Commit 7a601001c1ae9933f3eb23bb0b8b5c2f4e194d97

Add simple support for site wide footer

  Add footer in config file. HTML is allowed. See sampleConf.py
  • Diff rendering mode:
  • inline
  • side by side

mouchak/sampleConf.py

1DB = 'crin'
1DB = 'mouchak_test'
2SITE_TITLE = 'Testing Mouchak'2SITE_TITLE = 'Testing Mouchak'
3SITE_FOOTER = '''
4<div style="text-align: center;">
5 <small> Place your site footer here </small>
6</div>
7'''
3HOST = '0.0.0.0'8HOST = '0.0.0.0'
4PORT = 50009PORT = 5000

mouchak/server.py

44@app.route('/', methods=['GET'])44@app.route('/', methods=['GET'])
45def index():45def index():
46 return flask.render_template('index.html', content=getContent(),46 return flask.render_template('index.html', content=getContent(),
47 title=conf.SITE_TITLE)
47 title=conf.SITE_TITLE, footer=conf.SITE_FOOTER)
4848
4949
50@app.route('/edit', methods=['GET'])50@app.route('/edit', methods=['GET'])

mouchak/templates/index.html

28 <div id="navigation"></div>28 <div id="navigation"></div>
29 </div>29 </div>
30 <div id="content-container"></div>30 <div id="content-container"></div>
31 <div id="footer"></div>
31 <div id="footer"> {{ footer|safe }} </div>
32 </div>32 </div>
3333
34 <script>34 <script>