mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
page de tags avec échelle de taille selon la fréquence
This commit is contained in:
parent
341292aa12
commit
a473479b83
7 changed files with 112 additions and 58 deletions
|
@ -25,6 +25,31 @@
|
|||
<meta name="description" content="{{template_content['PAGE_TITLE']}}">
|
||||
<meta name="reply-to" content="{{template_content['EMAIL']}}">
|
||||
<link rel="icon" type="{{template_content['SITE_ICON_TYPE']}}" href="{{template_content['SITE_ICON']}}">
|
||||
<style>
|
||||
.tag-cloud {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
padding: 2rem;
|
||||
}
|
||||
.tag-link {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
transition: all 0.3s ease;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
.tag-link:hover {
|
||||
color: #007bff;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
{% for i in range(1, 11) %}
|
||||
.tag-size-{{i}} {
|
||||
font-size: {{ 0.8 + (i * 0.2) }}rem;
|
||||
opacity: {{ 0.5 + (i * 0.05) }};
|
||||
}
|
||||
{% endfor %}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -84,46 +109,51 @@
|
|||
</h1>
|
||||
{% if files %}
|
||||
|
||||
fichiers: {{files|length}}
|
||||
|
||||
<div class="article-main-content">
|
||||
<ul>
|
||||
|
||||
{% set sorted_files = files|sort(reverse=true) %}
|
||||
{% set files = sorted_files %}
|
||||
|
||||
{% for file in files %}
|
||||
{% if articles_info[file] %}
|
||||
<li>
|
||||
<a href='/{{articles_info[file].slug_with_year}}'>
|
||||
<h2>
|
||||
{{articles_info[file].annee}}
|
||||
{{articles_info[file].title}}
|
||||
</h2>
|
||||
</a>
|
||||
<div class="tags">
|
||||
{% for t in articles_info[file].tags %}
|
||||
<a href="/tag/{{t}}">
|
||||
{{t}}
|
||||
{% if articles_info[file] %}
|
||||
<li>
|
||||
<a class="article-link article-from-tag-list" href='/{{articles_info[file].slug_with_year}}'>
|
||||
<h2>
|
||||
{{articles_info[file].annee}}
|
||||
{{articles_info[file].title}}
|
||||
</h2>
|
||||
</a>
|
||||
<div class="tags">
|
||||
{% for t in articles_info[file].tags %}
|
||||
<a href="/tag/{{t}}">
|
||||
{{t}}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<li>
|
||||
<a class="article-link article-from-tag-slug" href='/{{file}}'>
|
||||
{{file}}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tags %}
|
||||
|
||||
<div class="article-tags">
|
||||
<ul>
|
||||
{% for tag_key, file_count in tags.items() %}
|
||||
|
||||
{% if tag_key %}
|
||||
<li><a href='/tag/{{tag_key}}.html'>{{tag_key}}</a> ({{file_count}})</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tag-cloud">
|
||||
{% for tag_key, info in tags.items() %}
|
||||
{% if tag_key %}
|
||||
<a href='/tag/{{tag_key}}' class="tag-link tag-size-{{info.size_class}}">
|
||||
{{tag_key}} ({{info.count}})
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue