nav header

This commit is contained in:
Tykayn 2021-12-13 16:18:24 +01:00 committed by tykayn
parent e4fd637cb4
commit 9cf278f18b
14 changed files with 94 additions and 27 deletions

View File

@ -7,9 +7,9 @@
</a> </a>
<a class="navbar-item title is-size-1-fullhd is-size-4-touch has-text-black" routerLink="/"> <a class="navbar-item title is-size-1-fullhd is-size-4-touch has-text-black" routerLink="/">
{{ appTitle }} {{ appTitle }}
<sub> <!-- <sub>-->
{{ environment.appVersion }} <!-- {{ environment.appVersion }}-->
</sub> <!-- </sub>-->
</a> </a>
</div> </div>
<div class="navbar-start"> <div class="navbar-start">
@ -22,9 +22,25 @@
> >
<i class="fa fa-plus-circle"></i> <i class="fa fa-plus-circle"></i>
<div class="is-hidden-touch"> <div class="is-hidden-touch">
{{ 'config.title' | translate }} {{ 'creation.init' | translate }}
</div> </div>
</a> </a>
<a href="#">
Explorer le libre
<i class="fa fa-chevron-down"></i>
</a>
<a href="#">
Des outils éthiques
<i class="fa fa-chevron-down"></i>
</a>
<a href="#">
Changer le monde
<i class="fa fa-chevron-down"></i>
</a>
<a href="#">
Entraide
<i class="fa fa-chevron-down"></i>
</a>
</span> </span>
</div> </div>
<div class="navbar-end"> <div class="navbar-end">
@ -33,23 +49,15 @@
<span class="navbar-item"> <span class="navbar-item">
<app-language-selector></app-language-selector> <app-language-selector></app-language-selector>
</span> </span>
<a <a href="#">
role="button" Faire un don
class="navbar-item burger-button-menu-custom" <i class="fa fa-chevron-down"></i>
aria-label="menu"
aria-expanded="false"
data-target="navbarBasicExample"
[ngClass]="{ 'has-background-primary': mobileMenuVisible }"
(click)="mobileMenuVisible = !mobileMenuVisible"
>
<i class="fa fa-bars" *ngIf="!mobileMenuVisible"></i>
<i class="fa fa-times" *ngIf="mobileMenuVisible"></i>
</a> </a>
</div> </div>
<!-- navbar items --> <!-- navbar items -->
<div class="mobile-menu" *ngIf="mobileMenuVisible"> <div class="mobile-menu" *ngIf="mobileMenuVisible">
<!-- menu mobile--> <!-- menu mobile-->
<app-navigation [appTitle]="appTitle" [appLogo]="appLogo"></app-navigation> <!-- <app-navigation [appTitle]="appTitle" [appLogo]="appLogo"></app-navigation>-->
</div> </div>
</nav> </nav>

View File

@ -23,7 +23,7 @@
</div> </div>
</div> </div>
<div class="column"> <div class="column">
<img src="assets/img/icone_home.png" alt="calendrier icone framadate" /> <!-- <img src="assets/img/icone_home.png" alt="calendrier icone framadate" />-->
</div> </div>
</div> </div>
</div> </div>

View File

@ -5,6 +5,18 @@
<a class="navbar-item" [routerLink]="['/administration']" routerLinkActive="is-primary"> <a class="navbar-item" [routerLink]="['/administration']" routerLinkActive="is-primary">
{{ 'creation.title' | translate }} {{ 'creation.title' | translate }}
</a> </a>
<a
role="button"
class="navbar-item burger-button-menu-custom is-visible-mobile"
aria-label="menu"
aria-expanded="false"
data-target="navbarBasicExample"
[ngClass]="{ 'has-background-primary': mobileMenuVisible }"
(click)="mobileMenuVisible = !mobileMenuVisible"
>
<i class="fa fa-bars" *ngIf="!mobileMenuVisible"></i>
<i class="fa fa-times" *ngIf="mobileMenuVisible"></i>
</a>
<div class="navbar-item has-dropdown is-hoverable is-warning" *ngIf="environment.display_routes"> <div class="navbar-item has-dropdown is-hoverable is-warning" *ngIf="environment.display_routes">
<div class="padded"> <div class="padded">
<a class="navbar-link"> Démos fixtures</a> <a class="navbar-link"> Démos fixtures</a>

View File

@ -1,4 +1,18 @@
@import '../../../../../styles/variables';
em { em {
margin-left: 1ch; margin-left: 1ch;
margin-right: 1ch; margin-right: 1ch;
} }
.logo-home-link {
margin-top: 0;
line-height: $header-nav-inner-height;
height: $header-nav-inner-height;
display: inline-block;
padding-left: 1em;
&:hover {
color: $font_color;
}
}

View File

