]> git.plutz.net Git - confetti/blob - templates/frame.html.sh
27d946668922195dd2252e731e82a5acb0563f54
[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   z-index: 0;
32 }
33 body {
34   background: #EEE;
35   margin: 0;
36   padding: 2.5em 0 0 0;
37 }
38 .NAVIGATION {
39   position: fixed;
40   top: 0;
41   display: inline-block;
42   border-style: none solid solid solid;
43   border-width: 0 1px 1px 1px;
44   border-radius: 0 0 4px 4px;
45   margin: 0 auto auto 3%;
46   padding: .5em 1ex .5em 1ex;
47   background: #FFF;
48   z-index: 1;
49 }
50 .NAVIGATION a {
51   color: #008;
52   border: solid 1px #BBF;
53   margin: .5em .5ex .25em .5ex;
54   padding: .2em 3ex .2em 3ex;
55   background: #EFF;
56 }
57 .NAVIGATION a:hover {
58   border-width: 2px 1px 2px 1px;
59   background: #F3FFFF;
60 }
61
62 /* dynamic page CSS starts here */
63 $(. $PAGE css)
64     -->
65     </style>
66   </head>
67   <body class="$PAGE">
68     <div class="NAVIGATION">
69       $(NAVIGATION |sed -r 's:^([^ ]+) (.+)$:<a href="\1">\2</a>:g')
70     </div>
71     $(. $PAGE body)
72   </body>
73 </html>
74 EOF
75
76 # vi:set filetype=html: