.
This commit is contained in:
parent
2a9167cb7e
commit
96573664a6
95 changed files with 4130 additions and 2328 deletions
|
|
@ -12,10 +12,19 @@ body {
|
|||
color: var(--fg);
|
||||
padding: 0 1rem;
|
||||
/* layout */
|
||||
max-width: 800px;
|
||||
max-width: 700px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
body a {
|
||||
color: magenta;
|
||||
}
|
||||
|
||||
body pre {
|
||||
padding:1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* ===== Typography ===== */
|
||||
h1, h2, h3, h4 {
|
||||
line-height: 1.3;
|
||||
|
|
@ -24,6 +33,7 @@ h1, h2, h3, h4 {
|
|||
}
|
||||
|
||||
p {
|
||||
margin-top: 1.3rem;
|
||||
margin-bottom: 1.3rem;
|
||||
}
|
||||
|
||||
|
|
@ -37,51 +47,73 @@ img {
|
|||
/* ===== Navigation ===== */
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 0;
|
||||
flex-wrap: wrap;
|
||||
/* justify-content: space-between; */
|
||||
/* align-items: center; */
|
||||
/* padding: 1rem 0; */
|
||||
/* flex-wrap: wrap; */
|
||||
}
|
||||
|
||||
nav a {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.home {
|
||||
font-size: 24px;
|
||||
margin-right: 1.5rem;
|
||||
font-size: 3rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.home {
|
||||
}
|
||||
|
||||
.toggle-button {
|
||||
font-size: 24px;
|
||||
font-size: 3rem;
|
||||
border: none;
|
||||
background-color: var(--bg);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toggle-button:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
/* .search-container { */
|
||||
/* text-align: center; */
|
||||
/* } */
|
||||
|
||||
#search {
|
||||
width: 100%;
|
||||
background-color: var(--bg);
|
||||
color: var(--fg);
|
||||
border: 1px solid var(--fg);
|
||||
padding: 1rem;
|
||||
margin-bottom: 1.3rem;
|
||||
}
|
||||
|
||||
/* #results li { */
|
||||
/* list-style: none; */
|
||||
/* padding: 20px; */
|
||||
/* font-size: 1.2rem; */
|
||||
/* } */
|
||||
#results li {
|
||||
list-style: none;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* archive tree */
|
||||
|
||||
.tree, .tree ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tree ul {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.tree li {
|
||||
margin: 0;
|
||||
padding: 0.25rem 0 0.25rem 1rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tree li::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border-left: 1px solid var(--fg);
|
||||
border-bottom: 1px solid var(--fg);
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* ===== Responsive ===== */
|
||||
|
|
|
|||
|
|
@ -17,17 +17,18 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
const query = searchInput.value.trim().toLowerCase();
|
||||
resultsList.innerHTML = "";
|
||||
|
||||
if (!query) return;
|
||||
if (!query) {
|
||||
return;
|
||||
}
|
||||
|
||||
// filter out posts that don't match
|
||||
const matches = index.filter(
|
||||
(post) =>
|
||||
post.title.toLowerCase().includes(query) ||
|
||||
post.content.toLowerCase().includes(query),
|
||||
);
|
||||
|
||||
if (matches.length === 0) {
|
||||
resultsList.innerHTML = "<li>No results found.</li>";
|
||||
resultsList.innerHTML = "<li>You leafed too hard :/</li>";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue