Превращайте фрагменты Django в изображения, которыми хочется делиться, не покидая 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.
Codeshot определяет Django по вставленному коду, так что ошибиться с выбором языка невозможно. Вот один и тот же фрагмент в трёх из 30 встроенных тем, отрисованных стилями самого приложения.
{% 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 · тёмная
{% 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 · тёмная
{% 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 · тёмная
Как выбрать тему для Django
Pick a theme that colours template tags differently from HTML. If they render the same, the whole point of the snippet disappears.
Как выбрать размер
Пусть размер следует за содержимым или зафиксируйте соотношение — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 или 3:4 — а затем экспортируйте в 1×, 2× или 3×, чтобы изображение оставалось чётким на retina-экране. Скопируйте его в буфер обмена сочетанием ⌘⇧C или сохраните через ⌘S.