瀏覽代碼

Partial commit ---Chat UI

master
kj1352 5 年之前
父節點
當前提交
ff103f9d79
共有 6 個檔案被更改,包括 144 行新增7 行删除
  1. +13
    -1
      src/app/chat-page/chat-page.component.html
  2. +50
    -0
      src/app/chat-page/chat-page.component.scss
  3. +13
    -6
      src/app/chat-page/chat-page.component.ts
  4. +5
    -0
      src/app/tabs/more/more.component.html
  5. +1
    -0
      src/assets/custom-icons/chat-color.svg
  6. +62
    -0
      src/assets/custom-icons/chat.svg

+ 13
- 1
src/app/chat-page/chat-page.component.html 查看文件

@@ -1 +1,13 @@
<p>chat-page works!</p>
<div class="page">
<header class="nav-header">
<button class="close-button" (click)="back()">
<svg-icon [applyClass]="true" class="icon" src="assets/custom-icons/close.svg"></svg-icon>
</button>
<h5>
<svg-icon [applyClass]="true" class="icon" src="assets/custom-icons/chat.svg"></svg-icon>
<span> Chat with friends </span>
</h5>
</header>

<section class="upfold"></section>
</div>

+ 50
- 0
src/app/chat-page/chat-page.component.scss 查看文件

@@ -0,0 +1,50 @@
.page {
background-color: var(--ash-black);
height: 100vh;
overflow: auto;
}

.nav-header {
background-color: var(--ash-black);
display: flex;
align-items: center;
padding: 0 5%;
height: 60px;
position: sticky;
position: -webkit-sticky;
top: 0;
z-index: 1;
box-shadow: 0px 0px 5px var(--black);

.close-button {
border: 0px;
background-color: transparent;
.icon {
width: 15px;
height: 15px;
fill: var(--light-grey);
}
}

h5 {
font-size: 16px;
color: white;
font-weight: 400;
margin-left: 20px;
letter-spacing: 1px;

.icon {
width: 15px;
height: 15px;
fill: white;
margin-right: 3px;
vertical-align: middle;
position: relative;
top: -1px;
}
}
}

.upfold {
height: 30vh;
}

+ 13
- 6
src/app/chat-page/chat-page.component.ts 查看文件

@@ -1,15 +1,22 @@
import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';

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

constructor() { }
constructor(
private location: Location
) { }

ngOnInit(): void {
}
ngOnInit(): void {
}

back() {
this.location.back();
}

}

+ 5
- 0
src/app/tabs/more/more.component.html 查看文件

@@ -130,6 +130,11 @@
<svg-icon [applyClass]="true" class="icon" src="assets/custom-icons/forum.svg"></svg-icon>
<h4> Forum </h4>
</li>

<li [routerLink]="['/chats']">
<svg-icon [applyClass]="true" class="icon" src="assets/custom-icons/chat-color.svg"></svg-icon>
<h4> Chats </h4>
</li>
</ul>

<button class="logout-button"> Logout </button>


+ 1
- 0
src/assets/custom-icons/chat-color.svg
文件差異過大導致無法顯示
查看文件


+ 62
- 0
src/assets/custom-icons/chat.svg 查看文件

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="511.626px" height="511.626px" viewBox="0 0 511.626 511.626" style="enable-background:new 0 0 511.626 511.626;"
xml:space="preserve">
<g>
<g>
<path d="M301.927,327.605c30.926-13.038,55.34-30.785,73.23-53.248c17.888-22.458,26.833-46.915,26.833-73.372
c0-26.458-8.945-50.917-26.84-73.376c-17.888-22.459-42.298-40.208-73.228-53.249c-30.93-13.039-64.571-19.556-100.928-19.556
c-36.354,0-69.995,6.521-100.927,19.556c-30.929,13.04-55.34,30.789-73.229,53.249C8.947,150.072,0,174.527,0,200.986
c0,22.648,6.767,43.975,20.28,63.96c13.512,19.981,32.071,36.829,55.671,50.531c-1.902,4.572-3.853,8.754-5.852,12.566
c-2,3.806-4.377,7.467-7.139,10.991c-2.76,3.525-4.899,6.283-6.423,8.275c-1.523,1.998-3.997,4.812-7.425,8.422
c-3.427,3.617-5.617,5.996-6.567,7.135c0-0.191-0.381,0.24-1.143,1.287c-0.763,1.047-1.191,1.52-1.285,1.431
c-0.096-0.103-0.477,0.373-1.143,1.42c-0.666,1.048-1,1.571-1,1.571l-0.715,1.423c-0.282,0.575-0.476,1.137-0.57,1.712
c-0.096,0.567-0.144,1.19-0.144,1.854s0.094,1.28,0.288,1.854c0.381,2.471,1.475,4.466,3.283,5.996
c1.807,1.52,3.756,2.279,5.852,2.279h0.857c9.515-1.332,17.701-2.854,24.552-4.569c29.312-7.61,55.771-19.797,79.372-36.545
c17.129,3.046,33.879,4.568,50.247,4.568C237.353,347.16,270.998,340.645,301.927,327.605z"/>
<path d="M491.354,338.166c13.518-19.889,20.272-41.247,20.272-64.09c0-23.414-7.146-45.316-21.416-65.68
c-14.277-20.362-33.694-37.305-58.245-50.819c4.374,14.274,6.563,28.739,6.563,43.398c0,25.503-6.368,49.676-19.129,72.519
c-12.752,22.836-31.025,43.01-54.816,60.524c-22.08,15.988-47.205,28.261-75.377,36.829
c-28.164,8.562-57.573,12.848-88.218,12.848c-5.708,0-14.084-0.377-25.122-1.137c38.256,25.119,83.177,37.685,134.756,37.685
c16.371,0,33.119-1.526,50.251-4.571c23.6,16.755,50.06,28.931,79.37,36.549c6.852,1.718,15.037,3.237,24.554,4.568
c2.283,0.191,4.381-0.476,6.283-1.999c1.903-1.522,3.142-3.61,3.71-6.272c-0.089-1.143,0-1.77,0.287-1.861
c0.281-0.09,0.233-0.712-0.144-1.852c-0.376-1.144-0.568-1.715-0.568-1.715l-0.712-1.424c-0.198-0.376-0.52-0.903-0.999-1.567
c-0.476-0.66-0.855-1.143-1.143-1.427c-0.28-0.284-0.705-0.763-1.28-1.424c-0.568-0.66-0.951-1.092-1.143-1.283
c-0.951-1.143-3.139-3.521-6.564-7.139c-3.429-3.613-5.899-6.42-7.422-8.418c-1.523-1.999-3.665-4.757-6.424-8.282
c-2.758-3.518-5.14-7.183-7.139-10.991c-1.998-3.806-3.949-7.995-5.852-12.56C459.289,374.859,477.843,358.062,491.354,338.166z"
/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>