]> git.plutz.net Git - confetti/blob - templates/frame.html.sh
8a754bab0afdd9de2432a064db89cdcdd07c47e9
[confetti] / templates / frame.html.sh
1 # Copyright 2014 Paul Hänsch
2 #
3 # This file is part of Confetti.
4
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
17
18 cat <<EOF
19 <!Doctype HTML>
20
21 <html>
22   <head>
23     <title>$($PAGE title)</title>
24     <style type="text/css">
25     <!--
26 * {
27   font-family: sans-serif;
28   box-sizing: border-box;
29   -moz-box-sizing: border-box;
30   -webkit-box-sizing: border-box;
31 }
32 body {
33   background: #EEE;
34   margin: 0;
35   padding: 2.5em 0 0 0;
36 }
37 .NAVIGATION {
38   position: fixed;
39   top: 0;
40   display: inline-block;
41   border-style: none solid solid solid;
42   border-width: 0 1px 1px 1px;
43   border-radius: 0 0 4px 4px;
44   margin: 0 auto auto 3%;
45   padding: .5em 1ex .5em 1ex;
46   background: #FFF;
47 }
48 .NAVIGATION a {
49   color: #008;
50   border: solid 1px #BBF;
51   margin: .5em .5ex .25em .5ex;
52   padding: .2em 3ex .2em 3ex;
53   background: #EFF;
54 }
55 .NAVIGATION a:hover {
56   border-width: 2px 1px 2px 1px;
57   background: #F3FFFF;
58 }
59
60 /* dynamic page CSS starts here */
61 $(. $PAGE css)
62     -->
63     </style>
64   </head>
65   <body class="$PAGE">
66     <div class="NAVIGATION">
67       $(NAVIGATION |sed -r 's:^([^ ]+) (.+)$:<a href="\1">\2</a>:g')
68     </div>
69     $(. $PAGE body)
70   </body>
71 </html>
72 EOF
73
74 # vi:set filetype=html: