<h3>CSS</h3> <p>Lister la taille, la simplicité, le nombre de polices… pour réduire le chargement.</p>
<div class=“table”> {% for data in file %}
{% if site.data %} {% assign stylestats = site.data.accueil.stylestats[data] %} {% else %} {% assign stylestats = accueil.stylestats[data] %} {% endif %} {% if stylestats %} <div class="grid"> <div class="box date"> <span>Date</span> <p>{{ data | date: "%d %b %y" }}</p> </div> {% for value in stylestats %} {% if value[0] == "size" or value[0] == "rules" or value[0] == "declarations" or value[0] == "declarations" or value[0] == "selectors" or value[0] == "totalUniqueFontSizes" or value[0] == "totalUniqueFontFamilies" or value[0] == "importantKeywords" or value[0] == "simplicity" or value[0] == "averageOfIdentifier" %} <div class="box score"> <span class="title">{{ value[0] }}</span> <span class="number">{{ value[1] | round:3 }}</span> <br> </div> {% endif %} {% endfor %} </div> {% endif %}
{% endfor %} </div>
<h3>Couleurs</h3> <p>Liste des couleurs de la charte graphique. Supprimer les couleurs trop similaires ou non utilisées.</p>
{% if site.data %} {% assign stylestats = site.data.accueil.stylestats %} {% assign wallace = site.data.accueil.wallace %} {% else %} {% assign stylestats = accueil.stylestats %} {% assign wallace = accueil.wallace %} {% endif %}
{% assign totalcolor = “” %} {% for color in wallace %}
{% assign totalcolor = totalcolor | plus: color.count %} {% assign totalcolornumber = forloop.length %}
{% endfor %}
<h4>{{ totalcolornumber }} couleurs différentes</h4>
{% if wallace %} <div class=“flex-list-color”> {% for color in wallace %}
<div style='background:{{ color.value }};width: calc(({{ color.count }} / {{ totalcolor }}) * 100%);'><span style='border: 1px solid {{ color.value }};'>{{ color.value }}</span></div>
{% endfor %}
</div> {% endif %}
{% if stylestats %} {% for value in stylestats %} {% if value == “uniqueColors” %} <div class=“table”> <div class=“grid”>
{% for color in value[1] %} <div class="box" style="background: {{ color }};"> {{color}} </div> {% endfor %}
</div> </div> {% endif %} {% endfor %} {% endif %}