Skip to content

Commit cb5fd27

Browse files
layout changes,
1 parent 51844fd commit cb5fd27

14 files changed

+140
-29
lines changed

notes.org

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* Tasks
2+
** TODO Add support for images, think about extenstion, and optimize images, should it be local or something like serverless resizing should be used ? something which everybody can use.

src/_css/components/button.css

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
.btn {
2-
@apply no-underline shadow;
3-
padding: 0.5em 2em 0.49em;
4-
transition: all 0.2s ease 0s;
1+
.btn, .btn:visited {
2+
@apply no-underline border-black;
3+
padding: 0.25em 0.5em 0.24em;
4+
transition: border 0.2s ease 0s;
55
}
6+
7+
.btn:hover, .btn:focus {
8+
@apply border-orange-base;
9+
}
10+
11+
@screen t {
12+
.btn, .btn:visited {
13+
@apply border-bg;
14+
}
15+
16+
.btn:hover,.btn:focus {
17+
@apply border-black;
18+
}
19+
}
20+
21+
622
.btn-black {
723
@apply text-white bg-black border-2 border-transparent;
824
fill: config('colors.white');

src/_css/critical.defaults.css

+22-6
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,43 @@ code {
2121
@apply bg-gray-300 p-0.5 font-sans;
2222
}
2323

24+
h1,
25+
h2,
26+
h3,
27+
h4,
2428
.h1,
2529
.h2,
2630
.h3,
2731
.h4 {
2832
@apply tracking-tight;
2933
}
3034

35+
3136
.h1 {
3237
@apply mt-3 mb-1 text-h1 leading-tight;
3338
}
3439

40+
h2,
3541
.h2 {
3642
@apply mt-2 mb-0.5 text-h2 leading-tight;
3743
}
3844

45+
h3,
3946
.h3 {
4047
@apply mt-2 mb-0.5 text-h3 leading-tight;
4148
}
4249

50+
h4,
4351
.h4 {
4452
@apply mt-1 mb-0 text-h4 leading-snug;
4553
}
4654

55+
h5,
4756
.h5 {
4857
@apply mt-1 mb-0 text-xl leading-normal;
4958
}
5059

60+
h6,
5161
.h6 {
5262
@apply mt-1 mb-0 text-lg leading-normal;
5363
}
@@ -63,21 +73,27 @@ code {
6373
}
6474

6575
a {
66-
@apply no-underline cursor-pointer outline-none text-black border-b;
76+
/* @apply underline cursor-pointer; */
77+
@apply no-underline cursor-pointer outline-none text-fg border-fg border-b-0.125;
78+
}
79+
80+
81+
a:visited {
82+
@apply border-orange-base;
6783
}
6884

6985
a:hover {
70-
@apply bg-green-500;
86+
@apply border-green-700 ;
7187
}
7288

7389
a:active {
74-
/* @apply bg-yellow; */
90+
@apply border-green-400;
7591
}
76-
77-
a:visited {
78-
/* @apply bg-red; */
92+
.btn {
93+
@apply border-bg;
7994
}
8095

96+
8197
/* Sets so the footer stay always on the bottom. */
8298
main {
8399
@apply flex-1;

src/_css/critical.typography.css

+8-8
Original file line numberDiff line numberDiff line change
@@ -44,41 +44,41 @@ body {
4444
-webkit-font-smoothing: antialiased;
4545
text-rendering: optimizeLegibility;
4646
font-feature-settings: "liga" on;
47-
@apply text-black;
47+
@apply text-fg bg-bg;
4848
}
4949
@media (min-width: 46.25em) and (max-width: 50em){
5050
body {
51-
line-height: 1.7;
51+
line-height: 1.5;
5252
}
5353
}
5454
@media (min-width: 50em) and (max-width: 63.75em) {
5555
body {
56-
line-height: 1.7;
56+
line-height: 1.5;
5757
}
5858
}
5959
@media (min-width: 63.75em) and (max-width: 79em) {
6060
body {
61-
line-height: 1.7;
61+
line-height: 1.5;
6262
}
6363
}
6464
@media (min-width: 79em) and (max-width: 125em) {
6565
body {
66-
line-height: 1.8;
66+
line-height: 1.6;
6767
}
6868
}
6969
@media (min-width: 125em) and (max-width: 200em) {
7070
body {
71-
line-height: 1.8;
71+
line-height: 1.6;
7272
}
7373
}
7474
@media (min-width: 200em) and (max-width: 400em) {
7575
body {
76-
line-height: 1.8;
76+
line-height: 1.6;
7777
}
7878
}
7979
@media (min-width: 400em) {
8080
body {
81-
line-height: 1.8;
81+
line-height: 1.6;
8282
}
8383
}
8484

src/_css/tailwind.config.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ module.exports = {
2727
},
2828
colors: {
2929
transparent: 'transparent',
30-
black: '#112',
31-
white: '#fffff8',
30+
black: 'black',
31+
fg: '#111111',
32+
white: '#ffffff',
33+
bg: '#fbf8ef',
3234
gray: {
3335
100: '#f7fafc',
3436
200: '#edf2f7',
@@ -52,6 +54,7 @@ module.exports = {
5254
900: '#742a2a',
5355
},
5456
orange: {
57+
base: '#df967c',
5558
100: '#fffaf0',
5659
200: '#feebc8',
5760
300: '#fbd38d',

src/_img/favicon.ico

-214 Bytes
Binary file not shown.

src/_includes/extends/html5boilerplate.njk

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<meta name="author" content="{{ author }}">
1111
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
1212
<meta name="theme-color" content="white"/>
13+
<meta name="theme-color" content="white"/>
14+
<link rel="shortcut icon" href="_img/favicon.ico" type="image/x-icon">
1315
<meta name="robots" content="noindex"> <!-- TODO remove this when you are happy with site -->
1416
{% endblock %}
1517

src/_includes/partials/header.njk

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<header class="container">
2+
<div class="mx-auto max-w-40 w-full mt-1 text-right t:text-left">
3+
<ul class="italic space-y-1 t:space-y-auto text-lg t:flex t:flex-row">
4+
<li><a class="btn" href="/">home</a></li>
5+
<li><a class="btn" href="/b">blog</a></li>
6+
<li><a class="btn" href="/a">about</a></li>
7+
<li><a class="btn" href="/c">curation</a></li>
8+
<li><a class="btn" href="/p">photos</a></li>
9+
<li class="flex-1"><a class="btn" href="/feed.xml">follow/rss</a></li>
10+
<li><h1><a class="no-underline border-none" href="daniel.rafaj.dev">Daniel Rafaj</a></h1></li>
11+
</ul>
12+
</div>
13+
</header>

src/_layouts/blog.njk

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: base.njk
3+
---
4+
<main class="page">
5+
{% include "partials/header.njk" %}
6+
<section class="container">
7+
<div class="mx-auto max-w-40 w-full">
8+
<h2 class="h1">
9+
{{ title }}
10+
</h2>
11+
<p class="text-right italic">
12+
Written on {{date.toUTCString().substring(0, 16)}}
13+
</p>
14+
{{ content | safe }}
15+
</div>
16+
</section>
17+
</main>

src/_layouts/root.njk

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: base.njk
3+
---
4+
<main class="page">
5+
{% include "partials/header.njk" %}
6+
<section class="container">
7+
<div class="mx-auto max-w-40 w-full">
8+
{{ content | safe }}
9+
</div>
10+
</section>
11+
</main>

src/b/first-post.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: blog.njk
3+
date: 2020-11-04
4+
tags:
5+
- blog
6+
- post
7+
title: First blog post
8+
description: First post describing something very unique and first.
9+
---
10+
Any text would do.
11+
12+

src/b/second-post.njk

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: blog.njk
3+
date: 2020-11-03
4+
tags:
5+
- blog
6+
- post
7+
title: Second blog post
8+
description: First post describing something very unique and first.
9+
---
10+
<p>
11+
Any text would do.
12+
</p>

src/index.njk

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
---
2-
layout: base.njk
3-
title: Web
2+
layout: root.njk
3+
title: Web by Daniel Rafaj
44
description: Web what was ment to be
55
---
6-
Hello there
7-
8-
<div class="page">
9-
<a href="">hello</a>
10-
</div>
6+
<h2 class="mt-3">Blog posts</h2>
7+
<p>
8+
Eu non diam phasellus vestibulum <a href="">lorem sed risus</a> ultricies tristique nulla. Sed vulputate odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam erat velit, scelerisque in dictum non, consectetur!
9+
</p>
10+
{% for post in collections.blog | reverse %}
11+
<div>
12+
<h3><a href="{{post.url}}">{{post.data.title}}</a></h3>
13+
<em class="italic">{{ post.date.toUTCString().substring(0, 16) }}</em>
14+
</div>
15+
{% endfor %}

util/generate-cheatsheet.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ const txt = Object.keys(config.cheatsheet).map((key) => {
4343
const tip = !!config.cheatsheet[key][key2].tip
4444
? `${config.cheatsheet[key][key2].tip}`
4545
: ''
46-
const desc = ''
47-
// const desc = !!config.cheatsheet[key][key2].desc ? ` - ${config.cheatsheet[key][key2].desc}\n` : ''
46+
// const desc = ''
47+
const desc = !!config.cheatsheet[key][key2].desc
48+
? ` - ${config.cheatsheet[key][key2].desc}\n`
49+
: ''
4850

4951
// With values
5052
// return `${subhead} ${variant} ${tip}\n${desc} ${config.cheatsheet[key][key2].value.map(obj=>{return `${Object.keys(obj).map(key3=>{return `${key3}: ${obj[key3]}`})}`}).join('\n ')}`

0 commit comments

Comments
 (0)