feat(console): integrate frontend (#95)

* feat: console frontend

* chore(dependabot): cycle and npm

* chore: rename citadel to zitadel, remove generated files

* chore: delete go files

* chore(frontend): ci steps

* chore: remove docker and envoy files

* chore: remove docker file

* chore: working dir

* chore: run proto build

* add console start

* chore: restructure folders

* chore: remove gui build

* statikFs

* generate proto for console

* add statik import

* import

* chore: try statik

* chore: path

* chore: path

* chore: script in root

* chore: order build steps

* chore: go get

* chore: folder traversal

* chore: non empty test file

* chore: gitignore

* chore: gitignore

* chore: statik path

* chore: switch to failing FE build

* fix: build

* fix: project-grant-test

* fix: rm test

* add statik.go

* go mod tidy

* chore: place test, seperate test from build

* chore: lint all the world

* chore: ci the world instead

* chore: tune docker

* chore: undo container test

* chore: fix run

* chore: docker build

* chore: test docker build

* chore: go build flags

* finaly

* fix caos_local

* go mod

Co-authored-by: Livio Amstutz <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
Florian Forster
2020-05-13 14:41:43 +02:00
committed by GitHub
co-authored by Livio Amstutz Max Peintner
parent 9e32740eb8
commit 92a294f5c8
375 changed files with 97826 additions and 52 deletions
@@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './home.component';
const routes: Routes = [
{
path: '',
component: HomeComponent,
data: { animation: 'HomePage' },
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class HomeRoutingModule { }
@@ -0,0 +1,53 @@
<div class="wrapper">
<div class="header">
<img *ngIf="dark; else lighttheme" src="../assets/images/zitadel-logo-oneline-darkdesign.svg" />
<ng-template #lighttheme>
<img src="../assets/images/zitadel-logo-oneline-lightdesign.svg" />
</ng-template>
<p>{{'HOME.DESCRIPTION' | translate}}</p>
</div>
<div class="container">
<div class="item">
<div class="top">
<h2>{{'HOME.SECURITYANDPRIVACY'| translate}}</h2>
<p>{{'HOME.SECURITYANDPRIVACY_DESC'| translate}}</p>
</div>
<span class="fill-space"></span>
<div class="footer">
<a color="accent" mat-button
[routerLink]="['/users/me']">{{'HOME.SECURITYANDPRIVACY_BUTTON' | translate}}</a>
</div>
</div>
<div class="item">
<div class="top">
<h2>{{'HOME.PROJECTS'| translate}}</h2>
<p>{{'HOME.PROJECTS_DESC'| translate}}</p>
</div>
<span class="fill-space"></span>
<div class="footer">
<a color="accent" mat-button [routerLink]="['/users/me']">{{'HOME.PROJECTS_BUTTON' | translate}}</a>
</div>
</div>
<div class="item">
<div class="top">
<h2>{{'HOME.PROTECTION'| translate}}</h2>
<p>{{'HOME.PROTECTION_DESC'| translate}}</p>
</div>
<span class="fill-space"></span>
<div class="footer">
<a color="accent" mat-button [routerLink]="['/users/me']">{{'HOME.PROTECTION_BUTTON' | translate}}</a>
</div>
</div>
<div class="item">
<div class="top">
<h2>{{'HOME.USERS'| translate}}</h2>
<p>{{'HOME.USERS_DESC'| translate}}</p>
</div>
<span class="fill-space"></span>
<div class="footer">
<a color="accent" mat-button [routerLink]="['/users/me']">{{'HOME.USERS_BUTTON' | translate}}</a>
</div>
</div>
</div>
</div>
@@ -0,0 +1,115 @@
.circle {
position: relative;
border-radius: 100%;
width: 8rem;
height: 8rem;
background: linear-gradient(40deg, #8983F7, #A3DAFB 70%);
margin: auto;
}
.crescent {
position: absolute;
border-radius: 100%;
right: 0;
width: 6rem;
height: 6rem;
background: #212224;
transform: scale(1);
transform-origin: top right;
transition: transform .6s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.wrapper {
width: 80%;
max-width: 1350px;
@media only screen and (max-width: 700px) {
width: 90%;
}
margin: auto;
.header {
display: flex;
flex-direction: column;
margin: 4rem 0;
align-items: center;
.avatar {
width: 100px;
height: 100px;
font-size: 100px;
line-height: 100px;
margin-top: 1rem;
}
h1 {
font-size: 3rem;
font-family: ailerons;
}
p {
color: #81868a;
text-align: center;
font-size: 1rem;
margin: 0;
}
img {
height: 90px;
margin-bottom: 2rem;
}
}
.container {
display: flex;
flex-wrap: wrap;
margin: -1rem;
justify-content: space-evenly;
.item {
flex: 1 1 45%;
box-sizing: border-box;
margin: 1rem;
border: 1px solid #ffffff20;
border-radius: .5rem;
display: flex;
flex-direction: column;
.top {
padding: 1rem 2rem;
h2 {
display: block;
margin-top: .5rem;
font-family: 'Rubik';
}
p {
display: block;
color: #81868a;
font-size: .9rem;
}
}
.fill-space {
flex: 1;
}
.footer {
// position: absolute;
// bottom: 0;
// left: 0;
// right: 0;
height: 60px;
display: flex;
align-items: center;
padding: 0 1rem;
border-top: 1px solid #ffffff20;
a {
// text-decoration: none;
// color: #e8eaed;
// font-size: .8rem;
// font-weight: 600;
}
}
}
}
}
@@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [HomeComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
})
export class HomeComponent {
public dark: boolean = true;
constructor() {
const theme = localStorage.getItem('theme');
this.dark = theme === 'dark-theme' ? true : theme === 'light-theme' ? false : true;
}
}
+30
View File
@@ -0,0 +1,30 @@
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { HttpLoaderFactory } from 'src/app/app.module';
import { HomeRoutingModule } from './home-routing.module';
import { HomeComponent } from './home.component';
@NgModule({
declarations: [HomeComponent],
imports: [
CommonModule,
MatIconModule,
HomeRoutingModule,
MatButtonModule,
TranslateModule.forChild({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient],
},
}),
],
})
export class HomeModule { }