Add a library placeholder
This commit is contained in:
parent
ccdbad8978
commit
6176744462
|
@ -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 {
|
||||
|
|
|
@ -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 }}
|
|
@ -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
|
||||
}
|
|
@ -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)
|
||||
|
||||
|
|
Reference in New Issue