From 5ef9af5f0855df4adf85504203cd2265f1104b7c Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Thu, 16 Jul 2020 23:41:18 +1200 Subject: [PATCH] Write new timeline loading blocked notice --- src/site/api/routes.js | 10 +--------- src/site/pug/fragments/timeline_loading_blocked.pug | 7 +++++++ src/site/sass/includes/_main.sass | 13 +++++++++++++ 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 src/site/pug/fragments/timeline_loading_blocked.pug diff --git a/src/site/api/routes.js b/src/site/api/routes.js index bc73c36..de4d662 100644 --- a/src/site/api/routes.js +++ b/src/site/api/routes.js @@ -160,15 +160,7 @@ module.exports = [ withInstancesLink: false }) } else if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.RATE_LIMITED) { - return render(503, "pug/friendlyerror.pug", { - statusCode: 503, - title: "Timeline loading blocked", - message: "Timeline loading blocked", - explanation: - "Instagram blocked this server for requesting too many timeline pages." - +"\nThis block is not permanent, and will expire soon." - +"\nPlease wait a few minutes before trying again." - }) + return render(503, "pug/fragments/timeline_loading_blocked.pug") } else { throw error } diff --git a/src/site/pug/fragments/timeline_loading_blocked.pug b/src/site/pug/fragments/timeline_loading_blocked.pug new file mode 100644 index 0000000..9788629 --- /dev/null +++ b/src/site/pug/fragments/timeline_loading_blocked.pug @@ -0,0 +1,7 @@ +.error-fragment + .message Timeline loading blocked + .explanation. + Instagram blocked this server for requesting too many timeline pages. + This block is not permanent, and will expire soon. + Please wait a few minutes before trying again. + Or, you could try #[a(href="https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md") browsing Bibliogram on another instance.] diff --git a/src/site/sass/includes/_main.sass b/src/site/sass/includes/_main.sass index 1938457..e5d7ec6 100644 --- a/src/site/sass/includes/_main.sass +++ b/src/site/sass/includes/_main.sass @@ -534,6 +534,19 @@ body &:target display: block +.error-fragment + text-align: center + padding: 30px 10px + + .message + font-size: 32px + margin-bottom: 10px + + .explanation + font-size: 20px + white-space: pre-line + line-height: 1.3 + .homepage display: flex flex-direction: column