From 42afdbefaa4a414cb65e2e3520883152e20465c1 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 11 Sep 2017 10:24:30 +0200 Subject: [PATCH 1/2] add announcements in sidebar --- website_assets/pelicanconf.py | 3 +++ .../templates/includes/announcements.html | 11 +++++++++++ .../templates/includes/sidebar.html | 1 + 3 files changed, 15 insertions(+) create mode 100644 website_assets/themes/pelican-bootstrap3/templates/includes/announcements.html diff --git a/website_assets/pelicanconf.py b/website_assets/pelicanconf.py index 01ef7ec..7e93da0 100644 --- a/website_assets/pelicanconf.py +++ b/website_assets/pelicanconf.py @@ -23,6 +23,9 @@ LINKS = (('This course on edX', 'http://tiny.cc/topocm'), ('Course chat', 'https://meso.tnw.tudelft.nl/topocondmat'), ('Source code', 'https://github.com/topocm/topocm_content'),) +ANNOUNCEMENTS = (('Hi there, this is an announcement.'), + ('And this too!'),) + DEFAULT_PAGINATION = 10 diff --git a/website_assets/themes/pelican-bootstrap3/templates/includes/announcements.html b/website_assets/themes/pelican-bootstrap3/templates/includes/announcements.html new file mode 100644 index 0000000..93c7c7f --- /dev/null +++ b/website_assets/themes/pelican-bootstrap3/templates/includes/announcements.html @@ -0,0 +1,11 @@ +{% if ANNOUNCEMENTS %} +
  • Announcements

    + +
  • +{% endif %} diff --git a/website_assets/themes/pelican-bootstrap3/templates/includes/sidebar.html b/website_assets/themes/pelican-bootstrap3/templates/includes/sidebar.html index c59b8f0..9953052 100755 --- a/website_assets/themes/pelican-bootstrap3/templates/includes/sidebar.html +++ b/website_assets/themes/pelican-bootstrap3/templates/includes/sidebar.html @@ -100,6 +100,7 @@ {% include 'includes/github.html' %} {% include 'includes/twitter_timeline.html' %} {% include 'includes/links.html' %} + {% include 'includes/announcements.html' %} {% include 'includes/sidebar-images.html' %} -- GitLab From 7bd013a98e11208a4e395b4b67c2f2d83aabf832 Mon Sep 17 00:00:00 2001 From: Anton Akhmerov Date: Sun, 8 Oct 2017 20:04:04 +0200 Subject: [PATCH 2/2] update the announcement text --- website_assets/pelicanconf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website_assets/pelicanconf.py b/website_assets/pelicanconf.py index 7e93da0..d4ca8c3 100644 --- a/website_assets/pelicanconf.py +++ b/website_assets/pelicanconf.py @@ -23,8 +23,12 @@ LINKS = (('This course on edX', 'http://tiny.cc/topocm'), ('Course chat', 'https://meso.tnw.tudelft.nl/topocondmat'), ('Source code', 'https://github.com/topocm/topocm_content'),) -ANNOUNCEMENTS = (('Hi there, this is an announcement.'), - ('And this too!'),) +ANNOUNCEMENTS = ( + ('' + 'We have a PhD position open'), +) + + DEFAULT_PAGINATION = 10 -- GitLab