Indexing update #1

Merged
partisan merged 9 commits from indexing into main 2025-01-05 21:17:34 +00:00
9 changed files with 37 additions and 16 deletions
Showing only changes of commit 8700035893 - Show all commits

View file

@ -56,7 +56,7 @@ func handleFileSearch(w http.ResponseWriter, settings UserSettings, query string
"Category": "all",
"Sort": "seed",
"Page": page,
"HasPrevPage": page > 1,
"HasPrevPage": page >= 1,
"HasNextPage": len(combinedResults) > 0,
"LanguageOptions": languageOptions,
"CurrentLang": settings.SearchLanguage,

View file

@ -118,7 +118,8 @@ func handleForumsSearch(w http.ResponseWriter, settings UserSettings, query stri
"Page": page,
"Fetched": fmt.Sprintf("%.2f %s", elapsedTime.Seconds(), Translate("seconds")), // Time for fetching results
"HasPrevPage": page > 1,
"HasNextPage": len(results) == 25, // Assuming 25 results per page
"HasNextPage": len(results) >= 25,
"NoResults": len(results) == 0,
"LanguageOptions": languageOptions,
"CurrentLang": settings.SearchLanguage,
"Theme": settings.Theme,

View file

@ -1158,17 +1158,20 @@ p {
border-radius: 8px;
position: relative;
border: 1px solid var(--snip-border);
margin-left: 175px;
color: var(--fg);
width: 530px;
padding: 15px;
margin-bottom: 627px;
margin-top: -20px;
margin-top: 20px;
font-size: 14px;
line-height: 1.58;
letter-spacing: normal;
}
.no-results-found-offset {
margin-left: 175px;
}
/* MAP */
.message {

View file

@ -173,11 +173,13 @@
{{ end }}
</form>
</div>
{{ else }}
<div class="no-results-found">
{{else if .NoResults}}
<div class="no-results-found no-results-found-offset">
{{ translate "no_results_found" .Query }}<br>
{{ translate "suggest_rephrase" }}
</div>
{{else}}
<div class="no-results-found no-results-found-offset">{{ translate "no_more_results" }}</div>
{{end}}
<script defer src="/static/js/autocomplete.js"></script>
<script defer src="/static/js/minimenu.js"></script>

View file

@ -143,9 +143,12 @@
<br>
{{end}}
{{else if .NoResults}}
<div class="no-results">{{ translate "no_results" .Query }}</div>
<div class="no-results-found">
{{ translate "no_results_found" .Query }}<br>
{{ translate "suggest_rephrase" }}
</div>
{{else}}
<div class="no-more-results">{{ translate "no_more_results" }}</div>
<div class="no-results-found">{{ translate "no_more_results" }}</div>
{{end}}
</div>
<div class="message-bottom-left" id="message-bottom-left">

View file

@ -226,9 +226,12 @@
</div>
</noscript>
{{ else if .NoResults }}
<div class="no-results">{{ translate "no_results" .Query }}</div>
<div class="no-results-found no-results-found-offset">
{{ translate "no_results_found" .Query }}<br>
{{ translate "suggest_rephrase" }}
</div>
{{ else }}
<div class="no-more-results">{{ translate "no_more_results" }}</div>
<div class="no-results-found no-results-found-offset">{{ translate "no_more_results" }}</div>
{{ end }}
</div>
<div class="message-bottom-left" id="message-bottom-left">

View file

@ -144,9 +144,12 @@
<br>
{{end}}
{{else if .NoResults}}
<div class="no-results">{{ translate "no_results" .Query }}</div>
<div class="no-results-found">
{{ translate "no_results_found" .Query }}<br>
{{ translate "suggest_rephrase" }}
</div>
{{else}}
<div class="no-more-results">{{ translate "no_more_results" }}</div>
<div class="no-results-found">{{ translate "no_more_results" }}</div>
{{end}}
</div>
<div class="message-bottom-left" id="message-bottom-left">

View file

@ -141,8 +141,13 @@
</div>
</div>
{{ end }}
{{else if .NoResults}}
<div class="no-results-found no-results-found-offset">
{{ translate "no_results_found" .Query }}<br>
{{ translate "suggest_rephrase" }}
</div>
{{else}}
<div class="no-results">{{ translate "no_results" .Query }}</div>
<div class="no-results-found no-results-found-offset">{{ translate "no_more_results" }}</div>
{{end}}
<div class="prev-next prev-img" id="prev-next">
<form action="/search" method="get">

View file

@ -170,6 +170,7 @@ func handleVideoSearch(w http.ResponseWriter, settings UserSettings, query strin
"Page": page,
"HasPrevPage": page > 1,
"HasNextPage": len(results) > 0,
"NoResults": len(results) == 0,
"LanguageOptions": languageOptions,
"CurrentLang": settings.SearchLanguage,
"Theme": settings.Theme,