Skip to content

Commit b17d1c3

Browse files
committed
Style stuff
1 parent 6eb9d0e commit b17d1c3

File tree

5 files changed

+39
-10
lines changed

5 files changed

+39
-10
lines changed

_layouts/default.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/java.min.js"></script>
1212

1313
</head>
14-
<body class="bg-zinc-900 !text-white">
15-
<div class="p-3 px-5 bg-zinc-800 rounded-full m-3 flex gap-3">
16-
<a href="../index.html" class="text-blue-500">1511 Teaching Resources</a>
17-
</div>
18-
<main class="mdStyle m-3">
14+
<body class="bg-zinc-900 !text-white max-w-4xl mx-auto lg:my-8">
15+
<a href="../index.html" class="text-blue-500 text-xs ps-3 pt-6 block">< 1511 Teaching Resources</a>
16+
<main class="mdStyle m-4 mt-0">
1917
{{ content }}
2018
</main>
2119
<script defer>
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<link rel="stylesheet" href="{{ "/assets/css/styles.css" | relative_url }}">
88
</head>
9-
<body class="bg-zinc-900 !text-white m-5">
10-
<main class="mdStyle">
9+
<body class="bg-zinc-900 !text-white max-w-4xl mx-auto lg:my-8 p-5">
10+
<main class="homepage">
1111
{{ content }}
1212
</main>
13+
<script defer>
14+
document.querySelectorAll('a').forEach(link => {
15+
link.addEventListener('click', event => {
16+
event.currentTarget.classList.add('clicked');
17+
});
18+
});
19+
</script>
1320
</body>
1421
</html>

_tailwind.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
@utility mdStyle {
77
& h1 {
88
font-size: 2.5rem;
9-
margin-top: 1.5rem;
109
font-weight: bold;
1110
}
1211

@@ -119,4 +118,6 @@
119118
padding: 0.5rem;
120119
font-size: 1.1rem;
121120
}
122-
}
121+
}
122+
123+
@import "./homepage.css"

homepage.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
@utility homepage {
3+
& h1 {
4+
@apply text-4xl font-bold mb-8 tracking-tight;
5+
}
6+
& h2, & h3 {
7+
@apply text-zinc-400 font-semibold mt-8 mb-4 text-lg;
8+
}
9+
& ul {
10+
@apply list-none p-0 mb-8;
11+
}
12+
& li {
13+
@apply mb-4;
14+
}
15+
& a {
16+
transition: color 50ms, background-color 50ms, margin 200ms cubic-bezier(0.68, -0.6, 0.32, 1.6);
17+
@apply block bg-zinc-800 text-blue-500 no-underline px-6 py-4 rounded-xl text-lg font-medium shadow-md motion-reduce:transition-none;
18+
@apply hover:bg-blue-500 hover:text-zinc-900 hover:ms-4 focus:bg-blue-400 focus:text-zinc-900 focus:ms-4 ;
19+
}
20+
& a.clicked {
21+
@apply ms-0;
22+
}
23+
}

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: main
2+
layout: homepage
33
title: Teaching Resources
44
---
55

0 commit comments

Comments
 (0)