Skip to content

Commit

Permalink
layout logic bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonrosage committed Jan 30, 2019
1 parent 7c53411 commit fce5728
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 45 deletions.
2 changes: 2 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
30 changes: 17 additions & 13 deletions _layouts/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,29 @@ <h1 class="{% if site.style == 'dark' %}text-white{% endif %} mb-2 lh-condensed"
<div class="col-md-7 col-lg-8 col-xl-9 px-4 py-6 px-lg-7">
<div class="mx-auto" style="max-width: 900px;">

<div class="f4 {% if site.style == 'dark' %}text-white{% endif %} mb-6">
{% if page.is_post %}
<div class="f4 {% if site.style == 'dark' %}text-white{% endif %}">
<p class="f5"><a href="/" class="d-flex flex-items-center {% if site.style == 'dark' %}text-white{% endif %}">{% octicon chevron-left height:16 class:"mr-2 v-align-middle" fill:{{ icon_color }} aria-label:Home %}Home</a></p>
<h1 class="f00-light lh-condensed">{{ page.title }}</h1>
<p class="mb-5">Published {{ page.date | date: "%b %d, %Y"}}</p>
{% unless content == "" %}
<div class="f4 {% if site.style == 'dark' %}text-white{% endif %} mb-6">
{% if page.is_post %}
<div class="f4 {% if site.style == 'dark' %}text-white{% endif %}">
<p class="f5"><a href="/" class="d-flex flex-items-center {% if site.style == 'dark' %}text-white{% endif %}">{% octicon chevron-left height:16 class:"mr-2 v-align-middle" fill:{{ icon_color }} aria-label:Home %}Home</a></p>
<h1 class="f00-light lh-condensed">{{ page.title }}</h1>
<p class="mb-5">Published {{ page.date | date: "%b %d, %Y"}}</p>
{{ content }}
</div>
{% else %}
{{ content }}
</div>
{% else %}
{{ content }}
{% endif %}
</div>
{% endif %}
</div>
{% 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 %}
Expand Down
10 changes: 6 additions & 4 deletions _layouts/stacked.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ <h1 class="f00-light lh-condensed">{{ page.title }}</h1>
{% include projects.html %}
</div>

<div class="my-6">
{% include interests.html %}
</div>
{% if site.topics %}
<div class="my-6">
{% include interests.html %}
</div>
{% endif %}

{% unless post_size == 0 %}
{% unless posts_total == 0 %}
<div class="my-6">
{% include thoughts.html %}
</div>
Expand Down
1 change: 1 addition & 0 deletions _posts/2019-01-29-hello-world.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Welcome to Jekyll!"
published: false
---

**Hello world**, this is my first Jekyll blog post.
Expand Down
32 changes: 5 additions & 27 deletions _site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@





<!doctype html>
<html>
<head>
Expand Down Expand Up @@ -44,12 +46,7 @@ <h1 class=" mb-2 lh-condensed">Sophie Shepherd</h1>
<div class="col-md-7 col-lg-8 col-xl-9 px-4 py-6 px-lg-7">
<div class="mx-auto" style="max-width: 900px;">

<div class="f4 mb-6">

I have stuff to say here.


</div>



<h2 >My Projects</h2>
Expand Down Expand Up @@ -171,7 +168,8 @@ <h1 class="f4 lh-condensed mb-1">
</div>


<h2 >My Interests</h2>

<h2 >My Interests</h2>
<p class="f4 mb-4 text-gray">Topics that I want to learn more about.</p>
<div class="d-flex flex-wrap gutter-condensed mb-4">

Expand Down Expand Up @@ -221,27 +219,7 @@ <h2 >My Interests</h2>

</div>



<h2 >My Thoughts</h2>
<p class="f4 mb-4 text-gray">Articles I've written.</p>
<div class="d-sm-flex flex-wrap gutter-condensed mb-4">

<div class="col-sm-6 col-md-12 col-lg-6 col-xl-4 mb-3">
<div class="height-full text-left border border-gray-light bg-white rounded-1 p-3">
<div class="d-flex flex-justify-between flex-items-start mb-1">
<h1 class="f4 lh-condensed mb-1">
<a href="/2019/01/29/hello-world/">
Welcome to Jekyll!
</a>
</h1>
</div>
<div class="text-gray mb-2 ws-normal">Jan 29, 2019</div>
</div>

</div>

</div>



Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: sidebar
---
I have stuff to say here.

0 comments on commit fce5728

Please sign in to comment.