temp dynmap landing

This commit is contained in:
cyber-dream 2024-01-08 16:43:51 +03:00
parent b5327c71fc
commit fcb7f22965
4 changed files with 107 additions and 80 deletions

View File

@ -712,12 +712,12 @@ document.getElementById('newsButton').onclick = () => {
} else {
$('#landingContainer *').attr('tabindex', '-1')
$('#newsContainer, #newsContainer *, #lower, #lower #center *').removeAttr('tabindex')
if(newsAlertShown){
$('#newsButtonAlert').fadeOut(2000)
newsAlertShown = false
ConfigManager.setNewsCacheDismissed(true)
ConfigManager.save()
}
// if(newsAlertShown){
// $('#newsButtonAlert').fadeOut(2000)
// newsAlertShown = false
// ConfigManager.setNewsCacheDismissed(true)
// ConfigManager.save()
// }
}
slide_(!newsActive)
newsActive = !newsActive
@ -909,24 +909,24 @@ async function initNews(){
* between articles. If you are on the landing page, the up arrow will
* open the news UI.
*/
document.addEventListener('keydown', (e) => {
if(newsActive){
if(e.key === 'ArrowRight' || e.key === 'ArrowLeft'){
document.getElementById(e.key === 'ArrowRight' ? 'newsNavigateRight' : 'newsNavigateLeft').click()
}
// Interferes with scrolling an article using the down arrow.
// Not sure of a straight forward solution at this point.
// if(e.key === 'ArrowDown'){
// document.getElementById('newsButton').click()
// }
} else {
if(getCurrentView() === VIEWS.landing){
if(e.key === 'ArrowUp'){
document.getElementById('newsButton').click()
}
}
}
})
// document.addEventListener('keydown', (e) => {
// if(newsActive){
// if(e.key === 'ArrowRight' || e.key === 'ArrowLeft'){
// document.getElementById(e.key === 'ArrowRight' ? 'newsNavigateRight' : 'newsNavigateLeft').click()
// }
// // Interferes with scrolling an article using the down arrow.
// // Not sure of a straight forward solution at this point.
// // if(e.key === 'ArrowDown'){
// // document.getElementById('newsButton').click()
// // }
// } else {
// if(getCurrentView() === VIEWS.landing){
// if(e.key === 'ArrowUp'){
// document.getElementById('newsButton').click()
// }
// }
// }
// })
/**
* Display a news article on the UI.

View File

@ -21,7 +21,8 @@ const VIEWS = {
loginOffline: '#loginOfflineContainer',
settings: '#settingsContainer',
welcome: '#welcomeContainer',
waiting: '#waitingContainer'
waiting: '#waitingContainer',
dynmap: '#dynmapContainer'
}
// The currently shown view container.

23
app/dynmap.ejs Normal file
View File

@ -0,0 +1,23 @@
<div id="dynmapContainer" style="display: none;">
PIZDAPIZDAPIDA
<div class="FloatingButtonContainer" id="center">
<div class="bot_wrapper">
<div id="content">
<button id="dynmapDoneButton"> <!-- Rename all elements to dynmapEtc -->
<div id="newsButtonAlert" style="display: none;"></div>
<svg id="newsButtonSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
&#10;<span id="dynmapDoneButtonText">MAP</span>
</button>
</div>
</div>
</div>
<div id="iframecontainer">
<iframe id="dynmapiframe" src="https://minemap.gregbrzezinski.com" frameborder="0"></iframe>
</div>
<script src="./assets/js/scripts/dynmap.js"></script>
</div>

View File

@ -159,62 +159,65 @@
</div>
</div>
<div id="newsContainer">
<div id="newsContent" article="-1" style="display: none;">
<div id="newsStatusContainer">
<div id="newsStatusContent">
<div id="newsTitleContainer">
<a id="newsArticleTitle" href="#">Lorem Ipsum</a>
</div>
<div id="newsMetaContainer">
<div id="newsArticleDateWrapper">
<span id="newsArticleDate">Mar 15, 44 BC, 9:14 AM</span>
</div>
<div id="newsArticleAuthorWrapper">
<span id="newsArticleAuthor">by Cicero</span>
</div>
<a href="#" id="newsArticleComments">0 Comments</a>
</div>
</div>
<div id="newsNavigationContainer">
<button id="newsNavigateLeft">
<svg id="newsNavigationLeftSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
</button>
<span id="newsNavigationStatus"><%- lang('landing.newsNavigationStatus', { currentPage: 1, totalPages: 1 }) %></span>
<button id="newsNavigateRight">
<svg id="newsNavigationRightSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
</button>
</div>
</div>
<div id="newsArticleContainer">
<div id="newsArticleContent">
<div id="newsArticleContentScrollable">
<!-- Article Content -->
</div>
</div>
</div>
</div>
<div id="newsErrorContainer">
<div id="newsErrorLoading">
<span id="nELoadSpan" class="newsErrorContent"><%- lang('landing.newsErrorLoadSpan') %></span>
</div>
<div id="newsErrorFailed" style="display: none;">
<span id="nEFailedSpan" class="newsErrorContent"><%- lang('landing.newsErrorFailedSpan') %></span>
<button id="newsErrorRetry"><%- lang('landing.newsErrorRetryButton') %></button>
</div>
<div id="newsErrorNone" style="display: none;">
<span id="nENoneSpan" class="newsErrorContent"><%- lang('landing.newsErrorNoneSpan') %></span>
</div>
<div id="dynmap-iframe-container">
PIZDA PIZDA PIZDA
</div>
<!-- <div id="newsContent" article="-1" style="display: none;">-->
<!-- <div id="newsStatusContainer">-->
<!-- <div id="newsStatusContent">-->
<!-- <div id="newsTitleContainer">-->
<!-- <a id="newsArticleTitle" href="#">Lorem Ipsum</a>-->
<!-- </div>-->
<!-- <div id="newsMetaContainer">-->
<!-- <div id="newsArticleDateWrapper">-->
<!-- <span id="newsArticleDate">Mar 15, 44 BC, 9:14 AM</span>-->
<!-- </div>-->
<!-- <div id="newsArticleAuthorWrapper">-->
<!-- <span id="newsArticleAuthor">by Cicero</span>-->
<!-- </div>-->
<!-- <a href="#" id="newsArticleComments">0 Comments</a>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div id="newsNavigationContainer">-->
<!-- <button id="newsNavigateLeft">-->
<!-- <svg id="newsNavigationLeftSVG" viewBox="0 0 24.87 13.97">-->
<!-- <defs>-->
<!-- <style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>-->
<!-- </defs>-->
<!-- <polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>-->
<!-- </svg>-->
<!-- </button>-->
<!-- <span id="newsNavigationStatus"><%- lang('landing.newsNavigationStatus', { currentPage: 1, totalPages: 1 }) %></span>-->
<!-- <button id="newsNavigateRight">-->
<!-- <svg id="newsNavigationRightSVG" viewBox="0 0 24.87 13.97">-->
<!-- <defs>-->
<!-- <style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>-->
<!-- </defs>-->
<!-- <polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>-->
<!-- </svg>-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div id="newsArticleContainer">-->
<!-- <div id="newsArticleContent">-->
<!-- <div id="newsArticleContentScrollable">-->
<!-- &lt;!&ndash; Article Content &ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div id="newsErrorContainer">-->
<!-- <div id="newsErrorLoading">-->
<!-- <span id="nELoadSpan" class="newsErrorContent"><%- lang('landing.newsErrorLoadSpan') %></span>-->
<!-- </div>-->
<!-- <div id="newsErrorFailed" style="display: none;">-->
<!-- <span id="nEFailedSpan" class="newsErrorContent"><%- lang('landing.newsErrorFailedSpan') %></span>-->
<!-- <button id="newsErrorRetry"><%- lang('landing.newsErrorRetryButton') %></button>-->
<!-- </div>-->
<!-- <div id="newsErrorNone" style="display: none;">-->
<!-- <span id="nENoneSpan" class="newsErrorContent"><%- lang('landing.newsErrorNoneSpan') %></span>-->
<!-- </div>-->
<!-- </div>-->
</div>
<script src="./assets/js/scripts/landing.js"></script>
</div>