creation of components for displaying profiles/threads/hashtags.
This commit is contained in:
parent
932375f8e9
commit
81324e6366
@ -35,6 +35,9 @@ import { ManageAccountComponent } from "./components/floating-column/manage-acco
|
|||||||
import { ActionBarComponent } from './components/stream/status/action-bar/action-bar.component';
|
import { ActionBarComponent } from './components/stream/status/action-bar/action-bar.component';
|
||||||
import { WaitingAnimationComponent } from './components/waiting-animation/waiting-animation.component';
|
import { WaitingAnimationComponent } from './components/waiting-animation/waiting-animation.component';
|
||||||
import { ReplyToStatusComponent } from './components/stream/status/reply-to-status/reply-to-status.component';
|
import { ReplyToStatusComponent } from './components/stream/status/reply-to-status/reply-to-status.component';
|
||||||
|
import { UserProfileComponent } from './components/stream/user-profile/user-profile.component';
|
||||||
|
import { ThreadComponent } from './components/stream/thread/thread.component';
|
||||||
|
import { HashtagComponent } from './components/stream/hashtag/hashtag.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: "", redirectTo: "home", pathMatch: "full" },
|
{ path: "", redirectTo: "home", pathMatch: "full" },
|
||||||
@ -62,7 +65,10 @@ const routes: Routes = [
|
|||||||
SearchComponent,
|
SearchComponent,
|
||||||
ActionBarComponent,
|
ActionBarComponent,
|
||||||
WaitingAnimationComponent,
|
WaitingAnimationComponent,
|
||||||
ReplyToStatusComponent
|
ReplyToStatusComponent,
|
||||||
|
UserProfileComponent,
|
||||||
|
ThreadComponent,
|
||||||
|
HashtagComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
3
src/app/components/stream/hashtag/hashtag.component.html
Normal file
3
src/app/components/stream/hashtag/hashtag.component.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
hashtag works!
|
||||||
|
</p>
|
25
src/app/components/stream/hashtag/hashtag.component.spec.ts
Normal file
25
src/app/components/stream/hashtag/hashtag.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { HashtagComponent } from './hashtag.component';
|
||||||
|
|
||||||
|
describe('HashtagComponent', () => {
|
||||||
|
let component: HashtagComponent;
|
||||||
|
let fixture: ComponentFixture<HashtagComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ HashtagComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(HashtagComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/components/stream/hashtag/hashtag.component.ts
Normal file
15
src/app/components/stream/hashtag/hashtag.component.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-hashtag',
|
||||||
|
templateUrl: './hashtag.component.html',
|
||||||
|
styleUrls: ['./hashtag.component.scss']
|
||||||
|
})
|
||||||
|
export class HashtagComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,11 +1,27 @@
|
|||||||
<div class="stream-column">
|
<div class="stream-column">
|
||||||
<div class="stream-column__stream-header">
|
<div class="stream-overlay">
|
||||||
<a href title="return to top" (click)="goToTop()"><h1>{{ streamElement.name.toUpperCase() }}</h1></a>
|
<div class="stream-overlay__header">
|
||||||
</div>
|
<a href class="overlay-close">CLOSE</a>
|
||||||
<div class="stream-toots flexcroll" #statusstream (scroll)="onScroll()"> <!-- data-simplebar -->
|
<a href class="overlay-previous">PREV</a>
|
||||||
<div class="stream-toots__status" *ngFor="let statusWrapper of statuses">
|
<a href class="overlay-next">NEXT</a>
|
||||||
<app-status [statusWrapper]="statusWrapper" ></app-status>
|
</div>
|
||||||
|
<div class="stream-overlay__title">
|
||||||
|
Account
|
||||||
|
</div>
|
||||||
|
<app-user-profile></app-user-profile>
|
||||||
|
<app-hashtag></app-hashtag>
|
||||||
|
<app-thread></app-thread>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
<div class="stream-column__stream-header">
|
||||||
|
<a href title="return to top" (click)="goToTop()">
|
||||||
|
<h1>{{ streamElement.name.toUpperCase() }}</h1>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="stream-toots flexcroll" #statusstream (scroll)="onScroll()">
|
||||||
|
<!-- data-simplebar -->
|
||||||
|
<div class="stream-toots__status" *ngFor="let statusWrapper of statuses">
|
||||||
|
<app-status [statusWrapper]="statusWrapper"></app-status>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,5 +1,7 @@
|
|||||||
@import "variables";
|
@import "variables";
|
||||||
.stream-column {
|
.stream-column {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
width: $stream-column-width;
|
width: $stream-column-width;
|
||||||
height: calc(100%);
|
height: calc(100%);
|
||||||
background-color: $column-color;
|
background-color: $column-color;
|
||||||
@ -7,7 +9,7 @@
|
|||||||
&__stream-header {
|
&__stream-header {
|
||||||
width: calc(100%);
|
width: calc(100%);
|
||||||
height: 30px;
|
height: 30px;
|
||||||
background-color: black;
|
background-color: $column-header-background-color;
|
||||||
border-bottom: 1px solid black;
|
border-bottom: 1px solid black;
|
||||||
& h1 {
|
& h1 {
|
||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
@ -47,4 +49,57 @@
|
|||||||
background: lighten($color-primary, 5);
|
background: lighten($color-primary, 5);
|
||||||
// -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
|
// -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.stream-overlay {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
z-index: 50;
|
||||||
|
width: $stream-column-width;
|
||||||
|
height: calc(100%);
|
||||||
|
background-color: rgba(#ff0000, 0.3);
|
||||||
|
|
||||||
|
|
||||||
|
// margin: 0 0 0 $stream-column-separator;
|
||||||
|
// outline: 1px red solid;
|
||||||
|
// float: left;
|
||||||
|
&__header {
|
||||||
|
width: calc(100%);
|
||||||
|
height: 30px;
|
||||||
|
background-color: $column-header-background-color;
|
||||||
|
padding: 6px 10px 0 10px;
|
||||||
|
& a {
|
||||||
|
color: whitesmoke;
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
width: calc(100%);
|
||||||
|
height: 30px;
|
||||||
|
background-color: $column-header-background-color;
|
||||||
|
border-top: 1px solid whitesmoke;
|
||||||
|
border-bottom: 1px solid whitesmoke;
|
||||||
|
padding: 3px 10px 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay-previous {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.overlay-next {
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.overlay-close {
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
}
|
}
|
3
src/app/components/stream/thread/thread.component.html
Normal file
3
src/app/components/stream/thread/thread.component.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
thread works!
|
||||||
|
</p>
|
25
src/app/components/stream/thread/thread.component.spec.ts
Normal file
25
src/app/components/stream/thread/thread.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ThreadComponent } from './thread.component';
|
||||||
|
|
||||||
|
describe('ThreadComponent', () => {
|
||||||
|
let component: ThreadComponent;
|
||||||
|
let fixture: ComponentFixture<ThreadComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ThreadComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ThreadComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/components/stream/thread/thread.component.ts
Normal file
15
src/app/components/stream/thread/thread.component.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-thread',
|
||||||
|
templateUrl: './thread.component.html',
|
||||||
|
styleUrls: ['./thread.component.scss']
|
||||||
|
})
|
||||||
|
export class ThreadComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
user-profile works!
|
||||||
|
</p>
|
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { UserProfileComponent } from './user-profile.component';
|
||||||
|
|
||||||
|
describe('UserProfileComponent', () => {
|
||||||
|
let component: UserProfileComponent;
|
||||||
|
let fixture: ComponentFixture<UserProfileComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ UserProfileComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(UserProfileComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-user-profile',
|
||||||
|
templateUrl: './user-profile.component.html',
|
||||||
|
styleUrls: ['./user-profile.component.scss']
|
||||||
|
})
|
||||||
|
export class UserProfileComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -6,7 +6,7 @@ $color-primary: #141824;
|
|||||||
$color-secondary: #090b10;
|
$color-secondary: #090b10;
|
||||||
|
|
||||||
$column-color: #0f111a;
|
$column-color: #0f111a;
|
||||||
|
$column-header-background-color: black;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user