parent
cac6b40af5
commit
afbfab338f
@ -11,16 +11,15 @@ body {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
.site-wrap {
|
||||
.site-wrap-normal-width {
|
||||
max-width: 70pc;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.site-wrap-wide {
|
||||
max-width: 95pc;
|
||||
.site-wrap-double-width {
|
||||
max-width: 140pc;
|
||||
}
|
||||
|
||||
.site-wrap {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
margin-left: auto;
|
||||
|
@ -1,2 +1,2 @@
|
||||
{% extends "base.html" %}
|
||||
{% block site_class %}class="wide-site-wrap"{% endblock %}
|
||||
{% block site_class %}class="site-wrap site-wrap-double-width"{% endblock %}
|
||||
|
@ -10,7 +10,7 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename=user_style) }}">
|
||||
<link rel="icon" href="{% if config.FAVICON %}{{ config.FAVICON }}{% else %}{{ url_for('static', filename='img/favicon.png') }}{% endif %}">
|
||||
|
||||
<div {% block site_class %}class="site-wrap"{% endblock %}>
|
||||
<div {% block site_class %}class="site-wrap site-wrap-normal-width"{% endblock %}>
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
<div class="nav">
|
||||
|
@ -198,8 +198,8 @@ def test_setting_selected_style_includes_cookie(client):
|
||||
def test_pages_can_supply_alternate_templates(client):
|
||||
"""Test that pages can supply templates other than the default."""
|
||||
response = client.get('/')
|
||||
assert b'class="site-wrap"' in response.data
|
||||
assert b'class="wide-site-wrap"' not in response.data
|
||||
assert b'class="site-wrap site-wrap-normal-width"' in response.data
|
||||
assert b'class="site-wrap site-wrap-double-width"' not in response.data
|
||||
response = client.get('/custom-template')
|
||||
assert b'class="site-wrap"' not in response.data
|
||||
assert b'class="wide-site-wrap"' in response.data
|
||||
assert b'class="site-wrap site-wrap-normal-width"' not in response.data
|
||||
assert b'class="site-wrap site-wrap-double-width"' in response.data
|
||||
|
Loading…
Reference in New Issue
Block a user