summaryrefslogtreecommitdiff
path: root/lib/web/templates/irc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/templates/irc')
-rw-r--r--lib/web/templates/irc/index.html.eex44
-rw-r--r--lib/web/templates/irc/txt.html.eex27
-rw-r--r--lib/web/templates/irc/txts.html.eex49
3 files changed, 120 insertions, 0 deletions
diff --git a/lib/web/templates/irc/index.html.eex b/lib/web/templates/irc/index.html.eex
new file mode 100644
index 0000000..182624d
--- /dev/null
+++ b/lib/web/templates/irc/index.html.eex
@@ -0,0 +1,44 @@
+<div class="hidden sm:block">
+ <nav class="flex flex-wrap space-x-4">
+ <%= link("live", to: NolaWeb.Router.Helpers.live_path(NolaWeb.Endpoint, NolaWeb.ChatLive, @network, NolaWeb.format_chan(@chan)), class: "py-4 font-medium leading-5 rounded-md text-gray-500 hover:text-gray-700 focus:outline-none focus:text-indigo-600 focus:bg-indigo-50", 'data-turbo': false) %>
+ <% list = for {identifier, _} <- @commands do %>
+ <% name = String.replace(identifier, "_", " ") %>
+ <%= link(name, to: "##{identifier}", class: "py-4 font-medium leading-5 rounded-md text-gray-500 hover:text-gray-700 focus:outline-none focus:text-indigo-600 focus:bg-indigo-50") %>
+ <% end %>
+ <%= list %>
+ </nav>
+</div>
+
+<%= if @members != [] do %>
+ <ul class="flex flew-wrap space-x-4 mt-12">
+ <%= for user <- @members do %><li><%= user.nick %></li><% end %>
+ </ul>
+<% end %>
+
+<div class="irchelps space-y-6 mt-12">
+ <%= for {identifier, help} <- @commands do %>
+ <%= if help do %>
+ <div class="bg-white border-b border-gray-200" id="<%= identifier %>">
+ <div class="prose w-auto max-w-full"><%= NolaWeb.LayoutView.liquid_markdown(@conn, help) %></div>
+ </div>
+ <% end %>
+ <% end %>
+</div>
+
+<br/><br/><br/>
+
+<p>
+<small>
+ <strong>Légende:</strong><br />
+ entre <code>< ></code>: argument obligatoire,<br />
+ entre <code>[ ]</code>: argument optionel; <code>[1 | ]</code>: argument optionel avec valeur par défaut.
+</small>
+</p>
+
+<br/><br/><br/>
+
+<p>
+<small>
+ running beautte version <%= Nola.version() %> &mdash; <a href="<%= Nola.source_url() %>">git</a>
+</small>
+</p>
diff --git a/lib/web/templates/irc/txt.html.eex b/lib/web/templates/irc/txt.html.eex
new file mode 100644
index 0000000..fd4ea00
--- /dev/null
+++ b/lib/web/templates/irc/txt.html.eex
@@ -0,0 +1,27 @@
+<style type="text/css">
+:target {
+ background-color: #ffa;
+ font-weight: bold;
+}
+ol > li > a {
+ display: none;
+}
+ol > li:hover > a {
+ display: inline-block;
+ color: gray;
+}
+</style>
+
+<ol class="prose space-y-3 w-auto max-w-full list-outside list-decimal m-4 leading-loose">
+ <%= for {txt, id} <- Enum.with_index(@data) do %>
+ <li class="text-lg" id="q<%= id+1 %>">
+
+ <%= txt %>
+ <a href="#q<%= id+1 %>" class="text-xs text-gray-500 space-x-3">#</a>
+ </li>
+ <% end %>
+</ol>
+
+<p>
+ <a href="/-/txt/<%= @name %>.txt" class="text-xs text-gray-500">télécharger au format texte</a>
+</p>
diff --git a/lib/web/templates/irc/txts.html.eex b/lib/web/templates/irc/txts.html.eex
new file mode 100644
index 0000000..aff0c5d
--- /dev/null
+++ b/lib/web/templates/irc/txts.html.eex
@@ -0,0 +1,49 @@
+<div>
+ <h2 class="text-gray-500 text-xs font-medium uppercase tracking-wide">
+ <strong><%= @lines %></strong> lignes dans <strong><%= @files %></strong> fichiers
+ <a href="#help" class="ml-4 font-bold">Aide</a>
+ <a href="#system" class="text-gray-300 ml-4">Fichiers système</a>
+ </h2>
+ <ul class="mt-3 grid grid-cols-1 gap-5 sm:gap-6 sm:grid-cols-4 lg:grid-cols-6">
+ <%= for {txt, data} <- @data do %>
+ <% base_url = cond do
+ @conn.assigns[:chan] -> "/#{@conn.assigns.network}/#{NolaWeb.format_chan(@conn.assigns.chan)}"
+ true -> "/-"
+ end %>
+ <li class="col-span-1 flex shadow-sm rounded-m">
+ <div class="flex-1 flex items-center justify-between border-l border-t border-r border-b border-gray-200 bg-white rounded-md truncate">
+ <div class="flex-1 px-4 py-2 text-sm leading-5 truncate">
+ <a href="<%= base_url %>/txt/<%= txt %>" class="text-gray-900 text-lg font-medium hover:text-gray-600 transition ease-in-out duration-150"><%= txt %></a>
+ <p class="text-gray-500"><%= Enum.count(data) %> lignes</p>
+ </div>
+ </div>
+ </li>
+ <% end %>
+ </ul>
+</div>
+
+<div class="prose mt-12" id="help""><%= NolaWeb.LayoutView.liquid_markdown(@conn, @doc) %></div>
+
+<div class="mt-24">
+ <h2 class="text-gray-500 text-xs font-medium uppercase tracking-wide">
+ Fichiers système
+ </h2>
+
+ <ul class="mt-3 grid grid-cols-1 gap-5 sm:gap-6 sm:grid-cols-4 lg:grid-cols-6">
+ <%= for {txt, data} <- @system do %>
+ <% base_url = cond do
+ @conn.assigns[:chan] -> "/#{@conn.assigns.network}/#{NolaWeb.format_chan(@conn.assigns.chan)}"
+ true -> "/-"
+ end %>
+ <li class="col-span-1 flex shadow-sm rounded-m">
+ <div class="flex-1 flex items-center justify-between border-l border-t border-r border-b border-gray-200 bg-white rounded-md truncate">
+ <div class="flex-1 px-4 py-2 text-sm leading-5 truncate">
+ <a href="<%= base_url %>/txt/<%= txt %>" class="text-gray-900 text-lg font-medium hover:text-gray-600 transition ease-in-out duration-150"><%= txt %></a>
+ <p class="text-gray-500"><%= Enum.count(data) %> lignes</p>
+ </div>
+ </div>
+ </li>
+ <% end %>
+ </ul>
+
+</div>