Skip to content

Commit 0945f9f

Browse files
committed
Improve readability, update CSS
Messing with font sizes and opacity to make the site more readable. Changes across basically all templates.
1 parent f11bea3 commit 0945f9f

File tree

7 files changed

+148
-99
lines changed

7 files changed

+148
-99
lines changed

static/app.css

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@
5858
@apply w-6 -translate-y-[5.5px] -rotate-45;
5959
}
6060

61-
.nav-wrapper {
62-
@apply hidden lg:flex;
63-
}
64-
65-
.open .nav-wrapper {
66-
@apply flex;
67-
}
68-
6961
article {
7062
@apply text-lg;
7163
}
@@ -95,10 +87,10 @@
9587
}
9688

9789
.primary-link {
98-
@apply text-black bg-transparent border-none hover:underline hover:decoration-4 hover:decoration-[#BECA9A]
90+
@apply bg-transparent border-none hover:underline hover:decoration-4 hover:decoration-[#BECA9A]
9991
}
10092

10193
.secondary-link {
102-
@apply text-gray-600 bg-transparent border-none hover:underline hover:decoration-2 hover:decoration-[#BECA9A]
94+
@apply bg-transparent border-none hover:underline hover:decoration-2 hover:decoration-[#BECA9A]
10395
}
10496
}

static/main.css

Lines changed: 130 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,10 @@ body {
11191119
--tw-prose-invert-td-borders: #404040;
11201120
}
11211121

1122+
.fixed {
1123+
position: fixed;
1124+
}
1125+
11221126
.relative {
11231127
position: relative;
11241128
}
@@ -1131,12 +1135,20 @@ body {
11311135
bottom: 1rem;
11321136
}
11331137

1138+
.right-0 {
1139+
right: 0px;
1140+
}
1141+
11341142
.top-0 {
11351143
top: 0px;
11361144
}
11371145

1138-
.top-3 {
1139-
top: 0.75rem;
1146+
.top-4 {
1147+
top: 1rem;
1148+
}
1149+
1150+
.z-10 {
1151+
z-index: 10;
11401152
}
11411153

11421154
.z-40 {
@@ -1178,6 +1190,19 @@ body {
11781190
display: flex;
11791191
}
11801192

1193+
.inline-flex {
1194+
display: inline-flex;
1195+
}
1196+
1197+
.hidden {
1198+
display: none;
1199+
}
1200+
1201+
.size-6 {
1202+
width: 1.5rem;
1203+
height: 1.5rem;
1204+
}
1205+
11811206
.h-auto {
11821207
height: auto;
11831208
}
@@ -1186,8 +1211,12 @@ body {
11861211
min-height: 3.5rem;
11871212
}
11881213

1189-
.w-1\/4 {
1190-
width: 25%;
1214+
.w-2\/3 {
1215+
width: 66.666667%;
1216+
}
1217+
1218+
.w-auto {
1219+
width: auto;
11911220
}
11921221

11931222
.w-full {
@@ -1230,10 +1259,22 @@ body {
12301259
justify-content: space-between;
12311260
}
12321261

1233-
.space-x-16 > :not([hidden]) ~ :not([hidden]) {
1262+
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
1263+
--tw-space-x-reverse: 0;
1264+
margin-right: calc(1rem * var(--tw-space-x-reverse));
1265+
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
1266+
}
1267+
1268+
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
12341269
--tw-space-x-reverse: 0;
1235-
margin-right: calc(4rem * var(--tw-space-x-reverse));
1236-
margin-left: calc(4rem * calc(1 - var(--tw-space-x-reverse)));
1270+
margin-right: calc(1.5rem * var(--tw-space-x-reverse));
1271+
margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
1272+
}
1273+
1274+
.space-y-1 > :not([hidden]) ~ :not([hidden]) {
1275+
--tw-space-y-reverse: 0;
1276+
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
1277+
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
12371278
}
12381279

12391280
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
@@ -1246,71 +1287,53 @@ body {
12461287
text-wrap: wrap;
12471288
}
12481289

1249-
.rounded-sm {
1250-
border-radius: 0.125rem;
1290+
.rounded-md {
1291+
border-radius: 0.375rem;
12511292
}
12521293

12531294
.bg-white {
12541295
--tw-bg-opacity: 1;
12551296
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
12561297
}
12571298

1258-
.p-3 {
1259-
padding: 0.75rem;
1260-
}
1261-
12621299
.p-4 {
12631300
padding: 1rem;
12641301
}
12651302

1303+
.p-5 {
1304+
padding: 1.25rem;
1305+
}
1306+
12661307
.px-3 {
12671308
padding-left: 0.75rem;
12681309
padding-right: 0.75rem;
12691310
}
12701311

1271-
.px-4 {
1272-
padding-left: 1rem;
1273-
padding-right: 1rem;
1274-
}
1275-
12761312
.py-0 {
12771313
padding-top: 0px;
12781314
padding-bottom: 0px;
12791315
}
12801316

1281-
.py-2 {
1282-
padding-top: 0.5rem;
1283-
padding-bottom: 0.5rem;
1284-
}
1285-
12861317
.pl-6 {
12871318
padding-left: 1.5rem;
12881319
}
12891320

1290-
.pt-4 {
1291-
padding-top: 1rem;
1292-
}
1293-
12941321
.pt-6 {
12951322
padding-top: 1.5rem;
12961323
}
12971324

1298-
.text-center {
1299-
text-align: center;
1325+
.text-left {
1326+
text-align: left;
13001327
}
13011328

1302-
.font-mono {
1303-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
1329+
.text-center {
1330+
text-align: center;
13041331
}
13051332

13061333
.text-2xl {
13071334
font-size: 1.953rem;
13081335
}
13091336

1310-
.text-3xl {
1311-
font-size: 2.441rem;
1312-
}
1313-
13141337
.text-lg {
13151338
font-size: 1.125rem;
13161339
line-height: 1.75rem;
@@ -1320,17 +1343,36 @@ body {
13201343
font-size: 1.563rem;
13211344
}
13221345

1323-
.font-bold {
1324-
font-weight: 700;
1346+
.font-semibold {
1347+
font-weight: 600;
13251348
}
13261349

13271350
.text-gray-600 {
13281351
--tw-text-opacity: 1;
13291352
color: rgb(75 85 99 / var(--tw-text-opacity));
13301353
}
13311354

1332-
.opacity-60 {
1333-
opacity: 0.6;
1355+
.text-opacity-80 {
1356+
--tw-text-opacity: 0.8;
1357+
}
1358+
1359+
.opacity-80 {
1360+
opacity: 0.8;
1361+
}
1362+
1363+
.opacity-90 {
1364+
opacity: 0.9;
1365+
}
1366+
1367+
.ring-1 {
1368+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1369+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1370+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1371+
}
1372+
1373+
.ring-gray-500 {
1374+
--tw-ring-opacity: 1;
1375+
--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity));
13341376
}
13351377

13361378
/*
@@ -1342,18 +1384,22 @@ body {
13421384
transition-property: none !important;
13431385
}
13441386

1345-
.nav-wrapper {
1346-
display: none;
1387+
.open {
1388+
overflow: hidden;
13471389
}
13481390

1349-
@media (min-width: 1024px) {
1350-
.nav-wrapper {
1351-
display: flex;
1352-
}
1391+
.open .btn-menu::before {
1392+
width: 1.5rem;
1393+
--tw-translate-y: 5.5px;
1394+
--tw-rotate: 45deg;
1395+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
13531396
}
13541397

1355-
.open .nav-wrapper {
1356-
display: flex;
1398+
.open .btn-menu::after {
1399+
width: 1.5rem;
1400+
--tw-translate-y: -5.5px;
1401+
--tw-rotate: -45deg;
1402+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
13571403
}
13581404

13591405
article {
@@ -1372,8 +1418,6 @@ article {
13721418
.primary-link {
13731419
border-style: none;
13741420
background-color: transparent;
1375-
--tw-text-opacity: 1;
1376-
color: rgb(0 0 0 / var(--tw-text-opacity));
13771421
}
13781422

13791423
.primary-link:hover {
@@ -1382,50 +1426,60 @@ article {
13821426
text-decoration-thickness: 4px;
13831427
}
13841428

1385-
.secondary-link {
1386-
border-style: none;
1387-
background-color: transparent;
1429+
.focus-within\:block:focus-within {
1430+
display: block;
1431+
}
1432+
1433+
.focus\:block:focus {
1434+
display: block;
1435+
}
1436+
1437+
.active\:block:active {
1438+
display: block;
1439+
}
1440+
1441+
.active\:text-gray-300:active {
13881442
--tw-text-opacity: 1;
1389-
color: rgb(75 85 99 / var(--tw-text-opacity));
1443+
color: rgb(209 213 219 / var(--tw-text-opacity));
13901444
}
13911445

1392-
.secondary-link:hover {
1393-
text-decoration-line: underline;
1394-
text-decoration-color: #BECA9A;
1395-
text-decoration-thickness: 2px;
1446+
.group:focus .group-focus\:block {
1447+
display: block;
13961448
}
13971449

1398-
@media (min-width: 1024px) {
1399-
.lg\:flex {
1400-
display: flex;
1401-
}
1450+
.group:focus .group-focus\:hidden {
1451+
display: none;
1452+
}
14021453

1403-
.lg\:w-auto {
1404-
width: auto;
1405-
}
1454+
.peer:focus ~ .peer-focus\:block {
1455+
display: block;
1456+
}
14061457

1407-
.lg\:flex-row {
1408-
flex-direction: row;
1458+
@media (min-width: 640px) {
1459+
.sm\:flex {
1460+
display: flex;
14091461
}
14101462

1411-
.lg\:justify-between {
1412-
justify-content: space-between;
1463+
.sm\:hidden {
1464+
display: none;
14131465
}
14141466

1415-
.lg\:self-center {
1416-
align-self: center;
1467+
.sm\:w-1\/4 {
1468+
width: 25%;
14171469
}
14181470

1419-
.lg\:px-3 {
1420-
padding-left: 0.75rem;
1421-
padding-right: 0.75rem;
1471+
.sm\:flex-row {
1472+
flex-direction: row;
14221473
}
14231474

1424-
.lg\:py-0 {
1425-
padding-top: 0px;
1426-
padding-bottom: 0px;
1475+
.sm\:space-x-16 > :not([hidden]) ~ :not([hidden]) {
1476+
--tw-space-x-reverse: 0;
1477+
margin-right: calc(4rem * var(--tw-space-x-reverse));
1478+
margin-left: calc(4rem * calc(1 - var(--tw-space-x-reverse)));
14271479
}
1480+
}
14281481

1482+
@media (min-width: 1024px) {
14291483
.lg\:text-base {
14301484
font-size: 1.25rem;
14311485
}

templates/404.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{% extends "index.html" %} {% block main %}
2-
<h1 class="relative flex items-center justify-center text-3xl font-bold">404: Page not found</h1>
2+
<h1 class="relative flex items-center justify-center text-2xl font-semibold">
3+
404: Page not found
4+
</h1>
35
{% endblock main %}

templates/blog.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
{% set section = get_section(path=page.extra.section) %}<!---->
55

66
{% for year, posts in section.pages | group_by(attribute="year") %}
7-
<h2>{{ year }}</h2>
7+
<div class="text-xl font-semibold">{{ year }}</div>
88

99
<div class="not-prose pl-6">
1010
<ul>
1111
{% for post in posts %}
1212
<li>
1313
<div class="my-2 flex items-center justify-between">
14-
<a class="secondary-link" href="{{ post.permalink }}">{{ post.title }}</a>
15-
<time class="font-mono opacity-60">{{ post.date | date(format="%m-%d") }}</time>
14+
<a class="primary-link text-lg" href="{{ post.permalink }}">{{ post.title }}</a>
15+
<time>{{ post.date | date(format="%m-%d") }}</time>
1616
</div>
1717
</li>
1818
{% endfor %}

0 commit comments

Comments
 (0)