This commit is contained in:
Zakary Timson 2022-09-20 13:57:30 -04:00
parent 2ed901984f
commit 705a59b0ea
39 changed files with 842 additions and 138 deletions

16
.browserslistrc Normal file
View File

@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR

16
.editorconfig Normal file
View File

@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

43
.gitignore vendored Normal file
View File

@ -0,0 +1,43 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
# Node
/node_modules
npm-debug.log
yarn-error.log
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
# System files
.DS_Store
Thumbs.db
/package-lock.json

97
.gitlab/.gitlab-ci.yml Normal file
View File

@ -0,0 +1,97 @@
image: node:16
stages:
- build
- test
- publish
- deploy
npm:
stage: build
artifacts:
paths:
- dist
expire_in: 1 week
cache:
- key:
files:
- package.json
paths:
- node_modules
- package-lock.json
policy: pull-push
- key: $CI_PIPELINE_ID
paths:
- dist
policy: push
script:
- npm i
- npm run build
rules:
- if: $CI_COMMIT_BRANCH
audit:
stage: test
cache:
- key:
files:
- package.json
paths:
- node_modules
policy: pull
script:
- AUDIT=$(npm audit)
- echo "vulnerabilities_high $(echo $AUDIT | grep -oE '[0-9]+ high' | grep -oE '[0-9]+' || echo 0)" > metrics.txt
- echo "vulnerabilities_medium $(echo $AUDIT | grep -oE '[0-9]+ moderate' | grep -oE '[0-9]+' || echo 0)" >> metrics.txt
- echo "vulnerabilities_low $(echo $AUDIT | grep -oE '[0-9]+ low' | grep -oE '[0-9]+' || echo 0)" >> metrics.txt
- echo "$AUDIT"
artifacts:
reports:
metrics: metrics.txt
rules:
- if: $CI_COMMIT_BRANCH
registry:
stage: publish
image: docker
cache:
- key: $CI_PIPELINE_ID
paths:
- dist
policy: pull
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- TAG=$([ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ] && echo "latest" || echo "$CI_COMMIT_BRANCH" | sed -E "s/[_/]/-/g")
- docker build --no-cache -t "$CI_REGISTRY_IMAGE:$TAG" .
- docker push "$CI_REGISTRY_IMAGE:$TAG"
rules:
- if: $CI_COMMIT_BRANCH
tag:
stage: publish
image:
name: alpine/git
entrypoint: [ "" ]
cache: [ ]
before_script:
- git remote set-url origin http://gitlab-ci-token:$DEPLOY_TOKEN@gitlab.zakscode.com/$CI_PROJECT_PATH.git
script:
- VERSION=$(cat package.json | grep version | grep -Eo ':.+' | grep -Eo '[[:alnum:]\.\/\-]+')
- git tag -f $VERSION $CI_COMMIT_SHA
- git push -f origin $VERSION
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
allow_failure: true
production:
stage: deploy
image: node:16
cache: [ ]
script:
- curl -X POST https://portainer.zakscode.com/api/webhooks/9fcc5dce-a884-4063-8666-34c0acf0aec5
environment:
name: Production
url: https://legioxxx.zakscode.com
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_DEPLOY_FREEZE == null'

28
Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM node:16 as build
# Variables
ARG NODE_ENV=prod
ARG NODE_OPTIONS="--max_old_space_size=4096"
ENV NG_CLI_ANALYTICS=ci \
NODE_ENV=${NODE_ENV} \
NODE_OPTIONS=${NODE_OPTIONS}
# Setup
RUN npm config set unsafe-perm true && \
mkdir /app
WORKDIR /app
COPY . .
# Install
RUN if [ ! -d "dist" ] && [ ! -d "node_modules" ]; then npm install; fi
# Build
RUN BUILD_MODE=$([ "$NODE_ENV" = "prod" ] && echo "dynmaic-prod" || echo "dynamic") && \
if [ ! -d "dist" ]; then npm run "build:$BUILD_MODE"; fi
# Use Nginx to serve
FROM nginx:1.20-alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY docker/robots.txt /usr/share/nginx/html/robots.txt
COPY docker/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

121
README.md
View File

