Commit 7a601001c1ae9933f3eb23bb0b8b5c2f4e194d97
Add simple support for site wide footer
Add footer in config file. HTML is allowed. See sampleConf.py
| | | | 1 | DB = 'crin' | | DB = 'crin' |
---|
| | 1 | DB = 'mouchak_test' | 2 | SITE_TITLE = 'Testing Mouchak' | 2 | SITE_TITLE = 'Testing Mouchak' |
---|
| | 3 | SITE_FOOTER = ''' |
---|
| | 4 | <div style="text-align: center;"> |
---|
| | 5 | <small> Place your site footer here </small> |
---|
| | 6 | </div> |
---|
| | 7 | ''' |
---|
3 | HOST = '0.0.0.0' | 8 | HOST = '0.0.0.0' |
---|
4 | PORT = 5000 | 9 | PORT = 5000 |
---|
| | | | 44 | @app.route('/', methods=['GET']) | 44 | @app.route('/', methods=['GET']) |
---|
45 | def index(): | 45 | def index(): |
---|
46 | return flask.render_template('index.html', content=getContent(), | 46 | return flask.render_template('index.html', content=getContent(), |
---|
47 | title=conf.SITE_TITLE) | | title=conf.SITE_TITLE) |
---|
| | 47 | title=conf.SITE_TITLE, footer=conf.SITE_FOOTER) | 48 | | 48 | |
---|
49 | | 49 | |
---|
50 | @app.route('/edit', methods=['GET']) | 50 | @app.route('/edit', methods=['GET']) |
---|
| | | | 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> | | <div id="footer"></div> |
---|
| | 31 | <div id="footer"> {{ footer|safe }} </div> | 32 | </div> | 32 | </div> |
---|
33 | | 33 | |
---|
34 | <script> | 34 | <script> |
---|