Max-width is configurable (closes #7)
This commit is contained in:
parent
a829e8d6f6
commit
cb45a6fe01
|
@ -1,3 +1,7 @@
|
|||
body {
|
||||
max-width: none; // Override water.css
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
font-weight: bold;
|
||||
> a { margin: 0 1rem; } // Spacing entries
|
||||
|
@ -35,7 +39,7 @@ article > div:first-child {
|
|||
}
|
||||
|
||||
main {
|
||||
margin: 1rem 0;
|
||||
margin: 1rem auto;
|
||||
}
|
||||
|
||||
.source {
|
||||
|
|
|
@ -8,20 +8,20 @@
|
|||
<title>{% block title %}{{ section.title }}{% endblock %}</title>
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ widgets::i18n_url(path="rss.xml") }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{{ get_url(path="style.css") }}" type="text/css">
|
||||
<link rel="stylesheet" href="{{ get_url(path="water." ~ config.extra.color ~ ".css") }}" type="text/css">
|
||||
<link rel="stylesheet" href="{{ get_url(path="style.css") }}" type="text/css">
|
||||
{%- for stylesheet in config.extra.stylesheets %}
|
||||
<link rel="stylesheet" href="{{ get_url(path=stylesheet) }}" type="text/css">
|
||||
{%- endfor %}
|
||||
</head>
|
||||
<body>
|
||||
<body{% if config.extra.max_width_for == "body" %} style="max-width: {{ config.extra.max_width }}"{% endif %}>
|
||||
<header>
|
||||
{% set header = get_page(path="_common/header.md") %}
|
||||
{{ header.content | markdown | safe }}
|
||||
{% if translations %}{{ widgets::translations(translations=translations) }}{% endif %}
|
||||
{{ widgets::menu(content="_common/menu.md") }}
|
||||
</header>
|
||||
<main>
|
||||
<main{% if config.extra.max_width_for == "main" %} style="max-width: {{ config.extra.max_width }}"{% endif %}>
|
||||
{% block main %}
|
||||
{{ section.content | markdown | safe }}
|
||||
{% endblock %}
|
||||
|
|
|
@ -12,8 +12,17 @@ demo = "https://thunix.net/~southerntofu/themes/zola/water"
|
|||
# be merged with user data, some kind of prefix or nesting is preferable
|
||||
# Use snake_casing to be consistent with the rest of Zola
|
||||
[extra]
|
||||
# The default color scheme. Can be either light or dark.
|
||||
# Whichever one you choose, it is overriden if the browser supports it.
|
||||
color = "dark"
|
||||
# A list of additional stylesheets to load from the index template
|
||||
stylesheets = []
|
||||
# Set the max-width for either "main" or "body". Defaults to "main",
|
||||
# switch to "body" for default water.css behavior
|
||||
max_width_for = "main" # Can be either main or body
|
||||
# Sets the max_width for either main or body, depending on the previous
|
||||
# setting. 800px is the water.css default
|
||||
max_width = "800px"
|
||||
|
||||
# The theme author info: you!
|
||||
[author]
|
||||
|
|
Loading…
Reference in New Issue