2018-02-22 18:47:29 +00:00
{% assign t = site.data.locales[page.lang][page.lang] %}
2017-03-05 15:25:51 +00:00
<!DOCTYPE html>
< html { % if page . direction = = " rtl " % } dir = "rtl" { % endif % } lang = "{{ page.lang }}" >
< head >
2017-06-27 08:07:25 +01:00
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2017-03-05 15:25:51 +00:00
{% if page.title %}
2018-02-22 18:47:29 +00:00
< title > {{ page.title }} — {{ site.title }}< / title >
{% elsif t.subtitle %}
{% if page.direction == "rtl" %}
< title > {{ site.title }} — {{ t.subtitle }}< / title >
2017-03-05 15:25:51 +00:00
{% else %}
2018-02-22 18:47:29 +00:00
< title > {{ t.subtitle }} — {{ t.subtitle }}< / title >
{% endif %}
{% else %}
< title > {{ site.title }}< / title >
2017-03-05 15:25:51 +00:00
{% endif %}
{% seo title=false %}
{% feed_meta %}
2017-06-27 08:07:25 +01:00
< meta name = "viewport" content = "width=device-width" >
2017-07-02 15:09:10 +01:00
< link rel = "icon" type = "image/x-icon" href = "/img/favicon.ico" >
2018-02-22 18:47:29 +00:00
< link rel = "apple-touch-icon" href = "/img/apple-touch-icon.png" >
2017-03-05 15:25:51 +00:00
< link rel = "stylesheet" href = "/css/screen.css" type = "text/css" media = "screen" >
< link rel = "stylesheet" href = "/css/pygments.css" type = "text/css" media = "screen" >
2018-02-22 18:47:29 +00:00
{% if site.url == "http://localhost:4000" %}
< script src = "https://github.com/Khan/tota11y/releases/download/0.1.3/tota11y.min.js" > < / script >
{% endif %}
2017-03-05 15:25:51 +00:00
< script >
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-76679469-2', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
< / script >
2018-02-22 18:47:29 +00:00
{% if site.data.locales %}
{% assign locales = site.data.locales | sort %}
{% for locale in locales %}
{% assign lang = locale[0] %}
{% if lang == "en" %}
2017-03-05 15:25:51 +00:00
< link rel = "alternate" hreflang = "en" href = "{{ site.url }}" / >
< link rel = "alternate" hreflang = "x-default" href = "{{ site.url }}" / >
{% else %}
2018-02-22 18:47:29 +00:00
< link rel = "alternate" hreflang = "{{ lang }}" href = "{{ lang | prepend: '/index_' | prepend: site.url }}" / >
2017-03-05 15:25:51 +00:00
{% endif %}
{% endfor %}
2018-02-22 18:47:29 +00:00
{% endif %}
2017-03-05 15:25:51 +00:00
< / head >
< body >
< div id = "wrap" >
< div id = "header" class = "{{ page.header-class }}" >
< img alt = "Homebrew logo" src = "/img/homebrew-256x256.png" width = "128" height = "128" >
< h1 > < a href = "/" > Homebrew< / a > < / h1 >
2018-02-22 18:47:29 +00:00
{% if t.subtitle %}
< p id = "subtitle" > < strong > {{ t.subtitle }}< / strong > < / p >
2017-03-05 15:25:51 +00:00
{% endif %}
{% if page.lang %}
< select id = "language" onchange = "loadLanguage(this.options[this.selectedIndex].value)" >
2018-02-22 18:47:29 +00:00
{% for locale in locales %}
{% assign lang = locale[0] %}
{% assign locale_name = locale[1][lang].locale_name %}
{% if page.lang == lang %}
< option value = "{{ lang }}" selected = "selected" > {{ locale_name }}< / option >
2017-03-05 15:25:51 +00:00
{% else %}
2018-02-22 18:47:29 +00:00
< option value = "{{ lang }}" > {{ locale_name }}< / option >
2017-03-05 15:25:51 +00:00
{% endif %}
{% endfor %}
< / select >
{% endif %}
< / div >
{{ content }}
< / div >
< a href = "https://github.com/Homebrew/brew/" > < img id = "forkme" src = "https://aral.github.io/fork-me-on-github-retina-ribbons/right-grey@2x.png" alt = "Fork me on GitHub" > < / a >
< script >
function selectText(elem) {
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(elem);
range.select();
} else if (window.getSelection) {
var range = document.createRange();
range.selectNode(elem);
window.getSelection().addRange(range);
}
}
function loadLanguage(lang) {
if (lang === {{ page.lang | jsonify }}) {
return;
} else if (lang === "en") {
2018-02-22 18:47:29 +00:00
window.location.assign("/");
2017-03-05 15:25:51 +00:00
} else {
2018-02-22 18:47:29 +00:00
window.location.assign("/index_" + lang);
2017-03-05 15:25:51 +00:00
}
}
< / script >
< / body >
< / html >