1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2025-12-15 02:45:09 +00:00

Implement SPA setting (closes #35)

This commit is contained in:
Cadence Ember
2020-05-06 02:14:11 +12:00
parent 850ea94ae8
commit d83a5de095
5 changed files with 22 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
//- Needs website_origin, title, post
//- Needs website_origin, title, post, settings
include includes/post
@@ -7,7 +7,8 @@ html
head
title= title
include includes/head
script(type="module" src=getStaticURL("html", "/static/js/post_overlay.js"))
if settings.spa
script(type="module" src=getStaticURL("html", "/static/js/post_overlay.js"))
meta(property="og:url" content=`${website_origin}/p/${post.data.shortcode}`)
meta(property="og:type" content="article")
- let firstEntry = post.children[0]

View File

@@ -49,7 +49,7 @@ html
+checkbox("link_hashtags", "Clickable hashtags", "Clickable", true)
+checkbox("spa", "Fast navigation", "Enabled", true)
+checkbox("spa", "Fast navigation", "Enabled", false)
+fieldset("Appearance")
+select("theme", "Theme", true, [

View File

@@ -1,4 +1,4 @@
//- Needs user, followerCountsAvailable, url, constants
//- Needs user, followerCountsAvailable, url, constants, settings
include includes/timeline_page.pug
include includes/next_page_button.pug
@@ -15,7 +15,10 @@ html
else
title= `@${user.data.username} | Bibliogram`
include includes/head
script(src=getStaticURL("html", "/static/js/post_overlay.js") type="module")
if settings.spa
script(src=getStaticURL("html", "/static/js/post_overlay.js") type="module")
else
script(src=getStaticURL("html", "/static/js/pagination.js") type="module")
meta(property="og:url" content=`${constants.website_origin}/u/${user.data.username}`)
meta(property="og:type" content="profile")
meta(property="og:title" content=(user.data.full_name || user.data.username))