This commit is contained in:
Peder Bergebakken Sundt 2019-10-06 12:58:50 +02:00
parent dd01866030
commit a20a0c4b62
3 changed files with 20 additions and 8 deletions

View File

@ -9,6 +9,10 @@ all: build/test_card.html build/test_card_rendered.html $(CARDS_DESTS) cards/bui
dev: dev:
git ls-files | entr bash -c "make all" git ls-files | entr bash -c "make all"
.PHONY: dev_test
dev_test:
git ls-files | entr bash -c "make build/test_card_rendered.html"
.PHONY: clean .PHONY: clean
clean: clean:
rm build/* cards/build/* rm build/* cards/build/*

View File

@ -45,6 +45,14 @@
{% else %} {% else %}
<img src="https://pvv.ntnu.no/~pederbs/cards/img/data/{{ figure.name }}"> <img src="https://pvv.ntnu.no/~pederbs/cards/img/data/{{ figure.name }}">
{% endif %} {% endif %}
{% elif not figure.type %}
{% if figure.color == true %}
<img src="{{ figure.name }}" class="colored">
{% elif figure.color %}
<img src="{{ figure.name }}" class="colored" style="--figure-color: {{ figure.color }}">
{% else %}
<img src="{{ figure.name }}">
{% endif %}
{% endif %} {% endif %}
</div> </div>
{% endmacro %} {% endmacro %}
@ -61,7 +69,7 @@
<li>{{ property }}</li> <li>{{ property }}</li>
{% endfor %} {% endfor %}
</ul></aside> </ul></aside>
<summary> <div class="costbar">
{% for cost in card.costs %} {% for cost in card.costs %}
<section> <section>
{% if cost.split() | length == 2 and cost.split()[0].isnumeric() %} {% if cost.split() | length == 2 and cost.split()[0].isnumeric() %}
@ -72,8 +80,8 @@
{% endif %} {% endif %}
</section> </section>
{% endfor %} {% endfor %}
</summary> </div>
<article> <div class="description">
<center><i>"{{ card.flavor }}"</i></center> <center><i>"{{ card.flavor }}"</i></center>
<center>{{ card.description | markdown | safe }}</center> <center>{{ card.description | markdown | safe }}</center>
{% if card.steps %} {% if card.steps %}
@ -83,7 +91,7 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
</article> </div>
</div> </div>
{# <br><pre>{{ card }}</pre> #} {# <br><pre>{{ card }}</pre> #}

View File

@ -89,7 +89,7 @@
} }
} }
} }
summary { .costbar {
grid-area: costbar; grid-area: costbar;
border-radius: 0; border-radius: 0;
background-color: black; background-color: black;
@ -108,7 +108,7 @@
line-height: 0.9em; line-height: 0.9em;
} }
} }
article { .description {
grid-area: description; grid-area: description;
margin: 1mm; margin: 1mm;
border-radius: 1mm; border-radius: 1mm;
@ -145,11 +145,11 @@
color: #444 ; color: #444 ;
} }
summary { .costbar {
background-color: #555; background-color: #555;
color: white; color: white;
} }
article { .description {
background-color: #ddd; background-color: #ddd;
} }
} }