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}) => {
|
||||
return render(403, "pug/posts_only.pug")
|
||||
|
||||
if (url.searchParams.has("u")) {
|
||||
let username = url.searchParams.get("u")
|
||||
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}) => {
|
||||
return render(403, "pug/posts_only.pug")
|
||||
|
||||
const username = fill[0]
|
||||
const type = fill[1] ? "igtv" : "timeline"
|
||||
|
||||
|
@ -14,11 +14,6 @@ html(lang=settings.language)
|
||||
|
||||
.go-sections-container(dir=ll.meta_direction)
|
||||
.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
|
||||
h2.title= ll.go_to_post
|
||||
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
|
||||
|
||||
.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
|
||||
h2= ll.about_bibliogram_header
|
||||
!= 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
|
||||
h2= ll.about_this_instance_header
|
||||
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
|
||||
background-color: map-get($theme, "background-power-secondary")
|
||||
color: map-get($theme, "foreground-power-secondary")
|
||||
padding: 50px 0px
|
||||
padding: 0px 0px 50px
|
||||
flex: 1
|
||||
min-height: 60vh
|
||||
|
||||
.notice
|
||||
background-color: map-get($theme, "background-power-tertiary")
|
||||
margin: 10px 0px
|
||||
padding: 20px 0px 10px
|
||||
|
||||
.about
|
||||
max-width: 700px
|
||||
margin: 0px auto
|
||||
@ -687,6 +682,11 @@ body
|
||||
.link-list
|
||||
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
|
||||
margin-bottom: 20px
|
||||
line-height: 1.4
|
||||
|
Loading…
Reference in New Issue
Block a user