diff --git a/src/site/api/routes.js b/src/site/api/routes.js index c1d3f9e..18be8f8 100644 --- a/src/site/api/routes.js +++ b/src/site/api/routes.js @@ -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" diff --git a/src/site/pug/home.pug b/src/site/pug/home.pug index 093b016..3900e6c 100644 --- a/src/site/pug/home.pug +++ b/src/site/pug/home.pug @@ -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 diff --git a/src/site/pug/posts_only.pug b/src/site/pug/posts_only.pug new file mode 100644 index 0000000..176b7cf --- /dev/null +++ b/src/site/pug/posts_only.pug @@ -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?] diff --git a/src/site/sass/includes/_main.sass b/src/site/sass/includes/_main.sass index 129d661..d37267b 100644 --- a/src/site/sass/includes/_main.sass +++ b/src/site/sass/includes/_main.sass @@ -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