Skip to content

Commit 6ce8daf

Browse files
committed
Fix styling
1 parent a6ce2d2 commit 6ce8daf

File tree

10 files changed

+2672
-1573
lines changed

10 files changed

+2672
-1573
lines changed

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

src/_includes/layouts/post.njk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ useContainer: true
88

99
<p>on {{ page.date | formatDate }}, takes {{ content | timeToRead }} to read.</p>
1010

11-
{% if (openGraph.imgUrl) %}
12-
<img id="ogimage" class="og-image" src="{{ openGraph.imgUrl }}">
13-
{% endif %}
14-
1511
<h2>Tags</h2>
1612
{% if ((tags | length) > 1) %}
1713
<ul>
@@ -29,6 +25,10 @@ useContainer: true
2925
<p>No tags</p>
3026
{% endif %}
3127

28+
{% if (openGraph.imgUrl) %}
29+
<img id="ogimage" class="og-image" src="{{ openGraph.imgUrl }}">
30+
{% endif %}
31+
3232
<div id="post-content" class="content">
3333
{{ content | safe }}
3434
<div>

src/_includes/layouts/project.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ useContainer: true
2929
<div id="posts-list" class="post-list">
3030
{%- for item in pagination.items %}
3131
{% if item.data.published != false %}
32-
<article id="post-{{ loop.index }}" class="post">
33-
<a href="{{ item.page.url }}">{{ item.data.title }}</a>
32+
<a id="post-{{ loop.index }}" class="post transition" href="{{ item.page.url }}">
33+
<p>{{ item.data.title }}</p>
3434
<p>on {{ item.page.date | formatDate }}, takes {{ item.content | timeToRead }} to read.</p>
35-
</article>
35+
</a>
3636
{% endif %}
3737
{% endfor -%}
3838
</div>

src/index.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pagination:
1616
</div>
1717
<div class="home-section-card-content">
1818
{%- for item in pagination.items %}
19-
<a href="{{ item.page.url }}">
19+
<a href="{{ item.page.url }}" class="home-section-card">
2020
<h3>{{ item.data.title }}</h3>
2121
<p>{{ item.data.description }}</p>
2222
</a>

src/posts.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ pagination:
3030

3131
<div id="posts-list" class="post-list">
3232
{%- for item in pagination.items %}
33-
<article id="post-{{ loop.index }}" class="post">
34-
<a href="{{ item.page.url }}">{{ item.data.title }}</a>
33+
<a id="post-{{ loop.index }}" href="{{ item.page.url }}" class="post transition">
34+
<p>{{ item.data.title }}</p>
3535
<p>on {{ item.page.date | formatDate }}, takes {{ item.content | timeToRead }} to read.</p>
36-
</article>
36+
</a>
3737
{% endfor -%}
3838
</div>
3939

src/projects.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ pagination:
1212

1313
<div id="posts-list" class="post-list">
1414
{%- for item in pagination.items %}
15-
<article id="post-{{ loop.index }}" class="post">
16-
<a href="{{ item.page.url }}">{{ item.data.title }}</a>
15+
<a id="post-{{ loop.index }}" class="post transition" href="{{ item.page.url }}">
16+
<p>{{ item.data.title }}</p>
1717
<p>{{ item.data.description }}</p>
18-
</article>
18+
</a>
1919
{% endfor -%}
2020
</div>
2121

src/styles/global.scss

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
:root {
77
--bg: var(--black);
88
--color: var(--white);
9-
--contrast: var(--gray-700);
9+
--contrast: var(--gray-800);
1010
--hover: var(--green-300);
1111
}
1212

@@ -101,7 +101,7 @@ a:hover {
101101

102102
.nav-bar {
103103
width: 100%;
104-
height: 32px;
104+
min-height: 64px;
105105
display: flex;
106106
flex-direction: row;
107107
padding: 12px;
@@ -143,34 +143,62 @@ a:hover {
143143
align-items: center;
144144

145145
.pagination-control {
146-
margin: 6px;
147-
padding: 6px 12px;
148-
border-radius: 12px;
149-
background-color: var(--green-500);
150-
151146
a {
147+
margin: 6px;
148+
padding: 6px 12px;
149+
display: block;
150+
border: 1px solid var(--hover);
151+
152152
text-decoration: none;
153153
}
154154

155155
a:hover {
156-
color: var(--color);
156+
color: var(--bg);
157+
background-color: var(--hover);
157158
}
158159
}
159160

160161
.pagination-control[aria-current] {
162+
margin: 6px;
163+
padding: 6px 12px;
164+
display: block;
165+
166+
border: 1px solid var(--contrast);
161167
background-color: var(--contrast);
162168
}
163169
}
164170

165171
.post-list {
166172
.post {
167173
margin-top: 12px;
174+
margin: 6px;
175+
padding: 6px 12px;
176+
display: block;
177+
border: 1px solid var(--hover);
178+
179+
text-decoration: none;
180+
}
181+
182+
.post:hover {
183+
color: var(--bg);
184+
background-color: var(--hover);
168185
}
169186
}
170187

171188
.tagged-posts {
172189
.tagged-post {
173190
margin-top: 12px;
191+
margin: 6px;
192+
padding: 6px 12px;
193+
display: block;
194+
border: 1px solid var(--hover);
195+
196+
text-decoration: none;
197+
}
198+
199+
.tagged-post:hover {
200+
color: var(--bg);
201+
background-color: var(--hover);
174202
}
175203
}
176204

src/styles/home.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@
3535
}
3636
}
3737

38+
.home-section-card {
39+
padding: 6px 12px;
40+
display: block;
41+
border: 1px solid var(--hover);
42+
43+
text-decoration: none;
44+
}
45+
46+
.home-section-card:hover {
47+
color: var(--bg);
48+
background-color: var(--hover);
49+
}
50+
3851
.home-section {
3952
margin-top: 32px;
4053
display: flex;

src/tags.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ isBlog: true
1919

2020
<div id="taggedposts" class="tagged-posts">
2121
{% for post in (collections[ tag ] | reverse) %}
22-
<article class="tagged-post">
23-
<a href="{{ post.url }}">{{ post.data.title }}</a>
22+
<a class="tagged-post transition" href="{{ post.url }}">
23+
<p>{{ post.data.title }}</p>
2424
<p>on {{ post.page.date | formatDate }}</p>
25-
</article>
25+
</a>
2626
{% endfor %}
2727
</div>

0 commit comments

Comments
 (0)