diff --git a/src/hmnurl/urls.go b/src/hmnurl/urls.go index 6f0bf08..9709159 100644 --- a/src/hmnurl/urls.go +++ b/src/hmnurl/urls.go @@ -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 { diff --git a/src/templates/src/library_not_ported_yet.html b/src/templates/src/library_not_ported_yet.html new file mode 100644 index 0000000..c6a246c --- /dev/null +++ b/src/templates/src/library_not_ported_yet.html @@ -0,0 +1,8 @@ +{{ template "base.html" . }} + +{{ define "content" }} +
+

The library is coming back soon.

+

The previous library wasn't everything we wanted it to be. Watch this space.

+
+{{ end }} diff --git a/src/website/library.go b/src/website/library.go new file mode 100644 index 0000000..17d58c8 --- /dev/null +++ b/src/website/library.go @@ -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 +} diff --git a/src/website/routes.go b/src/website/routes.go index 1c0e365..b5f2e3c 100644 --- a/src/website/routes.go +++ b/src/website/routes.go @@ -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)