diff --git a/dojo_theme/templates/dojos.html b/dojo_theme/templates/dojos.html index bab959e13..98d01f4ed 100644 --- a/dojo_theme/templates/dojos.html +++ b/dojo_theme/templates/dojos.html @@ -22,7 +22,8 @@

{{ type | title }}

{{ card(url_for("pwncollege_dojos.view_dojo", dojo=dojo.reference_id), title=dojo.name, text="{} Modules : ".format(dojo.modules | length) + "{} / {}".format(dojo.solves(user=user, ignore_visibility=True, ignore_admins=False).count() if user else 0, dojo.challenges | length), - icon="/themes/dojo_theme/static/img/dojo/{}.svg".format(dojo.award.belt) if (dojo.award.belt and dojo.official) else None) }} + icon="/themes/dojo_theme/static/img/dojo/{}.svg".format(dojo.award.belt) if (dojo.award.belt and dojo.official) else None, + emoji=dojo.award.emoji ) }} {% endfor %} {% if type == "More" %} diff --git a/dojo_theme/templates/macros/widgets.html b/dojo_theme/templates/macros/widgets.html index 36aa8725d..cc0436c3f 100644 --- a/dojo_theme/templates/macros/widgets.html +++ b/dojo_theme/templates/macros/widgets.html @@ -16,13 +16,16 @@ {% endmacro %} -{% macro card(url, title=None, text=None, icon=None, custom=False) -%} +{% macro card(url, title=None, text=None, icon=None, emoji=None, custom=False) -%}
  • {% if title %}

    {{ title }}

    {% endif %} {% if text %}

    {{ text }}

    {% endif %} - {% if icon %}{% endif %} +
    + {% if icon %}{% endif %} + {% if emoji %}{{ emoji }}{% endif %} +
    {% if custom %}{{ caller() }}{% endif %}