First draft working

This commit is contained in:
2025-01-04 00:17:15 +00:00
parent 032481d465
commit 3acd2d97c2
10 changed files with 89 additions and 136 deletions

View File

@@ -2,9 +2,9 @@
<main>
<div id="error-container">
<div id='error'>
<h2>{{ code }}: {{ description }}</h2>
<p>{{ long_description }}</p>
<a href='/'>Click here to return to our homepage</a>
<h2>{{ error }}</h2>
<p>{{ description }}</p>
<a href='/'>Click here to return to the homepage</a>
</div>
</div>
</main>

View File

@@ -1,32 +1,39 @@
{% include 'header.html' %}
<main>
<nav id="filter">
<label for="filter_category">Filter:</label>
<select id="filter_category" name="filter_category" onchange="update_filter()">
<option value="all">All Categories</option>
{% for category in all_categories %}
<option {{ 'selected' if current_category == category }} value="{{ category }}">{{all_categories.get(category).get('title')}}</option>
{% endfor %}
</select>
</nav>
<h2>{{ title }}</h2>
<p>{{ description }}</p>
<section id="projects">
{% for row in articles %}
<div class="project">
<img class="project-thumb" src="/projects/image/{{ row.image }}">
<main id="project-main">
<nav id="filter">
<label for="filter_category">Filter:</label>
<select id="filter_category" name="filter_category" onchange="update_filter()">
<option value="all">All Categories</option>
{% for category in all_categories %}
<option {{ 'selected' if current_category==category }} value="{{ category }}">
{{all_categories.get(category).get('title')}}</option>
{% endfor %}
</select>
</nav>
<h2>{{ title }}</h2>
<p>{{ description }}</p>
<section id="projects">
{% for row in articles %}
<div class="project">
<img class="project-thumb" src="/projects/image/{{ row.image }}">
<div class="project-text">
{% if row.get('link') is not none %}
<a href="{{ row.link }}"><h3>{{ row.title }}</h3></a>
<a href="{{ row.link }}">
<h3>{{ row.title }}</h3>
</a>
{% else %}
<a href="/projects/{{ row.id }}"><h3>{{ row.title }}</h3></a>
<a href="/projects/{{ row.id }}">
<h3>{{ row.title }}</h3>
</a>
{% endif %}
<p class="article-description">{{ row.description }}</p>
<p class="article-date">{{ row.date | human_date }}</p>
{% for category in row.categories %}
<a class="article-category" href="/projects/category/{{ category }}">{{ category | category_title }} </a>
<a class="article-category" href="/projects/category/{{ category }}">{{ category | category_title }}{{ ", " if not loop.last }}</loop></a>
{% endfor %}
</div>
{% endfor %}
</section>
</main>
</div>
{% endfor %}
</section>
</main>
{% include 'footer.html' %}