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