Commit 8eb80d0c3891f9622e50ad668793dbe7863266cd

Thomas de Grivel 2023-02-14T02:48:41

circle avatar

diff --git a/assets/css/app.scss b/assets/css/app.scss
index bfbf332..f3b853b 100644
--- a/assets/css/app.scss
+++ b/assets/css/app.scss
@@ -31,6 +31,9 @@ pre.wrap {
 .clear {
     clear: both;
 }
+.circle {
+    border-radius: 50%;
+}
 /* navbar */
 .navbar {
     padding-top: 0.3rem;
diff --git a/lib/kmxgit_web/templates/user/avatar.html.heex b/lib/kmxgit_web/templates/user/avatar.html.heex
index 605fefd..08f3542 100644
--- a/lib/kmxgit_web/templates/user/avatar.html.heex
+++ b/lib/kmxgit_web/templates/user/avatar.html.heex
@@ -6,7 +6,7 @@ end %>
 <% user = UserManager.get_user_by_email(@email) %>
 <%= if user do %>
   <% avatar_path = Avatar.path(user, @size) %>
-  <%= link to: Routes.slug_path(@conn, :show, User.login(user)) do %><%= if File.exists?(avatar_path) do %><%= img_tag(Routes.user_path(@conn, :avatar, User.login(user), @size), alt: @title, title: @title, class: @class) %><% else %><img src={Exgravatar.gravatar_url(@email, s: @size)} alt={@title} title={@title} class={@class} /><% end %><%= right %><% end %>
+  <%= link to: Routes.slug_path(@conn, :show, User.login(user)) do %><%= if File.exists?(avatar_path) do %><%= img_tag(Routes.user_path(@conn, :avatar, User.login(user), @size), alt: @title, title: @title, class: "#{@class} circle") %><% else %><img src={Exgravatar.gravatar_url(@email, s: @size)} alt={@title} title={@title} class={@class} /><% end %><%= right %><% end %>
 <% else %>
   <img src={Exgravatar.gravatar_url(@email, s: @size)} alt={@title} title={@title} class={@class} />
 <% end %>
diff --git a/priv/repo/migrations/20230208101511_create_stats.exs b/priv/repo/migrations/20230208101511_create_stats.exs
new file mode 100644
index 0000000..244dbde
--- /dev/null
+++ b/priv/repo/migrations/20230208101511_create_stats.exs
@@ -0,0 +1,13 @@
+defmodule Kmxgit.Repo.Migrations.CreateStats do
+  use Ecto.Migration
+
+  def change do
+    create table("url_views") do
+      add :url, :string
+      add :slug_id, references(:slugs)
+      add :repo_id, references(:repositories)
+      add :response_time, :time
+      add :inserted_at, :naive_datetime
+    end
+  end
+end
diff --git a/priv/static/_assets/app.css b/priv/static/_assets/app.css
index 50f2747..8a0d34b 100644
--- a/priv/static/_assets/app.css
+++ b/priv/static/_assets/app.css
@@ -19252,6 +19252,10 @@ pre.wrap {
   clear: both;
 }
 
+.circle {
+  border-radius: 50%;
+}
+
 /* navbar */
 .navbar {
   padding-top: 0.3rem;