Skip to content

Commit

Permalink
header_lower: add border when no logo on org page fixes #37
Browse files Browse the repository at this point in the history
  • Loading branch information
philli-m committed Oct 17, 2023
1 parent e9c3683 commit 95f936e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 6 additions & 1 deletion adhocracy-plus/assets/scss/components/_blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ $block-padding-md: 7.5 * $padding;
// multi col cta with content styling
.block-columns_cta {
text-align: center;
padding: $spacer;

.block-row-1 {
justify-content: center;
}

@media screen and (min-width: $breakpoint) {
padding: initial;
}

.block-col_cta-btn {
width: 100%;
margin: auto;
Expand Down Expand Up @@ -172,7 +177,7 @@ $block-padding-md: 7.5 * $padding;
}

.block-paragraph {
@extend .py-3;
padding: $spacer;
}

.block-download {
Expand Down
2 changes: 1 addition & 1 deletion adhocracy-plus/assets/scss/components/_header_lower.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
width: auto;
}

.header-lower__brand {
.header-lower__brand--border {
z-index: 1;
border-left: 2px solid $brand-primary;
border-top: 2px solid $brand-primary;
Expand Down
5 changes: 2 additions & 3 deletions adhocracy-plus/templates/header_lower.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
<div class="header-lower__position">
<div class="col-md-10 offset-md-1 ps-3 ps-md-0">
<nav class="header-lower__nav">
{% url 'organisation' organisation_slug=organisation.slug as organisation_url %}

{% if organisation.logo %}
{% url 'organisation' organisation_slug=organisation.slug as organisation_url %}
<a href="{% url 'organisation' organisation_slug=organisation.slug %}" class="header-lower__logo-box" rel="home">
<img src="{% thumbnail organisation.logo '0x160' %}" height="80" alt="{{ organisation.name }}" class="header-lower__logo-img" />
</a>
{% else %}
<div class="header-lower__brand u-bg-body">
<div class="header-lower__brand u-bg-body {% if request.get_full_path == organisation_url or '/information' in request.get_full_path %}header-lower__brand--border{% endif %}">
<a class="header-lower__brand--link fw-bold" href="{% url 'organisation' organisation_slug=organisation.slug %}">
{{ organisation.name }}
</a>
</div>
{% endif %}

{% url 'organisation' organisation_slug=organisation.slug as organisation_url %}

{% if request.get_full_path == organisation_url or '/information' in request.get_full_path %}
<ul class="header-lower__nav-list--md d-none d-sm-block">
{% include 'includes/header_lower_org_items.html' %}
Expand Down

0 comments on commit 95f936e

Please sign in to comment.