kopia lustrzana https://github.com/cblgh/lieu
/webring redirects to webring link
rodzic
44914e0f21
commit
e0f9c73fd0
|
@ -9,7 +9,7 @@
|
||||||
serendipitous connexions.
|
serendipitous connexions.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This instance indexes the <a href="{{ .Data.RingLink }}">{{ .Data.WebringName }}</a> - {{ .Data.DomainCount }} domains,
|
This instance indexes <a href="{{ .Data.RingLink }}">{{ .Data.WebringName }}</a>—{{ .Data.DomainCount }} domains,
|
||||||
{{ .Data.PageCount }} pages, {{ .Data.TermCount }} search terms.
|
{{ .Data.PageCount }} pages, {{ .Data.TermCount }} search terms.
|
||||||
Some domains of the webring have been filtered out for a better search experience,
|
Some domains of the webring have been filtered out for a better search experience,
|
||||||
see <a href="{{ .Data.FilteredLink }}">the filtered list</a>.
|
see <a href="{{ .Data.FilteredLink }}">the filtered list</a>.
|
||||||
|
|
|
@ -9,16 +9,18 @@
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<main>
|
<main>
|
||||||
<div class="lieu-container">
|
<div class="lieu-container">
|
||||||
<h1>
|
<div>
|
||||||
{{ .SiteName }}
|
<h1>
|
||||||
</h1>
|
{{ .SiteName }}
|
||||||
<h2>
|
</h1>
|
||||||
the search for the new—endless
|
<h2>
|
||||||
</h2>
|
the search for the new—endless
|
||||||
<form class="search-container">
|
</h2>
|
||||||
<input type="search" required minlength="1" name="q" placeholder="tracking" value="{{ .Data.Query }}" class="search-box">
|
<form class="search-container">
|
||||||
<button type="submit" class="search-button"></button>
|
<input type="search" required minlength="1" name="q" placeholder="tracking" value="{{ .Data.Query }}" class="search-box">
|
||||||
</form>
|
<button type="submit" class="search-button"></button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{{ template "footer" . }}
|
{{ template "footer" . }}
|
||||||
|
|
|
@ -127,6 +127,10 @@ func (h RequestHandler) randomRoute(res http.ResponseWriter, req *http.Request)
|
||||||
http.Redirect(res, req, link, http.StatusSeeOther)
|
http.Redirect(res, req, link, http.StatusSeeOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h RequestHandler) webringRoute(res http.ResponseWriter, req *http.Request) {
|
||||||
|
http.Redirect(res, req, h.config.General.URL, http.StatusSeeOther)
|
||||||
|
}
|
||||||
|
|
||||||
func (h RequestHandler) renderView(res http.ResponseWriter, tmpl string, view *TemplateView) {
|
func (h RequestHandler) renderView(res http.ResponseWriter, tmpl string, view *TemplateView) {
|
||||||
view.SiteName = h.config.General.Name
|
view.SiteName = h.config.General.Name
|
||||||
errTemp := templates.ExecuteTemplate(res, tmpl+".html", view)
|
errTemp := templates.ExecuteTemplate(res, tmpl+".html", view)
|
||||||
|
@ -140,6 +144,7 @@ func Serve(config types.Config) {
|
||||||
http.HandleFunc("/about", handler.aboutRoute)
|
http.HandleFunc("/about", handler.aboutRoute)
|
||||||
http.HandleFunc("/", handler.searchRoute)
|
http.HandleFunc("/", handler.searchRoute)
|
||||||
http.HandleFunc("/random", handler.randomRoute)
|
http.HandleFunc("/random", handler.randomRoute)
|
||||||
|
http.HandleFunc("/webring", handler.webringRoute)
|
||||||
http.HandleFunc("/filtered", handler.filteredRoute)
|
http.HandleFunc("/filtered", handler.filteredRoute)
|
||||||
|
|
||||||
fileserver := http.FileServer(http.Dir("html/assets/"))
|
fileserver := http.FileServer(http.Dir("html/assets/"))
|
||||||
|
|
Ładowanie…
Reference in New Issue