Skip to content

Commit

Permalink
Update the header
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Jul 4, 2024
1 parent e03aac0 commit f92288f
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 109 deletions.
1 change: 1 addition & 0 deletions backend/hub/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<link rel="stylesheet" href="{% static "css/colors.css" %}">
<link rel="stylesheet" href="{% static "css/sizing.css" %}">
<link rel="stylesheet" href="{% static "css/footer.css" %}">
<link rel="stylesheet" href="{% static "css/header.css" %}">
<link rel="stylesheet" href="{% static "css/hub.css" %}">

{% block styles %}{% endblock %}
Expand Down
240 changes: 131 additions & 109 deletions backend/hub/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,122 +3,144 @@
{% load hub_tags %}

<div class="navbar-container">
<div class="h-padded-wrapper columns has-background-grey-lighter pt-3 mr-0">
<div class="container column is-12 is-flex is-align-content-center">
<img src="{% static "images/code4romania-black.svg" %}" alt="code-4-ro" width="80"/>
<strong class="px-5">
O soluție Code for Romania.
<a href="https://code4.ro/ro/putem">Află mai multe</a>
</strong>
</div>
<div class="h-padded-wrapper columns pt-3 mr-0 banner">
<div class="container column is-12 is-flex is-align-content-center">
<a
href="https://www.commitglobal.org"
target="_blank"
aria-label="Link către site-ul Commit Global">
<svg
style="height: 32px; min-width: 80px; float: left; margin: 0 1em 0 0; display: block;"
viewBox="0 0 401.5 114.5" xmlns="http://www.w3.org/2000/svg">
<path
d="m87.4 2.4 16.2 2.4 29.6 52.4-29.6 52.5-16.2 2.4 21.4-54.9zm-41.6 0-16.2 2.4-29.6 52.4 29.6 52.5 16.2 2.4-17.5-54.9z"></path>
<path d="m45.8 2.4 20.8-2.4 7.5 31.7-7.5 25.5-24 6.2-28.3-6.2z" fill="#fff8da"></path>
<path d="m45.8 112.1 20.8 2.4 12.2-28.6-12.2-28.7h-52.3z" fill="#ffe46b"></path>
<path d="m87.4 2.4-20.8-2.4v57.2l21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5 0 0 0 .2 4.1 3.7 3.7 0 0 0 .8 1.9 3.4 3.4 0 0 0 2.7 1.1 3.7 3.7 0 0 0 2.9-1.2 3.9 3.9 0 0 0 1-2.8v-.9h-3.9v-3.4h8z"></path>
<path d="m87.4 112.1-20.8 2.4v-57.3h52.2z" fill="#ffd209"></path>
</svg>
</a>

<strong class="px-4">
<a href="https://www.commitglobal.org" class="subtle-link" target="_blank">
O soluție Commit Global.
</a>
</strong>
</div>
<div class="h-padded-wrapper">
<div class="container border-b">
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{% url 'home' %}">
<img src="{% static "images/votong_by_c4ro.svg" %}" alt="VotONg logo" width="200">
</a>

<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-end has-text-centered-touch">
<a href="{% url 'home' %}" class="navbar-item">
{% trans "Home" %}
</a>

<a href="{% url 'about' %}" class="navbar-item">
{% trans "About the platform" %}
</a>

<a href="{% url 'blog-list' %}" class="navbar-item">Blog</a>

<a href="{% url 'ngos' %}" class="navbar-item">
{% trans "Organizations" %}
</a>

<a href="{% url 'candidates' %}" class="navbar-item">
{% trans "VotONG Elections" %}
</a>

<a href="{% url 'history' %}" class="navbar-item">
{% trans "History" %}
</a>

{% if ORG_REGISTRATION_ENABLED %}
<a href="{% url 'ngos-register-request' %}" class="navbar-item">
{% trans "Register your organization" %}
</a>
{% endif %}

<!-- <a href="{% url 'candidates' %}" class="navbar-item">
</div>

<div class="h-padded-wrapper">
<div class="container border-b">
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{% url 'home' %}">
<img src="{% static "images/votong_by_c4ro.svg" %}" alt="VotONG logo" width="200">
</a>

<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-end has-text-centered-touch">
<a href="{% url 'home' %}" class="navbar-item">
{% trans "Home" %}
</a>

<a href="{% url 'about' %}" class="navbar-item">
{% trans "About the platform" %}
</a>

<a href="{% url 'blog-list' %}" class="navbar-item">Blog</a>

<a href="{% url 'ngos' %}" class="navbar-item">
{% trans "Organizations" %}
</a>

