From 33d024c4f1f4e523e888972ba63c399a18ff43ba Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 11 Apr 2022 16:31:40 -0500 Subject: [PATCH] Split default.html into two files to allow for special pages --- _includes/header.html | 8 ++ _layouts/base.html | 64 ++++++++++++++++ _layouts/default.html | 167 +++++++++++++----------------------------- 3 files changed, 123 insertions(+), 116 deletions(-) create mode 100644 _includes/header.html create mode 100644 _layouts/base.html diff --git a/_includes/header.html b/_includes/header.html new file mode 100644 index 0000000..b857d37 --- /dev/null +++ b/_includes/header.html @@ -0,0 +1,8 @@ +
Ryan Walters
+ \ No newline at end of file diff --git a/_layouts/base.html b/_layouts/base.html new file mode 100644 index 0000000..08d3ce6 --- /dev/null +++ b/_layouts/base.html @@ -0,0 +1,64 @@ +--- +layout: compress +--- + + + + + + + + + + + + {%- if page.title %} + {{- page.title -}}{{- " " -}}|{{- " " -}} + {%- endif -%} + {{- site.title -}} + + + + + + + + {% if page._preview_description and page.title or page.name == "index.html" -%} + + + + + {% if page._preview_description -%} + + + {% endif -%} + {%- if page._preview_image -%} + + + + {%- else -%} + + {%- endif -%} + {%- endif %} + + + + + {% if page.layout == "posts" %} + + {% endif %} + + + {{ content }} + + diff --git a/_layouts/default.html b/_layouts/default.html index db94380..04c5088 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,120 +1,55 @@ --- -layout: compress +layout: base --- - - - - - - - - - - - - {%- if page.title %} - {{- page.title -}}{{- " " -}}|{{- " " -}} - {%- endif -%} - {{- site.title -}} - - - - - - - - {% if page._preview_description and page.title or page.name == "index.html" -%} - - - - - {% if page._preview_description -%} - - - {% endif -%} - {%- if page._preview_image -%} - - - - {%- else -%} - - {%- endif -%} - {%- endif %} - - - - - {% if page.layout == "posts" %} - - {% endif %} - - -
Ryan Walters
- - {% if page.hide_header or layout.hide_header %} - {% else %} - {% if page.title %} - {% if page.date %} - {% if page._link %} -

- - {{ page.title }} - -

- {% else %} -

{{ page.title }}

- {% endif %} - {% else %} -

{{ page.title }}

- {% endif %} - {% endif %} - {% endif %} +
+ {% include header.html %} + {% if page.hide_header or layout.hide_header %} + {% else %} + {% if page.title %} + {% if page.date %} + {% if page._link %} +

+ + {{ page.title }} + +

+ {% else %} +

{{ page.title }}

+ {% endif %} + {% else %} +

{{ page.title }}

+ {% endif %} + {% endif %} + {% endif %} - {% if page.date %} -

- - - - - {%- for tag in page.tags -%} - {{- " " -}}{{- tag -}} - {%- endfor -%} - - {% endif %} -

- {{ content }} -
-

- {% if page.custom_js %} - {% for file in page.custom_js %} - - {% endfor %} - {% endif %} - {% if layout.medium_zoom %} - - - {% endif %} -

- - - + {% if page.date %} +

+ + + + + {%- for tag in page.tags -%} + {{- " " -}}{{- tag -}} + {%- endfor -%} + + {% endif %} +

+ {{ content }} +
+

+ {% if page.custom_js %} + {% for file in page.custom_js %} + + {% endfor %} + {% endif %} + {% if layout.medium_zoom %} + + + {% endif %} +

+
\ No newline at end of file