Skip to content

Commit

Permalink
Merge branch 'feature/add_sketch_slider' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
musicEnfanthen committed Feb 5, 2020
2 parents 0ecc46e + dc5e578 commit 6d02dc5
Show file tree
Hide file tree
Showing 195 changed files with 4,049 additions and 1,215 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ node_js:
- '10'

addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
chrome: stable

cache:
directories:
Expand Down
21 changes: 8 additions & 13 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,19 @@ module.exports = function(config) {
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
customLaunchers: {
// cf. https://medium.com/faun/configuring-travis-ci-for-angular-application-34afee1715f
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
flags: [
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
'--headless',
'--disable-gpu',
// Without a remote debugging port, Google Chrome exits immediately.
'--remote-debugging-port=9222'
]
}
}
restartOnFileChange: true
});
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"e2e": "ng e2e",
"test": "ng test",
"test:cov": "ng test awg-app --code-coverage",
"test:ci": "yarn test:cov --watch=false --browsers=ChromeHeadless",
"test:ci": "yarn test:cov --watch=false --browsers=ChromeHeadlessNoSandbox",
"lint": "ng lint awg-app",
"tslint-check": "tslint-config-prettier-check ./tslint.json",
"format:check": "prettier --check \"src/**/*.ts\"",
Expand Down
37 changes: 18 additions & 19 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';

import { HomeViewComponent } from './views/home-view/home-view.component';
import { PageNotFoundViewComponent } from './views/page-not-found-view/page-not-found-view.component';

/* routes of the AppModule */
const appRoutes: Routes = [
// eager loaded
{ path: 'home', component: HomeViewComponent },

// lazy loaded
{ path: 'contact', loadChildren: () => import('./views/contact-view/contact.module').then(m => m.ContactModule) },
{ path: 'data', loadChildren: () => import('./views/data-view/data.module').then(m => m.DataModule) },
{ path: 'edition', loadChildren: () => import('./views/edition-view/edition.module').then(m => m.EditionModule) },
{ path: 'home', loadChildren: () => import('@awg-views/home-view/home-view.module').then(m => m.HomeViewModule) },
{
path: 'contact',
loadChildren: () => import('@awg-views/contact-view/contact-view.module').then(m => m.ContactViewModule)
},
{ path: 'data', loadChildren: () => import('@awg-views/data-view/data-view.module').then(m => m.DataViewModule) },
{
path: 'edition',
loadChildren: () => import('@awg-views/edition-view/edition-view.module').then(m => m.EditionViewModule)
},
{ path: 'editions', redirectTo: 'edition', pathMatch: 'full' },
{
path: 'structure',
loadChildren: () => import('./views/structure-view/structure.module').then(m => m.StructureModule)
loadChildren: () => import('@awg-views/structure-view/structure-view.module').then(m => m.StructureViewModule)
},

// default routes
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: '404', component: PageNotFoundViewComponent },
{
path: '404',
loadChildren: () =>
import('@awg-views/page-not-found-view/page-not-found-view.module').then(m => m.PageNotFoundViewModule)
},
{ path: '**', redirectTo: '404', pathMatch: 'full' }
];

/**
* Routed components of the {@link AppModule}:
* {@link HomeViewComponent} and {@link PageNotFoundViewComponent}.
*/
export const routedAppComponents = [HomeViewComponent, PageNotFoundViewComponent];

