This repository has been archived by the owner on Jan 22, 2024. It is now read-only.
/
tutorial.html
165 lines (149 loc) · 10.5 KB
/
tutorial.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{% extends "base.html" %}
{% load i18n %}
{% load toc from templatefilters %}
{% get_current_language as LANGUAGE_CODE %}
{% block headauthor %}{{ tut.author.given_name }} {{ tut.author.family_name }} - {{ tut.author.email }}{% endblock %}
{% block headtitle %}{{ tut.title|safe }}{% endblock %}
{% block body %}
<header class="tutorial clearfix pattern-bg-lighter">
{% if not is_mobile %}
<hgroup>
<h1>{% trans "HTML5 Rocks" %}</h1>
<h2><a href="/{{LANGUAGE_CODE}}/tutorials/">{% trans "Tutorials" %}</a></h2>
</hgroup>
{% endif %}
<section>
<h1>{{ tut.title|safe }}</h1>
{% if tut.subtitle %}<h2>{{tut.subtitle|safe}}</h2>{% endif %}
<section class="byline">
<a href="/profiles/#{{ tut.author.key.name }}"><img src="/static/images/profiles/75/{{ tut.author.key.name }}.75.png" itemprop="photo" alt="{{ tut.author.given_name }} {{ tut.author.family_name }}" title="{{ tut.author.given_name }} {{ tut.author.family_name }}"></a>
<hgroup>
<h3>
By <strong><a href="/profiles/#{{ tut.author.key.name }}">{{ tut.author.given_name }} {{ tut.author.family_name }}</a></strong>
{% if tut.second_author %}
& <strong><a href="/profiles/#{{ tut.second_author.key.name }}">{{ tut.second_author.given_name }} {{ tut.second_author.family_name }}</a></strong>
{% endif %}
</h3>
</hgroup>
<div class="date">
<time pubdate>{% blocktrans %}Published{% endblocktrans %} <strong>{{ tut.publication_date }}</strong></time>
{%if tut.update_date %}<time class="updated">{% blocktrans %}Updated{% endblocktrans %} <strong>{{ tut.update_date }}</strong></time>{% endif %}
</div>
</section>
{% if not is_mobile %}
<aside id="html5badge">
<a href="http://www.w3.org/html/logo/">
{% block html5badge %}
<img src="/static/images/identity/html5-badge-h-solo.png" width="63" height="64" alt="{% trans "HTML5 Powered" %}" title="{% trans "HTML5 Powered" %}" style="margin-right:17px" />
{% endblock %}
</a>
</aside>
{% endif %}
<section class="browser_support">
<h3>{% trans "Supported browsers:" %}</h3>
<span class="browsers">
<span class="browser opera {% if 'opera' in tut.browser_support %}supported{% endif %}">
<span class="browser_name">{% trans "Opera" %}</span>
<span class="support">
{% if 'opera' in tut.browser_support %}
{% trans "supported" %}
{% else %}
{% trans "unsupported" %}
{% endif %}
</span>
</span>
<span class="browser ie {% if 'ie' in tut.browser_support %}supported{% endif %}">
<span class="browser_name">{% trans "IE" %}</span>
<span class="support">
{% if 'ie' in tut.browser_support %}
{% trans "supported" %}
{% else %}
{% trans "unsupported" %}
{% endif %}
</span>
</span>
<span class="browser safari {% if 'safari' in tut.browser_support %}supported{% endif %}">
<span class="browser_name">{% trans "Safari" %}</span>
<span class="support">
{% if 'safari' in tut.browser_support %}
{% trans "supported" %}
{% else %}
{% trans "unsupported" %}
{% endif %}
</span>
</span>
<span class="browser ff {% if 'ff' in tut.browser_support %}supported{% endif %}">
<span class="browser_name">{% trans "Firefox" %}</span>
<span class="support">
{% if 'ff' in tut.browser_support %}
{% trans "supported" %}
{% else %}
{% trans "unsupported" %}
{% endif %}
</span>
</span>
<span class="browser chrome {% if 'chrome' in tut.browser_support %}supported{% endif %}">
<span class="browser_name">{% trans "Chrome" %}</span>
<span class="support">
{% if 'chrome' in tut.browser_support %}
{% trans "supported" %}
{% else %}
{% trans "unsupported" %}
{% endif %}
</span>
</span>
</span>
<div class="compatible-block">
<p id="notcompatible" class="hidden">
{% block notcompatible_text %}
{% trans "Your browser may not support all of the functionality in this article." %}
{% endblock %}
</p>
<p id="compatible" class="hidden">
{% block compatible_text %}
{% trans "Your browser appears to support the functionality in this article." %}
{% endblock %}
</p>
</div>
</section>
{% if not is_mobile %}
<a href="#disqus_thread" data-disqus-identifier="{{ disqus_url }}" class="disqus_comments">{% trans "Leave a comment" %}</a>
{% endif %}
</section>
{% if not is_mobile %}
<span class="share">
<ul>
<li class="googleplus"><div class="g-plusone" data-size="medium" data-count="true" data-href="{{ disqus_url }}"></div></li>
<li class="facebook" data-url="{{ disqus_url }}"></li>
<li class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-url="{{ disqus_url }}" data-lang="{{LANGUAGE_CODE}}" data-related="ChromiumDev:News and announcements for developers from the Google Chrome team and makers of HTML5 Rocks.">{% trans "Tweet" %}</a></li>
</ul>
</span>
{% endif %}
</header>
{% if redirect_from_locale %}
<section class="redirect_notification pattern-bg-lighter" lang="{{ redirect_from_locale.lang }}">{{ redirect_from_locale.msg }}</section>
{% endif %}
<article class="tutorial pattern-bg-lighter">
<div class="outline_nav_toggle">
<img class="show" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAeCAYAAADU8sWcAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLX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HRRaJx+NIVVVhUtM00WQy4ephdEQIRQ5RiESyLTC98lyRTCatIItz7G1Muw9XpFKpQOQcewPTQu8afS6XMxVFmfohBjuwZ0XtvF511iKFQuED7uttiEEf7DxUdGe2N1haUCCgUIg6IFhY6pv1vEa7U18lFSBQUhHtbstHbyYkl968tsd7Za2PW7vhaH9VPQQxs2/fQyP5j5j3aIA6X9nBo+GBEBtBnkulLZ2AxHrz/Vw6xEPxV4ABAB9p/+75XTbuAAAAAElFTkSuQmCC">
<nav class="outline toc pattern-bg-lighter">
<h3>{% trans "Table of Contents" %}</h3>
{% toc %}
{% if localizations %}
<h3>{% trans "Localizations" %}</h3>
<p>{% trans "This article is additionally available in the following languages:" %}</p>
<ul>
{% for alt_locale in localizations %}
<li><a href="{{ alt_locale.path }}">{{ alt_locale.lang }}</a></li>
{% endfor %}
</ul>
{% endif %}
</nav>
</div>
<section>
{% block content %}{% endblock %}
</section>
</article>
{% include "article_footer.html" %}
{% endblock %}