added 'mini-menu' to result pages
Some checks failed
Run Integration Tests / test (push) Failing after 36s

This commit is contained in:
partisan 2024-12-07 23:07:19 +01:00
parent 7e573e6928
commit 287c7a7a1d
12 changed files with 266 additions and 189 deletions

View file

@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
<link rel="stylesheet" href="/static/css/style-fonts.css">
<link rel="stylesheet" href="/static/css/style-menu.css">
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
<!-- Icons -->
<link rel="icon" href="{{ .IconPathSVG }}" type="image/svg+xml">
@ -17,6 +18,41 @@
<link rel="apple-touch-icon" href="{{ .IconPathPNG }}">
</head>
<body>
<!-- Menu Button -->
<div id="content" class="js-enabled">
<div class="settings-search-div settings-search-div-search">
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
</div>
<div class="search-menu settings-menu-hidden">
<h2>Settings</h2>
<div class="settings-content">
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
<div class="theme-settings">
<p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
<div class="themes-settings-menu">
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
</div>
</div>
<select class="lang" name="safe" id="safeSearchSelect">
<option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
<option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
</select>
<select class="lang" name="lang" id="languageSelect">
{{range .LanguageOptions}}
<option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<!-- <button id="settingsButton" onclick="window.location.href='/about'">About QGato</button> -->
</div>
</div>
</div>
<noscript>
<div class="settings-search-div settings-search-div-search">
<a href="/settings" class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</a>
</div>
</noscript>
<form action="/search" id="prev-next-form" class="results-search-container" method="GET" autocomplete="off">
<h1 class="logomobile">
<div class="logo-container" herf="/">
@ -50,7 +86,7 @@
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="forum">&#xe0bf;</button> <!-- Forum icon -->
<button name="t" value="forum" class="clickable">{{ translate "forums" }}</button>
</div>
<div id="content" class="js-enabled">
<div id="content2" class="js-enabled">
<div class="search-container-results-btn">
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="map">&#xe55b;</button> <!-- Map icon -->
<button name="t" value="map" class="clickable">{{ translate "maps" }}</button>
@ -123,9 +159,9 @@
</div>
{{ end }}
<script defer src="/static/js/autocomplete.js"></script>
<script defer src="/static/js/minimenu.js"></script>
<script>
// Check if JavaScript is enabled and modify the DOM accordingly
document.getElementById('content').classList.remove('js-enabled');
document.querySelectorAll('.js-enabled').forEach(el => el.classList.remove('js-enabled'));
</script>
</body>
</html>

View file

@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
<link rel="stylesheet" href="/static/css/style-fonts.css">
<link rel="stylesheet" href="/static/css/style-menu.css">
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
<!-- Icons -->
<link rel="icon" href="{{ .IconPathSVG }}" type="image/svg+xml">
@ -17,6 +18,41 @@
<link rel="apple-touch-icon" href="{{ .IconPathPNG }}">
</head>
<body>
<!-- Menu Button -->
<div id="content" class="js-enabled">
<div class="settings-search-div settings-search-div-search">
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
</div>
<div class="search-menu settings-menu-hidden">
<h2>Settings</h2>
<div class="settings-content">
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
<div class="theme-settings">
<p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
<div class="themes-settings-menu">
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
</div>
</div>
<select class="lang" name="safe" id="safeSearchSelect">
<option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
<option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
</select>
<select class="lang" name="lang" id="languageSelect">
{{range .LanguageOptions}}
<option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<!-- <button id="settingsButton" onclick="window.location.href='/about'">About QGato</button> -->
</div>
</div>
</div>
<noscript>
<div class="settings-search-div settings-search-div-search">
<a href="/settings" class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</a>
</div>
</noscript>
<form action="/search" id="prev-next-form" class="results-search-container" method="GET" autocomplete="off">
<h1 class="logomobile">
<div class="logo-container" herf="/">
@ -50,7 +86,7 @@
<button id="sub-search-wrapper-ico" class="material-icons-round clickable search-active" name="t" value="forum">&#xe0bf;</button> <!-- Forum icon -->
<button name="t" value="forum" class="clickable search-active">{{ translate "forums" }}</button>
</div>
<div id="content" class="js-enabled">
<div id="content2" class="js-enabled">
<div class="search-container-results-btn">
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="map">&#xe55b;</button> <!-- Map icon -->
<button name="t" value="map" class="clickable">{{ translate "maps" }}</button>
@ -112,9 +148,9 @@
<div id="template-data" data-page="{{ .Page }}" data-query="{{ .Query }}" data-type="forum"></div>
<script defer src="/static/js/dynamicscrolling.js"></script>
<script defer src="/static/js/autocomplete.js"></script>
<script defer src="/static/js/minimenu.js"></script>
<script>
// Check if JavaScript is enabled and modify the DOM accordingly
document.getElementById('content').classList.remove('js-enabled');
document.querySelectorAll('.js-enabled').forEach(el => el.classList.remove('js-enabled'));
</script>
</body>
</html>