/**
* Main app module routing.
*
Expand All @@ -40,10 +39,10 @@ export const routedAppComponents = [HomeViewComponent, PageNotFoundViewComponent
imports: [
RouterModule.forRoot(appRoutes, {
anchorScrolling: 'enabled', // use anchor scrolling
scrollPositionRestoration: 'enabled', // restore scroll position
onSameUrlNavigation: 'reload', // reload when navigating to same url
scrollPositionRestoration: 'enabled', // restore scroll position
preloadingStrategy: PreloadAllModules // preload all lazy modules
// enableTracing: true // TODO: do not enable tracing for prodcution
// enableTracing: true // TODO: do not enable tracing for production
})
],
exports: [RouterModule]
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class AppComponent {
*
* @param {Router} router Instance of the Angular router.
*/
constructor(private router: Router) {
constructor(private readonly router: Router) {
this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
(window as any).ga('set', 'page', event.urlAfterRedirects);
Expand Down
4 changes: 2 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { SharedModule } from '@awg-shared/shared.module';
import { SideInfoModule } from '@awg-side-info/side-info.module';

/* Routing Module */
import { AppRoutingModule, routedAppComponents } from './app-routing.module';
import { AppRoutingModule } from './app-routing.module';

/* load and register the used locale file */
registerLocaleData(localeDeDE);
Expand All @@ -25,7 +25,7 @@ registerLocaleData(localeDeDE);
*/
@NgModule({
imports: [BrowserModule, HttpClientModule, CoreModule, SharedModule, SideInfoModule, AppRoutingModule],
declarations: [AppComponent, routedAppComponents],
declarations: [AppComponent],
providers: [{ provide: LOCALE_ID, useValue: 'de-DE' }], // change global LOCALE-ID
bootstrap: [AppComponent]
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/mock-data/meta.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const METAEDITION: MetaEdition = {
contactUrl: AppConfig.AWG_PROJECT_URL + 'index.php?id=3'
}
],
lastModified: '29. Januar 2016'
lastModified: '29. Januar 2020'
};

/**
Expand Down
61 changes: 51 additions & 10 deletions src/app/core/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,39 +44,80 @@
<fa-icon [icon]="faFileAlt" class="order-md-minus-1"></fa-icon>
</a>
<div ngbDropdownMenu aria-labelledby="dropdownNavEdition">
<a class="dropdown-item" [routerLink]="['/edition', 'intro']" routerLinkActive="active"
<h6 class="dropdown-header">Auswahl Skizzenkomplex</h6>
<a
*ngFor="let editionWork of editionWorks"
class="dropdown-item"
[routerLink]="[editionWork.baseRoute, editionWork.introRoute]"
routerLinkActive="active"
>{{ editionWork.work.full }}</a
>
<div class="dropdown-divider"></div>
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.introRoute]"
routerLinkActive="active"
>Einleitung</a
>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">Edierter Notentext</h6>
<a class="dropdown-item" [routerLink]="['/edition/detail', 'Aa:SkI/2']" routerLinkActive="active"
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.detailRoute]"
[queryParams]="{ sketch: 'Aa:SkI/2' }"
routerLinkActive="active"
>Aa:SkI/2</a
>
<a class="dropdown-item" [routerLink]="['/edition/detail', 'Aa:SkI/3']" routerLinkActive="active"
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.detailRoute]"
[queryParams]="{ sketch: 'Aa:SkI/3' }"
routerLinkActive="active"
>Aa:SkI/3</a
>
<a class="dropdown-item" [routerLink]="['/edition/detail', 'Aa:SkI/4']" routerLinkActive="active"
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.detailRoute]"
[queryParams]="{ sketch: 'Aa:SkI/4' }"
routerLinkActive="active"
>Aa:SkI/4</a
>
<a class="dropdown-item" [routerLink]="['/edition/detail', 'Aa:SkI/5']" routerLinkActive="active"
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.detailRoute]"
[queryParams]="{ sketch: 'Aa:SkI/5' }"
routerLinkActive="active"
>Aa:SkI/5</a
>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">Kritischer Bericht</h6>
<a class="dropdown-item" [routerLink]="['/edition', 'report']">I. Quellen</a>
<a class="dropdown-item awg-subitem" [routerLink]="['/edition', 'report']" fragment="sourceList"
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.reportRoute]"
>I. Quellen</a
>
<a
class="dropdown-item awg-subitem"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.reportRoute]"
fragment="sourceList"
>1. Quellenübersicht</a
>
<a class="dropdown-item awg-subitem" [routerLink]="['/edition', 'report']" fragment="sourceDesc"
<a
class="dropdown-item awg-subitem"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.reportRoute]"
fragment="sourceDesc"
>2. Quellenbeschreibung</a
>
<a
class="dropdown-item awg-subitem"
[routerLink]="['/edition', 'report']"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.reportRoute]"
fragment="sourceEvaluation"
>3. Quellenbewertung</a
>
<a class="dropdown-item" [routerLink]="['/edition', 'report']" fragment="tka"
<a
class="dropdown-item"
[routerLink]="[selectedEditionWork.baseRoute, selectedEditionWork.reportRoute]"
fragment="tkaPanel"
>II. Textkritischer Kommentar</a
>
</div>
Expand Down
Loading

0 comments on commit 6d02dc5

Please sign in to comment.