-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(apps): create the code of conduct frontend application
Create the initial code of conduct frontend
- Loading branch information
1 parent
3f26e9e
commit 2960641
Showing
45 changed files
with
1,211 additions
and
205 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
{} | ||
{ | ||
"projects": {}, | ||
"targets": { | ||
"internal-200822": { | ||
"hosting": { | ||
"code-of-conduct": [ | ||
"code-of-conduct" | ||
] | ||
} | ||
} | ||
}, | ||
"etags": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
load("//tools:defaults.bzl", "esbuild", "esbuild_config", "ng_module") | ||
load("@io_bazel_rules_sass//:defs.bzl", "npm_sass_library", "sass_binary") | ||
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin") | ||
|
||
package(default_visibility = ["//apps/code-of-conduct:__subpackages__"]) | ||
|
||
ng_module( | ||
name = "main", | ||
srcs = [ | ||
"environment.ts", | ||
"main.ts", | ||
], | ||
deps = [ | ||
"//apps/code-of-conduct/app", | ||
"//apps/code-of-conduct/app:app_routes", | ||
"@npm//@angular/common", | ||
"@npm//@angular/compiler", | ||
"@npm//@angular/fire", | ||
"@npm//@angular/material", | ||
"@npm//@angular/platform-browser", | ||
"@npm//@angular/router", | ||
"@npm//zone.js", | ||
], | ||
) | ||
|
||
npm_sass_library( | ||
name = "angular_material_sass_deps", | ||
deps = ["@npm//@angular/material"], | ||
) | ||
|
||
sass_binary( | ||
name = "styles", | ||
src = "styles.scss", | ||
include_paths = [ | ||
"external/npm/node_modules", | ||
], | ||
deps = [ | ||
":angular_material_sass_deps", | ||
], | ||
) | ||
|
||
esbuild_config( | ||
name = "esbuild_config", | ||
config_file = "esbuild.config.mjs", | ||
deps = [ | ||
"//shared-scripts/angular-optimization:js_lib", | ||
"@npm//@angular/compiler-cli", | ||
], | ||
) | ||
|
||
esbuild( | ||
name = "bundles", | ||
config = ":esbuild_config", | ||
entry_points = [":main.ts"], | ||
platform = "browser", | ||
target = "es2016", | ||
deps = [ | ||
":main", | ||
], | ||
) | ||
|
||
copy_to_bin( | ||
name = "application_files_in_bin", | ||
srcs = [ | ||
"favicon.ico", | ||
"index.html", | ||
"robots.txt", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "application_files", | ||
srcs = [ | ||
":application_files_in_bin", | ||
":bundles", | ||
":styles", | ||
"@npm//:node_modules/zone.js/dist/zone.js", | ||
], | ||
visibility = ["//apps:__pkg__"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
load("//tools:defaults.bzl", "ng_module") | ||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") | ||
|
||
package(default_visibility = ["//apps/code-of-conduct:__subpackages__"]) | ||
|
||
exports_files(glob(["*"])) | ||
|
||
ng_module( | ||
name = "app", | ||
srcs = [ | ||
"app.component.ts", | ||
], | ||
assets = [ | ||
":app.component.css", | ||
"app.component.html", | ||
], | ||
deps = [ | ||
"//apps/shared/account", | ||
"//apps/code-of-conduct/app/block-user", | ||
"//apps/code-of-conduct/app/user-table", | ||
"@npm//@angular/common", | ||
"@npm//@angular/core", | ||
"@npm//@angular/router", | ||
], | ||
) | ||
|
||
sass_binary( | ||
name = "app-style", | ||
src = "app.component.scss", | ||
) | ||
|
||
ng_module( | ||
name = "block_service", | ||
srcs = [ | ||
"block.service.ts", | ||
], | ||
deps = [ | ||
"@npm//@angular/common", | ||
"@npm//@angular/core", | ||
"@npm//@angular/fire", | ||
"@npm//@angular/material", | ||
"@npm//rxjs", | ||
], | ||
) | ||
|
||
ng_module( | ||
name = "app_routes", | ||
srcs = [ | ||
"app.routes.ts", | ||
], | ||
deps = [ | ||
"//apps/shared/account", | ||
"//apps/code-of-conduct/app/login", | ||
"//apps/code-of-conduct/app/main", | ||
"@npm//@angular/router", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<mat-toolbar class="app-header-bar" color="primary"> | ||
<a routerLink='/' class="title">Code of Conduct</a> | ||
<span class="spacer"></span> | ||
<account-menu-button></account-menu-button> | ||
</mat-toolbar> | ||
<router-outlet></router-outlet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
block-user { | ||
margin: 15px auto; | ||
} | ||
|
||
.app-header-bar { | ||
position: sticky; | ||
top: 0; | ||
z-index: 1; | ||
|
||
a { | ||
text-decoration: none; | ||
color: inherit; | ||
font-size: 1.5em; | ||
} | ||
|
||
.spacer { | ||
flex: 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {Component} from '@angular/core'; | ||
import {MatToolbarModule} from '@angular/material/toolbar'; | ||
import {RouterModule} from '@angular/router'; | ||
import {AccountComponent} from '../../shared/account/account.component.js'; | ||
import {BlockUserComponent} from './block-user/block-user.component.js'; | ||
import {UserTableComponent} from './user-table/user-table.component.js'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.scss'], | ||
imports: [ | ||
MatToolbarModule, | ||
RouterModule, | ||
BlockUserComponent, | ||
AccountComponent, | ||
UserTableComponent, | ||
], | ||
}) | ||
export class AppComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {Routes} from '@angular/router'; | ||
import {isLoggedInGuard} from '../../shared/account/account.guard.js'; | ||
|
||
export const routes: Routes = [ | ||
{ | ||
path: 'login', | ||
loadComponent: () => import('./login/login.component.js').then((m) => m.LoginComponent), | ||
}, | ||
{ | ||
path: '', | ||
canActivate: [isLoggedInGuard], | ||
loadComponent: () => import('./main/main.component.js').then((m) => m.MainComponent), | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
load("//tools:defaults.bzl", "ng_module") | ||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary") | ||
|
||
package(default_visibility = ["//apps/code-of-conduct:__subpackages__"]) | ||
|
||
ng_module( | ||
name = "block-user", | ||
srcs = glob(["*.ts"]), | ||
assets = [ | ||
":block-user.component.css", | ||
":block-user.component.html", | ||
], | ||
deps = [ | ||
"//apps/code-of-conduct/app:block_service", | ||
"@npm//@angular/common", | ||
"@npm//@angular/core", | ||
"@npm//@angular/fire", | ||
"@npm//@angular/forms", | ||
"@npm//@angular/material", | ||
], | ||
) | ||
|
||
sass_binary( | ||
name = "block-user-style", | ||
src = "block-user.component.scss", | ||
) |
Oops, something went wrong.