From d41b6e113584ed59cf92939be5de41ec1aafaf26 Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Wed, 4 Mar 2020 09:49:51 +0000 Subject: [PATCH] Reduce duplicated code and automate more things Also change styling for article captions (author/when published) --- _includes/article-heading.html | 9 +++++++++ _includes/image.html | 4 ++++ _includes/mdc-card.html | 16 ++++++++++++++++ _layouts/image-article.html | 10 +--------- _layouts/sound-article.html | 11 +---------- _layouts/video-article.html | 11 +---------- _layouts/year.html | 17 +---------------- ...-been-found-so-what-are-we-doing-about-it.md | 3 ++- ...he-roads-around-your-home-and-school-safe.md | 13 ++++--------- ...eek-real-life-issues-inspire-sarah-govett.md | 8 +++----- _posts/2019-03-06-finished-product.md | 1 + ...sa-parks-is-most-inspirational-woman-ever.md | 8 +++----- ...ate-as-redevelopment-plans-are-called-out.md | 8 +++----- ...games-virtual-fantasy-or-a-virtual-prison.md | 8 +++----- ...-06-what-is-in-the-patients-best-interest.md | 3 ++- .../2019-03-06-whats-next-for-reading-prison.md | 8 +++----- ...019-03-06-young-reporter-team-ready-to-go.md | 3 ++- index.md | 17 +---------------- 18 files changed, 60 insertions(+), 98 deletions(-) create mode 100644 _includes/article-heading.html create mode 100644 _includes/image.html create mode 100644 _includes/mdc-card.html diff --git a/_includes/article-heading.html b/_includes/article-heading.html new file mode 100644 index 0000000..3aeae19 --- /dev/null +++ b/_includes/article-heading.html @@ -0,0 +1,9 @@ +
+

{{ page.title }}

+
+
{{ page.image-caption }} • © {{ page.copyright }}
+ +

+ + • by {{ page.authors }} +

\ No newline at end of file diff --git a/_includes/image.html b/_includes/image.html new file mode 100644 index 0000000..f3f63e1 --- /dev/null +++ b/_includes/image.html @@ -0,0 +1,4 @@ +
+ +
{{ include.caption }} • © {{ include.copyright }}
+
\ No newline at end of file diff --git a/_includes/mdc-card.html b/_includes/mdc-card.html new file mode 100644 index 0000000..d8412bd --- /dev/null +++ b/_includes/mdc-card.html @@ -0,0 +1,16 @@ +
+
+
+

{{ include.article.title }}

+

+ + • by {{ include.article.authors }} +

+
{{ include.article.description }}
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/_layouts/image-article.html b/_layouts/image-article.html index b1608e0..e24ae2a 100644 --- a/_layouts/image-article.html +++ b/_layouts/image-article.html @@ -14,15 +14,7 @@
-
-

{{ page.title }}

-
-
{{ page.image-caption }}
- -

- - | by {{ page.authors }} -

+ {% include article-heading.html %}
{{ content }}
diff --git a/_layouts/sound-article.html b/_layouts/sound-article.html index 05bcd41..e56674e 100644 --- a/_layouts/sound-article.html +++ b/_layouts/sound-article.html @@ -14,16 +14,7 @@
-
-

{{ page.title }}

-
-
{{ page.image-caption }}
- -

- - | by {{ page.authors }} -

+ {% include article-heading.html %}