@ -1,92 +1,47 @@
# 291st
# 291st JTF
Clan page for the 291st Joint Task Force
Clan page for the 291st
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.2.
## Getting started
## Table of Contents
[[_TOC_]]
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
## Prerequisites
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- [NodeJS 16](https://nodejs.org/en/)
- _[Docker](https://docs.docker.com/install/) (Optional)_
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Setup
The project can either be run using NPM or Docker. NPM is recommended for development.
<details>
<summary>NPM</summary>
## Add your files
1. Install the dependencies: `npm install`
2. Start the Angular server: `npm run start`
</details>
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
<details>
<summary>Docker</summary>
```
cd existing_repo
git remote add origin https://gitlab.zakscode.com/zakscode/291st.git
git branch -M develop
git push -uf origin develop
1. Build the docker image: `docker build -t legio-xxx:<TAG> .`
2. Start the new image: `docker run -p 4200:80 legio-xxx:<TAG>`
</details>
The website should now be accessible on [http://localhost:4200](http://localhost:4200)
## Cheatsheet
```bash
# Start Angular server
npm run start
# Build production
npm run build:prod
# Build docker image
docker build -t legio-xxx:<TAG>
# Run docker image
docker run -p 4200:80 legio-xxx:<TAG>
```
## Integrate with your tools
- [ ] [Set up project integrations](https://gitlab.zakscode.com/zakscode/291st/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.

91
angular.json Normal file
View File

@ -0,0 +1,91 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"291st": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [ ]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "291st:build:production"
},
"development": {
"browserTarget": "291st:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "291st:build"
}
}
}
}
},
"cli": {
"analytics": false
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

31
docker/nginx.conf Normal file
View File

@ -0,0 +1,31 @@
worker_processes auto;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript application/json application/x-font-woff;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
sendfile off;
keepalive_timeout 65;
server {
listen 80;
index index.html;
root /usr/share/nginx/html;
autoindex off;
location / {
try_files $uri$args $uri$args/ /index.html;
}
}
}

2
docker/robots.txt Normal file
View File

@ -0,0 +1,2 @@
User-Agent: *
Allow: /

View File

@ -1,55 +0,0 @@
<html>
<head>
<title>291st Joint Task Force</title>
<link rel="icon" type="image/x-icon" href="assets/291.png">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
background-image: url('assets/background.jpg');
background-size: cover;
font-family: 'Roboto', sans-serif;
}
hr { border-color: #d60000; }
h1,h2,h3,h4,h5,h6 { margin: 0; }
a { color: white; }
a:hover { color: #ddd; }
</style>
</head>
<body>
<div style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);">\
<div style="display: flex">
<div>
<img alt="291st JTF" src="assets/291.png" width="350px" height="auto">
<div style="text-align: center;">
<h1>291st Joint Task Force</h1>
<h3 style="font-style: italic">"Putting the Damned to Rest"</h3>
</div>
<hr>
<div>
<div style="width: 100%; border-radius: 0.25rem; background-color: #222; color: white;">
<div style="display: flex;">
<div style="padding: 0.5rem;">
<img alt="minecraft" src="assets/minecraft.webp" width="52px" height="auto">
</div>
<div style="margin-top: 0.5rem;">
<h3 style="margin-bottom: 0.25rem;">Minecraft</h3>
<span style="font-weight: bolder;">Host: </span><a href="#">291st.ca:25565</a>
</div>
</div>
</div>
</div>
</div>
<div style="margin-left: 1rem;">
<iframe src="https://discordapp.com/widget?id=399625240927404033&theme=dark" width="350" height="100%" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
</div>
</div>
</div>
</body>
</html>

44
package.json Normal file
View File

@ -0,0 +1,44 @@
{
"name": "291st",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "npm run build:dev",
"build:dev": "ng build --configuration development",
"build:prod": "ng build --configuration production",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.0",
"@angular/cdk": "^14.2.2",
"@angular/common": "^14.2.0",
"@angular/compiler": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/forms": "^14.2.0",
"@angular/material": "^14.2.2",
"@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "^14.2.0",
"bootstrap": "^5.2.1",
"jquery": "^3.6.1",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"webstorage-decorators": "^4.2.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.2",
"@angular/cli": "~14.2.2",
"@angular/compiler-cli": "^14.2.0",
"@types/jasmine": "~4.0.0",
"jasmine-core": "~4.3.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2"
}
}

29
src/app/app.module.ts Normal file
View File

@ -0,0 +1,29 @@
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppRouting} from './app.routing';
import {FooterComponent} from './components/footer/footer.component';
import {NavbarComponent} from './components/navbar/navbar.component';
import {AppComponent} from './containers/app/app.component';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MaterialModule} from './material.module';
import {HomeComponent} from './views/home/home.component';
export const APP_COMPONENTS = [
AppComponent,
HomeComponent,
FooterComponent,
NavbarComponent
]
@NgModule({
declarations: APP_COMPONENTS,
imports: [
BrowserModule,
AppRouting,
BrowserAnimationsModule,
MaterialModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

13
src/app/app.routing.ts Normal file
View File

@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {HomeComponent} from './views/home/home.component';
const routes: Routes = [
{path: '', pathMatch: 'full', component: HomeComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRouting { }

View File

@ -0,0 +1,8 @@
<footer>
<div class="py-2 text-center">
<p class="copywright m-0">
Copyright &copy; 291st JTF 2022 | All Rights Reserved<br>
Created by <a href="https://zakscode.com" target="_blank">Zak Timson</a>
</p>
</div>
</footer>

View File

@ -0,0 +1,4 @@
.copywright {
a, a:visited { color: #b10000; }
a:hover, a:visited:hover { color: #cc0000; }
}

View File

@ -0,0 +1,8 @@
import {Component} from '@angular/core';
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss']
})
export class FooterComponent { }

View File

@ -0,0 +1,16 @@
<mat-toolbar>
<mat-toolbar-row>
<div>
<a class="navbar-brand d-flex align-items-center" routerLink="/">
<div class="px-2">291st Joint Task Force</div>
</a>
</div>
<div class="flex-grow-1"></div>
<div *ngIf="!hamburger">
</div>
<button *ngIf="hamburger" mat-icon-button class="mr-3">
<mat-icon (click)="hamburgerClick.emit()">menu</mat-icon>
</button>
</mat-toolbar-row>
</mat-toolbar>
<div class="navbar-spacing"><!-- Spacing --></div>

View File

@ -0,0 +1,58 @@
.navbar-spacing {
height: 64px;
width: 100%;
}
::ng-deep mat-toolbar {
background: #000 !important;
border-bottom: #fff solid 1px;
height: 64px;
position: fixed;
top: 0;
z-index: 100;
.mat-toolbar-row {
height: 100%;
}
.navbar-brand {
color: #fff;
//font-weight: lighter;
&:hover img {
filter: brightness(5%) sepia(75) saturate(100) hue-rotate(25deg);
}
}
.navbar-button {
//color: rgba(255, 255, 255, 0.55);
font-weight: normal;
padding: 0 8px 0 8px;
//&:hover {
// color: rgba(255, 255, 255, 0.75);
//}
}
}
::ng-deep .mat-menu-content {
background: #000;
border: #fff solid 1px;
padding: 0 !important;
border-radius: 0.25rem;
mat-divider {
border-color: white;
margin-top: 0.2rem;
padding-bottom: 0.1rem;
}
button {
height: 36px;
line-height: 36px;
&:hover {
background: rgba(255, 255, 255, 0.15) !important;
}
}
}

View File

@ -0,0 +1,34 @@
import {AfterViewInit, Component, EventEmitter, Input, OnDestroy, Output} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {Subscription} from 'rxjs';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.scss']
})
export class NavbarComponent implements AfterViewInit, OnDestroy {
private sub!: Subscription;
@Input() hamburger = true;
@Output() hamburgerClick = new EventEmitter<void>();
constructor(private route: ActivatedRoute) { }
ngAfterViewInit() {
this.sub = this.route.fragment.subscribe(frag => {
if(frag) this.scroll(frag);
});
}
ngOnDestroy(): void {
if(this.sub) this.sub.unsubscribe();
}
scroll(id: string) {
const el = document.getElementById(id);
if(el) el.scrollIntoView({behavior: 'smooth'});
else setTimeout(() => this.scroll(id), 500);
}
}

View File

@ -0,0 +1,5 @@
<app-navbar [hamburger]="mobile"></app-navbar>
<div class="fill app-container">
<router-outlet></router-outlet>
<app-footer></app-footer>
</div>

View File

@ -0,0 +1,5 @@
.app-container {
overflow-x: hidden;
overflow-y: auto;
scroll-behavior: smooth;
}

View File

@ -0,0 +1,23 @@
import {BreakpointObserver} from '@angular/cdk/layout';
import { Component } from '@angular/core';
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {filter} from 'rxjs';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
mobile = false;
open = false;
constructor(private router: Router, route: ActivatedRoute, breakpointObserver: BreakpointObserver) {
router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => this.open = false);
breakpointObserver.observe(['(max-width: 750px)']).subscribe(result => {
this.mobile = result.matches;
this.open = !this.mobile;
})
}
}

View File

@ -0,0 +1,16 @@
import {NgModule} from '@angular/core';
import {MatButtonModule} from '@angular/material/button';
import {MatIconModule} from '@angular/material/icon';
import {MatToolbarModule} from '@angular/material/toolbar';
export const MATERIAL_MODULES = [
MatButtonModule,
MatIconModule,
MatToolbarModule
];
@NgModule({
imports: MATERIAL_MODULES,
exports: MATERIAL_MODULES,
})
export class MaterialModule {}

View File

@ -0,0 +1,9 @@
<section class="fill background d-flex flex-column flex-md-row">
<div class="flex-grow-1 p-3" style="flex-basis: 0">
<iframe src="https://discordapp.com/widget?id=399625240927404033&theme=dark" width="100%" height="100%" allowtransparency="true" frameborder="0" style="min-height: 500px" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
</div>
<div class="flex-grow-1 p-3" style="flex-basis: 0">
</div>
<div class="flex-grow-1 p-3" style="flex-basis: 0">
</div>
</section>

View File

@ -0,0 +1,3 @@
.background {
background: url("/assets/img/291st-background.png") no-repeat center center;
}

View File

@ -0,0 +1,10 @@
import {Component} from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
src/assets/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -0,0 +1,3 @@
export const environment = {
production: true
};

View File

@ -0,0 +1,3 @@
export const environment = {
production: false
};

23
src/index.html Normal file
View File

@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- TODO: Description-->
<meta name="description" content="">
<meta name="author" content="Zak Timson">
<title>291st JTF</title>
<link href="assets/img/logo.png" rel="icon" type="image/png">
<link href="https://use.fontawesome.com/releases/v6.1.1/css/all.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography" style="background: #000">
<app-root></app-root>
</body>
</html>

12
src/main.ts Normal file
View File

@ -0,0 +1,12 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

53
src/polyfills.ts Normal file
View File

@ -0,0 +1,53 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes recent versions of Safari, Chrome (including
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

54
src/styles.scss Normal file
View File

@ -0,0 +1,54 @@
@use '@angular/material' as mat;
@include mat.core();
// hue. Available color palettes: https://material.io/design/color/
$LegioXXX-primary: mat.define-palette(mat.$red-palette, 900);
$LegioXXX-accent: mat.define-palette(mat.$indigo-palette, 900);
$LegioXXX-warn: mat.define-palette(mat.$orange-palette, 500);
$LegioXXX-theme: mat.define-dark-theme((
color: (
primary: $LegioXXX-primary,
accent: $LegioXXX-accent,
warn: $LegioXXX-warn,
)
));
@include mat.all-component-themes($LegioXXX-theme);
@import '~bootstrap/dist/css/bootstrap-utilities.min.css';
::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0);
}
::-webkit-scrollbar {
width: 10px;
background: rgba(0, 0, 0, 0);
}
::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.6);
&:hover { background: rgba(255, 255, 255, 0.8); }
}
html, body {
height: 100%;
}
body {
background: #000;
color: #fff;
font-family: Roboto, sans-serif;
margin: 0;
overflow: hidden;
}
a, a:visited {
text-decoration: none;
color: rgba(255, 255, 255, 0.6);
}
a:hover, a:visited:hover { color: #b10000; }
.fill {
height: 0;
min-height: calc(100vh - 64px);
}

15
tsconfig.app.json Normal file
View File

@ -0,0 +1,15 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}

32
tsconfig.json Normal file
View File

@ -0,0 +1,32 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2020",
"module": "es2020",
"lib": [
"es2020",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}