Initial commit - based off old webfolio
This commit is contained in:
commit
da058b7fb5
16 changed files with 276 additions and 0 deletions
11
feed.xml
Executable file
11
feed.xml
Executable file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<rss version="2.0">
|
||||
|
||||
<channel>
|
||||
<title>Benjamin Zimmerman's webfolio</title>
|
||||
<description>The feed for my webfolio, I guess</description>
|
||||
<link>https://engl-webfolio.askiiart.net</link>
|
||||
<lastBuildDate>Tue, 12 Nov 2024 15:46:22 +0000</lastBuildDate>
|
||||
|
||||
</channel>
|
||||
</rss>
|
17
generate-rss.sh
Executable file
17
generate-rss.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Makes RSS feed (feed.xml)
|
||||
# Currently missing description and pubDate
|
||||
# Based off https://en.wikipedia.org/wiki/RSS, particularly the example
|
||||
printf "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<rss version=\"2.0\">\n\n<channel>\n <title>Benjamin Zimmerman's webfolio</title>\n <description>The feed for my webfolio, I guess</description>\n <link>https://engl-webfolio.askiiart.net</link>\n <lastBuildDate>$(TZ='UTC' date --rfc-2822)</lastBuildDate>" >feed.xml
|
||||
find . -name '*.html' -print | while read -r item; do
|
||||
# Skip template and index
|
||||
if [[ $item == "./index.html" || $item == "./template.html" ]]; then
|
||||
continue
|
||||
fi
|
||||
item="${item%.*}"
|
||||
item="${item#./}"
|
||||
TITLE=$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)
|
||||
printf "\n <item>\n <title>${TITLE}</title>\n <link>https://askiiart.net/${item}.html</link>\n </item>" >>feed.xml
|
||||
done
|
||||
printf "\n\n</channel>\n</rss>" >>feed.xml
|
20
generate-sitemap.sh
Executable file
20
generate-sitemap.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Based on this: https://www.lostsaloon.com/technology/how-to-create-an-xml-sitemap-using-wget-and-shell-script/
|
||||
# (https://web.archive.org/web/20231202193251/https://www.lostsaloon.com/technology/how-to-create-an-xml-sitemap-using-wget-and-shell-script/) (https://archive.ph/qtdMP)
|
||||
sitedomain=https://engl-webfolio.askiiart.net
|
||||
dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
header='<?xml version="1.0" encoding="UTF-8"?><urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
||||
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'
|
||||
echo $header >sitemap.xml
|
||||
|
||||
find . -name "*.md" | while read -r item; do
|
||||
item="${item:2}"
|
||||
item="${item%.*}"
|
||||
echo '<url><loc>'${sitedomain}/${item}.html'</loc></url>' >>sitemap.xml
|
||||
done
|
||||
|
||||
echo "</urlset>" >> sitemap.xml
|
30
index.html
Normal file
30
index.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
|
||||
<title>Webfolio</title>
|
||||
<link href="/style.css" type="text/css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar" id="navbar">
|
||||
<a href="/" class="active">Home</a>
|
||||
<a href="https://git.askiiart.net/askiiart/engl-2311-webfolio">Code</a>
|
||||
</div>
|
||||
<h1 id="webfolio">Webfolio</h1>
|
||||
<h2 id="helloooooo">Helloooooo</h2>
|
||||
<p>I'm Benjamin Zimmerman, and this is my webfolio for Business
|
||||
and Technical Writing. The code is available <a
|
||||
href="https://git.askiiart.net/askiiart/engl-2311-webfolio">here</a>
|
||||
if you want to check it out.</p>
|
||||
<p>Anyways, here a picture I took of a baby turtle I used to
|
||||
have:</p>
|
||||
<figure>
|
||||
<img src="/static/askiiart.gif" alt="A baby turtle basking" />
|
||||
<figcaption aria-hidden="true">A baby turtle
|
||||
basking</figcaption>
|
||||
</figure>
|
||||
</body>
|
||||
<footer>
|
||||
<p>Created by Benjamin Zimmerman | <a href="/feed.xml">RSS</a></p>
|
||||
</footer>
|
||||
</html>
|
9
index.md
Executable file
9
index.md
Executable file
|
@ -0,0 +1,9 @@
|
|||
# Webfolio
|
||||
|
||||
## Helloooooo
|
||||
|
||||
I'm Benjamin Zimmerman, and this is my webfolio for Business and Technical Writing. The code is available [here](https://git.askiiart.net/askiiart/engl-2311-webfolio) if you want to check it out.
|
||||
|
||||
Anyways, here a picture I took of a baby turtle I used to have:
|
||||
|
||||
![A baby turtle basking](/static/askiiart.gif)
|
11
md2html.sh
Executable file
11
md2html.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
find . -name "*.md" | while read -r item; do
|
||||
item="${item%.*}"
|
||||
echo "Currently processing ${item}"
|
||||
pandoc -f markdown-smart --data-dir . --template ${dir}/template.html -t html -o ${item}.html ${item}.md --metadata title="$(grep -m 1 -oP '(?<=^# ).*' ${item}.md | cat)"
|
||||
done
|
||||
|
||||
find . \( ! -regex './md2html.sh' \) -type f | xargs sed -i 's/sourceCode /language-/g'
|
7
run.sh
Executable file
7
run.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
|
||||
cd $SCRIPT_DIR
|
||||
./md2html.sh
|
||||
./generate-rss.sh
|
3
sitemap.xml
Normal file
3
sitemap.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<url><loc>https://engl-webfolio.askiiart.net/index.html</loc></url>
|
||||
</urlset>
|
BIN
static/AtkinsonHyperlegible-Bold.woff2
Normal file
BIN
static/AtkinsonHyperlegible-Bold.woff2
Normal file
Binary file not shown.
BIN
static/AtkinsonHyperlegible-BoldItalic.woff2
Normal file
BIN
static/AtkinsonHyperlegible-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
static/AtkinsonHyperlegible-Italic.woff2
Normal file
BIN
static/AtkinsonHyperlegible-Italic.woff2
Normal file
Binary file not shown.
BIN
static/AtkinsonHyperlegible-Regular.woff2
Normal file
BIN
static/AtkinsonHyperlegible-Regular.woff2
Normal file
Binary file not shown.
BIN
static/FiraCodeNerdFontMono-Regular.woff2
Normal file
BIN
static/FiraCodeNerdFontMono-Regular.woff2
Normal file
Binary file not shown.
BIN
static/askiiart.gif
Executable file
BIN
static/askiiart.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 789 KiB |
150
style.css
Executable file
150
style.css
Executable file
|
@ -0,0 +1,150 @@
|
|||
@font-face {
|
||||
/* from https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode */
|
||||
font-family: "FiraCode";
|
||||
src: url('/static/FiraCodeNerdFontMono-Regular.woff2');
|
||||
}
|
||||
|
||||
/* from Google Fonts, under the Open Font License */
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible";
|
||||
src: local('Atkinson Hyperlegible'), url('/static/AtkinsonHyperlegible-Regular.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible Bold";
|
||||
src: local('Atkinson Hyperlegible Bold'), url('/static/AtkinsonHyperlegible-Bold.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible Italic";
|
||||
src: local('Atkinson Hyperlegible Italic'), url('/static/AtkinsonHyperlegible-Italic.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Atkinson Hyperlegible Bold Italic";
|
||||
src: local('Atkinson Hyperlegible Bold Italic'), url('/static/AtkinsonHyperlegible-BoldItalic.woff2');
|
||||
}
|
||||
|
||||
body {
|
||||
color: #dadada;
|
||||
background: #181a1b;
|
||||
margin: 1em auto;
|
||||
max-width: 90vw;
|
||||
padding: 0 .62em;
|
||||
}
|
||||
|
||||
li {
|
||||
font-family: 'Atkinson Hyperlegible';
|
||||
}
|
||||
|
||||
p,
|
||||
footer {
|
||||
font: 18px/1.35 'Atkinson Hyperlegible', sans-serif;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
font: 14px/1.35 'Atkinson Hyperlegible', sans-serif;
|
||||
}
|
||||
|
||||
small {
|
||||
font: 14px/1.35 'Atkinson Hyperlegible', sans-serif;
|
||||
}
|
||||
|
||||
a:link,
|
||||
a:visited {
|
||||
color: #80c47b;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:visited:hover {
|
||||
color: #6bb794
|
||||
}
|
||||
|
||||
h1 {
|
||||
font: 36px/1.2 'Atkinson Hyperlegible Bold', sans-serif;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
font: 24px/1.2 'Atkinson Hyperlegible Bold', sans-serif;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font: 20px/1.2 'Atkinson Hyperlegible Bold', sans-serif;
|
||||
}
|
||||
|
||||
code {
|
||||
background: #0e0f0f;
|
||||
border-radius: .2em;
|
||||
padding: .125em;
|
||||
}
|
||||
|
||||
.force-word-wrap pre code {
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
@media (max-device-width: 1200px) {
|
||||
h1 {
|
||||
line-height: 1.2;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
line-height: 1.2;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
max-width: none
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 3px solid #59997a;
|
||||
padding-left: 1em;
|
||||
margin-left: 0.5;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 90vw;
|
||||
}
|
||||
|
||||
/* navbar code is stolen from https://www.w3schools.com/howto/howto_js_topnav.asp */
|
||||
.navbar {
|
||||
font-family: 'Atkinson Hyperlegible';
|
||||
background-color: #2a2a2a;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Style the links inside the navigation bar */
|
||||
.navbar a {
|
||||
float: left;
|
||||
color: #f2f2f2;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
/* Change the color of links on hover */
|
||||
.navbar a:hover {
|
||||
background-color: #ddd;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* Add a color to the active/current link */
|
||||
.navbar a.active {
|
||||
background-color: #047baa;
|
||||
color: #fff;
|
||||
}
|
18
template.html
Executable file
18
template.html
Executable file
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
|
||||
<title>$title$</title>
|
||||
<link href="/style.css" type="text/css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar" id="navbar">
|
||||
<a href="/" class="active">Home</a>
|
||||
<a href="https://git.askiiart.net/askiiart/engl-2311-webfolio">Code</a>
|
||||
</div>
|
||||
$body$
|
||||
</body>
|
||||
<footer>
|
||||
<p>Created by Benjamin Zimmerman | <a href="/feed.xml">RSS</a></p>
|
||||
</footer>
|
||||
</html>
|
Loading…
Reference in a new issue