Skip to content

Commit

Permalink
Fix contributor tab css and icons (#325)
Browse files Browse the repository at this point in the history
* Wrap the content into a container

* Swap the icons for free ones

A few that were missed during
#313

* Apply mix format

---------

Co-authored-by: Dominik Stańczak-Marikin <[email protected]>
  • Loading branch information
geekingfrog and StanczakDominik authored Jun 12, 2024
1 parent 14efa3b commit 95bfe6b
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions lib/teiserver_web/live/account/profile/contributor.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,53 @@
}
</style>

<div class="row mt-2 mb-3">
<div class="col">
<h4>User flag</h4>
<%= if @show_flag_config do %>
You can enter any
<a href="https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes">
ISO Country code <Fontawesome.icon icon="arrow-up-right-from-square" style="regular" />
</a>
and even a few extra ones. <br /><br />
Your current country code is: "<span class="monospace"><%= @country_code %></span>".
<br /><br />
<div class="container card">
<div class="row mt-2 mb-3">
<div class="col">
<h4>User flag</h4>
<%= if @show_flag_config do %>
You can enter any
<a href="https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes">
ISO Country code <Fontawesome.icon icon="arrow-up-right-from-square" style="solid" />
</a>
and even a few extra ones. <br /><br />
Your current country code is: "<span class="monospace"><%= @country_code %></span>".
<br /><br />

<input
type="text"
name="country_code"
value={@temp_country_code}
class="form-control"
style="max-width: 150px;"
phx-keyup="set-temp_country_code"
/>
<input
type="text"
name="country_code"
value={@temp_country_code}
class="form-control"
style="max-width: 150px;"
phx-keyup="set-temp_country_code"
/>

<%= if @error_message do %>
<div class="text-danger">
<%= @error_message %>
<%= if @error_message do %>
<div class="text-danger">
<%= @error_message %>
</div>
<% end %>

<div :if={@temp_country_code && @country_code != @temp_country_code} class="pt-2">
<span class="btn btn-secondary" phx-click="revert-country_code">
<Fontawesome.icon icon="cancel" style="solid" size="2x" /><br />
Revert to <%= @country_code %>
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-secondary" phx-click="clear-country_code">
<Fontawesome.icon icon="arrow-rotate-left" style="solid" size="2x" /><br /> Clear
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-success" phx-click="save-country_code">
<Fontawesome.icon icon="check" style="solid" size="2x" /><br /> Save changes
</span>
</div>
<% else %>
You have currently set your profile to hide your flag and thus cannot select a custom one. To undo this please
<a href={~p"/account/settings"}>settings page</a>
to alter this.
<% end %>

<div :if={@temp_country_code && @country_code != @temp_country_code} class="pt-2">
<span class="btn btn-secondary" phx-click="revert-country_code">
<Fontawesome.icon icon="cancel" style="regular" size="2x" /><br />
Revert to <%= @country_code %>
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-secondary" phx-click="clear-country_code">
<Fontawesome.icon icon="arrow-rotate-left" style="regular" size="2x" /><br /> Clear
</span>
&nbsp;&nbsp;&nbsp;
<span class="btn btn-success" phx-click="save-country_code">
<Fontawesome.icon icon="check" style="solid" size="2x" /><br /> Save changes
</span>
</div>
<% else %>
You have currently set your profile to hide your flag and thus cannot select a custom one. To undo this please
<a href={~p"/account/settings"}>settings page</a>
to alter this.
<% end %>
</div>
</div>
</div>

0 comments on commit 95bfe6b

Please sign in to comment.