From 19deb7c065bf81d1f02e9299e5df3f8aa9c4ad5f Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 18 Aug 2019 01:47:12 -0700 Subject: [PATCH] Add small announcement on /qa/. --- src/Miscellaneous/PSA.coffee | 9 +++++++++ src/css/style.css | 8 ++++++++ src/main/Main.coffee | 1 + 3 files changed, 18 insertions(+) create mode 100644 src/Miscellaneous/PSA.coffee diff --git a/src/Miscellaneous/PSA.coffee b/src/Miscellaneous/PSA.coffee new file mode 100644 index 000000000..9d9da56cf --- /dev/null +++ b/src/Miscellaneous/PSA.coffee @@ -0,0 +1,9 @@ +PSA = + init: -> + return unless g.SITE.software is 'yotsuba' + if g.BOARD.ID is 'qa' + announcement = <%= html('Stay in touch with your /qa/ friends!') %> + return unless announcement + el = $.el 'div', {className: 'fcx-announcement'}, announcement + $.onExists doc, '.boardBanner', (banner) -> + $.after banner, el diff --git a/src/css/style.css b/src/css/style.css index b1ac0a414..546218ad5 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -2433,3 +2433,11 @@ a:only-of-type > .remove { .postJumper > .next { font-size: 120%; } + +/* PSA */ +.fcx-announcement { + text-align: center; +} +.fcx-announcement a { + text-decoration: underline; +} diff --git a/src/main/Main.coffee b/src/main/Main.coffee index 62a78b77a..55c5d4f34 100644 --- a/src/main/Main.coffee +++ b/src/main/Main.coffee @@ -668,6 +668,7 @@ Main = ['Index Navigation', Nav] ['Keybinds', Keybinds] ['Banner', Banner] + ['Announcements', PSA] ['Flash Features', Flash] ['Reply Pruning', ReplyPruning] ['Mod Contact Links', ModContact]