Add a library placeholder

This commit is contained in:
Ben Visness 2021-10-23 11:14:10 -05:00
parent ccdbad8978
commit 6176744462
4 changed files with 22 additions and 0 deletions

View File

@ -535,6 +535,9 @@ func BuildBlogPostReply(projectSlug string, threadId int, postId int) string {
* Library
*/
// Any library route. Remove after we port the library.
var RegexLibraryAny = regexp.MustCompile(`^/library`)
var RegexLibrary = regexp.MustCompile(`^/library$`)
func BuildLibrary(projectSlug string) string {

View File

@ -0,0 +1,8 @@
{{ template "base.html" . }}
{{ define "content" }}
<div class="center ph2 pv5">
<h2>The library is coming back soon.</h2>
<p>The previous library wasn't everything we wanted it to be. Watch this space.</p>
</div>
{{ end }}

9
src/website/library.go Normal file
View File

@ -0,0 +1,9 @@
package website
func LibraryNotPortedYet(c *RequestContext) ResponseData {
baseData := getBaseData(c, "Library", nil)
var res ResponseData
res.MustWriteTemplate("library_not_ported_yet.html", baseData, c.Perf)
return res
}

View File

@ -269,6 +269,8 @@ func NewWebsiteRoutes(longRequestContext context.Context, conn *pgxpool.Pool, pe
return res
})
mainRoutes.GET(hmnurl.RegexLibraryAny, LibraryNotPortedYet)
// Other
mainRoutes.AnyMethod(hmnurl.RegexCatchAll, FourOhFour)