<a href="{% url 'candidates' %}" class="navbar-item">
{% trans "VotONG Elections" %}
</a>

<a href="{% url 'history' %}" class="navbar-item">
{% trans "History" %}
</a>

{% if ORG_REGISTRATION_ENABLED %}
<a href="{% url 'ngos-register-request' %}" class="navbar-item">
{% trans "Register your organization" %}
</a>
{% endif %}

<!-- <a href="{% url 'candidates' %}" class="navbar-item">
{% trans "Candidates" %}
</a> -->

<!-- <a href="{% url 'rules' %}" class="navbar-item">
<!-- <a href="{% url 'rules' %}" class="navbar-item">
{% trans "Metodology" %}
</a> -->

<div class="navbar-item">|</div>

{% if request.user.is_authenticated %}

{% avatar user 50 class="img-circle img-responsive nav-avatar" id="user_avatar" %}

{% if user|in_committee_or_staff_groups %}
<a href="{% url 'committee-ngos' %}" class="navbar-item">
{% elif user.orgs.exists %}
<a href="{% url 'ngo-update' user.orgs.first.id %}" class="navbar-item">
{% else %}
<a href="{% url 'account-password-reset' %}" class="navbar-item">
{% endif %}
{{ user.email|truncatechars:24 }}
</a>

<a href="{% url 'account_logout' %}" class="navbar-item">{% trans "Logout" %}</a>

{% if user.is_impersonate %}
<a href="{% url 'impersonate-stop' %}" class="navbar-item" style="color:red; text-align:center;">
{% trans "STOP IMPERSONATING" %}<br>{{ request.user.email }}
</a>
{% endif %}

{% else %}

{# <a href="{% url 'account_login'%}" class="navbar-item"> #}
<a href="/allauth/amazon-cognito/login/?process=login" class="navbar-item">
{% trans "Login" %}
</a>
{% endif %}


{% comment %}
{% get_available_languages as LANGUAGES %}
{% get_current_language as LANGUAGE_CODE %}
<div class="navbar-item">
<form class="d-inline" action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}"/>
<div class="select">
<select id="language" name="language" onchange="this.form.submit()">
{% for language in LANGUAGES %}
<option {% if language.0 == LANGUAGE_CODE %} selected {% endif %} name="language" value="{{language.0}}">{{language.0 | upper}}</option>
{% endfor %}
</select>
</div>
</form>
</div>
{% endcomment %}

</div>
</div>
</nav>
<div class="navbar-item">|</div>

{% if request.user.is_authenticated %}

{% avatar user 50 class="img-circle img-responsive nav-avatar" id="user_avatar" %}

{% if user|in_committee_or_staff_groups %}
<a href="{% url 'committee-ngos' %}" class="navbar-item">
{% elif user.orgs.exists %}
<a href="{% url 'ngo-update' user.orgs.first.id %}" class="navbar-item">
{% else %}
<a href="{% url 'account-password-reset' %}" class="navbar-item">
{% endif %}
{{ user.email|truncatechars:24 }}
</a>

<a href="{% url 'account_logout' %}" class="navbar-item">{% trans "Logout" %}</a>

{% if user.is_impersonate %}
<a href="{% url 'impersonate-stop' %}" class="navbar-item" style="color:red; text-align:center;">
{% trans "STOP IMPERSONATING" %}<br>{{ request.user.email }}
</a>
{% endif %}

{% else %}

{# <a href="{% url 'account_login'%}" class="navbar-item"> #}
<a href="/allauth/amazon-cognito/login/?process=login" class="navbar-item">
{% trans "Login" %}
</a>
{% endif %}


{% comment %}
{% get_available_languages as LANGUAGES %}
{% get_current_language as LANGUAGE_CODE %}
<div class="navbar-item">
<form class="d-inline" action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}"/>
<div class="select">
<select id="language" name="language" onchange="this.form.submit()">
{% for language in LANGUAGES %}
<option {% if language.0 == LANGUAGE_CODE %} selected {% endif %} name="language"
value="{{ language.0 }}">{{ language.0 | upper }}</option>
{% endfor %}
</select>
</div>
</form>
</div>
{% endcomment %}

</div>
</div>
</nav>
</div>
</div>
</div>
19 changes: 19 additions & 0 deletions backend/static_extras/css/header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.subtle-link {
color: #000;

&:hover {
color: #165ccc;
}
}

.banner {
background-color: #f3f4f6;
}

.banner-content {
padding: 12px 0;
font-size: 14px;
font-weight: 500;
display: flex;
align-items: center;
}

0 comments on commit f92288f

Please sign in to comment.