Skip to content

Commit 363ebd2

Browse files
committed
Design changes
1 parent 09dcdcd commit 363ebd2

File tree

8 files changed

+140
-136
lines changed

8 files changed

+140
-136
lines changed

docs/_includes/categories.html

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/_includes/nav.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<nav>
2+
<!--div id="logo">
3+
<a href="/"><img src="/assets/composed.png" /></a>
4+
</div-->
5+
<div id="categories">
6+
<a href="/">All</a> ({{ site.posts | where_exp:"post","post.sitemap != false" | size }}),
7+
<a href="/python/">Python</a> ({{ site.categories.python | where_exp: "post","post.sitemap != false" | size }}),
8+
<a href="/jsonrpc/">JSON-RPC</a> ({{ site.categories.jsonrpc | where_exp: "post","post.sitemap != false" | size }}),
9+
<a href="/airflow/">Airflow</a> ({{ site.categories.airflow | where_exp: "post","post.sitemap != false" | size }}),
10+
<a href="/haskell/">Haskell</a> ({{ site.categories.haskell | where_exp: "post","post.sitemap != false" | size }})
11+
</div>
12+
</nav>
13+

docs/_includes/post_link_td.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
<tr>
2-
<td class="date">
3-
<span>{{ post.date | date: "%-d %b %y" }}</span>
4-
</td>
5-
<td class="title">
6-
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
7-
</td>
8-
</td>
1+
<div class="date">
2+
{{ post.date | date: "%-d %b %y" }}
3+
</div>
4+
<div class="link">
5+
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
6+
</div>

docs/_layouts/all.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@
3737
{% seo %}
3838
</head>
3939
<body>
40-
<nav>
41-
<div class="logo">
42-
<a href="/"><img src="/assets/composed.png" /></a>
43-
</div>
44-
</nav>
45-
<main>
46-
{{ content }}
47-
</main>
40+
{{ content }}
4841
</body>
4942
</html>

docs/_layouts/category.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
---
22
layout: all
33
---
4-
{% include categories.html %}
4+
{% include nav.html %}
55
{% assign posts = site.posts | where_exp:"post","post.category == page.category" | where_exp:"post","post.sitemap != false" | sort: 'date' | reverse %}
66

7-
<main id="post-list">
8-
<img src="/assets/{{page.category}}.png" style="display: block; margin: auto" />
9-
<h1 class="category-title">{{page.title}}</h1>
7+
<main>
8+
<div id="post-list">
9+
<img id="category-logo" src="/assets/{{page.category}}.png" />
10+
<h1 class="category-title">{{page.title}}</h1>
1011

11-
<table>
12-
{% for post in posts %}
13-
{% include post_link_td.html %}
14-
{% endfor %}
15-
</table>
16-
</div>
12+
<table>
13+
{% for post in posts %}
14+
{% include post_link_td.html %}
15+
{% endfor %}
16+
</table>
17+
</div>
18+
</main>

docs/_layouts/post.html

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,42 @@
33
---
44
{% assign created = page.date | date: "%b %-d, %Y" %}
55
{% assign updated = page.last_modified_at | date: '%b %-d, %Y' %}
6-
<article itemscope itemtype="http://schema.org/BlogPosting">
7-
<header>
8-
<h1>{{ page.title }}</h1>
9-
<div class="post-meta">
10-
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
11-
Beau Barker,
12-
<time>{{ created }}</time> |
13-
{% if updated and updated != created %}
14-
Updated <time>{{ updated }}</time> |
15-
{% endif %}
16-
<a href="https://github.com/explodinglabs/composed.blog/edit/main/docs/{{page.path}}">
17-
Edit
18-
</a>
19-
</time>
20-
</div>
21-
</header>
22-
{{ content }}
23-
<footer>
24-
<a href="/{{ page.category }}">More {{ page.category |capitalize}} posts</a>
25-
&#8594;
26-
</footer>
27-
</article>
6+
{% assign posts = site.posts |where: "category", page.category |where_exp: "item", "item.url != page.url" |sort: "date" |reverse %}
7+
<main>
288

29-
{% comment %}
30-
{% if page.category != empty %}
31-
Also in {{ page.category |capitalize }}:
9+
<article itemscope itemtype="http://schema.org/BlogPosting">
10+
<header>
11+
<h1>{{ page.title }}</h1>
12+
<div class="post-meta">
13+
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
14+
Beau Barker, <time>{{ created }}</time>.
15+
{% if updated and updated != created %}
16+
Updated <time>{{ updated }}</time>
17+
{% endif %}
18+
<a href="https://github.com/explodinglabs/composed.blog/edit/main/docs/{{page.path}}">
19+
&#9998;
20+
</a>
21+
</time>
22+
</div>
23+
</header>
24+
{{ content }}
25+
<footer>
26+
<a href="/{{ page.category }}">More {{ page.category |capitalize}} posts</a>
27+
</footer>
28+
</article>
3229

33-
<ul class="post-list">
34-
{% assign posts = site.posts |where: "category", page.category |where_exp: "item", "item.url != page.url" |sort: "date" |reverse %}
35-
{% for post in posts limit: 5 %}
36-
<li class="post-link">
37-
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
38-
</li>
39-
{% endfor %}
40-
</ul>
41-
{% endif %}
42-
{% endcomment %}
30+
{% comment %}
31+
{% if page.category != empty %}
32+
Also in {{ page.category |capitalize }}:
33+
34+
<ul class="post-list">
35+
{% for post in posts limit: 5 %}
36+
<li class="post-link">
37+
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
38+
</li>
39+
{% endfor %}
40+
</ul>
41+
{% endif %}
42+
{% endcomment %}
43+
44+
</main>

