-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
719c61a
commit 4f7c041
Showing
5 changed files
with
185 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
$(function() { | ||
let consultations = $(".main-nav li:nth-child(4)").clone(); | ||
$(".main-nav li:nth-child(4)").remove(); | ||
let template = ``; | ||
|
||
if (window.location.pathname === "/consultations") { | ||
$(".navbar").addClass("consultations"); | ||
template = ` | ||
<li class="main-nav__link main-nav__link--active _has_childs"> | ||
<a href="https://multiconsulta.decidim.barcelona" class="active">Multiconsulta</a> | ||
<nav class="_sub_nav"> | ||
<ul> | ||
<li class="sub-nav__link sub-nav__link--active"> | ||
<a href="/consultations" class="active">Multiconsulta 2018</a> | ||
</li> | ||
<li class="sub-nav__link "> | ||
<a href="https://multiconsulta.decidim.barcelona/ca/quan-i-com-votar">Quan i com votar</a> | ||
</li> | ||
<li class="sub-nav__link "> | ||
<a href="https://multiconsulta.decidim.barcelona/ca/que-es-la-multiconsulta">Què és la multiconsulta?</a> | ||
</li> | ||
<li class="sub-nav__link "> | ||
<a href="https://multiconsulta.decidim.barcelona/ca/lorem-ipsum">Lorem Ipsum</a> | ||
</li> | ||
<li class="sub-nav__link "> | ||
<a href="https://multiconsulta.decidim.barcelona/ca/membres-comissions">Comissió de seguiment</a> | ||
</li> | ||
<li class="sub-nav__link "> | ||
<a href="https://multiconsulta.decidim.barcelona/ca/dubtes">Dubtes</a> | ||
</li> | ||
<li class="sub-nav__link "> | ||
<a href="https://multiconsulta.decidim.barcelona/ca/entitat-interessada">Entitats interessades</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</li> | ||
`; | ||
} else { | ||
template = ` | ||
<li class="main-nav__link _has_childs"> | ||
<a href="https://multiconsulta.decidim.barcelona" class="active">Multiconsulta</a> | ||
</li> | ||
`; | ||
} | ||
|
||
$(template).insertAfter(".main-nav li:nth-child(2)"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
$title-color: #dbe7e4; | ||
$link-color: #e5e5e5; | ||
|
||
$navbar-height: 119px; | ||
|
||
$sub-nav-position:49px; | ||
$sub-nav-color: #3a363e; | ||
$sub-nav-hover-focus: #403b44; | ||
|
||
|
||
@mixin transform($transforms) { | ||
-moz-transform: $transforms; | ||
-o-transform: $transforms; | ||
-ms-transform: $transforms; | ||
-webkit-transform: $transforms; | ||
transform: $transforms; | ||
} | ||
|
||
|
||
/*._main-title { | ||
font-size: 22px; | ||
font-weight: 600; | ||
line-height: 20px; | ||
color: $title-color; | ||
span { | ||
display: block; | ||
font-weight: normal; | ||
} | ||
} | ||
.off-canvas { | ||
.close-button { | ||
z-index: 1; | ||
} | ||
}*/ | ||
|
||
.navbar.consultations { | ||
|
||
position: relative; | ||
min-height: $navbar-height; | ||
|
||
.main-nav__link { | ||
|
||
&._has_childs { | ||
a { | ||
position: relative; | ||
} | ||
} | ||
|
||
.active { | ||
color: white; | ||
} | ||
} | ||
|
||
._sub_nav { | ||
|
||
@media print, screen and (min-width: 40em) { | ||
position: absolute; | ||
left: 0; | ||
top: $sub-nav-position; | ||
width: 100%; | ||
|
||
min-height: calc(#{$navbar-height} - #{$sub-nav-position}); | ||
background-color: $sub-nav-color; | ||
} | ||
|
||
@media print, screen and (max-width: 767px) { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
padding-right: 0.625rem; | ||
padding-left: 0.625rem; | ||
background-color: #2c2930; | ||
transition: all ease .6s; | ||
will-change: transform; | ||
@include transform(translate(100%, 0)); | ||
&._visible { | ||
@include transform(translate(0, 0)); | ||
} | ||
} | ||
|
||
ul { | ||
|
||
max-width: 75rem; | ||
margin: 0 auto; | ||
|
||
@media print, screen and (min-width: 40em) { | ||
padding-right: 0.9375rem; | ||
padding-left: 0.9375rem; | ||
padding-top: 20px; | ||
} | ||
|
||
.sub-nav__link { | ||
|
||
&:hover, &:focus { | ||
@media print, screen and (min-width: 40em) { | ||
background-color: $sub-nav-hover-focus; | ||
} | ||
} | ||
|
||
&.sub-nav__link--active { | ||
a { | ||
@media print, screen and (max-width: 767px) { | ||
-webkit-box-shadow: inset 4px 0 0 0 #ef604d; | ||
box-shadow: inset 4px 0 0 0 #ef604d; | ||
color: #fff; | ||
background: rgba(255,255,255,0.02); | ||
} | ||
} | ||
} | ||
|
||
a { | ||
font-size: 16px; | ||
color: rgba(#FFFFFF, 0.5); | ||
box-shadow: none; | ||
background:none; | ||
@media print, screen and (min-width: 40em) { | ||
font-size: 14px; | ||
padding: 1em 2em; | ||
color: $link-color; | ||
} | ||
} | ||
} | ||
|
||
._back { | ||
a { | ||
box-shadow: none; | ||
background: none; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters