zola-base #1

Merged
boots merged 5 commits from zola-base into master 2022-03-24 22:54:43 +00:00
4 changed files with 56 additions and 2 deletions
Showing only changes of commit 488e853ec2 - Show all commits

View File

@ -14,3 +14,7 @@ highlight_code = true
[extra] [extra]
# Put all your custom variables here # Put all your custom variables here
toolbar_pages = [
["About Us", "about"],
["Contact", "contact"],
]

30
sass/main.scss Normal file
View File

@ -0,0 +1,30 @@
$sidebar_width: 20%;
body {
margin: 0;
nav {
height: 100%;
position: fixed;
width: $sidebar_width;
background: rgba(255, 0, 0, .1);
padding-top: 32px;
img {
width: 100%;
}
div {
padding: 0 16px 0 16px;
}
}
main {
height: 100%;
margin-left: $sidebar_width;
background: rgba(0, 255, 0, .1);
padding-top: 50px;
article {
margin: auto;
border: 1px solid blue;
padding: 16px;
max-width: 1000px;
}
}
}

View File

@ -7,10 +7,16 @@
Mountain Linux Club Mountain Linux Club
{% endif %} {% endif %}
</title> </title>
<link rel="stylesheet" href="{{ get_url(path='main.css') }}">
</head> </head>
<body> <body>
{% block content %} {% include "sidebar.html" %}
{% endblock %} <main>
<article>
{% block content %}
{% endblock %}
</article>
</main>
</body> </body>
</html> </html>

14
templates/sidebar.html Normal file
View File

@ -0,0 +1,14 @@
<nav>
<div>
<img src="{{ get_url(path='logo.png') }}">
</div>
<div>
<ul>
{% for page in config.extra.toolbar_pages %}
<li>
<a href="{{ get_url(path=page[1]) }}">{{ page[0] }}</a>
</li>
{% endfor %}
</ul>
</div>
</nav>