diff options
author | href <href@random.sh> | 2018-02-10 21:40:22 +0100 |
---|---|---|
committer | href <href@random.sh> | 2018-02-10 21:40:22 +0100 |
commit | 935a36eecc0faea60236101e11bc9f7cf1872686 (patch) | |
tree | b7b4358dee2eb3fc60681852f62c750ae8c05cb9 /lib/lsg_web/templates | |
parent | sse / embedded player (diff) |
update
Diffstat (limited to 'lib/lsg_web/templates')
-rw-r--r-- | lib/lsg_web/templates/irc/index.html.eex | 29 | ||||
-rw-r--r-- | lib/lsg_web/templates/irc/txt.html.eex | 19 | ||||
-rw-r--r-- | lib/lsg_web/templates/irc/txts.html.eex | 8 | ||||
-rw-r--r-- | lib/lsg_web/templates/layout/app.html.eex | 23 | ||||
-rw-r--r-- | lib/lsg_web/templates/page/api.html.eex | 35 | ||||
-rw-r--r-- | lib/lsg_web/templates/page/index.html.eex | 37 | ||||
-rw-r--r-- | lib/lsg_web/templates/page/irc.html.eex | 19 |
7 files changed, 114 insertions, 56 deletions
diff --git a/lib/lsg_web/templates/irc/index.html.eex b/lib/lsg_web/templates/irc/index.html.eex new file mode 100644 index 0000000..91873e6 --- /dev/null +++ b/lib/lsg_web/templates/irc/index.html.eex @@ -0,0 +1,29 @@ +<h1>bot `115ans</h1> + +<p> +Si vous cherchez l'IRC c'est <a href="https://115ans.net/irc/">par là</a>. +<br /> +<a href="/irc/stats/">Statistiques</a>. +</p> + + +<style type="text/css"> +.help-entry h1 { + font-size: 18px; +} +.help-entry h2 { + font-size: 16px; +} +</style> + +<div class="irchelps"> + <%= for help <- @commands do %> + <div class="help-entry"><%= help |> Earmark.as_html! |> raw() %></div> + <% end %> +</div> + +<p> +<small> + source: <a href="https://git.yt/115ans/sys">git.yt/115ans/sys</a> +</small> +</p> diff --git a/lib/lsg_web/templates/irc/txt.html.eex b/lib/lsg_web/templates/irc/txt.html.eex new file mode 100644 index 0000000..4ffde50 --- /dev/null +++ b/lib/lsg_web/templates/irc/txt.html.eex @@ -0,0 +1,19 @@ +<style type="text/css"> +h1 small { + font-size: 14px; +} +ol li { + margin-bottom: 5px +} +</style> + +<h1> + <small><a href="/irc/txt">irc.txt</a>:</small><br/> + <%= @name %>.txt</h1> + +<ol> + <%= for {txt, id} <- Enum.with_index(@data) do %> + <li id="<%= @name %>-<%= id %>"><%= txt %></li> + <% end %> +</ol> + diff --git a/lib/lsg_web/templates/irc/txts.html.eex b/lib/lsg_web/templates/irc/txts.html.eex new file mode 100644 index 0000000..7c96ed9 --- /dev/null +++ b/lib/lsg_web/templates/irc/txts.html.eex @@ -0,0 +1,8 @@ +<h1>irc.txt</h1> + +<ul> + <%= for {txt, data} <- @data do %> + <li><a href="/irc/txt/<%= txt %>"><%= txt %></a> <i>(<%= Enum.count(data) %>)</i></li> + <% end %> +</ul> + diff --git a/lib/lsg_web/templates/layout/app.html.eex b/lib/lsg_web/templates/layout/app.html.eex index 0d91f12..1c8f900 100644 --- a/lib/lsg_web/templates/layout/app.html.eex +++ b/lib/lsg_web/templates/layout/app.html.eex @@ -4,32 +4,15 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content=""> - <meta name="author" content=""> - - <title>Hello LSG!</title> - <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>"> + <link rel="stylesheet" href="<%= static_path(@conn, "/assets/css/app.css") %>"> </head> <body> <div class="container"> - <header class="header"> - <nav role="navigation"> - <ul class="nav nav-pills pull-right"> - <li><a href="http://www.phoenixframework.org/docs">Get Started</a></li> - </ul> - </nav> - <span class="logo"></span> - </header> - - <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p> - <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p> - <main role="main"> <%= render @view_module, @view_template, assigns %> </main> - - </div> <!-- /container --> - <script src="<%= static_path(@conn, "/js/app.js") %>"></script> + </div> + <script src="<%= static_path(@conn, "/assets/js/app.js") %>"></script> </body> </html> diff --git a/lib/lsg_web/templates/page/api.html.eex b/lib/lsg_web/templates/page/api.html.eex new file mode 100644 index 0000000..03dfa6b --- /dev/null +++ b/lib/lsg_web/templates/page/api.html.eex @@ -0,0 +1,35 @@ +<h1>sys.115ans.net/api</h1> + +<h2>Icecast Status</h2> + +<h3>GET /api/icecast.json</h3> + +<p> + Content-Type: <code>application/json</code> +</p> + +<pre><code> +{ + "np": String, + "genre": null | String, + "live": false | true +} +</pre></code> + +<h3>GET /api/icecast.sse</h3> +<p> + Content-Type: <code>text/event-stream</code> +</p> + +<p> + Stream of: +</p> + + <ul> + <li><strong>icecast</strong> events (same format as <code>/api/icecast.json</code>)</li> + <li><strong>ping</strong> events (to keep-alive connection. You can safely ignore them)</li> + </ul> +<p> + On client connection, the server sends the latest <code>icecast</code> status known. +</p> + diff --git a/lib/lsg_web/templates/page/index.html.eex b/lib/lsg_web/templates/page/index.html.eex index 0988ea5..98e407c 100644 --- a/lib/lsg_web/templates/page/index.html.eex +++ b/lib/lsg_web/templates/page/index.html.eex @@ -1,36 +1 @@ -<div class="jumbotron"> - <h2><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h2> - <p class="lead">A productive web framework that<br />does not compromise speed and maintainability.</p> -</div> - -<div class="row marketing"> - <div class="col-lg-6"> - <h4>Resources</h4> - <ul> - <li> - <a href="http://phoenixframework.org/docs/overview">Guides</a> - </li> - <li> - <a href="https://hexdocs.pm/phoenix">Docs</a> - </li> - <li> - <a href="https://github.com/phoenixframework/phoenix">Source</a> - </li> - </ul> - </div> - - <div class="col-lg-6"> - <h4>Help</h4> - <ul> - <li> - <a href="http://groups.google.com/group/phoenix-talk">Mailing list</a> - </li> - <li> - <a href="http://webchat.freenode.net/?channels=elixir-lang">#elixir-lang on freenode IRC</a> - </li> - <li> - <a href="https://twitter.com/elixirphoenix">@elixirphoenix</a> - </li> - </ul> - </div> -</div> +<p>Vous n'avez rien de mieux à faire ? Non ? Allez sur <a href="https://115ans.net">115ans.net</a>, alors.</p> diff --git a/lib/lsg_web/templates/page/irc.html.eex b/lib/lsg_web/templates/page/irc.html.eex new file mode 100644 index 0000000..f6598ee --- /dev/null +++ b/lib/lsg_web/templates/page/irc.html.eex @@ -0,0 +1,19 @@ +<h1>bot `115ans</h1> + +<p>Si vous cherchez l'IRC c'est <a href="https://115ans.net/irc/">par là</a>.</p> + +<style type="text/css"> +.help-entry h1 { + font-size: 18px; +} +.help-entry h2 { + font-size: 16px; +} +</style> + +<div class="irchelps"> + <%= for help <- @bot_helps do %> + <div class="help-entry"><%= help |> Earmark.as_html! |> raw() %></div> + <% end %> +</div> + |