1 # Copyright 2011 - 2014 Paul Hänsch
3 # This file is part of Busy
5 # Busy 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.
10 # Busy 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.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Busy. If not, see <http://www.gnu.org/licenses/>.
19 btcAddress="$(sed -rn 's:^btcAddress=(.*)$:\1:p' project.meta)"
20 flattrThingURL=$(sed -rn 's:^flattrThingURL=(.*)$:\1:p' project.meta)
22 grep -q 'useBitcoin=yes' project.meta \
23 && [ \! -f "QRcodes/bitcoin:${btcAddress}.png" ] \
24 && qrencode -o "QRcodes/bitcoin:${btcAddress}.png" "bitcoin:${btcAddress}"
25 grep -q 'useBitcoin=yes' project.meta \
27 <a href="#" onclick="javascript:show_screen('btcqr')"><img src="http://bitcoin.it/img/bc_logo_135.png" height="60"></a>
28 <div id="btcqr" style="display:none;">
29 <a href="#" onclick="javascript:hide_screen('btcqr')">close</a><br>
30 <img src="QRcodes/bitcoin:${btcAddress}.png"><br>
31 Address:<br><a href="bitcoin:${btcAddress}">$btcAddress</a>
35 grep -q 'useFlattr=yes' project.meta \
37 <a class="FlattrButton" style="display:none;" href="http://${HTTP_HOST}"></a>
38 <noscript> <a href="${flattrThingURL}" target="_blank">
39 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />
49 <title>$(sed -rn 's:^name=(.*)$:\1:p' $_DATA/project.meta) - Busy $(. $PAGE title)</title>
50 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
51 <style type="text/css"><!--
52 $(cat $_EXEC/templates/busy.css)
53 $(cat $_EXEC/templates/wikitext.css)
57 <script type="text/javascript">
59 function show_screen(id){
60 document.getElementById(id).style.display = "inline";
62 function hide_screen(id){
63 document.getElementById(id).style.display = "none";
68 <!-- Script for Flattr Button -->
69 <script type="text/javascript">
72 var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
73 s.type = 'text/javascript';
75 s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
76 t.parentNode.insertBefore(s, t);
82 <body onload="init();">
84 <h1 id="NAME">$(egrep '^name=.*$' project.meta |cut -d= -f2-)</h1>
85 <span id="SLOGAN">$(egrep '^slogan=.*$' project.meta |cut -d= -f2-)</span>
88 $( $LOGIN || echo '<form action="/?action=login" method="post" accept-charset="UTF-8">
90 <input type="text" name="user" value placeholder="Username"><br>
91 <input type="password" name="pass" value placeholder="Password"><br>
92 <input type="submit" value="Go!">
94 $( $LOGIN && echo "You are loggeed in as <b>${USER}</b><br>")
95 $( $LOGIN && $ACL_ADMIN && echo '<a href="?p=Admin">Admin</a><br>')
96 $( $LOGIN && echo '<a href="?p=Settings">My Settings</a><br>')
97 $( $LOGIN && echo '<a href="?action=logout">Log Out</a><br>')
100 <div id="ACCOUNTING">
104 <a href='/?p=Home'>Home</a>
105 <a href='/?p=Wiki'>Wiki</a>
106 <a href='/?p=Subversion'>Code</a>
107 <a href='/?p=Tasks'>Tasks</a>
115 # vi:set filetype=html: