[front] global : update button styles

This commit is contained in:
22px 2019-10-16 21:33:49 +02:00
parent 69802a99ff
commit 802f54b930
11 changed files with 116 additions and 83 deletions

View File

@ -32,7 +32,7 @@
(click)="config.set('pollType' , 'classic')" (click)="config.set('pollType' , 'classic')"
[class.active]="config.pollType == 'classic'" [class.active]="config.pollType == 'classic'"
[disabled]="!formIsValid" [disabled]="!formIsValid"
class="btn btn-primary next" class="btn btn--primary next"
> >
<span i18n> <span i18n>
sondage classique sondage classique
@ -46,7 +46,7 @@
(click)="selectOption('pollType' ,'dates')" (click)="selectOption('pollType' ,'dates')"
[class.active]="config.pollType == 'dates'" [class.active]="config.pollType == 'dates'"
[disabled]="!formIsValid" [disabled]="!formIsValid"
class="btn btn-primary next" class="btn btn--primary next"
> >
<span i18n> <span i18n>
sondage spécial date sondage spécial date
@ -58,7 +58,7 @@
</button> </button>
<button <button
class="btn" class="btn btn--primary"
i18n i18n
(click)="config.sendForm()" (click)="config.sendForm()"
> >

View File

@ -21,7 +21,7 @@
</ol> </ol>
<button <button
class="btn_border" class="btn btn--primary btn--outline"
(click)="addAnswer()" (click)="addAnswer()"
i18n i18n
> >
@ -30,7 +30,7 @@
<br> <br>
<button <button
[routerLink]="'/step/resume'" [routerLink]="'/step/resume'"
class="btn_background btn_white_text" class="btn btn--primary"
i18n i18n
> >
Voyons ce que ça donne Voyons ce que ça donne

View File

@ -1,2 +1,2 @@
<h1>Ce composant est celui de base pour les pages</h1> <h1>Ce composant est celui de base pour les pages</h1>
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a> <a [routerLink]="'/step/end'" class="btn btn--primary" i18n="@@confirm">C'est parfait!</a>

View File

@ -11,7 +11,7 @@
</p> </p>
<div class="btn-next"> <div class="btn-next">
<button <button
class="btn_background btn_white_text" class="btn btn--primary"
[routerLink]="'/home'" [routerLink]="'/home'"
> >
<span <span
@ -48,7 +48,7 @@
/> />
<input <input
type="submit" type="submit"
class="btn_border" class="btn btn--primary btn--outline"
i18n i18n
value="Retrouver mes sondages" value="Retrouver mes sondages"
/> />

View File

@ -24,7 +24,7 @@
</div> </div>
<button <button
class="btn btn-primary" class="btn btn--primary"
(click)="addDate()" (click)="addDate()"
i18n i18n
> >
@ -52,7 +52,7 @@
<a <a
[routerLink]="'/step/end'" [routerLink]="'/step/end'"
class="btn btn-block" class="btn btn--primary"
> >
C'est parfait! C'est parfait!
</a> </a>

View File

@ -74,7 +74,7 @@
<button <button
[routerLink]="'/step/answers'" [routerLink]="'/step/answers'"
class="btn btn_background btn_white_text" class="btn btn--primary"
i18n i18n
> >
Continuer Continuer

View File

