Skip to content

Commit c2c98b8

Browse files
committed
feat: update footer and headers to include docs
1 parent 3835ac1 commit c2c98b8

File tree

3 files changed

+67
-55
lines changed

3 files changed

+67
-55
lines changed

lib/algora_web/components/footer.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ defmodule AlgoraWeb.Components.Footer do
107107
class="text-base font-medium leading-6 text-gray-400 hover:text-white"
108108
href={Constants.get(:docs_url)}
109109
>
110-
Documentation
110+
Docs
111111
</a>
112112
</li>
113113
<li>

lib/algora_web/components/header.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ defmodule AlgoraWeb.Components.Header do
1010
%{name: "Bounties", path: ~p"/bounties"},
1111
%{name: "Testimonials", path: ~p"/testimonials"},
1212
%{name: "Crowdfund", path: ~p"/crowdfund"},
13+
%{name: "Docs", path: ~p"/docs"},
1314
%{name: "Pricing", path: ~p"/pricing"}
1415
]
1516
end

lib/algora_web/components/layouts/user.html.heex

Lines changed: 65 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -208,71 +208,82 @@
208208
</div>
209209
</.link>
210210
<%= if @current_user do %>
211-
<%= if main_contract_form = Map.get(assigns, :main_contract_form) do %>
211+
<div class="flex items-center gap-x-4">
212212
<div>
213213
<.button
214-
phx-click="open_main_contract_form"
214+
variant="secondary"
215+
navigate={~p"/docs"}
215216
class="h-9 w-9 rounded-md flex items-center justify-center relative"
216217
>
217-
<.icon name="tabler-user-dollar" class="h-6 w-6 shrink-0" />
218+
<.icon name="tabler-help" class="h-6 w-6 shrink-0" />
218219
</.button>
219-
<.drawer
220-
show={@main_contract_form_open?}
221-
direction="right"
222-
on_cancel="close_main_contract_form"
223-
>
224-
<.drawer_header>
225-
<.drawer_title>Create new contract</.drawer_title>
226-
<.drawer_description>
227-
Engage a developer for ongoing work
228-
</.drawer_description>
229-
</.drawer_header>
230-
<.drawer_content class="mt-4">
231-
<AlgoraWeb.Forms.ContractForm.contract_form form={main_contract_form} />
232-
</.drawer_content>
233-
</.drawer>
234220
</div>
235-
<% end %>
236-
<%= if main_bounty_form = Map.get(assigns, :main_bounty_form) do %>
237-
<div>
238-
<.button
239-
phx-click="open_main_bounty_form"
240-
class="h-9 w-9 rounded-md flex items-center justify-center relative"
241-
>
242-
<.icon name="tabler-diamond" class="h-6 w-6 shrink-0" />
243-
<.icon
244-
name="tabler-plus"
245-
class="h-[0.8rem] w-[0.8rem] shrink-0 absolute bottom-[0.2rem] right-[0.2rem]"
246-
/>
247-
</.button>
248-
<.drawer
249-
show={@main_bounty_form_open?}
250-
direction="right"
251-
on_cancel="close_main_bounty_form"
252-
>
253-
<.drawer_header>
254-
<.drawer_title>Create new bounty</.drawer_title>
255-
<.drawer_description>
256-
Create and fund a bounty for an issue
257-
</.drawer_description>
258-
</.drawer_header>
259-
<.drawer_content class="mt-4">
260-
<AlgoraWeb.Forms.BountyForm.bounty_form form={main_bounty_form} />
261-
</.drawer_content>
262-
</.drawer>
263-
</div>
264-
<% end %>
265-
<%!-- {live_render(@socket, AlgoraWeb.Activity.UserNavTimelineLive,
221+
<%= if main_contract_form = Map.get(assigns, :main_contract_form) do %>
222+
<div>
223+
<.button
224+
phx-click="open_main_contract_form"
225+
class="h-9 w-9 rounded-md flex items-center justify-center relative"
226+
>
227+
<.icon name="tabler-user-dollar" class="h-6 w-6 shrink-0" />
228+
</.button>
229+
<.drawer
230+
show={@main_contract_form_open?}
231+
direction="right"
232+
on_cancel="close_main_contract_form"
233+
>
234+
<.drawer_header>
235+
<.drawer_title>Create new contract</.drawer_title>
236+
<.drawer_description>
237+
Engage a developer for ongoing work
238+
</.drawer_description>
239+
</.drawer_header>
240+
<.drawer_content class="mt-4">
241+
<AlgoraWeb.Forms.ContractForm.contract_form form={main_contract_form} />
242+
</.drawer_content>
243+
</.drawer>
244+
</div>
245+
<% end %>
246+
<%= if main_bounty_form = Map.get(assigns, :main_bounty_form) do %>
247+
<div>
248+
<.button
249+
phx-click="open_main_bounty_form"
250+
class="h-9 w-9 rounded-md flex items-center justify-center relative"
251+
>
252+
<.icon name="tabler-diamond" class="h-6 w-6 shrink-0" />
253+
<.icon
254+
name="tabler-plus"
255+
class="h-[0.8rem] w-[0.8rem] shrink-0 absolute bottom-[0.2rem] right-[0.2rem]"
256+
/>
257+
</.button>
258+
<.drawer
259+
show={@main_bounty_form_open?}
260+
direction="right"
261+
on_cancel="close_main_bounty_form"
262+
>
263+
<.drawer_header>
264+
<.drawer_title>Create new bounty</.drawer_title>
265+
<.drawer_description>
266+
Create and fund a bounty for an issue
267+
</.drawer_description>
268+
</.drawer_header>
269+
<.drawer_content class="mt-4">
270+
<AlgoraWeb.Forms.BountyForm.bounty_form form={main_bounty_form} />
271+
</.drawer_content>
272+
</.drawer>
273+
</div>
274+
<% end %>
275+
<%!-- {live_render(@socket, AlgoraWeb.Activity.UserNavTimelineLive,
266276
id: "activity-timeline",
267277
session: %{},
268278
sticky: true,
269279
assigns: %{current_user: @current_user}
270280
)} --%>
271-
<.context_selector
272-
current_user={@current_user}
273-
current_context={@current_context}
274-
all_contexts={@all_contexts}
275-
/>
281+
<.context_selector
282+
current_user={@current_user}
283+
current_context={@current_context}
284+
all_contexts={@all_contexts}
285+
/>
286+
</div>
276287
<% else %>
277288
<.link
278289
navigate="/auth/login"

0 commit comments

Comments
 (0)