View file

@ -17,6 +17,7 @@
</noscript>
<link rel="stylesheet" href="/static/css/style-imageviewer.css">
<link rel="stylesheet" href="/static/css/style-fixedwidth.css">
<link rel="stylesheet" href="/static/css/style-menu.css">
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
<link rel="stylesheet" href="/static/css/style-fonts.css">
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
@ -26,6 +27,41 @@
<link rel="apple-touch-icon" href="{{ .IconPathPNG }}">
</head>
<body>
<!-- Menu Button -->
<div id="content" class="js-enabled">
<div class="settings-search-div settings-search-div-search">
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
</div>
<div class="search-menu settings-menu-hidden">
<h2>Settings</h2>
<div class="settings-content">
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
<div class="theme-settings">
<p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
<div class="themes-settings-menu">
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
</div>
</div>
<select class="lang" name="safe" id="safeSearchSelect">
<option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
<option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
</select>
<select class="lang" name="lang" id="languageSelect">
{{range .LanguageOptions}}
<option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<!-- <button id="settingsButton" onclick="window.location.href='/about'">About QGato</button> -->
</div>
</div>
</div>
<noscript>
<div class="settings-search-div settings-search-div-search">
<a href="/settings" class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</a>
</div>
</noscript>
<form action="/search" id="prev-next-form" class="results-search-container" method="GET" autocomplete="off">
<h1 class="logomobile">
<div class="logo-container" herf="/">
@ -60,7 +96,7 @@
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="forum">&#xe0bf;</button>
<button name="t" value="forum" class="clickable">{{ translate "forums" }}</button>
</div>
<div id="content" class="js-enabled">
<div id="content2" class="js-enabled">
<div class="search-container-results-btn">
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="map">&#xe55b;</button>
<button name="t" value="map" class="clickable">{{ translate "maps" }}</button>
@ -185,5 +221,9 @@
<script defer src="/static/js/imagetitletrim.js"></script>
<script defer src="/static/js/imageviewer.js"></script>
<script defer src="/static/js/dynamicscrollingimages.js"></script>
<script defer src="/static/js/minimenu.js"></script>
<script>
document.querySelectorAll('.js-enabled').forEach(el => el.classList.remove('js-enabled'));
</script>
</body>
</html>

View file

@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
<link rel="stylesheet" href="/static/css/style-fonts.css">
<link rel="stylesheet" href="/static/css/style-menu.css">
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css" />
@ -32,6 +33,41 @@
</style>
</head>
<body>
<!-- Menu Button -->
<div id="content" class="js-enabled">
<div class="settings-search-div settings-search-div-search">
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
</div>
<div class="search-menu settings-menu-hidden">
<h2>Settings</h2>
<div class="settings-content">
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
<div class="theme-settings">
<p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
<div class="themes-settings-menu">
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
</div>
</div>
<select class="lang" name="safe" id="safeSearchSelect">
<option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
<option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
</select>
<select class="lang" name="lang" id="languageSelect">
{{range .LanguageOptions}}
<option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<!-- <button id="settingsButton" onclick="window.location.href='/about'">About QGato</button> -->
</div>
</div>
</div>
<noscript>
<div class="settings-search-div settings-search-div-search">
<a href="/settings" class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</a>
</div>
</noscript>
<form action="/search" id="prev-next-form" class="results-search-container" method="GET" autocomplete="off">
<h1 class="logomobile">
<div class="logo-container" herf="/">
@ -159,7 +195,11 @@
map.on('locationfound', onLocationFound);
map.on('locationerror', onLocationError);
});
</script>
</script>
<script defer src="/static/js/minimenu.js"></script>
<script>
document.querySelectorAll('.js-enabled').forEach(el => el.classList.remove('js-enabled'));
</script>
{{ end }}
</body>
</html>

View file

