index page uses css and images; css and img are stored in static dir

small-nav
Mimi Momo 4 years ago
parent 72cb61d952
commit 72b760dc17

@ -1,5 +1,5 @@
import datetime, os import datetime, os
from bottle import route, run, template from bottle import error, route, run, static_file, template
# write diary # write diary
@ -64,12 +64,26 @@ def sort_files(files):
def gather_files(): def gather_files():
return os.listdir('entries/feature/') return os.listdir('entries/feature/')
# Webpages # Static
@route('/static/css/<filename:path>')
def serve_css(filename):
return static_file(filename, root='static/css')
@route('/static/img/<filename:path>')
def serve_css(filename):
return static_file(filename, root='static/img')
# Routes
@error(404)
def error404(error):
return "unfortunately, a 404 error"
@route('/') @route('/')
def index(): def index():
"""home page""" """home page"""
info = {'news': 'News goes here', 'title': 'chimchooree\'s dev space - blessfrey', 'year': datetime.datetime.now()} info = {'css': 'index', 'news': 'News goes here', 'title': 'chimchooree\'s dev space - blessfrey', 'year': datetime.datetime.now()}
return template('index.tpl', info) return template('index.tpl', info)
@route('/game') @route('/game')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 817 B

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 272 KiB

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 229 KiB

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -1,3 +1,3 @@
<title>{{title or 'blessfrey.me'}}</title> <title>{{title or 'blessfrey.me'}}</title>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<link rel="stylesheet" type="text/css" href="res/styles/index.css"/> <link rel="stylesheet" type="text/css" href="static/css/{{css}}.css"/>

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
% rebase('frame.tpl') % rebase('frame.tpl')
<div class="social"> <div class="social">
<a href="https://twitter.com/lilchimchooree"><img class="img-social-ribbon" src="res/img/ele/twitter-ribbon.png"></a> <a href="https://twitter.com/lilchimchooree"><img class="img-social-ribbon" src="static/img/ele/twitter-ribbon.png"></a>
</div> </div>
<div class="bg"> <div class="bg">

Loading…
Cancel
Save