mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-23 12:15:11 +00:00
Merge remote-tracking branch 'origin/develop' into BETTERZON-52
# Conflicts: # Frontend/angular.json # Frontend/package-lock.json # Frontend/package.json # Frontend/src/app/app.module.ts # Frontend/src/index.html
This commit is contained in:
commit
e0f1724d95
|
@ -1,8 +1,14 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="WEB_MODULE" version="4">
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="Python" name="Python">
|
||||||
|
<configuration sdkName="Python 3.9 (venv)" />
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$" />
|
<content url="file://$MODULE_DIR$" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="Python 3.9 (venv) interpreter library" level="application" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
20
Crawler/Dockerfile
Normal file
20
Crawler/Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Base image
|
||||||
|
FROM python
|
||||||
|
|
||||||
|
# Create directories and copy files
|
||||||
|
RUN echo 'Creating directory and copying files'
|
||||||
|
RUN mkdir /crawler
|
||||||
|
ADD . /crawler
|
||||||
|
WORKDIR /crawler
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN echo 'Installing dependencies'
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
# Expose ports
|
||||||
|
RUN echo 'Exposing ports'
|
||||||
|
EXPOSE 22026
|
||||||
|
|
||||||
|
# Start API
|
||||||
|
RUN echo 'Starting API'
|
||||||
|
CMD ["python3", "api.py"]
|
16
Crawler/api.py
Normal file
16
Crawler/api.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
from flask import Flask
|
||||||
|
from flask_restful import Resource, Api
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
api = Api(app)
|
||||||
|
|
||||||
|
|
||||||
|
class CrawlerApi(Resource):
|
||||||
|
def get(self):
|
||||||
|
return {'Hallo': 'Betterzon'}
|
||||||
|
|
||||||
|
|
||||||
|
api.add_resource(CrawlerApi, '/')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run(host='0.0.0.0', port=22026)
|
|
@ -1 +1,4 @@
|
||||||
pymysql
|
pymysql
|
||||||
|
flask
|
||||||
|
flask-sqlalchemy
|
||||||
|
flask_restful
|
|
@ -24,10 +24,13 @@
|
||||||
"src/assets"
|
"src/assets"
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||||
"src/styles.css"
|
"src/styles.css",
|
||||||
|
"./node_modules/cookieconsent/build/cookieconsent.min.css"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [
|
||||||
|
"./node_modules/cookieconsent/build/cookieconsent.min.js"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
|
@ -89,10 +92,13 @@
|
||||||
"src/assets"
|
"src/assets"
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||||
"src/styles.css"
|
"src/styles.css",
|
||||||
|
"./node_modules/cookieconsent/build/cookieconsent.min.css"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [
|
||||||
|
"./node_modules/cookieconsent/build/cookieconsent.min.js"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
|
@ -121,7 +127,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}},
|
||||||
},
|
|
||||||
"defaultProject": "Betterzon"
|
"defaultProject": "Betterzon"
|
||||||
}
|
}
|
60088
Frontend/package-lock.json
generated
60088
Frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -1,52 +1,54 @@
|
||||||
{
|
{
|
||||||
"name": "betterzon",
|
"name": "betterzon",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e"
|
"e2e": "ng e2e"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^10.2.3",
|
"@angular/animations": "^10.2.3",
|
||||||
"@angular/cdk": "~10.2.7",
|
"@angular/cdk": "~10.2.7",
|
||||||
"@angular/cli": "^10.2.0",
|
"@angular/cli": "^10.2.0",
|
||||||
"@angular/common": "^10.2.3",
|
"@angular/common": "^10.2.3",
|
||||||
"@angular/compiler": "^10.2.3",
|
"@angular/compiler": "^10.2.3",
|
||||||
"@angular/core": "^10.2.3",
|
"@angular/core": "^10.2.3",
|
||||||
"@angular/forms": "^10.2.3",
|
"@angular/forms": "^10.2.3",
|
||||||
"@angular/material": "~10.2.7",
|
"@angular/material": "~10.2.7",
|
||||||
"@angular/platform-browser": "^10.2.3",
|
"@angular/platform-browser": "^10.2.3",
|
||||||
"@angular/platform-browser-dynamic": "^10.2.3",
|
"@angular/platform-browser-dynamic": "^10.2.3",
|
||||||
"@angular/router": "^10.2.3",
|
"@angular/router": "^10.2.3",
|
||||||
"apexcharts": "^3.22.3",
|
"apexcharts": "^3.22.3",
|
||||||
"ng": "0.0.0",
|
"cookieconsent": "^3.1.1",
|
||||||
"ng-apexcharts": "^1.5.6",
|
"ng": "0.0.0",
|
||||||
"rxjs": "~6.6.0",
|
"ng-apexcharts": "^1.5.6",
|
||||||
"tslib": "^2.0.3",
|
"ngx-cookieconsent": "^2.2.3",
|
||||||
"zone.js": "~0.10.2"
|
"rxjs": "~6.6.0",
|
||||||
},
|
"tslib": "^2.0.3",
|
||||||
"devDependencies": {
|
"zone.js": "~0.10.2"
|
||||||
"@angular-devkit/build-angular": "^0.1100.2",
|
},
|
||||||
"@angular/cli": "^10.2.0",
|
"devDependencies": {
|
||||||
"@angular/compiler-cli": "^10.2.3",
|
"@angular-devkit/build-angular": "^0.1100.2",
|
||||||
"@types/jasmine": "~3.5.0",
|
"@angular/cli": "^10.2.0",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@angular/compiler-cli": "^10.2.3",
|
||||||
"@types/node": "^12.19.8",
|
"@types/jasmine": "~3.5.0",
|
||||||
"codelyzer": "^6.0.0",
|
"@types/jasminewd2": "~2.0.3",
|
||||||
"jasmine-core": "~3.6.0",
|
"@types/node": "^12.19.8",
|
||||||
"jasmine-spec-reporter": "~5.0.0",
|
"codelyzer": "^6.0.0",
|
||||||
"karma": "~5.0.0",
|
"jasmine-core": "~3.6.0",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"jasmine-spec-reporter": "~5.0.0",
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma": "~5.0.0",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"protractor": "~7.0.0",
|
"karma-jasmine": "~4.0.0",
|
||||||
"ts-node": "~8.3.0",
|
"karma-jasmine-html-reporter": "^1.5.0",
|
||||||
"tslint": "~6.1.0",
|
"protractor": "~7.0.0",
|
||||||
"typescript": "<4.1.0"
|
"ts-node": "~8.3.0",
|
||||||
}
|
"tslint": "~6.1.0",
|
||||||
|
"typescript": "<4.1.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,69 @@
|
||||||
import { Component } from '@angular/core';
|
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||||
|
import {NgcCookieConsentService, NgcInitializeEvent, NgcNoCookieLawEvent, NgcStatusChangeEvent} from 'ngx-cookieconsent';
|
||||||
|
import {Subscription} from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: ['./app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent implements OnInit, OnDestroy {
|
||||||
title = 'Betterzon';
|
title = 'Betterzon';
|
||||||
|
|
||||||
|
// Cookie popup stuff
|
||||||
|
// Docs on https://www.npmjs.com/package/ngx-cookieconsent
|
||||||
|
private popupOpenSubscription: Subscription;
|
||||||
|
private popupCloseSubscription: Subscription;
|
||||||
|
private initializeSubscription: Subscription;
|
||||||
|
private statusChangeSubscription: Subscription;
|
||||||
|
private revokeChoiceSubscription: Subscription;
|
||||||
|
private noCookieLawSubscription: Subscription;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private ccService: NgcCookieConsentService
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
// subscribe to cookieconsent observables to react to main events
|
||||||
|
this.popupOpenSubscription = this.ccService.popupOpen$.subscribe(
|
||||||
|
() => {
|
||||||
|
// you can use this.ccService.getConfig() to do stuff...
|
||||||
|
});
|
||||||
|
|
||||||
|
this.popupCloseSubscription = this.ccService.popupClose$.subscribe(
|
||||||
|
() => {
|
||||||
|
// you can use this.ccService.getConfig() to do stuff...
|
||||||
|
});
|
||||||
|
|
||||||
|
this.initializeSubscription = this.ccService.initialize$.subscribe(
|
||||||
|
(event: NgcInitializeEvent) => {
|
||||||
|
// you can use this.ccService.getConfig() to do stuff...
|
||||||
|
});
|
||||||
|
|
||||||
|
this.statusChangeSubscription = this.ccService.statusChange$.subscribe(
|
||||||
|
(event: NgcStatusChangeEvent) => {
|
||||||
|
// you can use this.ccService.getConfig() to do stuff...
|
||||||
|
});
|
||||||
|
|
||||||
|
this.revokeChoiceSubscription = this.ccService.revokeChoice$.subscribe(
|
||||||
|
() => {
|
||||||
|
// you can use this.ccService.getConfig() to do stuff...
|
||||||
|
});
|
||||||
|
|
||||||
|
this.noCookieLawSubscription = this.ccService.noCookieLaw$.subscribe(
|
||||||
|
(event: NgcNoCookieLawEvent) => {
|
||||||
|
// you can use this.ccService.getConfig() to do stuff...
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
// unsubscribe to cookieconsent observables to prevent memory leaks
|
||||||
|
this.popupOpenSubscription.unsubscribe();
|
||||||
|
this.popupCloseSubscription.unsubscribe();
|
||||||
|
this.initializeSubscription.unsubscribe();
|
||||||
|
this.statusChangeSubscription.unsubscribe();
|
||||||
|
this.revokeChoiceSubscription.unsubscribe();
|
||||||
|
this.noCookieLawSubscription.unsubscribe();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,48 @@ import {FormsModule} from '@angular/forms';
|
||||||
import {PageNotFoundPageComponent} from './pages/page-not-found-page/page-not-found-page.component';
|
import {PageNotFoundPageComponent} from './pages/page-not-found-page/page-not-found-page.component';
|
||||||
import {MatMenuModule} from '@angular/material/menu';
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { ImprintComponent } from './pages/imprint/imprint.component';
|
import {ImprintComponent} from './pages/imprint/imprint.component';
|
||||||
import { PrivacyComponent } from './pages/privacy/privacy.component';
|
import {PrivacyComponent} from './pages/privacy/privacy.component';
|
||||||
|
import {NgcCookieConsentModule, NgcCookieConsentConfig} from 'ngx-cookieconsent';
|
||||||
|
|
||||||
|
// For cookie popup
|
||||||
|
const cookieConfig: NgcCookieConsentConfig = {
|
||||||
|
cookie: {
|
||||||
|
domain: 'betterzon.xyz'
|
||||||
|
},
|
||||||
|
palette: {
|
||||||
|
popup: {
|
||||||
|
background: '#000'
|
||||||
|
},
|
||||||
|
button: {
|
||||||
|
background: '#f1d600'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
theme: 'edgeless',
|
||||||
|
type: 'opt-out',
|
||||||
|
layout: 'my-custom-layout',
|
||||||
|
layouts: {
|
||||||
|
'my-custom-layout': '{{messagelink}}{{compliance}}'
|
||||||
|
},
|
||||||
|
elements: {
|
||||||
|
messagelink: `
|
||||||
|
<span id="cookieconsent:desc" class="cc-message">{{message}}
|
||||||
|
<a aria-label="learn more about cookies" tabindex="0" class="cc-link" href="{{whatAreCookiesHref}}" target="_blank">{{whatAreCookiesLink}}</a>
|
||||||
|
<a aria-label="learn more about our privacy policy" tabindex="1" class="cc-link" href="{{privacyPolicyHref}}" target="_blank">{{privacyPolicyLink}}</a>
|
||||||
|
</span>
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
// Custom message
|
||||||
|
// message: 'By using our site, you acknowledge that you have read and understand our ',
|
||||||
|
|
||||||
|
whatAreCookiesLink: 'Learn more',
|
||||||
|
whatAreCookiesHref: 'https://www.cookiesandyou.com/',
|
||||||
|
|
||||||
|
privacyPolicyLink: 'Privacy Policy',
|
||||||
|
privacyPolicyHref: '/datenschutz',
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -42,7 +82,8 @@ import { PrivacyComponent } from './pages/privacy/privacy.component';
|
||||||
NgApexchartsModule,
|
NgApexchartsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
MatMenuModule,
|
MatMenuModule,
|
||||||
BrowserAnimationsModule
|
BrowserAnimationsModule,
|
||||||
|
NgcCookieConsentModule.forRoot(cookieConfig)
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Betterzon</title>
|
<title>Betterzon</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
</head>
|
<script src="node_modules/cookieconsent/build/cookieconsent.min.js"></script>
|
||||||
<body>
|
</head>
|
||||||
<app-root></app-root>
|
<body>
|
||||||
</body>
|
<app-root></app-root>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user