<commit_before>{% extends 'layout/base_auto.html' %}
{% from 'macros/user_badge.html' import render_user_badges %}
{% set current_page = 'user_badge' %}
{% set title = 'Abzeichen' %}

{% block body %}

  <h1>Abzeichen</h1>

{{ render_user_badges(badges) }}

{%- endblock %}<commit_msg>Present user badges as a vertical list, and include labels and descriptions<commit_after>{% extends 'layout/base_auto.html' %}
{% set current_page = 'user_badge' %}
{% set title = 'Abzeichen' %}

{% block head %}
  <style>
    .badges li {
      align-items: center;
      display: flex;
    }
    .badges li + li {
      margin-top: 1.5rem;
    }
    .badges .badge {
      flex: 0 0 auto;
    }
    .badges .badge a.user-badge {
      display: block;
    }
    .badges .description {
      margin-left: 1rem;
    }
    .badges .description p {
      margin: 0;
      padding: 0;
    }
    .badges .description p + p {
      margin-top: 0.5rem;
    }
  </style>
{%- endblock %}

{% block body %}

  <h1>Abzeichen</h1>

  <ol class="badges">
    {%- for badge in badges|sort(attribute='label') %}
      <li>
        <div class="badge">
          <a class="user-badge" href="{{ url_for('user_badge.view', badge_id=badge.id) }}" title="{{ badge.label }}"><img src="{{ badge.image_url }}"></a>
        </div>
        {%- if badge.description %}
        <div class="description">
          <p><strong>{{ badge.label }}</strong></p>
          <p>{{ badge.description }}</p>
        </div>
        {%- endif %}
      </li>
    {%- endfor %}
  </ol>

{%- endblock %}
{'fraction_non_alphanumeric': 0.18393782383419688, 'fraction_numerical': 0.008419689119170985, 'mean_word_length': 2.3807439824945296, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1085824', 'n_tokens_mistral': 598, 'n_tokens_neox': 545, 'n_words': 122}