summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--blog.html29
-rw-r--r--blog/.html0
-rw-r--r--blog/style.css13
-rw-r--r--bloglist.html3
-rwxr-xr-xgen4
-rwxr-xr-xgenblog15
-rw-r--r--index.html13
-rw-r--r--pics/globe.pngbin0 -> 5198 bytes
-rw-r--r--pics/open-book.pngbin0 -> 3121 bytes
-rw-r--r--pics/waving.pngbin0 -> 5969 bytes
-rwxr-xr-xscripts/genblog25
-rwxr-xr-xscripts/gengit13
-rw-r--r--style.css19
13 files changed, 102 insertions, 32 deletions
diff --git a/blog.html b/blog.html
new file mode 100644
index 0000000..ee59394
--- /dev/null
+++ b/blog.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML>
+<html lang="en">
+ <head>
+ <title>Squibid's Blog</title>
+ <link rel="stylesheet" href="style.css">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ </head>
+ <style type="text/css">
+ p {
+ font-size: 2.5vw;
+ }
+ #date {
+ font-size: 1.5vw;
+ float: right;
+ color: white;
+ }
+ </style>
+ <body>
+ <div class="master">
+ <header>
+ <h1 id="font"><span style="color: #ED8182;">Squibid's</span> Blog</h1>
+ </header>
+ <hr style="color: #f7f7f7;">
+ <p> <!-- script marker blog -->
+ </p> <!-- script marker blog -->
+ </div>
+ </body>
+</html>
diff --git a/blog/.html b/blog/.html
deleted file mode 100644
index e69de29..0000000
--- a/blog/.html
+++ /dev/null
diff --git a/blog/style.css b/blog/style.css
index 83ff097..1f346fb 100644
--- a/blog/style.css
+++ b/blog/style.css
@@ -5,3 +5,16 @@ html {
font-size: 2vh;
color: white;
}
+
+a:link, a:visited {
+ background-color: #f44336;
+ color: white;
+ padding: 1px 1px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+}
+
+a:hover, a:active {
+ background-color: red;
+}
diff --git a/bloglist.html b/bloglist.html
deleted file mode 100644
index 0004ac3..0000000
--- a/bloglist.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<p style="font-family: sans-serif; color: white;">
-2023 Mar 10 - <a href="https://squi.bid/blog/state-of-the-site.html" target="top" id="link">state-of-the-site</a><br>
-</p>
diff --git a/gen b/gen
new file mode 100755
index 0000000..d4894d7
--- /dev/null
+++ b/gen
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./scripts/gengit
+./scripts/genblog
diff --git a/genblog b/genblog
deleted file mode 100755
index 0705892..0000000
--- a/genblog
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-blogs=$(ls -ct1 blog/*.html)
-date() {
- ls -ct1l --time-style=+'%Y %b %d' $1 | cut -d ' ' -f 6-8
-}
-[ -f bloglist.html ] && rm bloglist.html
-echo '<p style="font-family: sans-serif; color: white;">' >> bloglist.html
-[ "$blogs" ] || echo "No blogs yet :)" >> bloglist.html
-
-for i in $blogs; do
- name=$(echo $i | sed 's/blog\///' | sed 's/\..*//')
- echo $(date $i)" - <a href=\"https://squi.bid/$i\" target=\"top\" id=\"link\">$name</a><br>" >> bloglist.html
-done
-echo '</p>' >> bloglist.html
diff --git a/index.html b/index.html
index 29d133f..761ca9e 100644
--- a/index.html
+++ b/index.html
@@ -9,7 +9,7 @@
<body>
<div class="master">
<header>
- <h1 id="font">Squibid's<br>Website!</h1>
+ <h1 id="font"><span style="color: #ED8182;">Squibid's</span> Website</h1>
</header>
<hr style="color: #f7f7f7;">
<div id="left">
@@ -19,12 +19,15 @@
interesting along with some of my personal
projects and a blog. </p>
<h2 id="font">🌐 Git Repos</h2>
- <a href="https://git.squi.bid">git site</a>
- <object type="text/html" data="gitlist.html"></object>
+ <p> <!-- script marker git -->
+ </p> <!-- script marker git -->
+ <a href="https://git.squi.bid">more...</a>
</div>
<div id="right">
- <h2 id="font">📖 My Blog</h2>
- <object type="text/html" data="bloglist.html"></object>
+ <h2 id="font">📚 My Blog</h2>
+ <p> <!-- script marker blog -->
+ </p> <!-- script marker blog -->
+ <a href="blog">more...</a>
</div>
</div>
</body>
diff --git a/pics/globe.png b/pics/globe.png
new file mode 100644
index 0000000..378050f
--- /dev/null
+++ b/pics/globe.png
Binary files differ
diff --git a/pics/open-book.png b/pics/open-book.png
new file mode 100644
index 0000000..5db64c3
--- /dev/null
+++ b/pics/open-book.png
Binary files differ
diff --git a/pics/waving.png b/pics/waving.png
new file mode 100644
index 0000000..5773b62
--- /dev/null
+++ b/pics/waving.png
Binary files differ
diff --git a/scripts/genblog b/scripts/genblog
new file mode 100755
index 0000000..e77f85f
--- /dev/null
+++ b/scripts/genblog
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+blogs=$(ls -ct1 blog/*.html)
+blogs5=$(ls -ct1 blog/*.html | head -5)
+date() {
+ ls -ct1l --time-style=+'%Y %b %d' $1 | cut -d ' ' -f 6-8
+}
+# delete old bloglist
+sed -i -n '1,/ <p> <!-- script marker blog -->/p;/ <\/p> <!-- script marker blog -->/,$p' index.html
+sed -i -n '1,/ <p> <!-- script marker blog -->/p;/ <\/p> <!-- script marker blog -->/,$p' blog.html
+
+# top 5 blogs
+for i in $blogs5; do
+ name=$(echo $i | sed 's/blog\///' | sed 's/\..*//' | sed 's/-/ /g')
+ line="<a href=\"https://squi.bid/$(echo $i | sed 's/\.html//')\">$name</a> [$(date $i)]<br>"
+ # add new bloglist
+ sed -i "/\ <\/p> <!-- script marker blog -->/i $line" index.html
+done
+# full blog
+for i in $blogs; do
+ name=$(echo $i | sed 's/blog\///' | sed 's/\..*//' | sed 's/-/ /g')
+ line="<a href=\"https://squi.bid/$(echo $i | sed 's/\.html//')\">$name<span id=\"date\">$(date $i)</span></a><br>"
+ # add new bloglist
+ sed -i "/ <\/p> <!-- script marker blog -->/i $line" blog.html
+done
diff --git a/scripts/gengit b/scripts/gengit
new file mode 100755
index 0000000..ff268ee
--- /dev/null
+++ b/scripts/gengit
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+repos=$(ls -1 /var/git | grep -o '.*\.git' | head -5)
+
+# delete old list
+sed -i -n '1,/ <p> <!-- script marker git -->/p;/ <\/p> <!-- script marker git -->/,$p' index.html
+
+for i in $repos ; do
+ name=$(echo $i | sed 's/\.git//')
+ line="<a href=\"https://git.squi.bid/$name\" target=\"top\" id=\"link\">$name</a><br>"
+ # add new repo
+ sed -i "/ <\/p> <!-- script marker git -->/i $line" index.html
+done
diff --git a/style.css b/style.css
index d29f987..caf36e5 100644
--- a/style.css
+++ b/style.css
@@ -1,18 +1,15 @@
html, body {
- background-color: #A9454A;
+ background-color: #141414;
display: flex;
justify-content: center;
}
.master {
- background-color: #141414;
- border: 1vw solid #141414;
position: absolute;
width: 50%;
- height: 100vh;
}
header {
text-align: center;
- font-size: 1.7vw;
+ font-size: 3.5vh;
}
#profile {
vertical-align: middle;
@@ -22,10 +19,6 @@ header {
font-family: sans-serif;
color: white;
}
-#link {
- font-family: sans-serif;
- color: white;
-}
#left {
float: left;
text-align: left;
@@ -36,3 +29,11 @@ header {
text-align: right;
width: 50%;
}
+a {
+ font-family: sans-serif;
+ text-decoration: none;
+ color: #ED8182;
+}
+a:hover, a:active {
+ font-style: italic;
+}