mirror of
				https://github.com/osmarks/mycorrhiza.git
				synced 2025-10-31 07:33:00 +00:00 
			
		
		
		
	Improve prev/next links
This commit is contained in:
		| @@ -41,10 +41,10 @@ If `contents` == "", a helpful message is shown instead. | ||||
| 	</article> | ||||
| 	<section class="prevnext"> | ||||
| 		{% if prevHyphaName != "" %} | ||||
| 		<a class="prevnext__el prevnext__prev" href="/page/{%s prevHyphaName %}">← {%s path.Base(prevHyphaName) %}</a> | ||||
| 		<a class="prevnext__el prevnext__prev" href="/page/{%s prevHyphaName %}" rel="prev">← {%s path.Base(prevHyphaName) %}</a> | ||||
| 		{% endif %} | ||||
| 		{% if nextHyphaName != "" %} | ||||
| 		<a class="prevnext__el prevnext__next" href="/page/{%s nextHyphaName %}">{%s path.Base(nextHyphaName) %} →</a> | ||||
| 		<a class="prevnext__el prevnext__next" href="/page/{%s nextHyphaName %}" rel="next">{%s path.Base(nextHyphaName) %} →</a> | ||||
| 		{% endif %} | ||||
| 	</section> | ||||
| 	<hr class="page-separator"/> | ||||
|   | ||||
| @@ -195,7 +195,7 @@ func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, navi | ||||
| //line templates/http_readers.qtpl:44 | ||||
| 		qw422016.E().S(prevHyphaName) | ||||
| //line templates/http_readers.qtpl:44 | ||||
| 		qw422016.N().S(`">← `) | ||||
| 		qw422016.N().S(`" rel="prev">← `) | ||||
| //line templates/http_readers.qtpl:44 | ||||
| 		qw422016.E().S(path.Base(prevHyphaName)) | ||||
| //line templates/http_readers.qtpl:44 | ||||
| @@ -214,7 +214,7 @@ func StreamPageHTML(qw422016 *qt422016.Writer, rq *http.Request, hyphaName, navi | ||||
| //line templates/http_readers.qtpl:47 | ||||
| 		qw422016.E().S(nextHyphaName) | ||||
| //line templates/http_readers.qtpl:47 | ||||
| 		qw422016.N().S(`">`) | ||||
| 		qw422016.N().S(`" rel="next">`) | ||||
| //line templates/http_readers.qtpl:47 | ||||
| 		qw422016.E().S(path.Base(nextHyphaName)) | ||||
| //line templates/http_readers.qtpl:47 | ||||
|   | ||||
| @@ -4,7 +4,6 @@ import ( | ||||
| 	"crypto/rand" | ||||
| 	"encoding/hex" | ||||
| 	"net/http" | ||||
| 	"path" | ||||
| 	"strings" | ||||
| ) | ||||
|  | ||||
| @@ -62,5 +61,5 @@ func BeautifulName(uglyName string) string { | ||||
| 	if uglyName == "" { | ||||
| 		return uglyName | ||||
| 	} | ||||
| 	return strings.Title(strings.ReplaceAll(path.Base(uglyName), "_", " ")) | ||||
| 	return strings.Title(strings.ReplaceAll(uglyName, "_", " ")) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bouncepaw
					bouncepaw