Compare commits

...

8 Commits

Author SHA1 Message Date
Michael Schramm
5389f7f3a1
Merge pull request #58 from aitchiss/accessible-color-themes
Accessibility fixes for login, register and recover pages
2019-10-12 15:03:11 +02:00
Suzanne Aitchison
fa54ce8991 Fix attribute order to comply with lint 2019-10-12 12:32:08 +01:00
Suzanne Aitchison
af22df803c make the footer a footer 2019-10-12 12:30:26 +01:00
Suzanne Aitchison
3133af88ec Add H1 tags for register, login, and recover pages 2019-10-12 12:28:31 +01:00
Suzanne Aitchison
7c3d3a4d04 Remove incorrect label-for attributes on login and register form fields, replace with aria-labels on inputs 2019-10-12 12:26:10 +01:00
Suzanne Aitchison
0750ffae68 wrap content in main tag, add language to html root 2019-10-12 12:21:42 +01:00
Suzanne Aitchison
06e5d4c9e7 Adjust primary color and primary btn style for accessibility 2019-10-12 12:09:33 +01:00
wodka
717739434a start basic init service 2019-09-12 00:02:28 +02:00
10 changed files with 57 additions and 19 deletions

View File

@ -11,15 +11,18 @@ import { AuthModule } from './auth/auth.module';
import { MailModule } from "./mail/mail.module"
import { MailerModule } from "@nest-modules/mailer"
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost/ohmyform'
const MAILER_URI = process.env.MAILER_URI || 'smtp://localhost:1025'
@Module({
imports: [
TypegooseModule.forRoot('mongodb://localhost/ohmyform', { useNewUrlParser: true }),
MongooseModule.forRoot('mongodb://localhost/ohmyform'),
TypegooseModule.forRoot(MONGODB_URI, { useNewUrlParser: true }),
MongooseModule.forRoot(MONGODB_URI),
TerminusModule.forRootAsync({
useClass: TerminusOptionsService,
}),
MailerModule.forRoot({
transport: 'smtp://localhost:1025',
transport: MAILER_URI,
defaults: {
from:'"OhMyForm" <noreply@ohmyform.com>',
}

View File

@ -0,0 +1,13 @@
import { Injectable, OnModuleInit } from '@nestjs/common';
@Injectable()
export class InitService implements OnModuleInit {
onModuleInit() {
if (!process.env.CREATE_ADMIN || process.env.CREATE_ADMIN.toUpperCase() === 'FALSE') {
console.log('SKIP INITIAL ADMIN USER CREATION')
return
}
// TODO process user creation if ENV CREATE_ADMIN is set
}
}

View File

@ -1,4 +1,4 @@
import {Injectable, NotFoundException} from '@nestjs/common';
import { Injectable, NotFoundException } from '@nestjs/common';
import { InjectModel } from 'nestjs-typegoose';
import { ModelType } from 'typegoose';
import { User } from "../models/user.model"

View File

@ -1,8 +1,10 @@
import { UserService } from "./services/user.service"
import { UsernameAlreadyInUse } from "./validators/UsernameAlreadyInUse"
import { EmailAlreadyInUse } from "./validators/EmailAlreadyInUse"
import { InitService } from "./services/init.service"
export default [
InitService,
UserService,
UsernameAlreadyInUse,
EmailAlreadyInUse,

View File

@ -1,12 +1,15 @@
$accent: #fae596;
$primary: #3fb0ac;
$primary: #379A96;
$font-size-standard: 1rem;
$font-size-md: 1.25rem;
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
1html {
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
font-size: $font-size-standard;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
@ -36,6 +39,8 @@ $primary: #3fb0ac;
color: #fff;
background-color: $primary;
border-color: $primary;
font-size: $font-size-md;
font-weight: bold;
&:hover {
color: #fff;

View File

@ -1,15 +1,15 @@
<template>
<div class="screen bg-primary dark">
<div class="content">
<main class="content">
<nuxt />
</div>
</main>
<div class="footer">
<footer class="footer">
<nuxt-link to="/login">Login</nuxt-link>
<nuxt-link to="/register">Register</nuxt-link>
<nuxt-link to="/admin">Manage</nuxt-link>
<a href="https://ohmyform.com">OhMyForm</a>
</div>
</footer>
</div>
</template>

View File

@ -8,6 +8,9 @@ export default {
*/
head: {
title: pkg.name,
htmlAttrs: {
lang: 'en-US'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },

View File

@ -1,21 +1,25 @@
<template>
<div>
<img src="../assets/img/logo_white_small.png" alt="OhMyForm" />
<h1 aria-label="Login">
<img src="../assets/img/logo_white_small.png" alt="OhMyForm" />
</h1>
<b-form class="box" @submit.prevent="submit">
<b-form-group label-for="username">
<b-form-group>
<b-form-input
id="username"
v-model="username"
aria-label="Username"
trim
placeholder="Username or Email"
></b-form-input>
</b-form-group>
<b-form-group label-for="password">
<b-form-group>
<b-form-input
id="password"
v-model="password"
aria-label="Password"
type="password"
placeholder="Password"
trim

View File

@ -1,12 +1,15 @@
<template>
<div>
<img src="../assets/img/logo_white_small.png" alt="OhMyForm" />
<h1 aria-label="Recover Password">
<img src="../assets/img/logo_white_small.png" alt="OhMyForm" />
</h1>
<b-form class="box" @submit.prevent="submit">
<b-form-group label-for="username">
<b-form-group>
<b-form-input
id="username"
v-model="username"
aria-label="Username"
trim
placeholder="Username or Email"
></b-form-input>

View File

@ -1,30 +1,35 @@
<template>
<div>
<img src="../assets/img/logo_white_small.png" alt="OhMyForm" />
<h1 aria-label="Register">
<img src="../assets/img/logo_white_small.png" alt="OhMyForm" />
</h1>
<b-form class="box" @submit="submit">
<b-form-group label-for="username">
<b-form-group>
<b-form-input
id="username"
v-model="username"
aria-label="Username"
trim
placeholder="Username"
></b-form-input>
</b-form-group>
<b-form-group label-for="email">
<b-form-group>
<b-form-input
id="email"
v-model="email"
aria-label="Email"
trim
placeholder="Email"
></b-form-input>
</b-form-group>
<b-form-group label-for="password">
<b-form-group>
<b-form-input
id="password"
v-model="password"
aria-label="Password"
type="password"
placeholder="Password"
trim