Commit Diff


commit - c2cdbf0fd06cbea7bc3bc5847e8283659e117555
commit + be7345422def6ccba8184a35018002794e5f8866
blob - cae83a8c2112d3942c7c698fb1914f244b23c9df
blob + a30bbd83dd469a44bde10cebd0156accf6c49d13
--- site/Makefile
+++ site/Makefile
@@ -24,6 +24,7 @@ SUBST_WWW =	${SUBST} MANEXT=html EXT=html
 
 all: dirs manpages pages
 	cp style.css www/
+	convert ../art/tohru.png -resize 300x300 www/tohru.png
 
 dirs:
 	mkdir -p gemini
@@ -37,7 +38,7 @@ manpages:
 
 pages:
 .for p in ${PAGES}
-	${SUBST_GEM} $p > gemini/$p
+	grep -v '^<' $p | ${SUBST_GEM} > gemini/$p
 
 	${SUBST_WWW} TITLE=${TITLE_${p}:Q} header.html > www/${p:.gmi=.html}
 	${MAKE} titles | ./menu.pl "${p:.gmi=.html}" >> www/${p:.gmi=.html}
blob - fb394ec9eafd684c36c4f979871906de9e7d4225
blob + 572da81870c5970989ca029a148ffca6fdfb9568
--- site/gem2html
+++ site/gem2html
@@ -35,6 +35,8 @@ while (<>) {
 		print "<pre>";
 	} elsif ($in_pre) {
 		say san($_);
+	} elsif (m/^</) {
+		say;
 	} elsif ($in_list && m/^$/) {
 		say "</ul>";
 		$in_list = 0;
@@ -49,6 +51,19 @@ while (<>) {
 		}
 		output("li", $1);
 	} elsif (m/^=>\s*([^\s]*)\s*(.*)$/) {
+		my $href = $1;
+		my $alt = $2 || $1;
+
+		# special case: images
+		if ($1 =~ /\.(png|jpg|svg)$/) {
+			if ($in_list) {
+				say "</ul>";
+				$in_list = 0;
+			}
+			say "<img src='$href' alt='$alt' />";
+			next;
+		}
+
 		if (!$in_list) {
 			$in_list = "link";
 			say "<ul class='link-list'>";
@@ -57,8 +72,7 @@ while (<>) {
 			say "</ul>";
 			say "<ul class='link-list'>";
 		}
-		my $href = $1;
-		$_ = $2 || $1;
+		$_ = $alt;
 		say "<li><a href='$href'>". san() ."</a></li>";
 	} elsif (m/^###\s*(.*)$/) {
 		output("h3", $1);
blob - ef55f80d3492c7931f9f290fed0e91f70600904b
blob + 83cb252be689ff1cd9ede0f007371eef8025c305
--- site/index.gmi
+++ site/index.gmi
@@ -1,5 +1,8 @@
 # kamid
 
+<section class="with-image">
+<img src="tohru.png" alt="Tohru from \"Kobayashi' Dragon Maid\"" title="tohru.png" />
+<div>
 kamid is a FREE, easy-to-use and portable implementation of a 9p file server daemon for UNIX-like systems with a strong focus on security and correctness.
 
 => GH/releases/download/CURRV/kamid-CURRV.tar.gz kamid-CURRV.tar.gz
@@ -16,8 +19,9 @@ kamid-NEXTV.pub:	NEXTSIGN
 => install.EXT		Installation guide
 => tutorial.EXT		Tutorial
 => caveats.EXT		Caveats
+</div>
+</section>
 
-
 ## Kamid documentation
 
 => 9p.7.MANEXT		9p.7: protocol documentation
blob - 3b8b69b9ca59b5aa328375008b423704632469e2
blob + 13e584882be268fd94a689eac738e5d22e3e9b21
--- site/style.css
+++ site/style.css
@@ -53,9 +53,28 @@ hr {
 }
 
 img {
-  border-radius: 5px;
+  margin: 10px;
+  display: inline-block;
 }
 
+section.with-image {
+}
+
+@media only screen and (min-width: 768px) {
+  section.with-image {
+    display: flex;
+    flex-direction: row;
+  }
+}
+
+section.with-image img {
+  object-fit: contain;
+}
+
+section.with-image div {
+  overflow: auto;
+}
+
 pre {
   overflow: auto;
   padding: 1rem;
@@ -77,12 +96,6 @@ ul.link-list {
   list-style: disclosure-closed;
 }
 
-img {
-  display: block;
-  margin: 0 auto;
-  max-width: 100%;
-}
-
 footer {
   margin-top: 4rem;
   font-size: 0.8rem;
@@ -110,6 +123,15 @@ footer {
   code, kbd {
     color: #ff4cff;
   }
+
+  img {
+    opacity: 0.8;
+    transition: opacity .2s ease-in-out;
+  }
+
+  img:hover {
+    opacity: 1;
+  }
 }
 
 @media (max-width: 400px) {