diff --git a/public/css/login.css b/public/css/login.css index 603a429b..4fb4305f 100644 --- a/public/css/login.css +++ b/public/css/login.css @@ -31,54 +31,3 @@ body { border-top-left-radius: 0; border-top-right-radius: 0; } - -.bd-placeholder-img { - font-size: 1.125rem; - text-anchor: middle; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} - -@media (min-width: 768px) { - .bd-placeholder-img-lg { - font-size: 3.5rem; - } -} - -.b-example-divider { - height: 3rem; - background-color: rgba(0, 0, 0, .1); - border: solid rgba(0, 0, 0, .15); - border-width: 1px 0; - box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); -} - -.b-example-vr { - flex-shrink: 0; - width: 1.5rem; - height: 100vh; -} - -.bi { - vertical-align: -.125em; - fill: currentColor; -} - -.nav-scroller { - position: relative; - z-index: 2; - height: 2.75rem; - overflow-y: hidden; -} - -.nav-scroller .nav { - display: flex; - flex-wrap: nowrap; - padding-bottom: 1rem; - margin-top: -1px; - overflow-x: auto; - text-align: center; - white-space: nowrap; - -webkit-overflow-scrolling: touch; -} diff --git a/public/js/app.js b/public/js/app.js index c24038e4..8c3daf1e 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -11,13 +11,16 @@ let ratingEditMode = false document.addEventListener('DOMContentLoaded', function () { const theme = document.cookie.split('; ').find((row) => row.startsWith('theme='))?.split('=')[1] ?? 'light'; - document.getElementById('darkModeInput').checked = theme !== 'light' + const darkModeInput = document.getElementById('darkModeInput'); + if (darkModeInput != null) { + darkModeInput.checked = theme !== 'light' + } const logPlayModalSearchInput = document.getElementById('logPlayModalSearchInput'); if (logPlayModalSearchInput != null) { logPlayModalSearchInput.addEventListener('change', updateLogPlayModalButtonState); - document.getElementById('logPlayModalSearchInput').addEventListener('input', updateLogPlayModalButtonState); - document.getElementById('logPlayModalSearchInput').addEventListener('keypress', loadLogModalSearchResultsOnEnterPress); + logPlayModalSearchInput.addEventListener('input', updateLogPlayModalButtonState); + logPlayModalSearchInput.addEventListener('keypress', loadLogModalSearchResultsOnEnterPress); new Datepicker(document.getElementById('logPlayModalWatchDateInput'), { format: document.getElementById('dateFormatJavascript').value, @@ -29,7 +32,7 @@ document.addEventListener('DOMContentLoaded', function () { }) document.getElementById('logPlayModal').addEventListener('hidden.bs.modal', function () { - document.getElementById('logPlayModalSearchInput').value = '' + logPlayModalSearchInput.value = '' resetLogModalLogInputs() resetLogModalSearchResults() backToLogModalSearchResults() @@ -153,7 +156,6 @@ function loadLogModalSearchResults(data) { let releaseYear = '?' if (item.release_date != null && item.release_date.length > 4) { - console.log(item.release_date) releaseYear = item.release_date.substring(0, 4) } @@ -211,9 +213,6 @@ async function selectLogModalTmdbItemForLogging(event) { document.getElementById('logPlayModalFooter').classList.remove('d-none') } -document.getElementById('logPlayModalSearchInput').addEventListener('change', updateLogPlayModalButtonState); -document.getElementById('logPlayModalSearchInput').addEventListener('input', updateLogPlayModalButtonState); - function updateLogPlayModalButtonState() { if (document.getElementById('logPlayModalSearchInput').value !== '') { document.getElementById('logPlayModalSearchButton').disabled = false; @@ -224,8 +223,6 @@ function updateLogPlayModalButtonState() { document.getElementById('logPlayModalSearchButton').disabled = true; } -document.getElementById('logPlayModalSearchInput').addEventListener('keypress', loadLogModalSearchResultsOnEnterPress); - function loadLogModalSearchResultsOnEnterPress(event) { // 13=enter, works better to check the key code because the key is named differently on mobile if (event.keyCode === 13) { @@ -316,7 +313,6 @@ function validateWatchDate(context, watchDate) { return false } - console.log(context + 'watchDateInput') document.getElementById(context + 'WatchDateInput').style.borderStyle = '' document.getElementById(context + 'WatchDateInput').style.borderColor = '' document.getElementById(context + 'RatingStars').style.marginTop = '0.5rem' @@ -419,11 +415,6 @@ function updateRatingStars(context, e) { setRatingStars(context, e.dataset.value) } -new Datepicker(document.getElementById('logPlayModalWatchDateInput'), { - format: document.getElementById('dateFormatJavascript').value, - title: 'Watch date', -}) - function toggleThemeSwitch() { if (document.getElementById('darkModeInput').checked === true) { setTheme('dark') diff --git a/public/serviceWorker.js b/public/serviceWorker.js index 89e93e18..5e5372e2 100644 --- a/public/serviceWorker.js +++ b/public/serviceWorker.js @@ -2,7 +2,6 @@ var staticDevCoffee = 'movary'; var assets = [ '/', '/index.php', - '/css/app.css', '/js/style.js' ]; diff --git a/templates/base.html.twig b/templates/base.html.twig index fc9d9936..e4725013 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -10,7 +10,6 @@ - {% block stylesheets %}{% endblock %}
diff --git a/templates/page/directors.html.twig b/templates/page/directors.html.twig index 23304321..c498da24 100644 --- a/templates/page/directors.html.twig +++ b/templates/page/directors.html.twig @@ -4,10 +4,6 @@ Watched Directors {% endblock %} -{% block stylesheets %} - -{% endblock %} - {% block scripts %} diff --git a/templates/page/history.html.twig b/templates/page/history.html.twig index b19aba17..27f7527b 100644 --- a/templates/page/history.html.twig +++ b/templates/page/history.html.twig @@ -4,10 +4,6 @@ History {% endblock %} -{% block stylesheets %} - -{% endblock %} - {% block scripts %} {% endblock %} diff --git a/templates/page/login.html.twig b/templates/page/login.html.twig index ef36f8d4..df6d424f 100644 --- a/templates/page/login.html.twig +++ b/templates/page/login.html.twig @@ -9,21 +9,23 @@ {% endblock %} {% block body %} +