Skip to content

Commit

Permalink
Show a (non-functional) form for adding websites.
Browse files Browse the repository at this point in the history
  • Loading branch information
colons committed Nov 7, 2023
1 parent 61c8d4e commit d8c934e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
4 changes: 2 additions & 2 deletions nkdsu/static/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ body {
}
}

ul.websites {
.websites {
text-align: center;

li {
ul li {
&::before {
.fas();
content: @fa-var-globe;
Expand Down
33 changes: 25 additions & 8 deletions nkdsu/templates/include/voter_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,31 @@ <h2>
</ul>
{% endif %}

{% if voter.get_websites %}
<ul class="websites">
{% for website in voter.get_websites %}
<li data-icon="{{ website.icon }}">
<a href="website.url">{{ website.url }}</a>
</li>
{% endfor %}
</ul>
{% if voter.get_websites or voter == request.user %}
<div class="websites">
<ul>
{% for website in voter.get_websites %}
<li data-icon="{{ website.icon }}">
<a href="website.url">{{ website.url }}</a>
</li>
{% endfor %}
</ul>

{% if voter == request.user.profile %}
<details>
<summary>add a website</summary>
<form method="post">
<p>
<label>URL:</label>
<input type="text" name="url" placeholder="https://mycoolwebsite.gov"/>
</p>
<p class="submit">
<button class="button" type="submit">Add website</button>
</p>
</form>
</details>
{% endif %}
</div>
{% endif %}
</div>

0 comments on commit d8c934e

Please sign in to comment.