Automate more code

This commit is contained in:
2020-03-04 07:58:52 +00:00
parent 89e3823781
commit 7b0082f7b9
29 changed files with 30 additions and 50 deletions

View File

@@ -14,7 +14,7 @@
<main class="main-content" id="main-content">
<div class="mdc-top-app-bar--short-fixed-adjust">
<div class="parallax-section article-title-section" data-jarallax data-speed="0.4" style="background-image: url('/images/{{ page.url | relative_url | remove: '.html' | replace: '/', '-' | remove: '-articles-' }}.jpg');">
<div class="parallax-section article-title-section" data-jarallax data-speed="{{ site.parallax-speed }}" style="background-image: url('/images/{{ page.url | relative_url | remove: '.html' | replace: '/', '-' | remove: '-articles-' }}.jpg');">
<h2 class="mdc-typography--headline3">{{ page.title }}</h2>
</div>
<figcaption class="mdc-typography--caption-text">{{ page.image-caption }}</figcaption>

View File

@@ -14,8 +14,7 @@
<main class="main-content" id="main-content">
<div class="mdc-top-app-bar--short-fixed-adjust">
<div class="parallax-section article-title-section" data-jarallax data-speed="0.4"
style="background-image: url('/images/{{ page.url | relative_url | remove: '.html' | replace: '/', '-' | remove: '-articles-' }}.jpg');">
<div class="parallax-section article-title-section" data-jarallax data-speed="{{ site.parallax-speed }}" style="background-image: url('/images/{{ page.url | relative_url | remove: '.html' | replace: '/', '-' | remove: '-articles-' }}.jpg');">
<h2 class="mdc-typography--headline3">{{ page.title }}</h2>
</div>
<figcaption class="mdc-typography--caption-text">{{ page.image-caption }}</figcaption>

View File

@@ -14,8 +14,7 @@
<main class="main-content" id="main-content">
<div class="mdc-top-app-bar--short-fixed-adjust">
<div class="parallax-section article-title-section" data-jarallax data-speed="0.4"
style="background-image: url('/images/{{ page.url | relative_url | remove: '.html' | replace: '/', '-' | remove: '-articles-' }}.jpg');">
<div class="parallax-section article-title-section" data-jarallax data-speed="{{ site.parallax-speed }}" style="background-image: url('/images/{{ page.url | relative_url | remove: '.html' | replace: '/', '-' | remove: '-articles-' }}.jpg');">
<h2 class="mdc-typography--headline3">{{ page.title }}</h2>
</div>
<figcaption class="mdc-typography--caption-text">{{ page.image-caption }}</figcaption>

View File

@@ -1,8 +1,13 @@
<!DOCTYPE html>
<html>
{% include head.html %}
{% assign pageyear = page.url | relative_url | remove: '.html' | remove: '/' %}
<!-- overwrite default title and description -->
<meta name="apple-mobile-web-app-title" content="{{ pageyear }} | BBC Young Reporter | Reading School">
<title>{{ pageyear }} | BBC Young Reporter | Reading School</title>
<meta name="description" content="News articles written by Reading School students in year 8, in {{ pageyear }}">
<link href="/css/article-list.css" rel="stylesheet">
<link href="/css/year.css" rel="stylesheet">
{% include head.html %}
<body>
<!-- cookie notice is included automatically -->
{% include cookie-notice.html %}
@@ -15,8 +20,7 @@
<main class="main-content" id="main-content">
<div class="mdc-top-app-bar--short-fixed-adjust">
{% assign pageyear = page.url | relative_url | remove: '.html' | remove: '/' %}
<div class="year-header parallax-section" data-jarallax data-speed="0.4" style="background-image: url('/images/backgrounds/{{ pageyear }}.jpg');">
<div class="year-header parallax-section" data-jarallax data-speed="{{ site.parallax-speed }}" style="background-image: url('/images/backgrounds/{{ pageyear }}.jpg');">
<h1 class="mdc-typography--headline1">{{ pageyear }}</h1>
</div>
<div class="splitter"></div>