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