{% extends 'base.html.twig' %} {% block headTitle %}Banners{% endblock %} {% block javascript %} var banners = []; {% if activeBanner %} {% set curBannerId = activeBanner.id %} {% else %} {% set curBannerId = -1 %} {% endif %} {% for banner in banners %} {% if curBannerId == -1 %} {% set curBannerId = banner.id %} {% endif %} banners[{{ banner.id }}] = {}; banners[{{ banner.id }}].name = "{{ banner.name }}"; banners[{{ banner.id }}].bannerFile = "{{ banner.bannerFile }}"; banners[{{ banner.id }}].iconFile = "{{ banner.iconFile }}"; banners[{{ banner.id }}].width = {{ banner.width }}; banners[{{ banner.id }}].height = {{ banner.height }}; {% endfor %} function updateBanner(id) { curBannerId = id; var curBanner = banners[id]; $(".selected").removeClass('selected'); $("#icon-"+id).addClass('selected'); $("#currentIconImage").attr('src', "/icons/" + curBanner.iconFile); $("#currentBannerImage").attr('src', "/icons/" + curBanner.bannerFile); $("#currentBannerImage").attr('width', curBanner.width); $("#currentBannerImage").attr('height', curBanner.height); $("#currentBannerName").text(curBanner.name); $("#bannerId").val(id); } $(function() { updateBanner({{ curBannerId }}); }); {% endblock %} {% block css %} #bannersOuter { overflow-y: auto; max-height: 60vh; } .icon { width: 150px; height: 90px; display: flex; align-items: center; justify-content: center; border: 1px solid #221; } .icon.selected { border: 1px solid rgb(34, 34, 17); background-color: rgb(96, 96, 64); } .icon-inner { display: block; } {% endblock %} {% block content %} {% include 'flashes.html.twig' %} {% if submittedBanners|length > 0 %}
You currently have a submitted banner waiting for approval. While you can select a banner here, it will be replaced with the submitted banner if it is ultimately approved.
{% endif %}

Banner Select

Choose a new banner from the list below, which lists all currently unused banners available. You can also submit your own banners—please ensure you read the rules on that page before you make your own.

Just click on an icon from the grid on the right to preview its associated banner on the left, then click "Select Banner" to choose it for your realm.



{% if submittedBanners|length > 0 %} {% for banner in submittedBanners %}
{{ banner.name }}
submitted banner
{% endfor %} {% endif %} {% for banner in banners %}
{{ banner.name }}
{% if banner.id == activeBanner.id %}
current banner
{% endif %}
{% endfor %}
{% endblock %}