From fce572823f288425d77ed62502ff6e2e7d71aae3 Mon Sep 17 00:00:00 2001 From: Brandon Rosage Date: Wed, 30 Jan 2019 09:20:51 -0600 Subject: [PATCH] layout logic bug fixes --- _includes/header.html | 2 ++ _layouts/sidebar.html | 30 +++++++++++++++++------------- _layouts/stacked.html | 10 ++++++---- _posts/2019-01-29-hello-world.md | 1 + _site/index.html | 32 +++++--------------------------- index.html | 1 - 6 files changed, 31 insertions(+), 45 deletions(-) diff --git a/_includes/header.html b/_includes/header.html index c738eca..c1f5de2 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -4,6 +4,8 @@ {% assign icon_color = "#24292e" %} {% endif %} +{% assign content = page.content | strip_newlines %} + {% assign posts_total = site.posts | size %} {% assign user = site.github.owner %} diff --git a/_layouts/sidebar.html b/_layouts/sidebar.html index 9650862..e9a5ca7 100644 --- a/_layouts/sidebar.html +++ b/_layouts/sidebar.html @@ -39,25 +39,29 @@
-
- {% if page.is_post %} -
-

{% octicon chevron-left height:16 class:"mr-2 v-align-middle" fill:{{ icon_color }} aria-label:Home %}Home

-

{{ page.title }}

-

Published {{ page.date | date: "%b %d, %Y"}}

+ {% unless content == "" %} +
+ {% if page.is_post %} +
+

{% octicon chevron-left height:16 class:"mr-2 v-align-middle" fill:{{ icon_color }} aria-label:Home %}Home

+

{{ page.title }}

+

Published {{ page.date | date: "%b %d, %Y"}}

+ {{ content }} +
+ {% else %} {{ content }} -
- {% else %} - {{ content }} - {% endif %} -
+ {% endif %} +
+ {% endunless %} {% unless page.is_post %} {% include projects.html %} - {% include interests.html %} + {% if site.topics %} + {% include interests.html %} + {% endif %} - {% unless post_size == 0 %} + {% unless posts_total == 0 %} {% include thoughts.html %} {% endunless %} {% endunless %} diff --git a/_layouts/stacked.html b/_layouts/stacked.html index 2c73367..744b2b9 100644 --- a/_layouts/stacked.html +++ b/_layouts/stacked.html @@ -51,11 +51,13 @@ {% include projects.html %}
-
- {% include interests.html %} -
+ {% if site.topics %} +
+ {% include interests.html %} +
+ {% endif %} - {% unless post_size == 0 %} + {% unless posts_total == 0 %}
{% include thoughts.html %}
diff --git a/_posts/2019-01-29-hello-world.md b/_posts/2019-01-29-hello-world.md index 2949788..97c4e3b 100644 --- a/_posts/2019-01-29-hello-world.md +++ b/_posts/2019-01-29-hello-world.md @@ -1,5 +1,6 @@ --- title: "Welcome to Jekyll!" +published: false --- **Hello world**, this is my first Jekyll blog post. diff --git a/_site/index.html b/_site/index.html index fbefee7..1fb1102 100644 --- a/_site/index.html +++ b/_site/index.html @@ -4,6 +4,8 @@ + + @@ -44,12 +46,7 @@
-
- - I have stuff to say here. - - -
+

My Projects

@@ -171,7 +168,8 @@
-

My Interests

+ +

My Interests

Topics that I want to learn more about.

@@ -221,27 +219,7 @@
- -

My Thoughts

-

Articles I've written.

-
- -
-
- -
Jan 29, 2019
-
- -
- -
diff --git a/index.html b/index.html index 9f78190..23a0325 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,3 @@ --- layout: sidebar --- -I have stuff to say here.