Fixed some issues with the theme

MetaPost
Øyvind Skaaden 2020-11-22 14:12:23 +01:00
parent 7d9b1bb873
commit ee40bdf989
9 changed files with 121 additions and 49 deletions

View File

@ -5,7 +5,7 @@ url: https://glados.no
title: GLaDOS # Site title
name: Øyvind Skaaden # Your name
author: Øyvind Skaaden
avatar: /theme/img/avatar.jpg # Path to an avatar image
avatar: /theme/img/ØyvindSkaaden.jpg # Path to an avatar image
description: Personlig nettside for Øyvind Skaaden.
description_long: Personlig nettside for Øyvind Skaaden. Inneholder alt av stæsj jeg holder på med på fritiden.
@ -23,7 +23,8 @@ highlighter: rouge
excerpt_separator: <!--more-->
kramdown:
parse_block_html: true
toc_levels: 1..4
toc_levels: 2..4
# Add a directory to hold misc pages, just to keep the root directory clean.
include: ["_pages", "_portfolio"]

View File

@ -68,6 +68,11 @@
],
tags: 'ams',
processRefs: true,
},
chtml: {
scale: 1,
minScale: .5,
matchFontHeight: true,
}
};
</script>

View File

@ -13,17 +13,49 @@ layout: default
{{ content }}
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {/*
var tpl =
"<li class='nav-item'>\
<a class='nav-link bg-white mb-1' href='#header[idx]'>[name]</a>\
</li>"
<a class='nav-link bg-white mb-1' href='#[idx]'>[name]</a>\
</li>";
$("h2").each(function(idx, h2) {
$(h2).attr("id", "header" + idx)
var name = $(h2).text().trim()
var dom_string = tpl.replace("[name]", name).replace("[idx]", idx)
var header = $(dom_string)
$(".header-list").append(header)
var id = h2.id;
var name = h2.textContent;
var header = tpl.replace("[name]", name).replace("[idx]", id);
$(".header-list").append(header);
})*/
var level = -1;
var headers = new Array();
var tplDrop =
"<li class='nav-item dropdown mb-1'>\
<a class='dropdown-toggle nav-link' data-toggle='dropdown' href='#'>[menuItem]\
<span class='caret'></span></a>\
<ul class='dropdown-menu subHeader[MenuId]'></ul>\
</li>";
var tplSub = "<li><a class='nav-link mb-1' href='#[idx]'>[name]</a></li>";
$("h2, h3").each(function(idx, h2) {
if (h2.tagName == "H2") {
level += 1;
var name = h2.textContent;
var id = h2.id;
headers.push(new Array());
var header = tplDrop.replace("[menuItem]",name).replace("[MenuId]", level);
$(".header-list").append(header);
}
else {
var name = h2.textContent;
var id = h2.id;
var header = tplSub.replace("[idx]", id).replace("[name]",name);
var subLevel = ".subHeader" + level;
$(subLevel).append(header);
headers[level].push(h2);
}
})
})
</script>

View File

@ -0,0 +1,29 @@
---
layout: default
---
<h1 class="border border-top-0 border-right-0 border-left-0 mb-3 pb-2">
{{ page.title }}
</h1>
<div class="d-md-block d-lg-none">
{% include components/lecture-meta.html %}
</div>
{{ content }}
<script type="text/javascript">
$(document).ready(function() {
var tpl =
"<li class='nav-item'>\
<a class='nav-link bg-white mb-1' href='#[idx]'>[name]</a>\
</li>"
$("h2").each(function(idx, h2) {
var id = $(h2).attr("id");
var name = $(h2).text().trim();
var dom_string = tpl.replace("[name]", name).replace("[idx]", id);
var header = $(dom_string);
$(".header-list").append(header);
})
})
</script>

View File

@ -23,8 +23,8 @@ This web site is the documentation for the theme and also provides examples of h
### Recent Posts
{% for post in site.posts limit:3 %}
{% for post in site.posts%}
{% include components/post-card.html %}
{% endfor %}

View File

@ -4,13 +4,18 @@ description: Filer for prosjekter og stæsj på NTNU.
tags: ntnu files
---
Vår 2020
--------
Filer fra NTNU.
<!--more-->
## Vår 2020
* TTT4270 - Elektronisk systemdesign, prosjekt
- [Teknisk notat. elsys prosjekt v20](/files/ntnu/v20/ttt4270/jolyu_fremtidens_fugletitter_elsys_v2020.pdf)
Høst 2019
---------
## Høst 2019
* TTT4265 - Elektronisk systemdesign II
- Designprosjeter
* [Designnotat 6](/files/ntnu/h19/ttt4265/D6.pdf)
@ -20,8 +25,8 @@ Høst 2019
* TDT4160 - Datamaskiner og digitalteknikk
- Alt av øvinger, forelesninger og eksamen på [git](https://git.glados.no/oyvindskaaden/TDT4160)
Vår 2019
--------
## Vår 2019
* TTT4260 - Elektronisk systemdesign I
- Designprosjeter
* [Designnotat 1](/files/ntnu/v19/ttt4260/D1.pdf)

View File

@ -1,30 +0,0 @@
---
title: "Testing of lecture notes"
description: Filer for prosjekter og stæsj på NTNU.
tags: ntnu lectures tdt4120
math: true
---
Lecture notes is fun \eqref{test}.
\begin{align}
E &= mc^2 \label{test} \\\\\
&= mv^s \nonumber
\end{align}
$\omega = 2 \pi f$
In equation \eqref{eq:sample}, we find the value of an
interesting integral:
\begin{equation}
\int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
\label{eq:sample}
\end{equation}
\begin{bmatrix}
a & b \\\\\
c & c
\end{bmatrix}
Whot

View File

@ -8,5 +8,34 @@ $green: #28a745 !default;
$primary: $green !default;
img {
max-width: 100%;
display: block;
margin: 0 auto;
max-height: 80%;
max-width: 80%;
}
blockquote {
border-left:.25em solid #dfe2e5;
margin:0;
color: #6a737d;
padding:0 0 0 20px;
font-style:italic;
}
.dropdown-menu>li>a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: 400;
line-height: 1.42857143;
color: #333;
white-space: nowrap;
}
.dropdown-menu>li>a:hover{
background-color: #eee;
}
.nav>li>a:hover {
text-decoration: none;
background-color: #eee;
}

File diff suppressed because one or more lines are too long