Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add legal pages and copyright notice #543

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/atomic_web/components/legal_pages_links.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
defmodule AtomicWeb.Components.LegalPagesLinks do
@moduledoc """
Contains the structure for the legal pages navigation
"""
use AtomicWeb, :component

def legal_pages_links(assigns) do
~H"""
<div class="flex-colunm group mt-2 mb-4 flex w-full flex-wrap place-items-center justify-center gap-x-6 gap-y-1">
RicoPleasure marked this conversation as resolved.
Show resolved Hide resolved
<.link navigate={~p"/tos"} class="shrink-0 select-none">
<p class="text-xs font-semibold text-zinc-400">Terms of Service</p>
</.link>
<.link navigate={~p"/privacy"} class="shrink-0 select-none">
<p class="text-xs font-semibold text-zinc-400">Privacy Policy</p>
</.link>
<.link navigate={~p"/cookies"} class="shrink-0 select-none">
<p class="text-xs font-semibold text-zinc-400">Cookie Policy</p>
</.link>
RicoPleasure marked this conversation as resolved.
Show resolved Hide resolved
<span class="flex text-xs font-semibold text-zinc-400">&#169; 2024 CeSIUM</span>
</div>
"""
end
end
3 changes: 3 additions & 0 deletions lib/atomic_web/components/sidebar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule AtomicWeb.Components.Sidebar do

alias Phoenix.LiveView.JS
import AtomicWeb.Components.Icon
import AtomicWeb.Components.LegalPagesLinks
alias Atomic.Organizations

attr :current_user, :map, required: true
Expand Down Expand Up @@ -64,6 +65,8 @@ defmodule AtomicWeb.Components.Sidebar do
<.live_component id="mobile-organizations" module={AtomicWeb.Components.Organizations} current_user={@current_user} current_organization={@current_organization} organizations={@organizations} />
<% end %>
</div>
<!-- Legal Pages Links -->
<.legal_pages_links />
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions lib/atomic_web/live/home_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ defmodule AtomicWeb.HomeLive.Index do

import AtomicWeb.Components.{Activity, Announcement, Tabs, Unauthenticated, Dropdown}
import AtomicWeb.HomeLive.Components.{FollowSuggestions, Schedule}
import AtomicWeb.Components.LegalPagesLinks

alias Atomic.Activities
alias Atomic.Feed
Expand Down
2 changes: 2 additions & 0 deletions lib/atomic_web/live/home_live/index.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
<.schedule schedule={@schedule_default} current_user={@current_user} tab="all" />
<% end %>
</section>
<!-- Legal Pages Links -->
<.legal_pages_links />
</div>
</div>
17 changes: 17 additions & 0 deletions lib/atomic_web/live/legal_terms_live/components/black_bar.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
defmodule AtomicWeb.LegalTermsLive.Components.BlackBar do
@moduledoc """
Component for Legal Pages Black Bar.
"""
use Phoenix.Component
use AtomicWeb, :component

def black_bar(assigns) do
~H"""
<section class="flex justify-center bg-zinc-800 p-10 font-semibold text-white">
<p class="flex w-full justify-center md:w-2/3">
Lorem ipsum dolor sit amet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Lorem ipsum dolor sit amet.
<%= getttext("Lorem ipsum dolor sit amet.") %>

</p>
</section>
"""
end
end
43 changes: 43 additions & 0 deletions lib/atomic_web/live/legal_terms_live/components/header.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
defmodule AtomicWeb.LegalTermsLive.Components.Header do
@moduledoc """
Component for Legal Pages Header.
"""
use Phoenix.Component
use AtomicWeb, :component

