refactor: improve UI consistency across templates
Updated category and projects templates to enhance readability and maintain UI consistency. Both templates now use a card layout with image headers and a relocated author, channel information, and metrics (favorites, views) to the card footer for improved layout consistency and readability. Also standardized image and anchor tag formats across both pages, removing inline styles and deprecated classes for cleaner, more maintainable code. Changes aim to provide a more uniform user experience and simplify future template adjustments.
This commit is contained in:
parent
9eee296c81
commit
c32144d437
2 changed files with 47 additions and 41 deletions
|
@ -1,11 +1,13 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %} {% block content %}
|
||||||
{% block content %}
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="text-center">{{ title }}</h1>
|
<h1 class="text-center">{{ title }}</h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for channel in channels %}
|
{% for channel in channels %}
|
||||||
<div class="col-6 col-md-4 col-lg-3 text-center mb-3">
|
<div class="col-6 col-md-4 col-lg-3 text-center mb-3">
|
||||||
<a href="/{{ channel }}" class="btn btn-primary d-block position-relative">
|
<a
|
||||||
|
href="/{{ channel }}"
|
||||||
|
class="btn btn-primary d-block position-relative"
|
||||||
|
>
|
||||||
{{ channel }}
|
{{ channel }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,37 +19,30 @@
|
||||||
</h2>
|
</h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for ible in ibles %}
|
{% for ible in ibles %}
|
||||||
<div class="col-12 col-sm-6 col-md-4 col-lg-3 mb-4">
|
<div class="col-xs-12 col-sm-6 col-lg-4 mb-4">
|
||||||
<div class="card">
|
<div class="card h-100 d-flex flex-column">
|
||||||
<a href="{{ ible.link }}" class="text-dark text-decoration-none">
|
<a href="{{ ible.link }}">
|
||||||
<img
|
<img
|
||||||
src="{{ ible.img }}"
|
|
||||||
alt="{{ ible.title }}"
|
|
||||||
class="card-img-top"
|
class="card-img-top"
|
||||||
|
src="{{ ible.img }}"
|
||||||
|
alt="{{ ible.alt }}"
|
||||||
|
style="max-width: 100%"
|
||||||
/>
|
/>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">{{ ible.title }}</h5>
|
<h5 class="card-title">{{ ible.title }}</h5>
|
||||||
<p class="card-text">
|
|
||||||
<small class="text-muted"
|
|
||||||
>by
|
|
||||||
<a href="{{ ible.author_link }}" class="text-primary"
|
|
||||||
>{{ ible.author }}</a
|
|
||||||
></small
|
|
||||||
>
|
|
||||||
<br />
|
|
||||||
<small class="text-muted"
|
|
||||||
>in
|
|
||||||
<a href="{{ ible.channel_link }}" class="text-primary"
|
|
||||||
>{{ ible.channel }}</a
|
|
||||||
></small
|
|
||||||
>
|
|
||||||
<br />
|
|
||||||
<small class="text-muted">{{ ible.views }} Views</small>
|
|
||||||
<br />
|
|
||||||
<small class="text-muted">{{ ible.favorites }} Favorites</small>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="card-footer mt-auto">
|
||||||
|
<p class="card-text">
|
||||||
|
by <a href="{{ ible.author_link }}">{{ ible.author }}</a>
|
||||||
|
</p>
|
||||||
|
<p class="card-text">
|
||||||
|
in <a href="{{ ible.channel_link }}">{{ ible.channel }}</a>
|
||||||
|
</p>
|
||||||
|
<p class="card-text">
|
||||||
|
{{ ible.favorites }} Favorites, {{ ible.views }} Views
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -11,20 +11,31 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for ible in ibles %}
|
{% for ible in ibles %}
|
||||||
<div class="ible-list-item col-xs-12 col-sm-6 col-lg-4">
|
<div class="col-xs-12 col-sm-6 col-lg-4 mb-4">
|
||||||
<a href="{{ ible.link }}" style="color: #bbc2cf">
|
<div class="card h-100 d-flex flex-column">
|
||||||
|
<a href="{{ ible.link }}">
|
||||||
<img
|
<img
|
||||||
style="max-width: 350px"
|
class="card-img-top"
|
||||||
src="{{ ible.img }}"
|
src="{{ ible.img }}"
|
||||||
alt="{{ ible.title }}"
|
alt="{{ ible.alt }}"
|
||||||
|
style="max-width: 100%"
|
||||||
/>
|
/>
|
||||||
<p>{{ ible.title }}</p>
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">{{ ible.title }}</h5>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<p>
|
<div class="card-footer mt-auto">
|
||||||
by <a href="{{ ible.author_link }}">{{ ible.author }}</a> in
|
<p class="card-text">
|
||||||
<a href="{{ ible.channel_link }}">{{ ible.channel }}</a>
|
by <a href="{{ ible.author_link }}">{{ ible.author }}</a>
|
||||||
</p>
|
</p>
|
||||||
<p>{{ ible.views }} Views, {{ ible.favorites }} Favorites</p>
|
<p class="card-text">
|
||||||
|
in <a href="{{ ible.channel_link }}">{{ ible.channel }}</a>
|
||||||
|
</p>
|
||||||
|
<p class="card-text">
|
||||||
|
{{ ible.favorites }} Favorites, {{ ible.views }} Views
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue