Browse Source

front end init

Ahmad Rusdi 6 years ago
parent
commit
5cc225ba3f
46 changed files with 773 additions and 33 deletions
  1. 5
    0
      package-lock.json
  2. 1
    0
      package.json
  3. 2
    18
      src/app/app.component.html
  4. 42
    8
      src/app/app.module.ts
  5. 28
    0
      src/app/buttons/buttons.component.css
  6. 28
    0
      src/app/buttons/buttons.component.html
  7. 25
    0
      src/app/buttons/buttons.component.spec.ts
  8. 15
    0
      src/app/buttons/buttons.component.ts
  9. 0
    0
      src/app/chatroom/chatroom.component.css
  10. 11
    0
      src/app/chatroom/chatroom.component.html
  11. 25
    0
      src/app/chatroom/chatroom.component.spec.ts
  12. 15
    0
      src/app/chatroom/chatroom.component.ts
  13. 7
    0
      src/app/homeui/homeui.component.css
  14. 23
    0
      src/app/homeui/homeui.component.html
  15. 25
    0
      src/app/homeui/homeui.component.spec.ts
  16. 15
    0
      src/app/homeui/homeui.component.ts
  17. 26
    0
      src/app/inbox/inbox.component.css
  18. 24
    0
      src/app/inbox/inbox.component.html
  19. 25
    0
      src/app/inbox/inbox.component.spec.ts
  20. 15
    0
      src/app/inbox/inbox.component.ts
  21. 8
    0
      src/app/inbox/message/message.component.css
  22. 10
    0
      src/app/inbox/message/message.component.html
  23. 25
    0
      src/app/inbox/message/message.component.spec.ts
  24. 15
    0
      src/app/inbox/message/message.component.ts
  25. 11
    0
      src/app/navi/navi.component.css
  26. 30
    0
      src/app/navi/navi.component.html
  27. 25
    0
      src/app/navi/navi.component.spec.ts
  28. 15
    0
      src/app/navi/navi.component.ts
  29. 0
    0
      src/app/timeline/post/comment/comment.component.css
  30. 18
    0
      src/app/timeline/post/comment/comment.component.html
  31. 25
    0
      src/app/timeline/post/comment/comment.component.spec.ts
  32. 15
    0
      src/app/timeline/post/comment/comment.component.ts
  33. 7
    0
      src/app/timeline/post/post.component.css
  34. 26
    0
      src/app/timeline/post/post.component.html
  35. 25
    0
      src/app/timeline/post/post.component.spec.ts
  36. 15
    0
      src/app/timeline/post/post.component.ts
  37. 5
    0
      src/app/timeline/status/status.component.css
  38. 12
    0
      src/app/timeline/status/status.component.html
  39. 25
    0
      src/app/timeline/status/status.component.spec.ts
  40. 25
    0
      src/app/timeline/status/status.component.ts
  41. 13
    0
      src/app/timeline/timeline.component.css
  42. 17
    0
      src/app/timeline/timeline.component.html
  43. 25
    0
      src/app/timeline/timeline.component.spec.ts
  44. 15
    0
      src/app/timeline/timeline.component.ts
  45. 8
    6
      src/index.html
  46. 1
    1
      tslint.json

+ 5
- 0
package-lock.json View File

797
       "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
797
       "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
798
       "dev": true
798
       "dev": true
799
     },
799
     },
800
+    "angular-in-memory-web-api": {
801
+      "version": "0.6.0",
802
+      "resolved": "https://registry.npmjs.org/angular-in-memory-web-api/-/angular-in-memory-web-api-0.6.0.tgz",
803
+      "integrity": "sha512-+i2bH9T/S4gTQdJLt264H4JMKXNpik33pMatSOvPSqFQ0vImnTBVbvijfmy75OgwKPJ8OZw0R76CrLjp2EYX2A=="
804
+    },
800
     "ansi-html": {
805
     "ansi-html": {
801
       "version": "0.0.7",
806
       "version": "0.0.7",
802
       "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
807
       "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",

+ 1
- 0
package.json View File

20
     "@angular/platform-browser": "^6.0.3",
20
     "@angular/platform-browser": "^6.0.3",
21
     "@angular/platform-browser-dynamic": "^6.0.3",
21
     "@angular/platform-browser-dynamic": "^6.0.3",
22
     "@angular/router": "^6.0.3",
22
     "@angular/router": "^6.0.3",
23
+    "angular-in-memory-web-api": "^0.6.0",
23
     "core-js": "^2.5.4",
24
     "core-js": "^2.5.4",
24
     "rxjs": "^6.0.0",
25
     "rxjs": "^6.0.0",
25
     "zone.js": "^0.8.26"
26
     "zone.js": "^0.8.26"

+ 2
- 18
src/app/app.component.html View File

1
 <!--The content below is only a placeholder and can be replaced.-->
1
 <!--The content below is only a placeholder and can be replaced.-->
2
-<div style="text-align:center">
3
-  <h1>
4
-    Welcome to {{ title }}!
5
-  </h1>
6
-  <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
7
-</div>
8
-<h2>Here are some links to help you start: </h2>
9
-<ul>
10
-  <li>
11
-    <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
12
-  </li>
13
-  <li>
14
-    <h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
15
-  </li>
16
-  <li>
17
-    <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
18
-  </li>
19
-</ul>
2
+<app-navi></app-navi>
3
+<app-homeui></app-homeui>
20
 
4
 

+ 42
- 8
src/app/app.module.ts View File

1
 import { BrowserModule } from '@angular/platform-browser';
1
 import { BrowserModule } from '@angular/platform-browser';
2
 import { NgModule } from '@angular/core';
2
 import { NgModule } from '@angular/core';
3
+import { FormsModule } from '@angular/forms';
4
+import { HttpClientModule } from '@angular/common/http';
3
 
5
 
4
 import { AppComponent } from './app.component';
6
 import { AppComponent } from './app.component';
7
+import { StatusComponent } from './timeline/status/status.component';
8
+import { HomeuiComponent } from './homeui/homeui.component';
9
+import { TimelineComponent } from './timeline/timeline.component';
10
+import { PostComponent } from './timeline/post/post.component';
11
+import { InboxComponent } from './inbox/inbox.component';
12
+import { ButtonsComponent } from './buttons/buttons.component';
13
+import { NaviComponent } from './navi/navi.component';
14
+import { CommentComponent } from './timeline/post/comment/comment.component';
15
+import { MessageComponent } from './inbox/message/message.component';
16
+import { RouterModule, Routes } from '@angular/router';
17
+import { ChatroomComponent } from './chatroom/chatroom.component';
18
+
19
+const appRoutes: Routes = [
20
+	{ path: '', component: TimelineComponent },
21
+	{ path: 'chatroom', component: ChatroomComponent }
22
+];
5
 
23
 
6
 @NgModule({
24
 @NgModule({
7
-  declarations: [
8
-    AppComponent
9
-  ],
10
-  imports: [
11
-    BrowserModule
12
-  ],
13
-  providers: [],
14
-  bootstrap: [AppComponent]
25
+	declarations: [
26
+		AppComponent,
27
+		StatusComponent,
28
+		HomeuiComponent,
29
+		TimelineComponent,
30
+		PostComponent,
31
+		InboxComponent,
32
+		ButtonsComponent,
33
+		NaviComponent,
34
+		CommentComponent,
35
+		MessageComponent,
36
+		ChatroomComponent,
37
+	],
38
+	imports: [
39
+		BrowserModule,
40
+		FormsModule,
41
+		HttpClientModule,
42
+		RouterModule.forRoot(
43
+			appRoutes,
44
+			{ enableTracing: false }
45
+		),
46
+	],
47
+	providers: [],
48
+	bootstrap: [AppComponent]
15
 })
49
 })
16
 export class AppModule { }
50
 export class AppModule { }

+ 28
- 0
src/app/buttons/buttons.component.css View File

1
+.container {
2
+	max-width: 100% !important;
3
+}
4
+
5
+.hero.is-fullheight {
6
+	min-height: calc(100vh - 3.25rem);
7
+}
8
+
9
+.side__buttons > li {
10
+	text-align: center;
11
+}
12
+
13
+.side__buttons > li > a {
14
+	height: 70px;
15
+	width: 100%;
16
+	border-radius: 0 !important;
17
+	border: 0;
18
+	transition: .3s ease;
19
+}
20
+
21
+.button:hover {
22
+	color: white;
23
+	background-color: black;
24
+}
25
+
26
+.hero-body {
27
+	padding: 0 0;
28
+}

+ 28
- 0
src/app/buttons/buttons.component.html View File

1
+<section class="hero is-fullheight">
2
+	<div class="hero-body">
3
+		<div class="container">
4
+			<ul class="side__buttons">
5
+				<li>
6
+					<a routerLink="/" class="button">
7
+						<i class="fas fa-home fa-fw fa-2x"></i>
8
+					</a>
9
+				</li>
10
+				<li>
11
+					<a class="button">
12
+						<i class="fas fa-image fa-fw fa-2x"></i>
13
+					</a>
14
+				</li>
15
+				<li>
16
+					<a class="button">
17
+						<i class="fas fa-envelope fa-fw fa-2x"></i>
18
+					</a>
19
+				</li>
20
+				<li>
21
+					<a class="button">
22
+						<i class="fas fa-folder-open fa-fw fa-2x"></i>
23
+					</a>
24
+				</li>
25
+			</ul>
26
+		</div>
27
+	</div>
28
+</section>

+ 25
- 0
src/app/buttons/buttons.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { ButtonsComponent } from './buttons.component';
4
+
5
+describe('ButtonsComponent', () => {
6
+  let component: ButtonsComponent;
7
+  let fixture: ComponentFixture<ButtonsComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ ButtonsComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(ButtonsComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/buttons/buttons.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-buttons',
5
+  templateUrl: './buttons.component.html',
6
+  styleUrls: ['./buttons.component.css']
7
+})
8
+export class ButtonsComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 0
- 0
src/app/chatroom/chatroom.component.css View File


+ 11
- 0
src/app/chatroom/chatroom.component.html View File

1
+<section class="hero is-fullheight">
2
+	<div class="hero-body no-vcenter">
3
+		<div class="container">
4
+			<p>
5
+				chatroom works!
6
+			</p>
7
+		</div>
8
+	</div>
9
+</section>
10
+
11
+

+ 25
- 0
src/app/chatroom/chatroom.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { ChatroomComponent } from './chatroom.component';
4
+
5
+describe('ChatroomComponent', () => {
6
+  let component: ChatroomComponent;
7
+  let fixture: ComponentFixture<ChatroomComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ ChatroomComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(ChatroomComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/chatroom/chatroom.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-chatroom',
5
+  templateUrl: './chatroom.component.html',
6
+  styleUrls: ['./chatroom.component.css']
7
+})
8
+export class ChatroomComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 7
- 0
src/app/homeui/homeui.component.css View File

1
+.hero-body {
2
+	padding: 0 0;
3
+}
4
+
5
+.container {
6
+	max-width: 100% !important;
7
+}

+ 23
- 0
src/app/homeui/homeui.component.html View File

1
+<!-- <app-navi></app-navi> -->
2
+<section class="hero is-fullheight">
3
+	<div class="hero-body">
4
+		<div class="container">
5
+			<div class="columns is-gapless">
6
+
7
+				<div class="column is-1">
8
+					<app-buttons style="position: fixed; width: inherit;"></app-buttons>
9
+				</div>
10
+
11
+				<div class="column is-2">
12
+					<app-inbox style="position: fixed; width: inherit"></app-inbox>
13
+				</div>
14
+
15
+				<div class="column">
16
+					<router-outlet></router-outlet>
17
+					<!-- <app-timeline></app-timeline> -->
18
+				</div>
19
+
20
+			</div>
21
+		</div>
22
+	</div>
23
+</section>

+ 25
- 0
src/app/homeui/homeui.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { HomeuiComponent } from './homeui.component';
4
+
5
+describe('HomeuiComponent', () => {
6
+  let component: HomeuiComponent;
7
+  let fixture: ComponentFixture<HomeuiComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ HomeuiComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(HomeuiComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/homeui/homeui.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+	selector: 'app-homeui',
5
+	templateUrl: './homeui.component.html',
6
+	styleUrls: ['./homeui.component.css']
7
+})
8
+export class HomeuiComponent implements OnInit {
9
+
10
+	constructor() { }
11
+
12
+	ngOnInit() {
13
+	}
14
+
15
+}

+ 26
- 0
src/app/inbox/inbox.component.css View File

1
+.hero.is-fullheight .hero-body.no-vcenter {
2
+	align-items: flex-start;
3
+}
4
+
5
+.hero.is-fullheight {
6
+	min-height: calc(100vh - 3.25rem);
7
+}
8
+
9
+section {
10
+	max-height: 1px;
11
+	overflow: auto;
12
+	border-left: 1px solid grey;
13
+	border-right: 1px solid grey;
14
+}
15
+
16
+.hero-body {
17
+	padding: 0 0;
18
+}
19
+
20
+.container {
21
+	max-width: 100% !important;
22
+}
23
+
24
+.box {
25
+	background-color: black;
26
+}

+ 24
- 0
src/app/inbox/inbox.component.html View File

1
+<section class="hero is-fullheight is-light">
2
+	<div class="hero-body no-vcenter">
3
+		<div class="container">
4
+			<ul class="side__boxes">
5
+				<app-message></app-message>
6
+				<app-message></app-message>
7
+				<app-message></app-message>
8
+				<app-message></app-message>
9
+				<app-message></app-message>
10
+				<app-message></app-message>
11
+				<app-message></app-message>
12
+				<app-message></app-message>
13
+				<app-message></app-message>
14
+				<app-message></app-message>
15
+				<app-message></app-message>
16
+				<app-message></app-message>
17
+				<app-message></app-message>
18
+				<app-message></app-message>
19
+				<app-message></app-message>
20
+				<app-message></app-message>
21
+			</ul>
22
+		</div>
23
+	</div>
24
+</section>

+ 25
- 0
src/app/inbox/inbox.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { InboxComponent } from './inbox.component';
4
+
5
+describe('InboxComponent', () => {
6
+  let component: InboxComponent;
7
+  let fixture: ComponentFixture<InboxComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ InboxComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(InboxComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/inbox/inbox.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-inbox',
5
+  templateUrl: './inbox.component.html',
6
+  styleUrls: ['./inbox.component.css']
7
+})
8
+export class InboxComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 8
- 0
src/app/inbox/message/message.component.css View File

1
+li > div {
2
+	min-height: 80px;
3
+	width: 100%;
4
+	border-radius: 0 !important;
5
+}
6
+
7
+.box {
8
+}

+ 10
- 0
src/app/inbox/message/message.component.html View File

1
+<li>
2
+	<div routerLink="/chatroom" class="box">
3
+		<p class="title is-6">
4
+		message
5
+		</p>
6
+		<p class="subtitle is-7">
7
+		3 min ago
8
+		</p>
9
+	</div>
10
+</li>

+ 25
- 0
src/app/inbox/message/message.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { MessageComponent } from './message.component';
4
+
5
+describe('MessageComponent', () => {
6
+  let component: MessageComponent;
7
+  let fixture: ComponentFixture<MessageComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ MessageComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(MessageComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/inbox/message/message.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-message',
5
+  templateUrl: './message.component.html',
6
+  styleUrls: ['./message.component.css']
7
+})
8
+export class MessageComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 11
- 0
src/app/navi/navi.component.css View File

1
+.navbar {
2
+	border-bottom: 1px solid grey;
3
+}
4
+
5
+.navbar-item {
6
+	border-left: 1px solid grey;
7
+}
8
+
9
+a {
10
+	color: black !important;
11
+}

+ 30
- 0
src/app/navi/navi.component.html View File

1
+<nav class="navbar is-fixed-top">
2
+	<div class="navbar-brand">
3
+		<a class="navbar-item" href="https://bulma.io">
4
+			<h1 class="is-size-5">ZipLine</h1>
5
+		</a>
6
+		<div class="navbar-burger burger" data-target="navbarExampleTransparentExample">
7
+			<span></span>
8
+			<span></span>
9
+			<span></span>
10
+		</div>
11
+	</div>
12
+
13
+	<div id="navbarExampleTransparentExample" class="navbar-menu">
14
+		<div class="navbar-end">
15
+			<div class="navbar-item">
16
+				<a href="#">
17
+					<span class="fa-layers fa-fw fa-lg">
18
+						<i class="fas fa-bell"></i>
19
+						<i class="fas fa-circle" data-fa-transform="shrink-7 up-5 right-5" style="color: Tomato "></i>
20
+					</span>
21
+				</a>
22
+			</div>
23
+			<div class="navbar-item">
24
+				<a href="#">
25
+					Profile
26
+				</a>
27
+			</div>
28
+		</div>
29
+	</div>
30
+</nav>

+ 25
- 0
src/app/navi/navi.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { NaviComponent } from './navi.component';
4
+
5
+describe('NaviComponent', () => {
6
+  let component: NaviComponent;
7
+  let fixture: ComponentFixture<NaviComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ NaviComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(NaviComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/navi/navi.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-navi',
5
+  templateUrl: './navi.component.html',
6
+  styleUrls: ['./navi.component.css']
7
+})
8
+export class NaviComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 0
- 0
src/app/timeline/post/comment/comment.component.css View File


+ 18
- 0
src/app/timeline/post/comment/comment.component.html View File

1
+<article class="media">
2
+	<figure class="media-left">
3
+		<p class="image is-48x48">
4
+			<img src="https://bulma.io/images/placeholders/96x96.png">
5
+		</p>
6
+	</figure>
7
+	<div class="media-content">
8
+		<div class="content">
9
+			<p>
10
+				<strong>Sean Brown</strong>
11
+				<br>
12
+				Donec sollicitudin urna eget eros malesuada sagittis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam blandit nisl a nulla sagittis, a lobortis leo feugiat.
13
+				<br>
14
+				<small><a>Like</a> · <a>Reply</a> · 2 hrs</small>
15
+			</p>
16
+		</div>
17
+	</div>
18
+</article>

+ 25
- 0
src/app/timeline/post/comment/comment.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { CommentComponent } from './comment.component';
4
+
5
+describe('CommentComponent', () => {
6
+  let component: CommentComponent;
7
+  let fixture: ComponentFixture<CommentComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ CommentComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(CommentComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/timeline/post/comment/comment.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-comment',
5
+  templateUrl: './comment.component.html',
6
+  styleUrls: ['./comment.component.css']
7
+})
8
+export class CommentComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 7
- 0
src/app/timeline/post/post.component.css View File

1
+.title, .subtitle {
2
+	color: grey !important;
3
+}
4
+
5
+.card {
6
+	max-width: 900px;
7
+}

+ 26
- 0
src/app/timeline/post/post.component.html View File

1
+<div class="card">
2
+	<div class="card-content">
3
+		<article class="media">
4
+			<figure class="media-left">
5
+				<p class="image is-64x64">
6
+					<img src="https://bulma.io/images/placeholders/128x128.png">
7
+				</p>
8
+			</figure>
9
+			<div class="media-content">
10
+				<div class="content">
11
+					<p>
12
+						<strong>Barbara Middleton</strong>
13
+						<br>
14
+						Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis porta eros lacus, nec ultricies elit blandit non. Suspendisse pellentesque mauris sit amet dolor blandit rutrum. Nunc in tempus turpis.
15
+						<br>
16
+						<small><a>Like</a> · <a>Reply</a> · 3 hrs</small>
17
+					</p>
18
+				</div>
19
+
20
+				<div class="comment">
21
+					<app-comment></app-comment>
22
+				</div>
23
+			</div>
24
+		</article>
25
+	</div>
26
+</div>

+ 25
- 0
src/app/timeline/post/post.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { PostComponent } from './post.component';
4
+
5
+describe('PostComponent', () => {
6
+  let component: PostComponent;
7
+  let fixture: ComponentFixture<PostComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ PostComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(PostComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/timeline/post/post.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-post',
5
+  templateUrl: './post.component.html',
6
+  styleUrls: ['./post.component.css']
7
+})
8
+export class PostComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 5
- 0
src/app/timeline/status/status.component.css View File

1
+textarea {
2
+	border-radius: 0;
3
+	border: 0;
4
+	box-shadow: 0 0 0;
5
+}

+ 12
- 0
src/app/timeline/status/status.component.html View File

1
+<div class="columns">
2
+	<div class="column is-6 is-offset-3">
3
+		<div class="card">
4
+			<div class="card-content">
5
+				<textarea [(ngModel)]="body" class="textarea" type="text" placeholder="What's on your mind?"></textarea>
6
+			</div>
7
+			<div class="card-footer">
8
+				<button class="button" (click)="submit()">submit</button>
9
+			</div>
10
+		</div>
11
+	</div>
12
+</div>

+ 25
- 0
src/app/timeline/status/status.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { StatusComponent } from './status.component';
4
+
5
+describe('MessageComponent', () => {
6
+  let component: MessageComponent;
7
+  let fixture: ComponentFixture<MessageComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ MessageComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(MessageComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 25
- 0
src/app/timeline/status/status.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';
3
+
4
+@Component({
5
+	selector: 'app-status',
6
+	templateUrl: './status.component.html',
7
+	styleUrls: ['./status.component.css']
8
+})
9
+export class StatusComponent implements OnInit {
10
+	sender = 'Origin'; // pull web3.address
11
+	body: string;
12
+
13
+	constructor(private http: HttpClient) { }
14
+
15
+	ngOnInit() {
16
+	}
17
+
18
+	submit() {
19
+		const headers = new HttpHeaders()
20
+			.set('Content-Type', 'application/json');
21
+
22
+		this.http.post(
23
+			`http://192.168.3.202:6969/post?sender=${this.sender}&body=${this.body}`, {headers}).subscribe(console.log);
24
+	}
25
+}

+ 13
- 0
src/app/timeline/timeline.component.css View File

1
+.hero.is-fullheight .hero-body.no-vcenter {
2
+	align-items: flex-start;
3
+}
4
+.container.timeline {
5
+	display: flex;
6
+	flex-direction: column;
7
+	align-items: center;
8
+}
9
+
10
+.hero-body {
11
+	padding: 0 0;
12
+	padding-top: 2rem;
13
+}

+ 17
- 0
src/app/timeline/timeline.component.html View File

1
+<section class="hero is-fullheight">
2
+	<div class="hero-body no-vcenter">
3
+		<div class="container">
4
+			<app-status></app-status>
5
+			<div class="container timeline">
6
+			<app-post></app-post>
7
+			<app-post></app-post>
8
+			<app-post></app-post>
9
+			<app-post></app-post>
10
+			<app-post></app-post>
11
+			<app-post></app-post>
12
+			</div>
13
+		</div>
14
+	</div>
15
+</section>
16
+
17
+

+ 25
- 0
src/app/timeline/timeline.component.spec.ts View File

1
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { TimelineComponent } from './timeline.component';
4
+
5
+describe('TimelineComponent', () => {
6
+  let component: TimelineComponent;
7
+  let fixture: ComponentFixture<TimelineComponent>;
8
+
9
+  beforeEach(async(() => {
10
+    TestBed.configureTestingModule({
11
+      declarations: [ TimelineComponent ]
12
+    })
13
+    .compileComponents();
14
+  }));
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(TimelineComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
src/app/timeline/timeline.component.ts View File

1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-timeline',
5
+  templateUrl: './timeline.component.html',
6
+  styleUrls: ['./timeline.component.css']
7
+})
8
+export class TimelineComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit() {
13
+  }
14
+
15
+}

+ 8
- 6
src/index.html View File

2
 <html lang="en">
2
 <html lang="en">
3
 <head>
3
 <head>
4
   <meta charset="utf-8">
4
   <meta charset="utf-8">
5
-  <title>ZiplineFrontend</title>
6
-  <base href="/">
5
+	<title>ZiplineFrontend</title>
6
+	<base href="/">
7
 
7
 
8
-  <meta name="viewport" content="width=device-width, initial-scale=1">
9
-  <link rel="icon" type="image/x-icon" href="favicon.ico">
8
+	<meta name="viewport" content="width=device-width, initial-scale=1">
9
+	<link rel="icon" type="image/x-icon" href="favicon.ico">
10
+	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css" />
11
+	<script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js" integrity="sha384-3LK/3kTpDE/Pkp8gTNp2gR/2gOiwQ6QaO7Td0zV76UFJVhqLl4Vl3KL1We6q6wR9" crossorigin="anonymous"></script>
10
 </head>
12
 </head>
11
-<body>
12
-  <app-root></app-root>
13
+<body class="has-navbar-fixed-top">
14
+	<app-root></app-root>
13
 </body>
15
 </body>
14
 </html>
16
 </html>

+ 1
- 1
tslint.json View File

23
     "import-spacing": true,
23
     "import-spacing": true,
24
     "indent": [
24
     "indent": [
25
       true,
25
       true,
26
-      "spaces"
26
+      "tabs"
27
     ],
27
     ],
28
     "interface-over-type-literal": true,
28
     "interface-over-type-literal": true,
29
     "label-position": true,
29
     "label-position": true,