Transforme trechos de Django em imagens que valem a pena compartilhar, sem sair do seu Mac.
Django templates mix two languages at once, and a screenshot is the clearest way to show where the template tags sit inside the markup.
O Codeshot detecta Django pelo código que você cola, então não há seletor de linguagem para errar. Aqui está o mesmo trecho em três dos 30 temas inclusos, renderizados com as folhas de estilo do próprio app.
{% extends "base.html" %}{% block content %}<ulclass="snapshots">{% for snap in snapshots %}<li>{{ snap.theme }} — {{ snap.created|date:"j M Y" }}</li>{% endfor %}</ul>{% endblock %}
Atom One · escuro
{% extends "base.html" %}{% block content %}<ulclass="snapshots">{% for snap in snapshots %}<li>{{ snap.theme }} — {{ snap.created|date:"j M Y" }}</li>{% endfor %}</ul>{% endblock %}
Edge · escuro
{% extends "base.html" %}{% block content %}<ulclass="snapshots">{% for snap in snapshots %}<li>{{ snap.theme }} — {{ snap.created|date:"j M Y" }}</li>{% endfor %}</ul>{% endblock %}
GitHub · escuro
Escolhendo um tema para Django
Pick a theme that colours template tags differently from HTML. If they render the same, the whole point of the snippet disappears.
Acertando o tamanho
Deixe a imagem seguir o conteúdo ou fixe uma proporção — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 ou 3:4 — e exporte em 1×, 2× ou 3× para que continue nítida em telas retina. Copie direto para a área de transferência com ⌘⇧C ou salve com ⌘S.