Skip to content

Commit

Permalink
Integrating biographies (#221)
Browse files Browse the repository at this point in the history
* remove inline style

* creating grid cards with bernoulli members

* correct function doc

* correct function doc

* open new bibliography page on click

* move meditationes to jacob bernoulli biography

* fix unit test

* structure biographies, rename component, correct headlines

* change order of biographies

* add johann III and jacob II bio

* add bio and correspondences to leonard euler

* add johan euler and nicolaus fuss bios

* remove BEBB section from landing page

* add error page if bio doesn't exist

* styling third party projects and extracting search into landing page

* change headline tag

* create lece-leoo component

* temporarily hide code on landing page

* add portrait images and display on landing page

* correct portrait images in biography component

* set correct titles in additionals of euler

* responsive flex layout in lece-leoo component

* setup routes for leoo and lece pages

* add correspondences for johann a. euler

* add correspondences for Niklaus I Fuss

* remove correspondence component

* fix unit test

* format code

* add links to bios
  • Loading branch information
Vijeinath committed Dec 21, 2023
1 parent b7c91ee commit 37b4196
Show file tree
Hide file tree
Showing 31 changed files with 1,330 additions and 857 deletions.
6 changes: 4 additions & 2 deletions src/app/app.module.ts
Expand Up @@ -41,7 +41,6 @@ import { PublishedLetterComponent } from './resource/publishedLetter/publishedLe
// directives
import { MathJaxDirective } from './directives/mathjax.directive';
// Loads the application configuration file during application startup
import { CorrespondenceComponent } from './correspondence/correspondence.component';
import { ContactComponent } from './contact/contact.component';

import { ReactiveFormsModule } from '@angular/forms';
Expand All @@ -63,6 +62,8 @@ import { ManuscriptEntryComponent } from './resource/manuscript-entry/manuscript
import { TeiLinkDirective } from './directives/tei-link.directive';
import { CommentComponent } from './resource/comment/comment.component';
import { HttpClientModule } from '@angular/common/http';
import { BiographyComponent } from './biography/biography.component';
import { LeceLeooComponent } from './lece-leoo/lece-leoo.component';

@NgModule({
declarations: [
Expand All @@ -80,7 +81,6 @@ import { HttpClientModule } from '@angular/common/http';
LeibnizLetterComponent,
ReadListValueComponent,
ReadTextValueAsHtmlComponent,
CorrespondenceComponent,
ContactComponent,
MathJaxDirective,
LeooRouteComponent,
Expand All @@ -100,6 +100,8 @@ import { HttpClientModule } from '@angular/common/http';
TeiLinkDirective,
CommentComponent,
PublishedLetterComponent,
BiographyComponent,
LeceLeooComponent,
],
imports: [
AppRouting,
Expand Down
15 changes: 12 additions & 3 deletions src/app/app.routing.ts
Expand Up @@ -10,7 +10,6 @@ import { PublisherComponent } from './resource/publisher/publisher.component';
import { PublishedLetterComponent } from './resource/publishedLetter/publishedLetter.component';
import { ResourceComponent } from './resource/resource.component';
import { SimpleResourceComponent } from './resource/simpleResource/simpleResource.component';
import { CorrespondenceComponent } from './correspondence/correspondence.component';
import { ContactComponent } from './contact/contact.component';
import { EndnoteComponent } from './resource/endnote/endnote.component';
import { LeooRouteComponent } from './leoo-route/leoo-route.component';
Expand All @@ -23,20 +22,30 @@ import { BebbRouteComponent } from './bebb-route/bebb-route.component';
import { TranscriptionComponent } from './resource/transcription/transcription.component';
import { ManuscriptEntryComponent } from './resource/manuscript-entry/manuscript-entry.component';
import { CommentComponent } from './resource/comment/comment.component';
import { BiographyComponent } from './biography/biography.component';
import { LeceLeooComponent } from './lece-leoo/lece-leoo.component';


const appRoutes: Routes = [
{
path: '',
component: LandingPageComponent,
},
{
path: 'biography/:person',
component: BiographyComponent
},
{
path: 'introduction/:project/:id',
component: IntroductionComponent
},
{
path: 'correspondence/:project',
component: CorrespondenceComponent,
path: 'leooIVA_IV_intro',
component: LeceLeooComponent
},
{
path: 'lece_intro',
component: LeceLeooComponent
},
{
path: 'resource/:id',
Expand Down
411 changes: 411 additions & 0 deletions src/app/biography/biography.component.html

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/app/biography/biography.component.scss
@@ -0,0 +1,20 @@
.biography {
margin-block-end: 1.5rem;

img {
float: right;
height: 320px;
width: auto;
}

.further-links {
list-style: none;
padding-inline-start: 0;
}
}

.biography::after {
content: "";
clear: both;
display: table;
}
41 changes: 41 additions & 0 deletions src/app/biography/biography.component.spec.ts
@@ -0,0 +1,41 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { BiographyComponent } from './biography.component';
import { RouterTestingModule } from '@angular/router/testing';
import { BeolService } from '../services/beol.service';
import { AppInitService } from '../dsp-ui-lib/core';

describe('BibliographyComponent', () => {
let component: BiographyComponent;
let fixture: ComponentFixture<BiographyComponent>;

beforeEach(waitForAsync(() => {

const appInitServiceMock = {
config: {
ontologyIRI: 'http://0.0.0.0:3333'
}
};

const beolServiceSpy = jasmine.createSpyObj('BeolService', ['getEntriesForManuscript']); // see https://angular.io/guide/testing#angular-testbed

TestBed.configureTestingModule({
imports: [
RouterTestingModule,
],
declarations: [BiographyComponent],
providers: [
{ provide: BeolService, useValue: beolServiceSpy },
{ provide: AppInitService, useValue: appInitServiceMock }
]
})
.compileComponents();

fixture = TestBed.createComponent(BiographyComponent);
component = fixture.componentInstance;
fixture.detectChanges();
}));

it('should create', () => {
expect(component).toBeTruthy();
});
});

0 comments on commit 37b4196

Please sign in to comment.