Skip to content

Commit

Permalink
lece (#102)
Browse files Browse the repository at this point in the history
* display preface and its subsection

* display side menu for introduction sections

* remove preface subsection

* introduction singular

* fix (lece) adapt the size of introduction sidebar boxes to the content

* fix (lece) homogenize the sizes of sidebar boxes
  • Loading branch information
SepidehAlassi authored Jan 28, 2019
1 parent 28f47ce commit 53ee6cc
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 38 deletions.
4 changes: 2 additions & 2 deletions src/app/correspondence/correspondence.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</div>
</div>
<!-- display the correspondences of the LEOO project -->
<div *ngSwitchCase="'leooCondorcet'">
<div *ngFor="let corrGroup of leooCondorcet">
<div *ngSwitchCase="'lece'">
<div *ngFor="let corrGroup of lece">
<p>Correspondence between <strong>{{corrGroup.mainCorrespondent.name}}</strong> and
<!-- select list to choose the recipient name (among one or several choices) -->
<mat-form-field>
Expand Down
44 changes: 19 additions & 25 deletions src/app/correspondence/correspondence.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,9 @@ export class CorrespondenceComponent implements OnInit {

@Input() project?: string;

Christian_Goldbach = new Correspondent('Christian Goldbach', '(DE-588)118696149');
Leonhard_Euler = new Correspondent('Leonhard Euler', '(DE-588)118531379');
Johann_Albrecht_Euler = new Correspondent('Johann Albrecht Euler', '(DE-588)116610832');
Condorcet = new Correspondent('Marie Jean Antoine Nicolas Condorcet', '(DE-588)118521772');
Turgot = new Correspondent('Anne Robert Jacques Turgot', '(DE-588)118763202');
Lexell = new Correspondent('Anders Johan Lexell', '(DE-588)100189180');
FussNI = new Correspondent('Niklaus (I) Fuss', '(DE-588)116878894');


// project: string;
leooIV: Book[];
leooCondorcet: CorrespondenceGroupWithSection[];
lece: CorrespondenceGroupWithSection[];
wiki: CorrespondenceGroupWithSection[];

constructor(
Expand All @@ -123,8 +114,11 @@ export class CorrespondenceComponent implements OnInit {
* List of all existing correspondents
*/
const Leonhard_Euler = new Correspondent('Leonhard Euler', '(DE-588)118531379');

const Johann_Albrecht_Euler = new Correspondent('Johann Albrecht Euler', '(DE-588)116610832');
const Condorcet = new Correspondent('Marie Jean Antoine Nicolas Condorcet', '(DE-588)118521772');
const Turgot = new Correspondent('Anne Robert Jacques Turgot', '(DE-588)118763202');
const Lexell = new Correspondent('Anders Johan Lexell', '(DE-588)100189180');
const FussNI = new Correspondent('Niklaus (I) Fuss', '(DE-588)116878894');

const Christian_Goldbach = new Correspondent('Christian Goldbach', '(DE-588)118696149');

Expand Down Expand Up @@ -308,28 +302,28 @@ export class CorrespondenceComponent implements OnInit {
*/
this.leooIV = [
new Book('LEOO IVA.IV', '978-3-0348-0880-4', [
new CorrespondenceGroup(this.Leonhard_Euler, [
new Correspondence(this.Leonhard_Euler, this.Christian_Goldbach, 'Original', true),
new Correspondence(this.Leonhard_Euler, this.Christian_Goldbach, 'Translation')
new CorrespondenceGroup(Leonhard_Euler, [
new Correspondence(Leonhard_Euler, Christian_Goldbach, 'Original', true),
new Correspondence(Leonhard_Euler, Christian_Goldbach, 'Translation')
], 'between Leonhard Euler and Christian Goldbach'),
new CorrespondenceGroup(this.Johann_Albrecht_Euler, [
new Correspondence(this.Johann_Albrecht_Euler, this.Christian_Goldbach, 'Original', true),
new Correspondence(this.Johann_Albrecht_Euler, this.Christian_Goldbach, 'Translation')
new CorrespondenceGroup(Johann_Albrecht_Euler, [
new Correspondence(Johann_Albrecht_Euler, Christian_Goldbach, 'Original', true),
new Correspondence(Johann_Albrecht_Euler, Christian_Goldbach, 'Translation')
], 'between Johann Albrecht Euler and Christian Goldbach')
])
];
this.leooCondorcet = [
this.lece = [

new CorrespondenceGroupWithSection(this.Condorcet, [
new CorrespondenceGroupWithSection(Condorcet, [
new Section('condorcet', [
new Correspondence(this.Condorcet, this.Leonhard_Euler),
new Correspondence(this.Condorcet, this.Johann_Albrecht_Euler),
new Correspondence(this.Condorcet, this.Lexell),
new Correspondence(this.Condorcet, this.FussNI)
new Correspondence(Condorcet, Leonhard_Euler),
new Correspondence(Condorcet, Johann_Albrecht_Euler),
new Correspondence(Condorcet, Lexell),
new Correspondence(Condorcet, FussNI)
])]),
new CorrespondenceGroupWithSection(this.Turgot, [
new CorrespondenceGroupWithSection(Turgot, [
new Section('turgot', [
new Correspondence(this.Turgot, this.Leonhard_Euler)
new Correspondence(Turgot, Leonhard_Euler)
])])
];

Expand Down
28 changes: 28 additions & 0 deletions src/app/introduction/introduction.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,34 @@
</div>
</div>
</div>
<div *ngIf="project=='lece'">
<div *ngFor="let item of listLece; let i = index;">

<mat-list-item [class.parent]="item.children">
<button mat-button [routerLink]="'/introduction/lece/' + item.name"
routerLinkActive="active-link" class="nav-item" (click)="toggleChildren(i)">
{{item.label}}
<mat-icon *ngIf="!item.children">keyboard_arrow_right</mat-icon>
<mat-icon *ngIf="item.children">keyboard_arrow_down</mat-icon>
</button>
</mat-list-item>

<div *ngIf="item.children" class="nav-children" [class.open]="curIndex === i">
<div *ngFor="let child of item.children; let c = index;">
<mat-list-item>
<button mat-button [routerLink]="'/introduction/lece/' + child.name"
routerLinkActive="active-link" class="nav-item"
(click)="toggleGrandChildren(c)">
{{child.label}}
<mat-icon *ngIf="!child.children">keyboard_arrow_right</mat-icon>
<mat-icon *ngIf="child.children">keyboard_arrow_down</mat-icon>
</button>
</mat-list-item>

</div>
</div>
</div>
</div>
</mat-list>

</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/introduction/introduction.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}

.mat-list-item {
width: 196px;
width: 240px;
}

.nav-grand-children {
Expand All @@ -44,7 +44,7 @@
}

.nav-item {
width: 200px;
width: 240px;
text-align: left;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/introduction/introduction.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class IntroductionComponent implements OnInit, OnDestroy {
const introleoo = require('../../assets/data/introductionLeoo.json');
const introLece = require('../../assets/data/introductionLece.json');
this.listLeoo = <Introduction[]> introleoo.Introductions;
this.listLece = <Introduction[]> introLece.introductions;
this.listLece = <Introduction[]> introLece.Introductions;

this.paramsSubscription = this._route.paramMap.subscribe((params: ParamMap) => {
this.project = params.get('project');
Expand Down
19 changes: 14 additions & 5 deletions src/app/landing-page/landing-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,34 @@ <h2 mat-card-title>Leonhardi Euleri Opera Omnia (Series Quarta A, vol. IV)</h2>
</section>
<mat-divider></mat-divider>
<section>
<h3 mat-card-subtitle>LECE</h3>
<h2 mat-card-title>Leonhardi Euleri Commercium Epistolicum</h2>

<p fxLayout="column"><strong>Introductions</strong></p>
<div class="container">
<div class="flex-container" fxFlex fxLayout="row wrap" fxLayout.sm="column" fxlayout.xs="column" fxFlexFill>
<div fxFlex routerLink="introduction/leooCondorcet/CondorcetMJA_Introduction">
<div fxFlex routerLink="introduction/lece/CondorcetTurgot_preface">
<mat-card class="intro-card" fxFlex>
Préface
</mat-card>
</div>
</div>
</div>
<p fxLayout="column"><strong>Introduction</strong></p>
<div class="container">
<div class="flex-container" fxFlex fxLayout="row wrap" fxLayout.sm="column" fxlayout.xs="column" fxFlexFill>
<div fxFlex routerLink="introduction/lece/CondorcetMJA_Introduction">
<mat-card class="intro-card" fxFlex>
Correspondance d'Euler avec Condorcet
</mat-card>
</div>
<div fxFlex routerLink="introduction/leooCondorcet/Turgot_Introduction">
<div fxFlex routerLink="introduction/lece/Turgot_Introduction">
<mat-card class="intro-card" fxFlex>
Correspondance d'Euler avec Turgot
</mat-card>
</div>
</div>
</div>
<div class="leoo-section">
<app-correspondence [project]="'leooCondorcet'"></app-correspondence>
<app-correspondence [project]="'lece'"></app-correspondence>

</div>

Expand Down
10 changes: 7 additions & 3 deletions src/assets/data/introductionLece.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"Introductions": [
{
"name": "CondorcetTurgot_preface",
"label": "Préface"
},
{
"name": "condorcet_edition_introduction",
"label": "Introduction of Leonhardi Euleri Commercium Epistolicum",
"label": "Introduction",
"children":[
{
"name": "CondorcetMJA_Introduction",
"label": "Condorcet Correspondence Introduction"
"label": "Condorcet Correspondence"
},
{
"name": "Turgot_Introduction",
"label": "Turgot Correspondence Introduction"
"label": "Turgot Correspondence"
}
]
}
Expand Down

0 comments on commit 53ee6cc

Please sign in to comment.