1s

Un dépôt pour générer le site de canine - retour accueil

git clone git://bebou.netlib.re/1s

Log | Files | Refs | README |

genm (911B)


      1 #! /bin/sh
      2 
      3 <<@@ cat
      4 <!DOCTYPE html>
      5 <html>
      6 <head>
      7 	<title>$2/$1</title>
      8 	<link rel=stylesheet href=/style.css />
      9 	<meta charset="utf-8">
     10 	<meta name="viewport" content="width=device-width,initial-scale=1.0">
     11 	<meta name="generator" content="catium" />
     12 </head>
     13 <header>
     14 	<h1>$3 $1</h1>
     15 </header>
     16 <body>
     17 	<nav>
     18 		<p><a href="/">Accueil</a></p>
     19 		<p>Année : <a href="/$1">$1</a></p>
     20 		<p>Jours :</p>
     21 		<ol>
     22 @@
     23 
     24 < cal grep "$1/$2" |
     25 	awk '{print $5}' | sed 'p' |
     26 	xargs printf "<li><a href='/$1/$2/%s'>%s</a></li>\n"
     27 
     28 <<@@ cat
     29 		</ol>
     30 	</nav>
     31 	<main>
     32 @@
     33 
     34 < cal grep "$1/$2" | awk '{print $6,$1,$5,$8,$3,$7}' | xargs printf '
     35 <p><a href=%s>%s %s %s %s</a></p>
     36 		<figure class="video">
     37 			<video controls preload="none" width="320" height="180">
     38 				<source src="%s">
     39 			</video>
     40 			<img class="poster" src="/320x180.svg" loading="lazy" width="320" height="180">
     41 		</figure>
     42 '
     43 
     44 <<@@ cat
     45 	</main>
     46 </body>
     47 </html>
     48 @@