From 404bf26376c99a432b456b0df0efdbc797953f5e Mon Sep 17 00:00:00 2001 From: Wingy Date: Tue, 14 Sep 2021 22:17:05 -0400 Subject: [PATCH] extract updateNotice to pug file --- views/includes/updateNotice.pug | 14 ++++++++++++++ views/layout.pug | 15 +-------------- 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 views/includes/updateNotice.pug diff --git a/views/includes/updateNotice.pug b/views/includes/updateNotice.pug new file mode 100644 index 0000000..b162cda --- /dev/null +++ b/views/includes/updateNotice.pug @@ -0,0 +1,14 @@ +if req.user && req.user.admin && _CC.updateNotice + .columns + .column + .column.is-narrow + .box + span.has-text-danger.is-size-4.has-text-weight-bold Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :) + br + span (you can turn this off with UPDATE_CHECK=false) + br + br + span Current: #{_CC.updateNotice.current} + br + span Latest: #{_CC.updateNotice.latest} + span.has-text-info(style='float: right;') This message is only visible to admins \ No newline at end of file diff --git a/views/layout.pug b/views/layout.pug index 7e8841a..21911cf 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -41,17 +41,4 @@ html(lang='en') h1 #{config.siteTitle} include includes/messages.pug block content - if req.user && req.user.admin && _CC.updateNotice - .columns - .column - .column.is-narrow - .box - span.has-text-danger.is-size-4.has-text-weight-bold Christmas Community is out of date. There may be new features or bug fixes. Consider updating! :) - br - span (you can turn this off with UPDATE_CHECK=false) - br - br - span Current: #{_CC.updateNotice.current} - br - span Latest: #{_CC.updateNotice.latest} - span.has-text-info(style='float: right;') This message is only visible to admins \ No newline at end of file + include includes/updateNotice.pug \ No newline at end of file