Skip to content

Commit 1de82c4

Browse files
committed
UI Tweaks
1 parent 612c6a1 commit 1de82c4

12 files changed

+73
-21
lines changed

content/collections/pages/home.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Welcome to my personal website. Take your time to look around, and if you want t
3030
{{ partial:home/cta title="Work" }}Check out my <a href="/projects">Projects</a><br/>or <a href="/now">What I'm doing now</a>{{ /partial:home/cta }}
3131
</div>
3232

33-
<h2 class="text-center text-3xl mt-10 md:text-2xl md:text-left" id="my-values">My values</h2>
33+
<h2 class="text-center text-3xl mt-10 text-blue-darker md:text-2xl md:text-left" id="my-values">My values</h2>
3434

3535
<div class="flex flex-col-reverse w-full md:flex-row">
3636

@@ -65,7 +65,7 @@ These are my values:
6565

6666
</div>
6767

68-
<h2 class="text-center text-3xl mt-10 md:text-2xl md:text-left" id="my-background">My background</h2>
68+
<h2 class="text-center text-3xl text-blue-darker mt-10 md:text-2xl md:text-left" id="my-background">My background</h2>
6969

7070
<div class="flex flex-col w-full md:flex-row">
7171

@@ -89,7 +89,7 @@ Or, if you prefer, you can just read [my CV](/cv.pdf).
8989

9090
</div>
9191

92-
<h2 class="text-center text-3xl mt-10 md:text-2xl md:text-left" id="beyond-the-code">Beyond the code</h2>
92+
<h2 class="text-center text-blue-darker text-3xl mt-10 md:text-2xl md:text-left" id="beyond-the-code">Beyond the code</h2>
9393

9494
<div class="flex flex-col-reverse w-full md:flex-row">
9595