docs/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
layout: all
33
title: Composed
44
---
5-
{% include categories.html %}
5+
{% include nav.html %}
66
{% assign posts = site.posts | where_exp:"post","post.sitemap != false" | sort: 'date' | reverse %}
77

8-
<main id="post-list">
9-
<table>
8+
<main>
9+
<div id="post-list">
1010
{% for post in posts limit:1 %}
1111
{% include post_link_td.html %}
1212
{% endfor %}
1313
{% for post in posts offset:1 %}
1414
{% include post_link_td.html %}
1515
{% endfor %}
16-
</table>
17-
</div>
16+
</div>
17+
</main>

docs/main.scss

Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -56,84 +56,101 @@ body {
5656
.linktext {
5757
color: hsl(330, 100, 50);
5858
text-decoration: none;
59-
&:visited { color: purple; }
59+
&:visited { color: hsl(330, 50, 50); }
6060
&:hover { color: orange; }
6161
}
6262

6363
nav {
64-
background: linear-gradient(to right, hsl(176, 96%, 50%), hsl(330, 100%, 50%));
64+
//background: linear-gradient(to right, hsl(176, 96%, 50%), hsl(330, 100%, 50%));
6565
// box-shadow: 0 5px 5px -2px #999;
66-
text-align: right;
67-
padding: 10px $hspace 2px $hspace;
68-
.logo {
69-
@extend .wrapper;
66+
padding: $vspace $hspace 2px $hspace;
67+
margin-bottom: $vspace*2;
68+
69+
#logo {
70+
float: left;
71+
text-align: left;
7072
img {
7173
height: 30px;
7274
}
7375
}
74-
}
7576

76-
#categories {
77-
padding-top: $vspace;
78-
text-align: center;
79-
@extend .bodytext;
80-
margin: 0 $hspace $vspace $hspace;
81-
a {
82-
color: red;
77+
#categories {
78+
@extend .bodytext;
79+
font-size: 90%;
80+
text-align: center;
81+
a {
82+
color: red;
83+
}
8384
}
85+
8486
}
8587

8688
main {
8789
@extend .wrapper;
8890

8991
#post-list {
90-
@extend .wrapper;
92+
@extend .bodytext;
93+
border-collapse: collapse;
94+
padding: 0;
95+
margin: 0 $hspace;
96+
@include media-query($on-palm) {
97+
margin: 0 $hspace/2;
98+
}
99+
100+
#category-logo {
101+
display: block;
102+
margin: auto;
103+
}
91104

92105
h1 {
93106
@extend .titletext;
94-
margin-bottom: $vspace / 1.5;
107+
margin-bottom: $vspace*1.5;
95108
text-align: center;
96109
}
97110

98-
table {
99-
@extend .bodytext;
100-
border-collapse: collapse;
101-
padding: 0;
102-
margin: 0 $hspace;
103-
@include media-query($on-palm) {
104-
margin: 0 $hspace/2;
105-
}
106-
107-
td {
108-
padding-bottom: 10px;
109-
vertical-align: top;
110-
a {
111-
@extend .linktext;
112-
}
113-
}
114-
115-
td.date {
116-
text-align: right;
117-
white-space: nowrap;
118-
}
111+
.date {
112+
text-align: center;
113+
font-size: smaller;
114+
color: hsl(300, 0, 40);
115+
}
119116

120-
td span {
121-
padding-right: $hspace / 2;
117+
.link {
118+
text-align: center;
119+
font-size: 1.2em;
120+
margin-bottom: 2em;
121+
line-height: 1.4em;
122+
a {
123+
@extend .linktext;
124+
text-decoration: none;
122125
}
123126
}
124127
}
125128

126129
article {
127130

128-
header {
129-
h1 {
130-
@extend .titletext;
131-
margin: $vspace * 2 $hspace $vspace / 2;
132-
@include media-query($on-palm) {
133-
margin-top: $vspace * 1.5;
134-
}
131+
h1 {
132+
margin: $vspace * 2 $hspace $vspace / 2;
133+
@include media-query($on-palm) {
134+
margin-top: $vspace * 1.5;
135135
}
136+
@extend .titletext;
137+
}
138+
139+
h2 {
140+
margin: $vspace * 1.5 $hspace $vspace $hspace;
141+
@extend .titletext;
142+
font-size: 120%;
143+
line-height: 100%;
144+
}
145+
146+
h3 {
147+
margin: $vspace * 1.5 0 $vspace 0;
148+
@extend .titletext;
149+
font-size: 110%;
150+
line-height: 100%;
151+
}
136152

153+
header {
137154
.post-meta {
138155
@extend .bodytext;
139156
font-size: smaller;
@@ -185,18 +202,6 @@ main {
185202
}
186203
}
187204

188-
h2 {
189-
@extend .titletext;
190-
margin: $vspace * 1.5 $hspace $vspace $hspace;
191-
line-height: 100%;
192-
}
193-
194-
h3 {
195-
@extend .titletext;
196-
margin: $vspace * 1.5 0 $vspace 0;
197-
line-height: 100%;
198-
}
199-
200205
img {
201206
max-width: 100%;
202207
vertical-align: middle;
@@ -333,10 +338,9 @@ main {
333338
footer {
334339
@extend .bodytext;
335340
font-size: smaller;
336-
margin: $vspace*2 $hspace $vspace $hspace;
337-
padding: $vspace/2 0;
338-
border-top: 1px solid #dedede;
339-
text-align: right;
341+
margin: $vspace*2 $hspace $vspace*3 $hspace;
342+
text-align: left;
343+
a { @extend .linktext; }
340344
}
341345
}
342346

0 commit comments

Comments
 (0)