@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
<link rel="stylesheet" href="/static/css/style-fonts.css">
<link rel="stylesheet" href="/static/css/style-menu.css">
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
<!-- Icons -->
<link rel="icon" href="{{ .IconPathSVG }}" type="image/svg+xml">
@ -17,6 +18,41 @@
<link rel="apple-touch-icon" href="{{ .IconPathPNG }}">
</head>
<body>
<!-- Menu Button -->
<div id="content" class="js-enabled">
<div class="settings-search-div settings-search-div-search">
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
</div>
<div class="search-menu settings-menu-hidden">
<h2>Settings</h2>
<div class="settings-content">
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
<div class="theme-settings">
<p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
<div class="themes-settings-menu">
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
</div>
</div>
<select class="lang" name="safe" id="safeSearchSelect">
<option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
<option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
</select>
<select class="lang" name="lang" id="languageSelect">
{{range .LanguageOptions}}
<option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<!-- <button id="settingsButton" onclick="window.location.href='/about'">About QGato</button> -->
</div>
</div>
</div>
<noscript>
<div class="settings-search-div settings-search-div-search">
<a href="/settings" class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</a>
</div>
</noscript>
<form action="/search" id="prev-next-form" class="results-search-container" method="GET" autocomplete="off">
<h1 class="logomobile">
<div class="logo-container" href="/">
@ -51,7 +87,7 @@
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="forum">&#xe0bf;</button>
<button name="t" value="forum" class="clickable">{{ translate "forums" }}</button>
</div>
<div id="content" class="js-enabled">
<div id="content2" class="js-enabled">
<div class="search-container-results-btn">
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="map">&#xe55b;</button>
<button name="t" value="map" class="clickable">{{ translate "maps" }}</button>
@ -99,22 +135,22 @@
<form action="/search" method="get">
<input type="hidden" name="q" value="{{ .Query }}">
<input type="hidden" name="t" value="text">
<div id="content" class="js-enabled">
<noscript>
{{ if .HasPrevPage }}
<button type="submit" name="p" value="{{ sub .Page 1 }}">{{ translate "previous" }}</button>
{{ end }}
{{ if .HasNextPage }}
<button type="submit" name="p" value="{{ add .Page 1 }}">{{ translate "next" }}</button>
{{ end }}
</div>
</noscript>
</form>
</div>
<div id="template-data" data-page="{{ .Page }}" data-query="{{ .Query }}" data-type="text"></div>
<script defer src="/static/js/dynamicscrolling.js"></script>
<script defer src="/static/js/autocomplete.js"></script>
<script defer src="/static/js/minimenu.js"></script>
<script>
// Check if JavaScript is enabled and modify the DOM accordingly
document.getElementById('content').classList.remove('js-enabled');
document.querySelectorAll('.js-enabled').forEach(el => el.classList.remove('js-enabled'));
</script>
</body>
</html>

View file

@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/style.css">
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
<link rel="stylesheet" href="/static/css/style-fonts.css">
<link rel="stylesheet" href="/static/css/style-menu.css">
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
<!-- Icons -->
<link rel="icon" href="{{ .IconPathSVG }}" type="image/svg+xml">
@ -17,6 +18,41 @@
<link rel="apple-touch-icon" href="{{ .IconPathPNG }}">
</head>
<body>
<!-- Menu Button -->
<div id="content" class="js-enabled">
<div class="settings-search-div settings-search-div-search">
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
</div>
<div class="search-menu settings-menu-hidden">
<h2>Settings</h2>
<div class="settings-content">
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
<div class="theme-settings">
<p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
<div class="themes-settings-menu">
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
</div>
</div>
<select class="lang" name="safe" id="safeSearchSelect">
<option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
<option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
</select>
<select class="lang" name="lang" id="languageSelect">
{{range .LanguageOptions}}
<option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
{{end}}
</select>
<!-- <button id="settingsButton" onclick="window.location.href='/about'">About QGato</button> -->
</div>
</div>
</div>
<noscript>
<div class="settings-search-div settings-search-div-search">
<a href="/settings" class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</a>
</div>
</noscript>
<form action="/search" id="prev-next-form" class="results-search-container" method="GET" autocomplete="off">
<h1 class="logomobile">
<div class="logo-container" herf="/">
@ -50,7 +86,7 @@
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="forum">&#xe0bf;</button>
<button name="t" value="forum" class="clickable">{{ translate "forums" }}</button>
</div>
<div id="content" class="js-enabled">
<div id="content2" class="js-enabled">
<div class="search-container-results-btn">
<button id="sub-search-wrapper-ico" class="material-icons-round clickable" name="t" value="map">&#xe55b;</button>
<button name="t" value="map" class="clickable">{{ translate "maps" }}</button>
@ -100,9 +136,9 @@
</form>
</div>
<script defer src="/static/js/autocomplete.js"></script>
<script defer src="/static/js/minimenu.js"></script>
<script>
// Check if JavaScript is enabled and modify the DOM accordingly
document.getElementById('content').classList.remove('js-enabled');
document.querySelectorAll('.js-enabled').forEach(el => el.classList.remove('js-enabled'));
</script>
</body>
</html>