Skip to content

Commit

Permalink
Add simple nav element
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparrow0hawk committed Oct 20, 2024
1 parent 5c19882 commit 2bddbca
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
27 changes: 26 additions & 1 deletion custom/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,35 @@ body {
font-size: 1.2rem;
}

body > * {
@media (max-width: 650px) {
body {
grid-template-columns: 1fr;
grid-template-areas:
"left"
"main"
"right"
"footer";
}
nav > ul {
text-align: right;
}
}

main {
grid-area: main;
}

nav {
grid-column: left;
padding-left: 10%;
padding-right: 10%;
}

nav > ul {
list-style: none;
padding: 0;
}

pre {
padding: 1rem;
border: 1px solid black;
Expand Down
6 changes: 6 additions & 0 deletions custom/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
<title>{% block title %}{% endblock %}</title>
</head>
<body>
<nav>
<h3>{{ SITENAME }}</h3>
<ul>
<li><a href="{{ SITEURL }}">Home</a></li>
</ul>
</nav>
<main>
{% block content %}{% endblock %}
</main>
Expand Down
4 changes: 1 addition & 3 deletions custom/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% extends "base.html" %}
{% block title %}{{ SITENAME }}{% endblock %}
{% block content %}
{% block content_title %}
<h1>{{ SITENAME }}</h1>
{% endblock %}
{% block content_title %}{% endblock %}
<ul>
{% for article in articles_page.object_list %}
<li><a href="/{{ article.url }}">{{ article.date | strftime('%-d %b %Y')}} {{ article.title }}</a> </li>
Expand Down

0 comments on commit 2bddbca

Please sign in to comment.