forked from tykayn/funky-framadate-front
🎨 style on current page from the route data, and texts in the confirm page, step end
This commit is contained in:
parent
32cbecf0f4
commit
809aa0f02f
@ -1,19 +1,41 @@
|
|||||||
<header style="text-align:center">
|
<header style="text-align:center">
|
||||||
<a [routerLink]="'home'" class="home_link" aria-roledescription="home">
|
<a
|
||||||
|
[routerLink]="'home'"
|
||||||
|
class="home_link"
|
||||||
|
aria-roledescription="home"
|
||||||
|
>
|
||||||
<h1>
|
<h1>
|
||||||
<span class="logo_first">Frama</span>
|
<span class="logo_first">Frama</span>
|
||||||
<span class="logo_second">date</span>
|
<span class="logo_second">date</span>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="legend">proposé par <span class="legend_first">Frama</span><span class="legend_second">soft</span></div>
|
<div class="legend">proposé par
|
||||||
|
<span class="legend_first">Frama</span>
|
||||||
|
<span class="legend_second">soft</span>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div id="translate_example">
|
<div id="translate_example">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<img src="assets/img/icone-langue.svg" alt="location icon" class="lang_icon">
|
<img
|
||||||
<img src="assets/img/icone-menu.svg" alt="menu icon" class="menu_icon">
|
src="assets/img/icone-langue.svg"
|
||||||
<select name="language" class="Language-" (change)="switchLanguage($event.target.value)">
|
alt="location icon"
|
||||||
<option value="d" default class="select_language">{{"Language" | translate}}</option>
|
class="lang_icon"
|
||||||
<option value="en" >English</option>
|
> <img
|
||||||
<option value="fr" >Français</option>
|
src="assets/img/icone-menu.svg"
|
||||||
|
alt="menu icon"
|
||||||
|
class="menu_icon"
|
||||||
|
>
|
||||||
|
<select
|
||||||
|
name="language"
|
||||||
|
class="Language-"
|
||||||
|
(change)="switchLanguage($event.target.value)"
|
||||||
|
>
|
||||||
|
<option
|
||||||
|
value="d"
|
||||||
|
default
|
||||||
|
class="select_language"
|
||||||
|
>{{"Language" | translate}}</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="fr">Français</option>
|
||||||
</select>
|
</select>
|
||||||
<span class="menu_label">Menu</span>
|
<span class="menu_label">Menu</span>
|
||||||
</div>
|
</div>
|
||||||
@ -24,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
<framadate-navigation></framadate-navigation>
|
<framadate-navigation [step]="step"></framadate-navigation>
|
||||||
<main>
|
<main>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</main>
|
</main>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {TranslateService} from "@ngx-translate/core";
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
|
import {Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -14,9 +15,26 @@ export class AppComponent {
|
|||||||
name: 'Arthur',
|
name: 'Arthur',
|
||||||
age: 42
|
age: 42
|
||||||
};
|
};
|
||||||
|
private step: string;
|
||||||
|
|
||||||
constructor(private translate: TranslateService) {
|
constructor(private translate: TranslateService,
|
||||||
|
private route: Router) {
|
||||||
this.translate.setDefaultLang('fr');
|
this.translate.setDefaultLang('fr');
|
||||||
|
this.route.events.subscribe((event: any) => {
|
||||||
|
|
||||||
|
// console.log('event', event);
|
||||||
|
if (event.url) {
|
||||||
|
|
||||||
|
const tab = event.url.split('/');
|
||||||
|
console.log(tab);
|
||||||
|
if (tab && tab[2]) {
|
||||||
|
this.step = tab[2];
|
||||||
|
} else {
|
||||||
|
this.step = 'home';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
switchLanguage(language: string) {
|
switchLanguage(language: string) {
|
||||||
|
@ -1,6 +1,72 @@
|
|||||||
<h1 i18n>
|
<h1 i18n>
|
||||||
{{"resume.title"|translate}}
|
{{"resume.title"|translate}}
|
||||||
</h1>
|
</h1>
|
||||||
<h2 i18n>{{"resume.admins"|translate}}</h2>
|
<section class="admin">
|
||||||
<h2 i18n>{{"resume.users"|translate}}</h2>
|
<h2 i18n>{{"resume.admins"|translate}}</h2>
|
||||||
<h2 i18n>{{"resume.links_mail"|translate}}</h2>
|
<p>
|
||||||
|
|
||||||
|
Votre sondage «
|
||||||
|
<span class="poll-title">
|
||||||
|
{{config.title}} </span>
|
||||||
|
» a bien été créé !
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Voici les liens d’accès au sondage, conservez-les soigneusement !
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Pour accéder au sondage et à tous ses paramètres : https://framadate.org/urladmindusondage
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
(click)="copyLink(adminLink)"
|
||||||
|
>
|
||||||
|
Copier le lien
|
||||||
|
</button>
|
||||||
|
<a href="{{adminLink}}">
|
||||||
|
Voir le sondage coté administrateur·ice
|
||||||
|
</a>
|
||||||
|
<p class="note">
|
||||||
|
Note : Le sondage sera supprimé 180 jours après la date de sa dernière modification.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</section>
|
||||||
|
<section class="public">
|
||||||
|
|
||||||
|
<h2 i18n>{{"resume.users"|translate}}</h2>
|
||||||
|
<p>
|
||||||
|
Pour accéder au sondage : https://framadate.org/urladmindusondage
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
(click)="copyLink(publicLink)"
|
||||||
|
>
|
||||||
|
Copier le lien
|
||||||
|
</button>
|
||||||
|
</section>
|
||||||
|
<section class="mail">
|
||||||
|
|
||||||
|
<h2 i18n>{{"resume.links_mail"|translate}}</h2>
|
||||||
|
<p>
|
||||||
|
Pour être sur de retrouver ces liens, nous pouvons vous les envoyer sur votre mail
|
||||||
|
|
||||||
|
mail :
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
[(ngModel)]="mailToRecieve"
|
||||||
|
paceholder="email"
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
(click)="sendToEmail()"
|
||||||
|
>
|
||||||
|
Envoyer les liens du sondage
|
||||||
|
</button>
|
||||||
|
<a href="{{publicLink}}">
|
||||||
|
Voir le sondage
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
@ -1,19 +1,30 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {BaseComponent} from "../base-page/base.component";
|
import {BaseComponent} from '../base-page/base.component';
|
||||||
import {ConfigService} from "../../config.service";
|
import {ConfigService} from '../../config.service';
|
||||||
|
import {HttpClient} from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'framadate-end-confirmation',
|
selector: 'framadate-end-confirmation',
|
||||||
templateUrl: './end-confirmation.component.html',
|
templateUrl: './end-confirmation.component.html',
|
||||||
styleUrls: ['./end-confirmation.component.scss']
|
styleUrls: ['./end-confirmation.component.scss']
|
||||||
})
|
})
|
||||||
export class EndConfirmationComponent extends BaseComponent implements OnInit {
|
export class EndConfirmationComponent extends BaseComponent implements OnInit {
|
||||||
|
public adminLink = '';
|
||||||
|
public publicLink = '';
|
||||||
|
mailToRecieve = '';
|
||||||
|
|
||||||
constructor(public config: ConfigService) {
|
constructor(public config: ConfigService, public http: HttpClient) {
|
||||||
super(config);
|
super(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copyLink(adminLink: any) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sendToEmail() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,94 @@
|
|||||||
<nav class="choices">
|
<nav class="choices">
|
||||||
<a [routerLink]="'/step/creation'" i18n>
|
<a
|
||||||
|
[routerLink]="'home'"
|
||||||
|
[ngClass]="{'active': step == 'home'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
|
<i class="fa fa-home"></i>
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
[routerLink]="'/step/creation'"
|
||||||
|
[ngClass]="{'active': step == 'creation'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Création
|
Création
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/date'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/date'"
|
||||||
|
[ngClass]="{'active': step == 'date'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Les Dates
|
Les Dates
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/answers'" i18>
|
<a
|
||||||
|
[routerLink]="'/step/answers'"
|
||||||
|
[ngClass]="{'active': step == 'answers'}"
|
||||||
|
i18
|
||||||
|
>
|
||||||
Réponses
|
Réponses
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/visibility'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/visibility'"
|
||||||
|
[ngClass]="{'active': step == 'visibility'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Visibilité
|
Visibilité
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/base'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/base'"
|
||||||
|
[ngClass]="{'active': step == 'base'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Base
|
Base
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/pictures'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/pictures'"
|
||||||
|
[ngClass]="{'active': step == 'pictures'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Images
|
Images
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/resume'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/resume'"
|
||||||
|
[ngClass]="{'active': step == 'resume'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Résumé
|
Résumé
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/kind'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/end'"
|
||||||
|
[ngClass]="{'active': step == 'end'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
|
Confirmation
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
[routerLink]="'/step/kind'"
|
||||||
|
[ngClass]="{'active': step == 'kind'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Page démo
|
Page démo
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/graphic/toto'" i18n>
|
<a
|
||||||
|
[routerLink]="'/graphic/toto'"
|
||||||
|
[ngClass]="{'active': step == 'graphic'}"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Graphique
|
Graphique
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/step/admin'" i18n>
|
<a
|
||||||
|
[routerLink]="'/step/admin'"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Administration
|
Administration
|
||||||
</a>
|
</a>
|
||||||
<a [routerLink]="'/home'" i18n>
|
<a
|
||||||
|
[routerLink]="'/home'"
|
||||||
|
i18n
|
||||||
|
>
|
||||||
Accueil
|
Accueil
|
||||||
</a>
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
<div class="well">
|
||||||
|
step: {{step}}
|
||||||
|
</div>
|
||||||
|
@ -1,27 +1,33 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 3.2rem;
|
margin-bottom: 3.2rem;
|
||||||
padding-top: 1.6rem;
|
padding-top: 1.6rem;
|
||||||
padding-bottom: 1.6rem;
|
padding-bottom: 1.6rem;
|
||||||
border-top: 2px solid #ffd52c;
|
border-top: 2px solid #ffd52c;
|
||||||
border-bottom: 2px solid #ffd52c;
|
border-bottom: 2px solid #ffd52c;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
&::before {
|
&::before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: auto;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
&::after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(:first-of-type)::before {
|
&::after {
|
||||||
content: ' | ';
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-of-type)::before {
|
||||||
|
content: ' | ';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: white;
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
import {BaseComponent} from '../../pages/base-page/base.component';
|
import {BaseComponent} from '../../pages/base-page/base.component';
|
||||||
import {ConfigService} from '../../config.service';
|
import {ConfigService} from '../../config.service';
|
||||||
|
import {Router} from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'framadate-navigation',
|
selector: 'framadate-navigation',
|
||||||
@ -9,11 +10,16 @@ import {ConfigService} from '../../config.service';
|
|||||||
})
|
})
|
||||||
export class NavigationComponent extends BaseComponent implements OnInit {
|
export class NavigationComponent extends BaseComponent implements OnInit {
|
||||||
|
|
||||||
constructor(public config: ConfigService) {
|
@Input() public step: 'home';
|
||||||
|
|
||||||
|
constructor(public config: ConfigService,
|
||||||
|
public route: Router) {
|
||||||
super(config);
|
super(config);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nextPage() {
|
nextPage() {
|
||||||
|
Loading…
Reference in New Issue
Block a user