Skip to content

Commit 6ad2b89

Browse files
committed
Added faq
1 parent 4ce0612 commit 6ad2b89

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

zerobin/default_settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
MENU = (
5959
('Home', '/'), # internal link. First link will be highlited
6060
('Download 0bin', 'https://github.com/sametmax/0bin'), # external link
61+
('Faq', '/faq/'), # faq
6162
('Contact', 'mailto:your@email.com') # email
6263
)
6364

zerobin/routes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ def index():
3838
return GLOBAL_CONTEXT
3939

4040

41+
@app.route('/faq/')
42+
@view('faq')
43+
def index():
44+
return GLOBAL_CONTEXT
45+
46+
4147
@app.route('/paste/create', method='POST')
4248
def create_paste():
4349

zerobin/views/faq.tpl

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<div class="well">
2+
3+
<h1>FAQ</h1>
4+
5+
%for i, entry in enumerate(settings.MENU):
6+
%if "mailto:" in entry[1]:
7+
<p>If a question does not appear here you can
8+
<span title="{{ entry[1].replace('mailto:', '').replace('@', '__AT__') }}"
9+
class="email-link" >
10+
contact us
11+
</span>.
12+
</p>
13+
%end
14+
%end
15+
16+
<hr width="90%">
17+
18+
<dl>
19+
20+
<dt>What's the name of the captain?</dt>
21+
<dd>The name of the captain is Igloo !</dd>
22+
</br>
23+
<dt>What's the name of the captain?</dt>
24+
<dd>The name of the captain is Igloo !</dd>
25+
</br>
26+
<dt>What's the name of the captain?</dt>
27+
<dd>The name of the captain is Igloo !</dd>
28+
29+
</dl>
30+
31+
</div>
32+
33+
34+
35+
%rebase base settings=settings

0 commit comments

Comments
 (0)