Django

Djangoコードスクリーンショット生成

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種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。

{% extends "base.html" %}

{% block content %}
  <ul class="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 %}
  <ul class="snapshots">
    {% for snap in snapshots %}
      <li>{{ snap.theme }}{{ snap.created|date:"j M Y" }}</li>
    {% endfor %}
  </ul>
{% endblock %}
Edge · ダーク
{% extends "base.html" %}

{% block content %}
  <ul class="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で保存できます。

30種類のテーマを見比べるか、全体の流れをご覧ください。

Djangoと、ほかの59言語のために

すべてMac上で動作します。コードが外に出ることはありません。

macOS版をダウンロード