-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.eex
74 lines (74 loc) · 3.06 KB
/
index.eex
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ElixirToolbox | Curated list of Elixir libraries</title>
<meta content="A curated list of Elixir libraries by category" name="description">
<link href="https://fonts.googleapis.com/css?family=Bitter|Lato&display=swap" rel="stylesheet">
<link href="css/index.css" rel="stylesheet" >
<script src="js/index.js" async defer></script>
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
<link rel="icon" href="img/favicon.ico" type="image/x-icon">
</head>
<body>
<nav>
<a href="https://github.com/szTheory/beamtoolbox/edit/master/README.md" class="edit">Submit a change</a>
<a id="toggle-night-mode" class="btn" href="">
<img src="">
</a>
</nav>
<main>
<div id="form-wrapper">
<div id="title">
<div id='logo-container'>
<img src="img/logo.png" class="logo main">
<img src="img/logo.png" class="logo glow">
</div>
<div class="text">
<h1>ElixirToolbox</h1>
<p>A curated list of libraries</p>
</div>
</div>
<form>
<input id="search-query" type="text" placeholder="Search for libraries" autofocus>
</form>
<div id="sections-nav">
<%= for {section, i} <- Enum.with_index(@sections) do %>
<a href="#section-<%= i %>" class='section'><%= section.section_name %></a><%= if i < length(@sections)-1 do %>
<code class="separator">▷</code>
<% end %>
<% end %>
</div>
</div>
<div id="sections">
<%= for {section, i} <- Enum.with_index(@sections) do %>
<div class="section" id="section-<%= i %>">
<h2 class="section-name"><%= section.section_name %></h2>
<%= for category <- section.list do %>
<div class="category">
<h5 class="category-name"><%= category.name %></h5>
<%= for {entry, j} <- Enum.with_index(category.entries) do %>
<% is_main = j === 0 %>
<div class="entry <%= if is_main, do: "main", else: "alt" %>"
data-search="<%= String.downcase(entry.name) %>
<%= String.downcase(category.name) %>">
<% icon_name = if entry.language === :elixir, do: "ex", else: "erl" %>
<% size_px = 20 %>
<img src="img/<%= icon_name %>.png" width="<%= size_px %>" height="<%= size_px %>" class="icon-<%= entry.language %>"><a href="<%= entry.url %>" class="project-link <%= if is_main, do: "main", else: "alt" %>">
<%= entry.name %>
</a>
</div>
<% end %>
</div>
<% end %>
</div>
<% end %>
</main>
</div>
<footer>
<a href="https://github.com/szTheory/elixirtoolbox.dev">Website source</a>
<code class="separator">▷</code>
<a href="index.json">JSON API</a>
</footer>
</body>
</html>