resources/assets/js/turbo/header.js

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
document.addEventListener('turbo:click', () => {
2+
Turbo.navigator.delegate.adapter.progressBar.setValue(0);
3+
Turbo.navigator.delegate.adapter.progressBar.show();
4+
});
5+
16
document.addEventListener('turbo:frame-load', (event) => {
27
const header = document.querySelector('header');
38
const frameData = event.target.firstElementChild.dataset;
@@ -11,4 +16,6 @@ document.addEventListener('turbo:frame-load', (event) => {
1116
.querySelector(`[href="${frameData.currentPath}"]`)
1217
?.setAttribute('aria-current', 'page');
1318
}
19+
20+
Turbo.navigator.delegate.adapter.progressBar.hide();
1421
});

resources/assets/js/turbo/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ import '@hotwired/turbo';
22

33
import './header';
44
import './scroll';
5-
6-
Turbo.config.drive.progressBarDelay = 0;

resources/views/blog/index.blade.php

+35-13
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ class="bg-rss top-8 right-2 mt-2 flex items-center justify-center rounded-sm p-1
1919
<s:partial src="icons/rss" class="inline h-3 fill-current text-white" />
2020
</a>
2121

22-
<h2>My favorites</h2>
22+
<h2 class="text-blue-darker mt-8 flex items-center justify-start space-x-1">
23+
<s:partial src="icons/seedling" class="size-5" />
24+
<span>Most recent</span>
25+
</h2>
26+
27+
<s:collection :from="$mount" sort="publication_date:desc" limit="1">
28+
<x-content-card heading="3" :$title :$url :date="$publication_date">
29+
{!! $summary !!}
30+
</x-content-card>
31+
</s:collection>
32+
33+
<h2 class="text-blue-darker mt-8 flex items-center justify-start space-x-1">
34+
<s:partial src="icons/favorite" class="size-5" />
35+
<span>My favorites</span>
36+
</h2>
2337

2438
<s:collection
2539
:from="$mount"
@@ -31,13 +45,16 @@ class="bg-rss top-8 right-2 mt-2 flex items-center justify-center rounded-sm p-1
3145
</x-content-card>
3246
</s:collection>
3347

34-
<h2>All posts</h2>
48+
<h2 class="text-blue-darker mt-8 flex items-center justify-start space-x-1">
49+
<s:partial src="icons/list-bullet" class="size-5" />
50+
<span>All posts</span>
51+
</h2>
3552

3653
<ul class="list-none">
3754
<s:collection :from="$mount" sort="publication_date:desc">
38-
<li class="mb-2 flex">
55+
<li class="mb-4 flex items-center md:mb-2">
3956
<time
40-
class="bg-blue-lighter text-blue-darker mr-2 rounded-lg px-2 py-1 font-mono text-sm"
57+
class="bg-blue-lighter text-blue-darker mr-2 shrink-0 self-start rounded-lg px-2 py-1 font-mono text-sm"
4158
datetime="{{ $publication_date->toDateTimeString() }}"
4259
>
4360
<span
@@ -47,16 +64,21 @@ class="ml-1"
4764
{{ $publication_date->display('month-short') }}
4865
</span>
4966
</time>
50-
@if ($favorite->value())
51-
<s:partial src="icons/favorite" class="mr-1 size-5" />
52-
@endif
67+
<span class="items-center md:flex">
68+
@if ($favorite->value())
69+
<s:partial
70+
src="icons/favorite"
71+
class="size-5 md:mr-1"
72+
/>
73+
@endif
5374

54-
<a
55-
href="{{ $url }}"
56-
class="no-underline hover:underline focus:underline"
57-
>
58-
{{ $title }}
59-
</a>
75+
<a
76+
href="{{ $url }}"
77+
class="no-underline hover:underline focus:underline"
78+
>
79+
{{ $title }}
80+
</a>
81+
</span>
6082
</li>
6183
</s:collection>
6284
</ul>

resources/views/components/layout-header.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class="bg-header absolute inset-0 z-0 w-[500vw] md:opacity-0"
5353
href="{{ $url }}"
5454
data-turbo-frame="mainframe"
5555
class="group hover:bg-overlay relative flex items-center px-4 py-3 font-bold text-black uppercase hover:opacity-100 focus:opacity-100 aria-[current]:opacity-100 md:px-2 md:py-2 md:opacity-50"
56+
@click="navigationOpen = false"
5657
@if ($is_current)
5758
aria-current="page"
5859
@endif

resources/views/components/project-cards.blade.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<h2 class="{{ $titleClass ?? 'mt-8' }} font-bold">{{ $title }}</h2>
1+
<h2 class="{{ $titleClass ?? 'mt-8' }} text-blue-darker font-bold">
2+
{{ $title }}
3+
</h2>
24

35
<ul class="ml-0 grid list-none grid-cols-1 gap-4 pl-0 md:grid-cols-2">
46
<s:collection from="projects" :category:is="$category">

resources/views/components/table-of-contents-list.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
href="{{ $landmark->anchor }}"
77
class="no-underline hover:underline focus:underline"
88
style="margin-left: {{ $landmark->level - 2 }}rem"
9+
data-turbo="false"
910
@click="close()"
1011
>
1112
{!! $landmark->title !!}

resources/views/components/table-of-contents.blade.php

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class="absolute top-0 right-0 mt-5 mr-4 md:hidden"
4646
href="#main"
4747
class="text-blue-darkest mb-3 block pr-2 text-lg font-semibold no-underline hover:underline focus:underline md:pr-0"
4848
aria-hidden="true"
49+
data-turbo="false"
4950
@click="close()"
5051
>
5152
{{ $title }}

resources/views/icons/favorite.antlers.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
viewBox="0 0 20 20"
55
>
66
<path
7-
fill="#888"
7+
fill="currentColor"
88
d="m10 15-5.878 3.09 1.123-6.545L.489 6.91l6.572-.955L10 0l2.939 5.955 6.572.955-4.756 4.635 1.123 6.545z"
99
/>
1010
</svg>

resources/views/icons/list-bullet.antlers.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
viewBox="0 0 20 20"
55
>
66
<path
7+
fill="currentColor"
78
d="M1 4h2v2H1V4zm4 0h14v2H5V4zM1 9h2v2H1V9zm4 0h14v2H5V9zm-4 5h2v2H1v-2zm4 0h14v2H5v-2z"
89
/>
910
</svg>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<svg
2+
class="{{ class ?? '' }}"
3+
xmlns="http://www.w3.org/2000/svg"
4+
viewBox="0 0 48 48"
5+
>
6+
<g
7+
fill="none"
8+
stroke="currentColor"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
stroke-width="4"
12+
>
13+
<path d="M24 42V26" />
14+
<path
15+
fill="currentColor"
16+
d="M41.942 10.007c-.776 13.024-9.13 17.236-15.946 17.896C24.896 28.009 24 27.104 24 26v-8.372c0-.233.04-.468.125-.684C27.117 9.199 34.283 8.155 40 8.02c1.105-.027 2.006.884 1.94 1.987M7.998 6.072c9.329.685 14.197 6.091 15.836 9.558.115.242.166.508.166.776v7.504c0 1.14-.96 2.055-2.094 1.94C7.337 24.384 6.11 14.786 6.009 8 5.993 6.894 6.897 5.99 8 6.072"
17+
/>
18+
</g>
19+
</svg>

resources/views/now/index.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class="bg-grey-lighter border-grey-light flex w-full flex-col items-center justi
7878
@endif
7979
</s:collection>
8080

81-
<h2>Past activity</h2>
81+
<h2 class="text-blue-darker">Past activity</h2>
8282

8383
@foreach ($events as $year => $yearEvents)
8484
<details {{ $loop->first ? 'open' : '' }} class="mb-4">

0 commit comments

Comments
 (0)