Skip to content

Commit

Permalink
Adds footnote + table of contents generation
Browse files Browse the repository at this point in the history
  • Loading branch information
derpyzza committed Oct 28, 2024
1 parent 0ce92a3 commit 57dd023
Show file tree
Hide file tree
Showing 16 changed files with 538 additions and 292 deletions.
7 changes: 1 addition & 6 deletions assets/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div>
<a href="/index.html">home</a>
<span>/</span>
<a href="/archive.html">archive</a>
<a href="/public/archive.html">archive</a>
<span>/</span>
<a href="https://github.com/derpyzza">github</a>
</div>
Expand All @@ -33,7 +33,6 @@
<hgroup>
<h1>{{title}}</h1>
</hgroup>

{{content}}
<br>
<ul>
Expand All @@ -47,10 +46,6 @@ <h1>{{title}}</h1>
<span>
Derpyzza — 2024
</span>
<span>generated with
<a href="https://github.com/derpyzza/jenny"> jenny </a>
</span>
<a href=" ">back to top</a>
</nav>
</footer>
</body>
Expand Down
88 changes: 43 additions & 45 deletions assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/*light*/
--dc: #4c4c4c;
/*decor colour*/
--ac: #f66f57;
--ac: #ff5c5c;
/*accent*/
--a2: #f9a293;
/*accent 2*/
Expand All @@ -32,21 +32,27 @@

--code-bg: #0e0e0e;

--code-box-side-bg: #000;
--code-box-side-fg: #fff;

--wi: 80ch
/*max width*/
}

@media (prefers-color-scheme: light) {
:root {
--bg: #fff9f3;
--bg: #ffffff;
/*background*/
--nm: #161616;
--nm: #272727;
/*normal*/
--li: #9f9f9f;
/*light*/
--note-bg: #ffcdc0;
--hint-bg: #bbdfff;
--code-bg: #e6e6e6;
--note-bg: #e99fff;
--hint-bg: #acd6cf;
--code-bg: #f0f4f7;

--code-box-side-bg: #000;
--code-box-side-fg: #fff;
}
}

Expand All @@ -61,6 +67,7 @@ body {
background-color: var(--bg);
/* background-color: #0f0f0f; */
font-family: 'Noto Sans';
/* font-size: 18px; */
}

header,
Expand All @@ -72,6 +79,20 @@ section {
word-wrap: break-word;
}

section, h2, h3, h4 {
margin-top: 2rem;
}

.infobox h2,
.infobox h3,
.infobox h4 {
margin-top: 0;
}

sup a {
font-weight: bolder;
}

