This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from karenia-works/Professor-Page
Professor page
- Loading branch information
Showing
21 changed files
with
658 additions
and
85 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
export const connections = [ | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '邢惠钧', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '祝思凡', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '王适意', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '李子烨', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '刘子暄', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '草草', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '马老师', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: 'NSR', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '我可以一直:)吗', | ||
from: '北京航空航天大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '孙笑川', | ||
from: '四川大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '孙笑川233', | ||
from: '四川大学' | ||
}, | ||
{ | ||
pic_url: 'https://pic3.zhimg.com/a82b51c4284beda5b29d645fa4f91c97_xl.jpg', | ||
name: '孙笑川NMSL', | ||
from: '四川大学' | ||
}, | ||
]; |
36 changes: 36 additions & 0 deletions
36
src/pages/professorpage/my-article-page/my-article-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<div class="container"> | ||
<div class="left"> | ||
<h1 class="title"> | ||
文章 | ||
</h1> | ||
<div> | ||
<div *ngFor="let article of returnedArray"> | ||
<app-article-abstract [title]="article.title" [articleType]="article.articleType" [abstract]="article.abstract" | ||
[authors]="article.authors" [releaseDate]="article.releaseDate" [tags]="article.tags" | ||
[refCount]="article.refCount" [downloadCount]="article.downloadCount" [hasFile]="article.hasFile" | ||
[showFavorite]="article.showFavorite"> | ||
</app-article-abstract> | ||
</div> | ||
|
||
<app-paginator [totalItems]="articles.length" [itemsPerPage]="5" [showBoundary]="true" | ||
(pageChanged)="pageChanged($event)"></app-paginator> | ||
</div> | ||
</div> | ||
|
||
<div class="right"> | ||
<div class="right-wrapper"> | ||
<div class="line"></div> | ||
<div class="summary"> | ||
<div class="toc-fat"> | ||
<a routerLink=".." class="func_h">专家简介</a> | ||
</div> | ||
<div class="toc"> | ||
<a routerLink="." class="func_t">文章 ({{articleNum}})</a> | ||
</div> | ||
<div class="toc"> | ||
<a routerLink="../connection" class="func_h">人脉</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
src/pages/professorpage/my-article-page/my-article-page.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { MyArticlePageComponent } from './my-article-page.component'; | ||
|
||
describe('MyArticlePageComponent', () => { | ||
let component: MyArticlePageComponent; | ||
let fixture: ComponentFixture<MyArticlePageComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ MyArticlePageComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(MyArticlePageComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
75 changes: 75 additions & 0 deletions
75
src/pages/professorpage/my-article-page/my-article-page.component.styl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
@lost flexbox flex | ||
// | ||
.professorpage-banner { | ||
} | ||
|
||
.container { | ||
display: flex | ||
flex-direction: row | ||
} | ||
|
||
.left { | ||
lost-column: 2 / 3 | ||
display: flex | ||
flex-direction: column | ||
align-items: stretch | ||
.title{ | ||
lost-colume: 3/4 | ||
} | ||
h1 { | ||
margin-bottom: 0 | ||
} | ||
} | ||
|
||
.right { | ||
lost-column: 1 / 3 | ||
display: block | ||
height: auto | ||
|
||
.right-wrapper { | ||
margin-top: var(--theme-pad-06) | ||
position: sticky | ||
top: var(--theme-pad-06) | ||
} | ||
} | ||
|
||
.line { | ||
background-color: var(--theme-accept) | ||
width: 60% | ||
height: 1px | ||
} | ||
|
||
.func_t { | ||
color: var(--palette-base05) | ||
margin-top: 5px | ||
} | ||
|
||
.func_h { | ||
color: var(--palette-base03) | ||
margin-top: 5px | ||
} | ||
|
||
.toc-fat { | ||
position: relative | ||
padding-top: var(--theme-pad-04) | ||
font-family: Sarasa Gothic SC | ||
font-style: normal | ||
font-weight: bold | ||
font-size: var(--theme-size-base) | ||
display: flex | ||
align-items: flex-end | ||
color: var(--theme-base00) | ||
} | ||
|
||
.toc { | ||
padding-top: var(--theme-pad-02) | ||
position: relative | ||
font-family: Sarasa Gothic SC | ||
font-style: normal | ||
font-weight: 500 | ||
font-size: var(--theme-size-base) | ||
display: flex | ||
align-items: flex-end | ||
font-feature-settings: 'zero' on | ||
color: var(--theme-base03) | ||
} |
27 changes: 27 additions & 0 deletions
27
src/pages/professorpage/my-article-page/my-article-page.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import {articles} from '../../../articleAbstractList'; | ||
import {PageChangedEvent} from '../../../components/base-components/paginator/paginator.component'; | ||
|
||
@Component({ | ||
selector: 'app-my-article-page', | ||
templateUrl: './my-article-page.component.html', | ||
styleUrls: ['./my-article-page.component.styl'], | ||
}) | ||
export class MyArticlePageComponent implements OnInit { | ||
articles = articles; | ||
returnedArray; | ||
articleNum; | ||
|
||
constructor() {} | ||
|
||
ngOnInit() { | ||
this.returnedArray = this.articles.slice(0, 5); | ||
this.articleNum = '30'; | ||
} | ||
|
||
pageChanged(event: PageChangedEvent): void { | ||
const startItem = (event.page - 1) * event.itemsPerPage; | ||
const endItem = event.page * event.itemsPerPage; | ||
this.returnedArray = this.articles.slice(startItem, endItem); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/pages/professorpage/my-article-page/my-article-page.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { MyArticlePageComponent } from './my-article-page.component'; | ||
import { BaseComponentsModule } from 'src/components/base-components/base-components.module'; | ||
import {RouterModule} from "@angular/router"; | ||
@NgModule({ | ||
declarations: [MyArticlePageComponent], | ||
imports: [CommonModule, BaseComponentsModule, RouterModule], | ||
exports: [MyArticlePageComponent], | ||
}) | ||
export class MyArticlePageModule {} |
Oops, something went wrong.