Browse Source

translate homepage

creation-form
tykayn 2 years ago
parent
commit
d07f51dd91
  1. 2
      src/app/core/components/footer/footer.component.html
  2. 11
      src/app/core/components/header/header.component.html
  3. 3
      src/app/core/components/header/header.component.scss
  4. 25
      src/app/core/components/home/home.component.html
  5. 6
      src/app/core/components/home/home.component.scss
  6. 9
      src/app/core/components/home/home.component.ts
  7. 2
      src/app/features/administration/form/form.component.html
  8. 6
      src/assets/i18n/EN.json
  9. 6
      src/assets/i18n/FR.json
  10. BIN
      src/assets/img/kind/classic.jpeg
  11. BIN
      src/assets/img/kind/date.jpeg
  12. 10
      src/styles/partials/_links.scss

2
src/app/core/components/footer/footer.component.html

@ -5,6 +5,8 @@
{{ env.appTitle }} - {{ env.appVersion }} - libérez vos sondages. <i class="fa fa-copyleft"></i> Logiciel
libre sous licence AGPL v3.
<app-theme-selector></app-theme-selector>
<a href="https://framagit.org/framasoft/framadate/funky-framadate-front">
<i class="fa fa-gitlab"></i> Sources</a
>

11
src/app/core/components/header/header.component.html

@ -6,7 +6,7 @@
<span class="app-title title is-2">
{{ appTitle }}
</span>
<span class="dev-env" *ngIf="!env.production">
<span class="dev-env button bg-success" *ngIf="!env.production">
<i>
(dev)
</i>
@ -31,16 +31,15 @@
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item btn btn--primary" routerLink="administration" routerLinkActive="is-active">
<i class="fa fa-plus-circle"></i> {{ 'config.title' | translate }}
<i class="fa fa-plus-circle"></i>
<span>
{{ 'config.title' | translate }}
</span>
</a>
</div>
<div class="navbar-end">
<app-language-selector></app-language-selector>
<app-theme-selector></app-theme-selector>
<a class="navbar-item btn btn-primary" routerLink="user/polls" routerLinkActive="is-active">
<i class="fa fa-user"></i>
</a>
</div>
</div>
<div class="mobile-menu" *ngIf="mobileMenuVisible">

3
src/app/core/components/header/header.component.scss

@ -2,6 +2,9 @@
header {
nav {
padding-right: 1em;
.fa {
margin-right: 1ch;
}
}
.container {
padding: 0;

25
src/app/core/components/home/home.component.html

@ -2,24 +2,35 @@
<div class="hero-body">
<div class="container">
<h1 class="title">
Bienvenue sur Framasondage
{{ 'home.title' | translate }}
{{ env.appTitle }}
</h1>
<div class="columns">
<div class="column">
<h2 class="subtitle">
Se consulter simplement pour s’organiser collectivement.
{{ 'home.subtitle' | translate }}
</h2>
<a role="button" class="button is-fullwidth is-primary" routerLink="administration">
Créer un nouveau sondage
</a>
</div>
<div class="column">
<h2 class="subtitle">
Où sont mes sondages?
{{ 'home.search_title' | translate }}
</h2>
</div>
</div>
<div class="columns">
<div class="column">
<a role="button" class="button is-fullwidth is-primary" routerLink="administration">
<i class="fa fa-plus-circle"></i>
{{ 'home.create_button' | translate }}
</a>
<img src="assets/img/kind/date.jpeg" alt="sondage date" />
</div>
<div class="column">
<a role="button" class="button is-fullwidth is-primary" routerLink="user/polls">
Mes sondages
<i class="fa fa-search"></i>
{{ 'home.search_button' | translate }}
</a>
<img src="assets/img/kind/classic.jpeg" alt="sondage date" />
</div>
</div>
</div>

6
src/app/core/components/home/home.component.scss

@ -0,0 +1,6 @@
:host {
text-align: center;
a .fa {
margin-right: 1ch;
}
}

9
src/app/core/components/home/home.component.ts

@ -1,12 +1,11 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';
import { environment } from '../../../../environments/environment';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
constructor() {}
ngOnInit(): void {}
export class HomeComponent {
public env = environment;
}

2
src/app/features/administration/form/form.component.html

@ -29,7 +29,7 @@
[ngClass]="{ 'is-primary': !form.controls.isAboutDate.value }"
(click)="form.controls.isAboutDate.setValue(false)"
>
<i class="fa fa-doc-text"></i>
<i class="fa fa-stats"></i>
{{ 'creation.kind.classic' | translate }}
</button>
</div>

6
src/assets/i18n/EN.json

@ -3,7 +3,11 @@
"Title": "Translation example",
"Intro": "Hello I am {{name}}, I am {{age}} years old.",
"home": {
"title": "home's title"
"title": "Welcome at",
"subtitle": "Simply get together to collectivly organize",
"search_title": "Where are my polls ? ",
"create_button": "Create a new poll",
"search_button": "Search"
},
"PAGE_NOT_FOUND": {
"DEFAULT": "This page doesn’t exist.",

6
src/assets/i18n/FR.json

@ -3,7 +3,11 @@
"Title": "Exemple de traduction",
"Intro": "Bonjour je m'appelle {{name}}, j'ai {{age}} ans.",
"home": {
"title": "le titre de la home"
"title": "Bienvenue sur",
"subtitle": "Se consulter simplement pour s’organiser collectivement.",
"search_title": "Où sont mes sondages? ",
"create_button": "Créer un nouveau sondage ",
"search_button": "Rechercher"
},
"PAGE_NOT_FOUND": {
"DEFAULT": "Cette page n’existe pas.",

BIN
src/assets/img/kind/classic.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/assets/img/kind/date.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

10
src/styles/partials/_links.scss

@ -18,8 +18,16 @@ a {
background: $pale-purple;
}
}
.fa {
margin-right: 1ch;
}
}
.button,
.btn {
.fa {
margin-right: 1ch;
}
}
.list-my-polls {
a {
@extend .is-block;

Loading…
Cancel
Save