simplify header

This commit is contained in:
codl 2017-08-07 21:35:46 +02:00
parent f33422fb44
commit 0ae1fe260b
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
3 changed files with 22 additions and 12 deletions

7
app.py
View File

@ -35,3 +35,10 @@ if 'SENTRY_DSN' in app.config:
from raven.contrib.flask import Sentry
app.config['SENTRY_CONFIG']['release'] = version.version
sentry = Sentry(app, dsn=app.config['SENTRY_DSN'])
@app.context_processor
def inject_static():
from flask import url_for
def static(filename, **kwargs):
return url_for('static', filename=filename, **kwargs)
return {'st': static}

View File

@ -18,12 +18,15 @@ body > section, body > header {
header > h1 {
margin: 0;
text-indent:-1000vw;
background: url('/static/logotype.png') no-repeat 2rem bottom, white;
background-size: contain;
padding: 2em;
padding: 0;
}
h1 img {
margin-left: 2.5rem;
}
body > section {
margin-bottom: 3rem;
@ -50,10 +53,6 @@ h3 {
padding-left: 5rem;
}
header {
text-align: center;
}
input[type=number]{
max-width: 8ch;
}

View File

@ -2,12 +2,12 @@
<html lang=en prefix='og: http://ogp.me/ns#'>
<head>
<title>Forget</title>
<link rel='stylesheet' href='{{ url_for("static", filename="style.css") }}' />
<link rel='stylesheet' href='{{ st("style.css") }}' />
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='icon' href='{{ url_for("static", filename="icon.png") }}' />
<link rel='icon' href='{{ st("icon.png") }}' />
<meta name='og:title' content='Forget'/>
<meta name='og:description' content='Let your old bad posts be forgotten'/>
<meta name='og:image' content='{{ url_for("static", filename="logotype.png", _external=True) }}'/>
<meta name='og:image' content='{{ st("logotype.png", _external=True) }}'/>
<meta name='og:image:alt' content='Forget'/>
<meta name='og:type' content='website' />
<meta name='twitter:card' content='summary' />
@ -15,7 +15,11 @@
</head>
<body>
<header>
<h1>Forget</h1>
<h1>
<a href="{{url_for('index')}}">
<img src="{{ st('logotype.png') }}" alt="Forget" width=200 />
</a>
</h1>
</header>
{% block body %}{% endblock %}
</body>