header {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -118,7 +139,7 @@ p {

a {
color: var(--ac);
text-decoration: underline;
text-decoration: underline var(--ac);
}

a:hover,
Expand Down Expand Up @@ -230,7 +251,7 @@ mark {
#toc {
display: inline;
float: right;
left: 10%;
left: 2%;
top: 160px;
position: fixed;
width: 20vw;
Expand Down Expand Up @@ -259,6 +280,7 @@ mark {
.infobox {
padding: 18px;
border-radius: 4px;
border-bottom-right-radius: 20px;
}

.note {
Expand All @@ -283,14 +305,11 @@ mark {

aside[id^="side-"],
.aside {
/* position: absolute; */
/* right: 25rem; */
display: inline;
float: right;
position: relative;
width: 20vw;
margin-right: -22vw;
/* font-size: 16px; */
}

.code-highlight {
Expand All @@ -301,48 +320,22 @@ aside[id^="side-"],
padding: 20px 20px 20px 10px;
}

code {
color: var(--nm);
font-family: 'Fira Code';
}

code span {
.code-highlight code span {
font-weight: normal;
}

.code-box {
padding: 12px;
code {
border-radius: 10px;
font-family: 'Fira Code';
color: var(--nm);
background-color: var(--code-bg);
font-family: 'Fira Code';
}

.code-side {
user-select: none;
color: var(--ac);;
margin: 0px 12px 0px 0px;
padding: 12px 12px 12px 18px;
background-color: var(--dc);
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}

.code-box pre {
border-radius: 6px;
}

.post-list li {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
margin-left: 16px;
}

pre {
counter-reset: line;
border-radius: 5px;
/* background-color: #0e0e0e; */
/* padding: 2em 0px; */
}

pre code {
Expand All @@ -351,14 +344,19 @@ pre code {

pre code::before {
content: counter(line);
/* background-color: #070707; */
color: #f66f57;
color: var(--ac);
display: inline-block;
text-align: right;
width: 2em;
padding: 0 1em 0 0;
}

.post-list li {
display: flex;
justify-content: space-between;
align-items: center;
}

div[class^="language-"]::before {
content: attr(lang);
position: relative;
Expand All @@ -381,7 +379,7 @@ nav {

footer nav {
padding-top: 4rem;
justify-content: space-between;
justify-content: center;
}

@media screen and (max-width: 1400px) {
Expand Down
30 changes: 7 additions & 23 deletions assets/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,34 @@
</head>

<body>
<header id="header">
<a href="/">
// Derpyzza's notes :D
</a>
<div>
<a href="/index.html">home</a>
<span>/</span>
<a href="/archive.html">archive</a>
<span>/</span>
<a href="https://github.com/derpyzza">github</a>
</div>
</header>

<main>
<section id="main">
<hgroup>
<div class="datebar">
<span> 26th October, 2024 </span>
<span>{{date}}</span>
<a href="/public/archive.html">Go back</a>
</div>
<h1>{{title}}</h1>
<h4>{{subtitle}}</h4>
{{subtitle}}
</hgroup>

<article>
{{content}}
</article>

</section>

</main>

<footer id="footer">
<hr />
<nav>
<span>
Derpyzza — 2024
</span>
<div>
<a href="/index.html">home</a>
<span> / </span>
<a href="/archive.html">archive</a>
<a href="/public/archive.html">archive</a>
<span> / </span>
<a href="https://github.com/derpyzza">github</a>
</div>
<a href=" ">back to top</a>
<span> / </span>
<a href=" ">back to top</a>
</nav>
</footer>
</body>
Expand Down
51 changes: 25 additions & 26 deletions design.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</head>

<body>
<header id="header">
<!-- <header id="header">
<a href="/">
// Derpyzza's notes :D
</a>
Expand All @@ -30,7 +30,7 @@
<span>/</span>
<a href="https://github.com/derpyzza">github</a>
</div>
</header>
</header> -->
<main>
<section id="main">
<hgroup>
Expand All @@ -53,7 +53,7 @@ <h4>This is the subtitle, which describes the title in greater detail, or perhap
<article>
<div id="toc">
<ul class="toc">
<a href="#main">
<a href="">
Title
</a>
<a href="#h1">
Expand Down Expand Up @@ -165,7 +165,7 @@ <h3>Notice</h3>
</ul>
<br>

<div class="language-c code-highlight" lang="crystal">
<div class="language-c code-highlight" lang="C">
<pre>
<code>#include &lt;stdio.h&gt;</code>
<code></code>
Expand All @@ -186,6 +186,7 @@ <h3>Notice</h3>
<code> printf("hello planet %i", x);</code>
<code>}</code>
</pre>
</div>
</div>
<br>
<br>
Expand All @@ -194,11 +195,14 @@ <h3>Notice</h3>
<div class="code-side">$</div>
cd build && make run
</div> -->
<div class="code-box" style="display: flex;padding: 0;">
<div class="code-side">>_</div>
<div class="code-body" style="color: var(--nm); padding: 12px 0px;width: 100%;margin-left: 16px;">
cd build &amp;&amp; make run</div>
</div>
<div class="code-highlight">
<code>cd build &amp;&amp; make run</code>
</div>
<p>and then do</p>
<div class="code-highlight">
<code>^C</code>
</div>
<p>to quit</p>
<p>yaay</p>

<ol>
Expand Down Expand Up @@ -252,24 +256,19 @@ <h2>Footnotes & Links</h2>
</ul>

</section>

<footer id="footer">
<hr />
<nav>
<span>
Derpyzza — 2024
</span>
<div>
<a href="/index.html">home</a>
<span> / </span>
<a href="/archive.html">archive</a>
<span> / </span>
<a href="https://github.com/derpyzza">github</a>
</div>
<a href=" ">back to top</a>
</nav>
</footer>
</main>
<footer id="footer">
<!-- <hr /> -->
<nav>
<a href="/index.html">home</a>
<span> / </span>
<a href="/public/archive.html">archive</a>
<span> / </span>
<a href="https://github.com/derpyzza">github</a>
<span> / </span>
<a href=" ">back to top</a>
</nav>
</footer>
</body>

</html>
Loading

0 comments on commit 57dd023

Please sign in to comment.