summaryrefslogtreecommitdiff
path: root/site
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-12-04 03:32:14 +0000
committerdavidovski <david@davidovski.xyz>2023-12-04 03:32:14 +0000
commit6317c20aa212a21ae3301c7c8e936b1ea9451c96 (patch)
tree9075a1a72dc4c5071cc4a6bb0f13c5ad05b4ca1e /site
parentc8294e0aebef0c13507ad815ce773fdef00efcb7 (diff)
change size of window for some pages
Diffstat (limited to 'site')
-rwxr-xr-xsite/entries/welcome.html2
-rwxr-xr-xsite/index.html2
-rwxr-xr-xsite/page.sh14
-rw-r--r--site/style.css30
4 files changed, 37 insertions, 11 deletions
diff --git a/site/entries/welcome.html b/site/entries/welcome.html
index 5d34602..38e7351 100755
--- a/site/entries/welcome.html
+++ b/site/entries/welcome.html
@@ -2,7 +2,7 @@
# welcome
-welcome. i decided to turn this webpage into blog-style site... i havent got a topic or anything, so expect either: quality tutorials and very interesting techy things; or just random shitposts or rambles about things.
+welcome! i decided to turn this webpage into blog-style site... i havent got a topic or anything, so expect either: quality tutorials and very interesting techy things; or just random shitposts or rambles about things.
originally i was going to make this blog on [b.davidovski.xyz](https://b.davidovski.xyz) using [nanoblogger](http://nanoblogger.sourceforge.net/) (you might be able to still see the start of that) but nb itself seemed quite dead, and i couldn't really be asked to customise it all myself. So i made my own script to generate this static site: [kblg](https://github.com/davidovski/kblg/). Right now its probably just the bare minimum needed for this, but I am planning to add more things to it as I go along (including rss, if anyone would be interested?)
diff --git a/site/index.html b/site/index.html
index 39c4540..0f9c75d 100755
--- a/site/index.html
+++ b/site/index.html
@@ -1,4 +1,4 @@
-#!./page.sh
+#!./page.sh -s
entries="$(for f in entries/*.html; do echo $(git log --pretty=format:'%ct' --follow $f | tail -n 1) $f; done | sort -nr | cut -f2- -d' ')"
diff --git a/site/page.sh b/site/page.sh
index 69db1fb..d3bf1a7 100755
--- a/site/page.sh
+++ b/site/page.sh
@@ -1,5 +1,12 @@
#!/bin/sh
-# set a variable to avoid this template being repeated indefinitely
+
+# if this is called with -s then make it the small version of the page
+
+type="regular-window"
+[ "$1" = "-s" ] &&{
+ type="small-window"
+ shift
+}
cat << EOF
<!DOCTYPE html>
@@ -11,7 +18,7 @@ cat << EOF
<title>davidovski.xyz</title>
</head>
<body bgcolor="#191919" text="#f58f44" link="#b4d6d1">
- <div valign="middle" class="main" bgcolor="#191919" text="#f58f44">
+ <div valign="middle" class="main $type" bgcolor="#191919" text="#f58f44">
<div class="header">
<a href="https://davidovski.xyz/"<h1 class="title">davidovski.xyz</h1></a>
<hr>
@@ -32,12 +39,13 @@ cat << EOF
</div>
</div>
<hr>
-
+ <div class="content">
EOF
[ -z "$1" ] || /bin/sh $*
cat << EOF
+ </div>
</div>
</body>
diff --git a/site/style.css b/site/style.css
index 48d93bb..0180539 100644
--- a/site/style.css
+++ b/site/style.css
@@ -65,15 +65,29 @@ h3 {
color: #5f819d;
}
+.small-window {
+ width: 100%;
+ max-width: 1080px;
+ height: 100%;
+ max-height: 607px;
+}
+.regular-window {
+ width: 70%;
+ max-width: 70%;
+ height: 100%;
+ max-height: 80%;
+ overflow: hidden;
+
+}
.main {
background-color: #191919;
- margin-top: 0;
- margin-bottom: 0;
- margin-left: auto;
- margin-right: auto;
-
- width: 70%;
+ margin-left: auto;
+ margin-right: auto;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ position: absolute;
padding: 2%;
height: 100%;
@@ -81,6 +95,10 @@ h3 {
border-radius: 6px;
box-shadow: 0px 0px 50px black;
}
+.content {
+ overflow: scroll;
+ height: 80%;
+}
.header {
text-align: center;