Skip to content

Commit

Permalink
add rss feed to header, tweak css a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
zachflower committed Jan 20, 2024
1 parent 5547dcd commit 327388b
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 10 deletions.
24 changes: 16 additions & 8 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
<header>
<hr />

<a href="{{ site.url | relative_url }}">{{ site.title | escape }}</a>
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<a href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}

<ul>
<li>
<a href="{{ site.url | relative_url }}">{{ site.title | escape }}</a>
</li>
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<li>
<a href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
</li>
{%- endif -%}
{%- endfor -%}
<li class="float-right">
<a href="/feed.xml">rss</a>
</li>
</ul>
<hr />
</header>
62 changes: 60 additions & 2 deletions _sass/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ $container-max-width: 1024px !default;

:root {
--link-color: green;
--text-color: #333333;
--header-color: #000000;
--code-color-1: #aaaaaa;
--code-color-2: #ffffcc;
--code-color-3: #F00000;
Expand Down Expand Up @@ -58,9 +60,46 @@ h5,
h6 {
font-size: $base-font-size;
margin: 0px;
margin-top: 1rem;
margin-top: 1.5rem;
margin-bottom: 1rem;
font-weight: bold;
color: var(--text-color);
color: var(--header-color);
}

h1 {
&:before {
content: "# ";
}
}

h2 {
&:before {
content: "## ";
}
}

h3 {
&:before {
content: "### ";
}
}

h4 {
&:before {
content: "#### ";
}
}

h5 {
&:before {
content: "##### ";
}
}

h6 {
&:before {
content: "###### ";
}
}

blockquote {
Expand Down Expand Up @@ -115,6 +154,25 @@ iframe {
margin: 3rem auto;
}

header {
ul {
list-style: none;

li {
display: inline-block;
margin-right: 1rem;

&:last-child {
margin-right: 0;
}

&.float-right {
float: right;
}
}
}
}

/**
* Layout
*/
Expand Down

0 comments on commit 327388b

Please sign in to comment.