forked from beeware/beeware.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.html
More file actions
168 lines (150 loc) Β· 7.7 KB
/
layout.html
File metadata and controls
168 lines (150 loc) Β· 7.7 KB
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
166
167
168
{%- macro menu_item(identifier) -%}
{%- set identifier_url = ('/' + identifier).replace('/donate', '/membership') -%}
{%- set trans_url = identifier_url|url(alt=this.alt) -%}
{%- set this_is_child = this.is_child_of(identifier_url) -%}
<li class="nav-item{% if this_is_child %} active{% endif %}">
<a class="nav-link" href="{{ trans_url }}">{{ identifier|trans("menu") }}{%- if this_is_child -%}<span class="sr-only">(current)</span>{%- endif -%}</a>
</li>
{%- endmacro -%}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags always come first -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{%- block title %}{{- "welcome"|trans -}}{% endblock -%} β BeeWare</title>
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/images/brutus-144.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/images/brutus-114.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/images/brutus-72.png">
<link rel="apple-touch-icon-precomposed" href="/static/images/brutus-57.png">
<link rel="shortcut icon" href="/static/images/brutus-32.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" type="text/css" href="/static/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/static/bootstrap/css/bootstrap-grid.min.css">
<!-- Project CSS -->
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Cutive">
<link rel="stylesheet" type="text/css" href="/static/beeware.css">
{%- if this.alt in ['ar', 'fa'] -%}
<link rel="stylesheet" type="text/css" href="/static/rtl.css">
{%- endif -%}
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/078c86a30a.js" crossorigin="anonymous"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-2943925-4"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-2943925-4');
</script>
{%- block extra_head -%}{%- endblock -%}
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
<div class="nav-top">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsDefault" aria-controls="navbarsDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-brand-block">
<a class="navbar-brand" href="{{ '/'|url(alt=this.alt) }}"><img class="mx-2" src="{{ '/static/images/brutus-32.png'|asseturl }}">BeeWare</a>
</div>
</div>
<div class="collapse navbar-collapse" id="navbarsDefault">
<ul class="navbar-nav mr-auto">
{{ menu_item('about') }}
{{ menu_item('project') }}
{{ menu_item('community') }}
{{ menu_item('contributing') }}
{{ menu_item('news') }}
{{ menu_item('donate') }}
</ul>
<ul class="nav navbar-nav navbar-right">
{%- if this.alt == "en" -%}
{%-
set edit_link = (
"https://github.com/beeware/beeware.github.io/tree/lektor/content"
+ this.path.split("@")[0] + "/contents.lr"
)
-%}
{%- set edit_text = "edit_on_github"|trans -%}
{%- set icon_name = "github" -%}
{%- else -%}
{%- set edit_link = (
"https://hosted.weblate.org/projects/beeware/website/"
+ {"zh_CN": "zh_Hans", "zh_TW": "zh_Hant"}.get(this.alt, this.alt[:2])
)
-%}
{%- set edit_text = "edit_translation"|trans -%}
{# Font Awesome doesn't have a Weblate icon. #}
{%- set icon_name = "pencil" -%}
{%- endif -%}
<a class="nav-link" href="{{ edit_link }}" target="_blank">
<i class="fa fa-{{ icon_name }}"></i><small> {{ edit_text }}</small>
</a>
</li>
<li class="nav-item dropdown dropdown-pull-right">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-globe" aria-hidden="true"></i> <span class="caret"></span>
</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
{%- set eng_active = this.alt == 'en' %}
<a class="dropdown-item {% if eng_active %}active{% endif %}" href="{{ '.'|url(alt='en') }}">
English
</a>
{%- for alt, alternative in config.ALTERNATIVES.items()|sort -%}
{%- set alt_active = alt == this.alt -%}
{%- if alt != config.primary_alternative %}
<a class="dropdown-item{% if alt_active %} active{% endif %}" href="{{ '.'|url(alt=alt) }}">
{{- alternative.name.en.lower()|trans -}}
</a>
{%- endif -%}
{%- endfor %}
</div>
</li>
</ul>
</div>
</nav>
<div class="content">
{%- block preamble -%}
{%- endblock -%}
<div class="container">
{%- block body -%}
{%- endblock -%}
</div>
</div>
<footer class="footer">
<div class="container text-muted">
<div class="d-block d-sm-none copyright">© Russell Keith-Magee {{ none|dateformat('Y') }}</div>
<div class="float-right clearfix d-sm-block d-none">© Russell Keith-Magee {{ none|dateformat('Y') }}</div>
<p class="d-sm-block d-none">
<a href="https://github.com/beeware/"><i class="fa fa-github fa-lg" aria-hidden="true"></i> GitHub</a> |
<a href="https://beeware.org/bee/chat/"><i class="fa-brands fa-discord fa-lg" aria-hidden="true"></i> Discord</a> |
<a href="https://fosstodon.org/@beeware"><i class="fa-brands fa-mastodon fa-lg" aria-hidden="true"></i> Mastodon</a> |
<a href="{{ '/sitemap'|url(alt=this.alt) }}"><i class="fa fa-sitemap fa-lg" aria-hidden="true"></i> {{ "sitemap"|trans }}</a>
</p>
<p class="d-block d-sm-none footer-social">
<a href="https://github.com/beeware/"><i class="fa fa-github fa-lg" aria-hidden="true"></i> GitHub</a> |
<a href="https://beeware.org/bee/chat/"><i class="fa-brands fa-discord fa-lg" aria-hidden="true"></i> Discord</a> |
<a rel="me" href="https://fosstodon.org/@beeware"><i class="fa-brands fa-mastodon fa-lg" aria-hidden="true"></i> Mastodon</a>
</p>
<p class="d-block d-sm-none footer-sitemap">
<a href="{{ '/sitemap'|url(alt=this.alt) }}"><i class="fa fa-sitemap fa-lg" aria-hidden="true"></i> {{ "sitemap"|trans }}</a>
</p>
{% set team = site.query('/about/team', alt=this.alt).all() %}
{% for member in team %}
{% if member.mastodon_handle %}
<a rel="me" href="https://{{ member.mastodon_handle.split('@')[2] }}/@{{ member.mastodon_handle.split('@')[1] }}" style="display:none" ></a>
{% endif %}
{% endfor %}
</div>
</footer>
<!-- jQuery first, then Bootstrap JS. -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="/static/tether-1.3.3/js/tether.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
{%- block extra_script -%}{%- endblock -%}
</body>
</html>