From 2d83df8b32bff7f0028923bb5b64dc0b55f20d03 Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Tue, 20 Dec 2022 00:21:54 +0000 Subject: Nola rename: The Big Move, Refs T77 --- lib/nola_web/templates/alcoolog/auth.html.eex | 43 ++++++ lib/nola_web/templates/alcoolog/index.html.eex | 205 +++++++++++++++++++++++++ lib/nola_web/templates/alcoolog/user.html.eex | 170 ++++++++++++++++++++ 3 files changed, 418 insertions(+) create mode 100644 lib/nola_web/templates/alcoolog/auth.html.eex create mode 100644 lib/nola_web/templates/alcoolog/index.html.eex create mode 100644 lib/nola_web/templates/alcoolog/user.html.eex (limited to 'lib/nola_web/templates/alcoolog') diff --git a/lib/nola_web/templates/alcoolog/auth.html.eex b/lib/nola_web/templates/alcoolog/auth.html.eex new file mode 100644 index 0000000..6e5cedc --- /dev/null +++ b/lib/nola_web/templates/alcoolog/auth.html.eex @@ -0,0 +1,43 @@ +
+

authentication

+
+ <%= link("connect using random.sh", to: "/login/oidc", class: "inline-block font-medium underline") %> +
+
+ +
+

+ <%= if @bot, do: "Send this to #{@bot} on #{@network}:", else: "Find your bot nickname and send:" %>

+ /msg <%= @bot || "the-bot-nickname" %> web +

+ ... then come back to this address. +

+
+ + diff --git a/lib/nola_web/templates/alcoolog/index.html.eex b/lib/nola_web/templates/alcoolog/index.html.eex new file mode 100644 index 0000000..5a5423a --- /dev/null +++ b/lib/nola_web/templates/alcoolog/index.html.eex @@ -0,0 +1,205 @@ + + +<%= if @stats == [] do %> +
+
+
+ + + +
+
+

+ CATASTROPHE! Personne n'a bu!!!! +

+
+
+
+<% end %> + + + +<%= if @stats == %{} do %> +
+
+
+ + + +
+
+

+ ENCORE PIRE! Aucune boisson enregistrée! +

+
+
+
+<% else %> + + + +

Classement 15 jours

+ + + +

Historique

+
+
+
+ + + + + + + + + + + <%= for {{{{account, date}, points, _active, cl, deg, nom, comment, _meta}, nick}, index} <- Enum.with_index(@drinks) do %> + <% class = if(Integer.is_even(index), do: "bg-gray-50", else: "bg-white") %> + <% date = DateTime.from_unix!(date, :millisecond) %> + + + + + + + <% end %> + +
+ date + + nick + +   + +   +
+ <%= NolaWeb.LayoutView.format_time(date, false) %> + + <%= link nick, to: alcoolog_path(@conn, :nick, @network, nick) %> + <%= cl %>cl <%= deg %>°<%= comment||"" %>
+
+
+
+<% end %> + +<%= if @conn.assigns.account && (@network || @channel) do %> + <%= link("alcoolog global", to: alcoolog_path(@conn, :index)) %> +<% end %> + + + + + + + + diff --git a/lib/nola_web/templates/alcoolog/user.html.eex b/lib/nola_web/templates/alcoolog/user.html.eex new file mode 100644 index 0000000..d7f716b --- /dev/null +++ b/lib/nola_web/templates/alcoolog/user.html.eex @@ -0,0 +1,170 @@ +<%= if @stats.active > 0 do %> +

+ <% rising_class = if @stats.rising, do: "teal", else: "red" %> + + <%= @stats.trend_symbol %> <%= Float.round(@stats.active, 4) %> g/l + + + <%= @stats.last_cl %>cl @ <%= @stats.last_deg %>° + + <%= if @stats.last_descr && @stats.last_descr != "" do %> + <%= @stats.last_descr %> + <% end %> + + + <%= NolaWeb.LayoutView.format_time(@stats.last_at) %> + +

+ +

+ a commencé il y a <%= @stats.since_s %> + — + sobre dans <%= @stats.sober_in_s %> +

+<% else %> +

+ est sobre! + +

+ dernier verre + <%= @stats.last_cl %>cl @ <%= @stats.last_deg %>° + + <%= if @stats.last_descr && @stats.last_descr != "" do %> + <%= @stats.last_descr %> + <% end %> + + + <%= NolaWeb.LayoutView.format_time(@stats.last_at) %> +

+<% end %> + + + + + +

Historique

+
+
+
+ + + + + + + + + + <%= for {%{at: date, cl: cl, deg: deg, description: comment}, index} <- Enum.with_index(@history) do %> + <% class = if(Integer.is_even(index), do: "bg-gray-50", else: "bg-white") %> + + + + + + <% end %> + +
+ date + +   + +   +
+ <%= NolaWeb.LayoutView.format_time(date, false) %> + <%= cl %>cl <%= deg %>°<%= comment||"" %>
+
+
+
+ +
+ + + + + + + + -- cgit v1.2.3