updates - categories
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
{% extends "default.html" %}
|
||||
|
||||
{% block menu_links %}
|
||||
<a href="index.html">Home</a>
|
||||
<a href="static/about.html">About</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row"></div>
|
||||
{% for category in categories_list %}
|
||||
<a href="{{category}}.html">{{ category }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -74,10 +74,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="top_menu d-flex justify-content-end" style="margin-bottom: 20px;">
|
||||
{% block menu_links %}
|
||||
{% endblock %}
|
||||
|
||||
<a href="{{ parent_path }}index.html">Home</a>
|
||||
<a id="categories_toggle" href="#">Categories</a>
|
||||
<a href="{{ parent_path }}static/about.html">About</a>
|
||||
</div>
|
||||
<div id="categories_container" class="container">
|
||||
<div id="categories_menu" class="row justify-content-around mx-auto" style="visibility: hidden">
|
||||
{% for category in categories %}
|
||||
<a href="{{ parent_path }}categories/{{ category }}.html" class="mx-2">{{ category }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content">{% block content %}{% endblock %}</div>
|
||||
|
||||
@@ -92,4 +99,16 @@
|
||||
</div>
|
||||
<div class="row small text-muted justify-content-end"><p class="mx-4">Page created with <a href="">microgen</a></p></div>
|
||||
</div>
|
||||
</body>
|
||||
<script defer>
|
||||
document.getElementById("categories_toggle").onclick = function() {
|
||||
categories_menu_item = document.getElementById("categories_menu")
|
||||
console.log(categories_menu_item.style.visibility)
|
||||
if (categories_menu_item.style.visibility == "hidden") {
|
||||
categories_menu_item.style.visibility = "visible"
|
||||
}
|
||||
else {
|
||||
categories_menu_item.style.visibility = "hidden"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -5,20 +5,10 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block menu_links %}
|
||||
<a href="index.html">Home</a>
|
||||
<a id="categories_toggle" href="#">Categories</a>
|
||||
<a href="static/about.html">About</a>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div id="categories_menu" class="row justify-content-around mx-auto" style="visibility: hidden">
|
||||
{% for category in categories %}
|
||||
<a href="categories/{{ category }}.html" class="mx-2">{{ category }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid content-row mx-auto">
|
||||
<div class="row justify-content-start mx-auto">
|
||||
{% for content_item in content_items %}
|
||||
@@ -42,19 +32,4 @@
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_includes %}
|
||||
<script defer>
|
||||
document.getElementById("categories_toggle").onclick = function() {
|
||||
categories_menu_item = document.getElementById("categories_menu")
|
||||
console.log(categories_menu_item.style.visibility)
|
||||
if (categories_menu_item.style.visibility == "hidden") {
|
||||
categories_menu_item.style.visibility = "visible"
|
||||
}
|
||||
else {
|
||||
categories_menu_item.style.visibility = "hidden"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user