@ -16,6 +16,7 @@ export class NavigationComponent implements OnInit {
@Input() public appTitle = 'FramaDate Funky'; @Input() public appTitle = 'FramaDate Funky';
@Input() public appLogo: string; @Input() public appLogo: string;
public environment = environment; public environment = environment;
mobileMenuVisible: boolean;
constructor(private mockingService: MockingService) {} constructor(private mockingService: MockingService) {}

View File

@ -12,7 +12,7 @@
<div <div
class="button input-radio is-fullwidth" class="button input-radio is-fullwidth"
[ngClass]="{ [ngClass]="{
'is-selected': pollService.form.controls.isAboutDate.value !== false 'is-selected': pollService.form.value.isAboutDate != false
}" }"
(click)="pollService.form.controls.isAboutDate.setValue(true)" (click)="pollService.form.controls.isAboutDate.setValue(true)"
> >
@ -27,7 +27,7 @@
<div <div
class="button input-radio is-fullwidth" class="button input-radio is-fullwidth"
[ngClass]="{ [ngClass]="{
'is-selected': !pollService.form.controls.isAboutDate.value !== false 'is-selected': !pollService.form.controls.isAboutDate.value != false
}" }"
(click)="pollService.form.controls.isAboutDate.setValue(false)" (click)="pollService.form.controls.isAboutDate.setValue(false)"
> >

View File

@ -12,6 +12,7 @@
transition: background-color ease 1.5s; transition: background-color ease 1.5s;
color: $font-color; color: $font-color;
&.is-selected { &.is-selected {
background: $secondary_color;
border: solid $primary-color 1px; border: solid $primary-color 1px;
color: $white; color: $white;
label { label {

View File

@ -53,7 +53,11 @@
<div class="step-info"> <div class="step-info">
<div class="columns half-columns"> <div class="columns half-columns">
<div class="column"> <div class="column">
<a class="navbar-item pull-left is-hidden-mobile" [routerLink]="['/']" routerLinkActive="active"> <a
class="logo-home-link navbar-item pull-left is-hidden-mobile"
[routerLink]="['/']"
routerLinkActive="active"
>
<img src="assets/img/icone_home.png" alt="accueil FramaDate" /> <img src="assets/img/icone_home.png" alt="accueil FramaDate" />
</a> </a>
<h2 class="step-title-poll" *ngIf="pollService.step_current == 1"> <h2 class="step-title-poll" *ngIf="pollService.step_current == 1">
@ -70,7 +74,10 @@
<h3 class="step-counter-text">Étape {{ step_current }} sur {{ step_max }}</h3> <h3 class="step-counter-text">Étape {{ step_current }} sur {{ step_max }}</h3>
</div> </div>
<div class="column has-text-right"> <div class="column has-text-right">
<a class="cancel-button" (click)="showCancelDialog()"> Annuler <i class="fa fa-times"></i> </a> <app-language-selector class="nav-button is-hidden-mobile"></app-language-selector>
<a class="nav-button cancel-button" (click)="showCancelDialog()">
Annuler <i class="fa fa-times"></i>
</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -52,12 +52,19 @@
} }
} }
.cancel-button { .nav-button {
margin-top: 0; margin-top: 0;
line-height: $header-nav-inner-height; line-height: 5rem;
height: $header-nav-inner-height; height: 5rem;
display: inline-block; display: inline-block;
padding-left: 1em; padding-left: 1em;
&app-language-selector {
padding-top: 1rem;
}
}
.cancel-button {
line-height: 4rem;
height: 4rem;
&:hover { &:hover {
color: $font_color; color: $font_color;
@ -96,3 +103,8 @@
color: white !important; color: white !important;
} }
} }
.lang-selector-icon {
margin-top: 0.5rem;
display: inline-block;
}

View File

@ -1,8 +1,15 @@
<div class="selector"> <div class="selector">
<img class="clickable" src="assets/img/icone-langue.svg" alt="langue" (click)="nextLang()" /> <img
class="lang-selector-icon clickable"
src="assets/img/icone-langue.svg"
alt="sélection de langue"
(click)="nextLang()"
/>
<div class="buttons has-addons"> <div class="buttons has-addons">
<label for="lang_selector" class="hidden">{{ 'selector.lang' | translate }}</label> <label for="lang_selector" class="hidden"
<select class="select is-hidden-touch" id="lang_selector" (change)="setLang()" [(ngModel)]="currentLang"> >{{ 'selector.lang' | translate }} {{ 'LANGUAGES.' + language | translate }}</label
>
<select class="is-hidden" id="lang_selector" (change)="setLang()" [(ngModel)]="currentLang">
<option *ngFor="let language of availableLanguages" value="{{ language }}"> <option *ngFor="let language of availableLanguages" value="{{ language }}">
<!-- {{ language }} - --> <!-- {{ language }} - -->
{{ 'LANGUAGES.' + language | translate }} {{ 'LANGUAGES.' + language | translate }}

View File

@ -1,3 +1,5 @@
#lang_selector { #lang_selector {
background: white; background: white;
max-width: 15em;
width: 15em !important;
} }

View File

@ -12,6 +12,7 @@ import { StorageService } from '../../../../core/services/storage.service';
export class LanguageSelectorComponent implements OnInit { export class LanguageSelectorComponent implements OnInit {
public currentLang: Language; public currentLang: Language;
public availableLanguages: any = []; public availableLanguages: any = [];
language: string;
constructor(private languageService: LanguageService, private storageService: StorageService) {} constructor(private languageService: LanguageService, private storageService: StorageService) {}

View File

@ -26,6 +26,7 @@
"find_button": "Find my polls" "find_button": "Find my polls"
}, },
"creation": { "creation": {
"init": "Creation",
"title": "To begin with", "title": "To begin with",
"want": "I want to create a poll", "want": "I want to create a poll",
"advanced": "More options", "advanced": "More options",

View File

@ -31,6 +31,7 @@
"find_button": "Retrouver mes sondages" "find_button": "Retrouver mes sondages"
}, },
"creation": { "creation": {
"init": "Création",
"title": "Création de sondage", "title": "Création de sondage",
"want": "Choisissez le type de sondage", "want": "Choisissez le type de sondage",
"dialog": "Quitter la création de sondage?", "dialog": "Quitter la création de sondage?",