Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from karenia-works/login
Browse files Browse the repository at this point in the history
Login
  • Loading branch information
lynzrand authored Dec 17, 2019
2 parents ee3f288 + c1222ba commit c5485dc
Show file tree
Hide file tree
Showing 23 changed files with 339 additions and 25 deletions.
10 changes: 10 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { MySettingPageComponent } from 'src/pages/personal-page/my-setting-page/
import { MySettingPageModule } from 'src/pages/personal-page/my-setting-page/my-setting-page.module';
import { MyPaymentPageComponent } from 'src/pages/personal-page/my-payment-page/my-payment-page.component';
import { MyPaymentPageModule } from 'src/pages/personal-page/my-payment-page/my-payment-page.module';
import {LoginPageComponent} from 'src/pages/login-page/login-page.component';
import {RegisterPageComponent} from 'src/pages/register-page/register-page.component';

const routes: Routes = [
{
Expand All @@ -29,6 +31,14 @@ const routes: Routes = [
path: 's',
component: SearchpageComponent,
},
{
path: 'login',
component: LoginPageComponent,
},
{
path: 'register',
component: RegisterPageComponent,
},
{
path: 'p',
component: ProfessorpageComponent,
Expand Down
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import { RouterOutlet } from '@angular/router';
import { SearchpageModule } from 'src/pages/searchpage/searchpage.module';
import { ProfessorpageModule } from 'src/pages/professorpage/professorpage.module';
import { HttpClientModule } from '@angular/common/http';
import {LoginPageComponent} from 'src/pages/login-page/login-page.component';
import {RegisterPageComponent} from 'src/pages/register-page/register-page.component';

@NgModule({
declarations: [AppComponent],
declarations: [AppComponent, LoginPageComponent, RegisterPageComponent],
imports: [
BrowserModule,
AppRoutingModule,
Expand Down
27 changes: 27 additions & 0 deletions src/pages/login-page/login-page.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="login-page-banner" @banner-trigger>
<div class="container">
<div class="login">
<h1>登录</h1>
<h5 class="textdarcula">用户名</h5>
<input
name="username"
id="username"
type="text"
class="username-box"
/>
<h5 class="textdarcula">密码</h5>
<input
name="password"
id="password"
type="password"
class="username-box"
/>
<div class="foot">
<button class="btn login-btn">登录</button>
<button class="btn ghost-btn" routerLink="/register">注册</button>
<button class="btn ghost-btn">忘记密码</button>

</div>
</div>
</div>
</div>
25 changes: 25 additions & 0 deletions src/pages/login-page/login-page.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { LoginPageComponent } from './login-page.component';

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

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginPageComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(LoginPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
72 changes: 72 additions & 0 deletions src/pages/login-page/login-page.component.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.login-page-banner {
height: 100vh
padding-top: var(--theme-pad-03)
box-sizing: border-box
background: var(--theme-base02)
color: var(--theme-base07)
display: flex
flex-direction: column
};

.login {
width 60vh
margin auto
};

.foot {
display flex
flex-direction row-reverse
text-align center
margin: var(--theme-pad-00) var(--theme-pad-02)
padding: var(--theme-pad-02) var(--theme-pad-04)
};

.username-box {
position relative
bottom 20px
height 30px
width 55vh
font-family: inherit
font-weight: normal
font-size: var(--theme-size-base)
transition: border-color 150ms ease-in-out
border-style: solid
border-width: 2px
background-color var(--theme-base01)
color var(--theme-base07)
border-color var(--theme-base01)

&:focus-within {
border-color var(--theme-accent-alter)
}
};

.login-btn {
display flex
justify-content center
width 15vh
font-weight: 500
--btn-border-color: var(--theme-accent-alter)
--btn-background-color: var(--theme-base02)
--btn-highlight-color: var(--theme-accent)
--btn-highlight-text-color: var(--theme-base07)
--btn-text-color: var(--theme-accent-alter)
};

.ghost-btn {
display flex
justify-content center
width 15vh
font-weight: 500
border-style: none
--btn-border-color: var(--theme-base02)
--btn-background-color: var(--theme-base02)
--btn-highlight-color: var(--theme-accent)
--btn-highlight-text-color: var(--theme-base07)
--btn-text-color: var(--theme-accent-alter)
};

.textdarcula {
color var(--theme-base04)
}

15 changes: 15 additions & 0 deletions src/pages/login-page/login-page.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-login-page',
templateUrl: './login-page.component.html',
styleUrls: ['./login-page.component.styl']
})
export class LoginPageComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="container">
<div class="left_part">
<h5><br></h5>
<h1 class="recent_title">
我的下载
</h1>
Expand Down Expand Up @@ -40,4 +41,4 @@ <h1 class="recent_title">
<a routerLink="../payment">财务管理</a>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

.right_part {
lost-column: 1 / 5
position: sticky
top: var(--theme-pad-05)

position: fixed
right: var(--theme-pad-05)
top: var(--theme-pad-10)

.line {
width = 100%
}
Expand All @@ -25,4 +26,4 @@
color: var(--palette-base03)
margin-top: 5px
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="container">
<div class="left_part">
<h5><br></h5>
<h1 class="recent_title">
最近收藏
</h1>
Expand Down Expand Up @@ -39,4 +40,4 @@ <h1 class="recent_title">
<a routerLink="../payment">财务管理</a>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@

.right_part {
lost-column: 1 / 5
position: sticky
top: var(--theme-pad-05)

position: fixed
right: var(--theme-pad-05)
top: var(--theme-pad-10)

.line {
width = 100%
}
Expand All @@ -25,4 +26,4 @@
color: var(--palette-base03)
margin-top: 5px
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="container">
<div class="left_part">
<h5></h5>
<h1 class="recent_title">
我的关注
</h1>
Expand Down Expand Up @@ -44,4 +45,4 @@ <h1 class="recent_title">
<a routerLink="../payment">财务管理</a>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
margin-right: 30px
}

.label {
.label {

.name {
font-size: var(--theme-size-h3)
Expand All @@ -46,8 +46,9 @@

.right_part {
lost-column: 1 / 5
position: sticky
top: var(--theme-pad-05)
position: fixed
right: var(--theme-pad-05)
top: var(--theme-pad-10)

.line {
width = 100%
Expand All @@ -62,4 +63,4 @@
color: var(--palette-base03)
margin-top: 5px
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="container">
<div class="left_part">
<h5><br></h5>
<h1 class="recent_title">
财务管理
</h1>
Expand Down Expand Up @@ -43,4 +44,4 @@ <h4>扫码支付:</h4>
<a routerLink="." class="func_t">财务管理</a>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@

.right_part {
lost-column: 1 / 5
position: sticky
top: var(--theme-pad-05)
position: fixed
right: var(--theme-pad-05)
top: var(--theme-pad-10)

.line {
width = 100%
Expand All @@ -41,4 +42,4 @@
color: var(--palette-base03)
margin-top: 5px
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="container">
<div class="left_part">
<h5><br></h5>
<h1 class="recent_title">
个人设置
</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
color: var(--palette-base03)
margin-top: 5px
}
}
}
3 changes: 2 additions & 1 deletion src/pages/personal-page/personal-page.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="container">
<div class="info_part">
<h3><br></h3>
<div class="jumbotron">
{{name}}
</div>
Expand Down Expand Up @@ -75,4 +76,4 @@ <h1 class="recent_title">
<a routerLink="payment">财务管理</a>
</div>
</div>
</div>
</div>
7 changes: 4 additions & 3 deletions src/pages/personal-page/personal-page.component.styl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
margin: 30px
lost-align: middle-right
lost-column: 1 / 4

}
}

Expand All @@ -80,8 +80,9 @@

.func_part {
lost-column: 1 / 5
position: sticky
top: var(--theme-pad-05)
position: fixed
right: var(--theme-pad-05)
top: var(--theme-pad-10)

.line {
width = 100%
Expand Down
Loading

0 comments on commit c5485dc

Please sign in to comment.