def header(assigns) do
~H"""
<header class="fixed flex w-full place-items-center justify-between bg-white pt-8 pr-8 pb-4 pl-4">
<div class="flex place-items-center gap-x-6 md:gap-x-12 lg:pl-12">
<div class="flex place-items-center gap-x-4">
<!-- Atomic Logo -->
<.link navigate={~p"/"}>
<img src={~p"/images/atomic.svg"} class="h-14 w-auto" />
</.link>
<!-- Section Name -->
<p class="hidden select-none text-2xl font-semibold text-zinc-400 sm:block"><%= @page_name %></p>
</div>
<div class="flex hidden place-items-center gap-x-2 text-sm font-semibold text-zinc-300 sm:block sm:gap-x-4 sm:space-x-2 md:space-x-4">
<%= if @page_name == "Terms of Service" do %>
<.link class="hover:text-zinc-400" navigate={~p"/privacy"}>Privacy Policy</.link>
<.link class="hover:text-zinc-400" navigate={~p"/cookies"}>Cookie Policy</.link>
<% end %>
<%= if @page_name == "Privacy Policy" do %>
<.link class="hover:text-zinc-400" navigate={~p"/tos"}>Terms of Service</.link>
<.link class="hover:text-zinc-400" navigate={~p"/cookies"}>Cookie Policy</.link>
<% end %>
<%= if @page_name == "Cookie Policy" do %>
<.link class="hover:text-zinc-400" navigate={~p"/tos"}>Terms of Service</.link>
<.link class="hover:text-zinc-400" navigate={~p"/privacy"}>Privacy Policy</.link>
<% end %>
</div>
</div>
RicoPleasure marked this conversation as resolved.
Show resolved Hide resolved
<!-- Link to Home (hidden on mobile) -->
<div class="flex place-items-center lg:pr-12">
<.link class="atomic-button atomic-button--white atomic-button--md hidden sm:block" navigate={~p"/"}>Back home</.link>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this link to the button component. Make use of the attribute patch so you mantain the funcitionality of the link.
Put the text Back Home in a gettext("Back Home")

<.link class="atomic-button atomic-button--md hero-home block text-zinc-400 sm:hidden" navigate={~p"/"}></.link>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the component button allows only a icon without text, if so, change this too.

</div>
</header>
"""
end
end
15 changes: 15 additions & 0 deletions lib/atomic_web/live/legal_terms_live/components/main_title.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
defmodule AtomicWeb.LegalTermsLive.Components.MainTitle do
@moduledoc """
Component for Legal Pages Main Title.
"""
use Phoenix.Component
use AtomicWeb, :component

def main_title(assigns) do
~H"""
<section class="align-center pt-138 flex h-fit place-items-center px-4 py-40 xl:px-12">
<span class="w-86 text-7xl font-semibold text-zinc-800 sm:text-9xl lg:w-8/12 2xl:w-2/5"><%= @page_title %></span>
RicoPleasure marked this conversation as resolved.
Show resolved Hide resolved
</section>
"""
end
end
18 changes: 18 additions & 0 deletions lib/atomic_web/live/legal_terms_live/cookies_live/show.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
defmodule AtomicWeb.CookiesLive.Show do
use AtomicWeb, :live_view

import AtomicWeb.LegalTermsLive.Components.{Header, MainTitle, BlackBar}

@impl true
def mount(_params, _session, socket) do
{:ok, socket, layout: false}
end

@impl true
def handle_params(_params, _, socket) do
{:noreply,
socket
|> assign(:current_page, :cookies)
|> assign(:page_title, gettext("Cookie Policy"))}
end
end
76 changes: 76 additions & 0 deletions lib/atomic_web/live/legal_terms_live/cookies_live/show.html.heex
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<main class="px-4">
<!-- Header -->
<.header page_name="Cookie Policy" />
<!-- Main title -->
<.main_title page_title="Cookie Policy" />
<!-- Black container -->
<.black_bar black_bar_text="Lorem ipsum sit dor amet" />
<!-- Content Section -->
<section class="px-4 sm:px-8 md:px-36 2xl:px-96 pt-16">
<h2 class="text-2xl sm:text-4xl font-semibold mb-8">How We Use Cookies</h2>
<p class="text-md sm:text-lg">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum!</p>
<br />
<ul class="list-disc mx-6 mb-8">
<li class="mb-4 text-md sm:text-lg text-zinc-900">Jonas ipsum dolor sit amet, consectetur Jonas elit.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Vivamus Jonas tincidunt, Jonas feugiat sapien Jonas, accumsan Jonas ligula erat Jonas.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Fusce Jonas fermentum Jonas ornare.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Curabitur Jonas vel urna Jonas pharetra Jonas semper.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Quisque Jonas purus nisl, aliquet Jonas varius a Jonas dictum a Jonas tempus.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Pellentesque habitant morbi Jonas tristique senectus Jonas netus Jonas malesuada fames ac turpis Jonas.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Proin Jonas scelerisque nunc Jonas sodales.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Sed Jonas dapibus risus vel Jonas porta, non Jonas interdum nisl.</li>
</ul>
<p class="text-md sm:text-lg">Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum!</p>

