forked from elixir-lang/elixir-lang.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroot_layout.ex
144 lines (134 loc) · 4.98 KB
/
root_layout.ex
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
defmodule Elixirlang.RootLayout do
use Tableau.Layout
use Phoenix.Component
def old_template(assigns) do
~H"""
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http_equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
<%= [@page[:title], Elixirlang]
|> Enum.filter(& &1)
|> Enum.intersperse("|")
|> Enum.join(" ") %>
</title>
<link rel="stylesheet" href="/css/site.css" />
</head>
<body>
<main>
<%= render(@inner_content) %>
</main>
</body>
<%= if Mix.env() == :dev do %>
<%= Phoenix.HTML.raw(Tableau.live_reload(assigns)) %>
<% end %>
</html>
"""
|> Phoenix.HTML.Safe.to_iodata()
end
def template(assigns) do
~H"""
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="description"
content="Welcome to Elixir, a dynamic, functional language designed for building scalable and maintainable applications"
/>
<title>
{% if page.title %}{{ page.title }} - {% endif %}The Elixir programming language
</title>
<link
href="https://elixir-lang.org/atom.xml"
rel="alternate"
title="Elixir's Blog"
type="application/atom+xml"
/>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="stylesheet" type="text/css" href="/css/syntax.css" />
<link rel="stylesheet" href="/js/icons/style.css" />
<!--[if lt IE 8]><!-->
<link rel="stylesheet" href="/js/icons/ie7/ie7.css" />
<!--<![endif]-->
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link
rel="stylesheet"
id="font-bitter-css"
href="//fonts.googleapis.com/css?family=Bitter:400,700"
type="text/css"
media="screen"
/>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link
rel="search"
type="application/opensearchdescription+xml"
title="elixir-lang.org"
href="/opensearch.xml"
/>
<script defer data-domain="elixir-lang.org" src="https://plausible.io/js/plausible.js">
</script>
<script defer src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js">
</script>
<script defer src="/js/index.js" type="text/javascript" charset="utf-8">
</script>
{% seo title=false %}
</head>
<body class="{{ page.section }}">
<div id="container">
<div class="wrap">
<div id="header">
<div id="branding">
<a id="site-title" href="/" title="Elixir" rel="Home">
<img class="logo" src="/images/logo/logo.png" alt="Elixir Logo" />
</a>
</div>
<div id="menu-primary" class="menu-container">
<ul id="menu-primary-items">
<li class="menu-item home"><a class="spec" href="/">Home</a></li>
<li class="menu-item install"><a class="spec" href="/install.html">Install</a></li>
<li class="menu-item learning">
<a class="spec" href="/learning.html">Learning</a>
</li>
<li class="menu-item docs"><a class="spec" href="/docs.html">Docs</a></li>
<li class="menu-item getting-started">
<a class="spec" href="https://hexdocs.pm/elixir/introduction.html">Guides</a>
</li>
<li class="menu-item cases"><a class="spec" href="/cases.html">Cases</a></li>
<li class="menu-item blog"><a class="spec" href="/blog/">Blog</a></li>
</ul>
</div>
</div>
<div id="main">
<div id="content"Old>
<%= render(@inner_content) %>
</div>
<!-- #content -->
<div id="sidebar-primary" class="sidebar">
{% include search.html %}
{% include important-links.html %}
</div>
</div>
<!-- #main -->
<div class="clear"></div>
<div id="trademark">
© 2012–{{ 'now' | date: "%Y" }} The Elixir Team.<br />
Elixir and the Elixir logo are <a href="/trademarks">registered trademarks of The Elixir Team</a>.
</div>
</div>
<!-- .wrap -->
</div>
<!-- #container -->
</body>
<%= if Mix.env() == :dev do %>
<%= Phoenix.HTML.raw(Tableau.live_reload(assigns)) %>
<% end %>
</html>
"""
|> Phoenix.HTML.Safe.to_iodata()
end
end