mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 08:07:30 +00:00
Posts only mode
This commit is contained in:
parent
39c8d7102f
commit
4607b1264e
@ -76,6 +76,8 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: `/u`, methods: ["GET"], code: async ({url}) => {
|
route: `/u`, methods: ["GET"], code: async ({url}) => {
|
||||||
|
return render(403, "pug/posts_only.pug")
|
||||||
|
|
||||||
if (url.searchParams.has("u")) {
|
if (url.searchParams.has("u")) {
|
||||||
let username = url.searchParams.get("u")
|
let username = url.searchParams.get("u")
|
||||||
username = username.replace(/^(https?:\/\/)?([a-z]+\.)?instagram\.com\//, "")
|
username = username.replace(/^(https?:\/\/)?([a-z]+\.)?instagram\.com\//, "")
|
||||||
@ -96,6 +98,8 @@ module.exports = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: `/u/(${constants.external.username_regex})(/channel)?`, methods: ["GET"], code: async ({req, url, fill}) => {
|
route: `/u/(${constants.external.username_regex})(/channel)?`, methods: ["GET"], code: async ({req, url, fill}) => {
|
||||||
|
return render(403, "pug/posts_only.pug")
|
||||||
|
|
||||||
const username = fill[0]
|
const username = fill[0]
|
||||||
const type = fill[1] ? "igtv" : "timeline"
|
const type = fill[1] ? "igtv" : "timeline"
|
||||||
|
|
||||||
|
@ -14,11 +14,6 @@ html(lang=settings.language)
|
|||||||
|
|
||||||
.go-sections-container(dir=ll.meta_direction)
|
.go-sections-container(dir=ll.meta_direction)
|
||||||
.go-sections
|
.go-sections
|
||||||
section
|
|
||||||
h2.title= ll.go_to_profile
|
|
||||||
form(method="get" action="/u" class=`dir-${ll.meta_direction}`).pair-entry
|
|
||||||
input(type="text" name="u" placeholder=ll.go_username_or_url).text
|
|
||||||
input(type="submit" value=ll.go_button).button
|
|
||||||
section
|
section
|
||||||
h2.title= ll.go_to_post
|
h2.title= ll.go_to_post
|
||||||
form(method="get" action="/p" class=`dir-${ll.meta_direction}`).pair-entry
|
form(method="get" action="/p" class=`dir-${ll.meta_direction}`).pair-entry
|
||||||
@ -26,15 +21,16 @@ html(lang=settings.language)
|
|||||||
input(type="submit" value=ll.go_button).button
|
input(type="submit" value=ll.go_button).button
|
||||||
|
|
||||||
.about-container(dir=ll.meta_direction)
|
.about-container(dir=ll.meta_direction)
|
||||||
|
section.notice
|
||||||
|
section.about
|
||||||
|
h2 Bibliogram is discontinued
|
||||||
|
p You can't view profiles anymore. You can only view individual posts.
|
||||||
|
p #[a(href="https://cadence.moe/blog/2022-09-01-discontinuing-bibliogram") Nooo! Why discontinued?]
|
||||||
|
|
||||||
section.about
|
section.about
|
||||||
h2= ll.about_bibliogram_header
|
h2= ll.about_bibliogram_header
|
||||||
!= ll.pug_about_bibliogram_content({link_to_featured_profiles: constants.featured_profiles.length})
|
!= ll.pug_about_bibliogram_content({link_to_featured_profiles: constants.featured_profiles.length})
|
||||||
|
|
||||||
.notice
|
|
||||||
section.about
|
|
||||||
h2= ll.experiencing_problems_header
|
|
||||||
p: a(href="https://lists.sr.ht/~cadence/bibliogram-announce/%3C20201218014302.855fa8a816be2f19da2f56e3%40disroot.org%3E")= ll.t_read_more_here
|
|
||||||
|
|
||||||
section.about
|
section.about
|
||||||
h2= ll.about_this_instance_header
|
h2= ll.about_this_instance_header
|
||||||
ul
|
ul
|
||||||
|
12
src/site/pug/posts_only.pug
Normal file
12
src/site/pug/posts_only.pug
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
include includes/error.pug
|
||||||
|
|
||||||
|
doctype html
|
||||||
|
html
|
||||||
|
head
|
||||||
|
title= `Only posts are available | Bibliogram`
|
||||||
|
include includes/head
|
||||||
|
body.error-page
|
||||||
|
+error(403, "Only posts are available", false)
|
||||||
|
| Bibliogram is discontinued.
|
||||||
|
| You can only view individual posts, not user profiles.
|
||||||
|
| #[a(href="https://cadence.moe/blog/2022-09-01-discontinuing-bibliogram") Nooo! Why discontinued?]
|
@ -665,15 +665,10 @@ body
|
|||||||
.about-container
|
.about-container
|
||||||
background-color: map-get($theme, "background-power-secondary")
|
background-color: map-get($theme, "background-power-secondary")
|
||||||
color: map-get($theme, "foreground-power-secondary")
|
color: map-get($theme, "foreground-power-secondary")
|
||||||
padding: 50px 0px
|
padding: 0px 0px 50px
|
||||||
flex: 1
|
flex: 1
|
||||||
min-height: 60vh
|
min-height: 60vh
|
||||||
|
|
||||||
.notice
|
|
||||||
background-color: map-get($theme, "background-power-tertiary")
|
|
||||||
margin: 10px 0px
|
|
||||||
padding: 20px 0px 10px
|
|
||||||
|
|
||||||
.about
|
.about
|
||||||
max-width: 700px
|
max-width: 700px
|
||||||
margin: 0px auto
|
margin: 0px auto
|
||||||
@ -687,6 +682,11 @@ body
|
|||||||
.link-list
|
.link-list
|
||||||
color: map-get($theme, "link-power")
|
color: map-get($theme, "link-power")
|
||||||
|
|
||||||
|
.notice
|
||||||
|
background-color: map-get($theme, "background-power-tertiary")
|
||||||
|
margin: 0px 0px 50px
|
||||||
|
padding: 20px 0px 10px
|
||||||
|
|
||||||
.featured-profiles
|
.featured-profiles
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
line-height: 1.4
|
line-height: 1.4
|
||||||
|
Loading…
Reference in New Issue
Block a user