Files
RedBear-OS/local/recipes/kde/kf6-syntaxhighlighting/source/autotests/html/highlight_django.html.dark.html
T

73 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight_django.html</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Django HTML Template) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
{# Basic extension of a common file #}
<span style="color:#8e44ad">{% extends</span><span style="color:#8e44ad"> </span><span style="color:#f44f4f">"base_file.html"</span><span style="color:#8e44ad"> </span><span style="color:#8e44ad">%}</span>
<span style="color:#8e44ad">{% block</span><span style="color:#8e44ad"> title </span><span style="color:#8e44ad">%}</span><span style="color:#8e44ad">{{ section.title }}</span><span style="color:#8e44ad">{% endblock %}</span>
<span style="color:#8e44ad">{% block</span><span style="color:#8e44ad"> content </span><span style="color:#8e44ad">%}</span>
<span style="font-weight:bold">&lt;h1></span><span style="color:#8e44ad">{{ section.title }}</span><span style="font-weight:bold">&lt;/h1></span>
{# For loop example #}
<span style="color:#8e44ad">{% for</span><span style="color:#8e44ad"> item in item_list </span><span style="color:#8e44ad">%}</span>
<span style="font-weight:bold">&lt;h2></span>
<span style="font-weight:bold">&lt;a</span><span style="color:#27ae60"> href=</span><span style="color:#f44f4f">"</span><span style="color:#8e44ad">{{ item.get_absolute_url }}</span><span style="color:#f44f4f">"</span><span style="font-weight:bold">></span>
<span style="color:#8e44ad">{{ item.text }}</span>
<span style="color:#8e44ad">{{ item.other_text</span><span style="color:#27ae60">|upper </span><span style="color:#8e44ad">}}</span>
<span style="font-weight:bold">&lt;/a></span>
<span style="font-weight:bold">&lt;/h2></span>
<span style="font-weight:bold">&lt;p></span><span style="color:#8e44ad">{{ story.longer_text</span><span style="color:#27ae60">|truncatewords:</span><span style="color:#f44f4f">"100"</span><span style="color:#27ae60"> </span><span style="color:#8e44ad">}}</span><span style="font-weight:bold">&lt;/p></span>
<span style="color:#8e44ad">{% endfor %}</span>
<span style="color:#8e44ad">{% endblock %}</span>
{# For loop example with specific content if empty #}
<span style="color:#8e44ad">{% for</span><span style="color:#8e44ad"> item in other_list </span><span style="color:#8e44ad">%}</span>
<span style="font-weight:bold">&lt;h2></span>
<span style="color:#8e44ad">{{ item.text }}</span>
<span style="font-weight:bold">&lt;/h2></span>
<span style="color:#8e44ad">{% else</span><span style="color:#8e44ad"> </span><span style="color:#8e44ad">%}</span>
<span style="font-weight:bold">&lt;h2></span>
This list is empty
<span style="font-weight:bold">&lt;/h2></span>
<span style="color:#8e44ad">{% endfor %}</span>
<span style="color:#da4453;text-decoration:underline">{% endblock %}</span>
{# if example #}
<span style="color:#8e44ad">{% if</span><span style="color:#8e44ad"> item_list </span><span style="color:#8e44ad">%}</span>
Number of items: <span style="color:#8e44ad">{{ item_list</span><span style="color:#27ae60">|length </span><span style="color:#8e44ad">}}</span>
<span style="color:#8e44ad">{% elif</span><span style="color:#8e44ad"> some_condition </span><span style="color:#8e44ad">%}</span>
Show this text
<span style="color:#8e44ad">{% else</span><span style="color:#8e44ad"> </span><span style="color:#8e44ad">%}</span>
Nothing to process
<span style="color:#8e44ad">{% endif %}</span>
{# This is a comment #} hello comment
{# Translation example #}
<span style="color:#8e44ad">{% translate</span><span style="color:#8e44ad"> </span><span style="color:#f44f4f">"Title"</span><span style="color:#8e44ad"> as title </span><span style="color:#8e44ad">%}</span>
<span style="color:#8e44ad">{% block</span><span style="color:#8e44ad"> content </span><span style="color:#8e44ad">%}</span><span style="color:#8e44ad">{{ title }}</span><span style="color:#8e44ad">{% endblock %}</span>
{# Auto-escaping #}
<span style="color:#8e44ad">{% autoescape</span><span style="color:#8e44ad"> off </span><span style="color:#8e44ad">%}</span>
Hello <span style="color:#8e44ad">{{ name }}</span>
<span style="color:#8e44ad">{% endautoescape %}</span>
{# Loading custom tags/libraries #}
<span style="color:#8e44ad">{% load</span><span style="color:#8e44ad"> humanize </span><span style="color:#8e44ad">%}</span>
</pre></body></html>