From 5bdb3f91d4d2459d8bacc67992b5fe8088c86f13 Mon Sep 17 00:00:00 2001
From: Ivan Reshetnikov
Date: Mon, 21 Oct 2024 00:26:39 +0500
Subject: [PATCH] Update services and registration url
---
assets/css/home.css | 19 +++++++++++-
lib/comfycamp_web/components/navbar.ex | 13 +++-----
lib/comfycamp_web/controllers/home_html.ex | 35 ++++++++++++++--------
3 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/assets/css/home.css b/assets/css/home.css
index b42eba0..75f5fa4 100644
--- a/assets/css/home.css
+++ b/assets/css/home.css
@@ -2,10 +2,27 @@
margin-top: 28px;
}
-.home .service h3 {
+.home .service .title {
+ display: flex;
+ gap: 8px;
+ align-items: center;
+ flex-wrap: wrap;
margin-bottom: 8px;
}
+.home .service .title h3 {
+ margin-right: 8px;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.home .service .tag {
+ font-size: 12px;
+ background-color: #333;
+ padding: 4px 6px;
+ border-radius: 6px;
+}
+
.home .service .link {
color: var(--accent);
}
diff --git a/lib/comfycamp_web/components/navbar.ex b/lib/comfycamp_web/components/navbar.ex
index ddc7ae6..016fd7c 100644
--- a/lib/comfycamp_web/components/navbar.ex
+++ b/lib/comfycamp_web/components/navbar.ex
@@ -22,6 +22,10 @@ defmodule ComfycampWeb.NavBar do
+ <.link href="https://auth.comfycamp.space/if/flow/enrollment/">
+ Зарегистрироваться
+
+
<%= if @current_user do %>
<.link :if={@current_user.is_admin} href={~p"/admin"}>
Админка
@@ -29,18 +33,9 @@ defmodule ComfycampWeb.NavBar do
<.link navigate={~p"/users/settings"}>
Настройки
-
<.link href={~p"/users/log_out"} method="delete">
Выйти
- <% else %>
- <.link navigate={~p"/users/register"}>
- Зарегистрироваться
-
-
- <.link navigate={~p"/users/log_in"}>
- Войти
-
<% end %>
"""
diff --git a/lib/comfycamp_web/controllers/home_html.ex b/lib/comfycamp_web/controllers/home_html.ex
index 267a31e..2ebfd10 100644
--- a/lib/comfycamp_web/controllers/home_html.ex
+++ b/lib/comfycamp_web/controllers/home_html.ex
@@ -23,7 +23,7 @@ defmodule ComfycampWeb.HomeHTML do
- Создайте аккаунт на этом сайте, чтобы получить доступ к остальным сервисам.
+ Создайте один аккаунт, чтобы получить доступ к большинству сервисов.
@@ -49,10 +49,10 @@ defmodule ComfycampWeb.HomeHTML do
/>
<.service
- name="Nextcloud"
- domain="nc.comfycamp.space"
- description="Облако, календарь, задачи."
- learn_more_url="/services/nextcloud"
+ name="Matrix"
+ domain="matrix.comfycamp.space"
+ description="Современный протокол для общения."
+ enable_link={false}
/>
<.service
@@ -61,21 +61,24 @@ defmodule ComfycampWeb.HomeHTML do
description="Хостинг для git-проектов."
/>
+ <.service
+ name="Nextcloud"
+ tags={["Временно отключен"]}
+ domain="nc.comfycamp.space"
+ description="Облако, календарь, задачи."
+ learn_more_url="/services/nextcloud"
+ />
+
<.service
name="XMPP"
+ tags={["Временно отключен"]}
domain="xmpp.comfycamp.space"
description="Проверенный временем протокол для обмена сообщениями."
enable_link={false}
/>
<.service
- name="Matrix"
- domain="matrix.comfycamp.space"
- description="Современный протокол для общения."
- enable_link={false}
- />
-
- <.service
+ tags={["Временно отключен"]}
name="Fresh RSS"
domain="freshrss.comfycamp.space"
description="Сервис для чтения RSS лент."
@@ -88,6 +91,7 @@ defmodule ComfycampWeb.HomeHTML do
A component representing one service, like mastodon or nextcloud.
"""
attr :name, :string, required: true
+ attr :tags, :list, default: []
attr :domain, :string, required: true
attr :description, :string, required: true
attr :enable_link, :boolean, required: false, default: true
@@ -96,7 +100,12 @@ defmodule ComfycampWeb.HomeHTML do
def service(assigns) do
~H"""