-
Notifications
You must be signed in to change notification settings - Fork 3
/
generate
executable file
·99 lines (93 loc) · 2.28 KB
/
generate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/env bash
INDHEAD=`cat <<EOF
<!DOCTYPE html>
<html lang="fr-CA">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Club RADAR</title>
<link href="./stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
<img src="logo.svg" alt="" id="radar-logo" />
<h1>RADAR</h1>
</hgroup>
</header>
<nav>
<a href="./index.html">Accueil</a>
<a href="./activites.html">Activités</a>
<a href="./membres.html">Membres</a>
<a href="./galerie.html">Galerie</a>
<a href="./about.html">À propos du club</a>
</nav>
<section>
EOF
`
INDTAIL=`cat <<EOF
</section>
<footer>
<ul>
<li><a href="./about.html">à propos</a></li>
<li><a href="https://github.com/RADAR-IRO">github</a></li>
<li><a href="mailto:[email protected]">contact</a></li>
</ul>
</footer>
</body>
</html>
EOF
`
echo $INDHEAD > docs/index.html
for FILENAME in $(ls rencontres/ | sort -r | head)
do
source rencontres/${FILENAME}
#INDEX.HTML
ARTICLE=`cat <<-EOT
<article>
<header>
<a href="./rencontres/${FILENAME}.html"><h1>${ALT}</h1></a>
</header>
<section>
${RESUME}
</section>
</article>
EOT
`
echo $ARTICLE >> docs/index.html
#RENCONTRES
PAGE=`cat <<-EOT
<!DOCTYPE html>
<html lang="fr-CA">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Détails de rencontre du RADAR</title>
<link href="../stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
<img src="../logo.svg" alt="" id="radar-logo" />
<h1>Détails de rencontre du RADAR</h1>
<h2>${TITRE}</h2>
</hgroup>
</header>
<section>
${CONTENU}
</section>
<a href="/">Retour à l'accueil</a>
<footer>
<ul>
<li><a href="/about.html">à propos</a></li>
<li><a href="https://github.com/RADAR-IRO">github</a></li>
<li><a href="mailto:[email protected]">contact</a></li>
</ul>
</footer>
</body>
</html>
EOT
`
echo $PAGE > docs/rencontres/${FILENAME}.html
done
echo $INDTAIL >> docs/index.html