@ -1,7 +1,7 @@
<h1>page de démo</h1> <h1>page de démo</h1>
<p>cette étape est en cours de développement. <br> S'inspirer de la page de Home pour réaliser d'autres pages <p>cette étape est en cours de développement. <br> S'inspirer de la page de Home pour réaliser d'autres pages
</p> </p>
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a> <a [routerLink]="'/step/end'" class="btn btn--primary" i18n="@@confirm">C'est parfait!</a>
<h1>Atoms</h1> <h1>Atoms</h1>
<section> <section>
<article> <article>
@ -33,26 +33,67 @@
<article> <article>
<h2>Buttons</h2> <h2>Buttons</h2>
<p> <button type="submit" class="btn btn--primary">
<input type="submit" value="Input Submit with border" class="btn_border"><br> primary - default
<input type="submit" value="Input Submit with background" class="btn_background"><br> </button>
<input type="submit" value="Input Submit delete with border" class="btn_border btn_delete"><br>
<input type="submit" value="Input Submit delete with background" class="btn_background btn_delete">
<input type="submit" value="Input Submit with background and white text" class="btn_background btn_white_text">
</p>
<p> <br>
<button class="btn_border">Button with border</button><br>
<button class="btn_background">Button with background</button><br>
<button class="btn_border btn_delete">Button delete with background</button><br>
<button class="btn_background btn_delete">Button delete with background</button>
<button class="btn_background btn_white_text">Button with background and white text</button>
</p>
<p> <button type="submit" class="btn btn--primary btn--small">
Warning, in the mockups, some buttons have different paddings.<br> primary - small
Example: "Copier le lien" has smaller paddings, maybe a `btn_small` class could do the job, to check. </button>
</p>
<br>
<a href="#" class="btn btn--primary btn--outline">
primary - outline - default
</a>
<br>
<button type="submit" class="btn btn--primary btn--outline btn--small">
primary - outline - small
</button>
<br>
<input type="submit" class="btn btn--alert" value="alert - default">
<br>
<button type="submit" class="btn btn--alert btn--small">
alert - small
</button>
<br>
<button type="submit" class="btn btn--alert btn--outline">
alert - outline - default
</button>
<br>
<button type="submit" class="btn btn--alert btn--outline btn--small">
alert - outline - small
</button>
<br><br>
<button type="submit" class="btn btn--primary btn--full">
primary - full
</button>
<button type="submit" class="btn btn--primary btn--outline btn--full">
primary - outline - full
</button>
<button type="submit" class="btn btn--alert btn--full">
alert - full
</button>
<button type="submit" class="btn btn--alert btn--outline btn--full">
alert - outline - full
</button>
</article> </article>

View File

@ -2,5 +2,5 @@
<h1 i18n> <h1 i18n>
Images Images
</h1> </h1>
<a [routerLink]="'/step/visibility'" class="btn btn-block">ok</a> <a [routerLink]="'/step/visibility'" class="btn btn--primary">ok</a>

View File

@ -7,4 +7,4 @@
{{config |json}} {{config |json}}
</pre> </pre>
</section> </section>
<button [routerLink]="'/step/end'" class="btn_background btn_white_text" i18n="@@confirm">C'est parfait!</button> <button [routerLink]="'/step/end'" class="btn btn--primary" i18n="@@confirm">C'est parfait!</button>

View File

@ -11,4 +11,4 @@
<h1 i18n> <h1 i18n>
Accès au sondage Accès au sondage
</h1> </h1>
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a> <a [routerLink]="'/step/end'" class="btn btn--primary" i18n="@@confirm">C'est parfait!</a>

View File

@ -1,55 +1,47 @@
@charset "UTF-8"; @charset "UTF-8";
button, @mixin btnTheme ($color) {
input[type="submit"] { background-color: $color;
padding-right: 1.5rem; color: $white;
padding-left: 1.5rem; &.btn--outline {
font-size: 1.6rem; background-color: transparent;
line-height: 1; border-color: $color;
background-color: #fff; color: $font-color;
border: 2px solid $primary_color;
border-radius: 0.3rem;
font-family: $default_font;
font-weight: 600;
&.btn_background {
padding-top: 1rem;
padding-bottom: 1rem;
font-weight: 600;
background-color: $primary_color;
&:hover {
background-color: $secondary_color;
border-color: $secondary_color;
} }
&:focus,
&.btn_delete { &:hover,
color: #fff; &:active {
background-color: $red; background-color: rgba($color, .8);
&.btn--outline {
&:hover { background-color: rgba($color, .2);
color: $red; }
background-color: #fff;
}
} }
&.btn_white_text{ }
color:$white;
} .btn {
} margin: .5rem 0;
padding: 1rem 1.5rem;
&.btn_border { font-size: 1.6rem;
padding-top: 0.8rem; line-height: normal;
padding-bottom: 0.8rem; border: .2rem solid transparent;
border-radius: .3rem;
&:hover { font-weight: normal;
background-color: rgba($primary_color, 0.2);
} &--primary {
} @include btnTheme($primary_color);
}
&.btn_delete {
&, &--alert {
&:hover { @include btnTheme($red);
border-color: $red; }
}
} &--small {
padding: .75rem 1.25rem;
}
&--full {
display: block;
min-width: 100%;
}
} }