<div class="border my-8"></div>

<h2 class="text-2xl sm:text-4xl font-semibold mb-8">What are cookies, pixels, and local storage?</h2>
<p class="text-md sm:text-lg">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Culpa accusamus facilis, animi saepe autem et vel, amet explicabo, cupiditate pariatur doloribus odit voluptates ad nisi at expedita corporis qui sunt.
</p>
<br />
<p class="text-md sm:text-lg">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Culpa accusamus facilis, animi saepe autem et vel, amet explicabo, cupiditate pariatur doloribus odit voluptates ad nisi at expedita corporis qui sunt.
</p>
<br />
<p class="text-md sm:text-lg">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Culpa accusamus facilis, animi saepe autem et vel, amet explicabo, cupiditate pariatur doloribus odit voluptates ad nisi at expedita corporis qui sunt.
</p>

<div class="border my-8"></div>

<h2 class="text-2xl sm:text-4xl font-semibold mb-8">Why do our services use these technologies?</h2>
<p class="text-md sm:text-lg">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Culpa accusamus facilis, animi saepe autem et vel, amet explicabo, cupiditate pariatur doloribus odit voluptates ad nisi at expedita corporis qui sunt.
</p>

<div class="border my-8"></div>

<ul class="list-disc mx-6 mb-8">
<li class="mb-4 text-md sm:text-lg text-zinc-900">Jonas ipsum dolor sit amet, consectetur Jonas elit.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Vivamus Jonas tincidunt, Jonas feugiat sapien Jonas, accumsan Jonas ligula erat Jonas.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Fusce Jonas fermentum Jonas ornare.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Curabitur Jonas vel urna Jonas pharetra Jonas semper.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Quisque Jonas purus nisl, aliquet Jonas varius a Jonas dictum a Jonas tempus.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Pellentesque habitant morbi Jonas tristique senectus Jonas netus Jonas malesuada fames ac turpis Jonas.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Proin Jonas scelerisque nunc Jonas sodales.</li>
<li class="mb-4 text-md sm:text-lg text-zinc-900">Sed Jonas dapibus risus vel Jonas porta, non Jonas interdum nisl.</li>
</ul>

<div class="border my-8"></div>

<h2 class="text-2xl sm:text-4xl font-semibold mb-8">Lorem ipsum, dolor sit amet consectetur adipisicing elit.</h2>
<p class="text-md sm:text-lg">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Culpa accusamus facilis, animi saepe autem et vel, amet explicabo, cupiditate pariatur doloribus odit voluptates ad nisi at expedita corporis qui sunt. Lorem ipsum dolor sit amet consectetur adipisicing elit. Nulla, quisquam? Ex harum aliquam dolores est asperiores mollitia, similique magni illum ea repellendus doloribus consequuntur sit distinctio sed dignissimos fuga placeat!
</p>

<div class="border my-8"></div>

<h2 class="text-2xl sm:text-4xl font-semibold mb-8">Jonas Johanes Johnson</h2>
<p class="text-md sm:text-lg">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Hic nesciunt fuga sint inventore laudantium, et quas cum at ad blanditiis magnam suscipit assumenda enim nemo quod qui animi provident eum! Lorem ipsum dolor, sit amet consectetur adipisicing elit. Culpa accusamus facilis, animi saepe autem et vel, amet explicabo, cupiditate pariatur doloribus odit voluptates ad nisi at expedita corporis qui sunt.
</p>

<div class="border my-8"></div>
</section>
</main>
18 changes: 18 additions & 0 deletions lib/atomic_web/live/legal_terms_live/privacy_live/show.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
defmodule AtomicWeb.PrivacyLive.Show do
use AtomicWeb, :live_view

import AtomicWeb.LegalTermsLive.Components.{Header, MainTitle, BlackBar}

@impl true
def mount(_params, _session, socket) do
{:ok, socket, layout: false}
end

@impl true
def handle_params(_params, _, socket) do
{:noreply,
socket
|> assign(:current_page, :privacy)
|> assign(:page_title, gettext("Privacy Policy"))}
end
end
Loading
Loading