This commit is contained in:
12
src/app/pages/BoardThreads/op/op.component.css
Normal file
12
src/app/pages/BoardThreads/op/op.component.css
Normal file
@@ -0,0 +1,12 @@
|
||||
.op {
|
||||
border-width: 1px;
|
||||
border-color: rgb(190,190,190);
|
||||
border-style: solid;
|
||||
background-color: #F0D0B6;
|
||||
border-radius: 5px;
|
||||
padding:20px;
|
||||
width: 500px;
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
margin-top: 6px;
|
||||
}
|
10
src/app/pages/BoardThreads/op/op.component.html
Normal file
10
src/app/pages/BoardThreads/op/op.component.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="op">
|
||||
<a [routerLink] ="['/board']" [queryParams]="{thread: op.Thread_Id}" >Зайти в тред{{op.Thread_Id}} </a>
|
||||
<p> # {{op.Id}} {{op.Timestamp}}</p>
|
||||
<div>
|
||||
<a *ngFor="let i of op.ImgURL" [href]="i" target="_blank">
|
||||
<img [src]="i" style="height:140px">
|
||||
</a>
|
||||
</div>
|
||||
<p>{{op.Text}}</p>
|
||||
</div>
|
23
src/app/pages/BoardThreads/op/op.component.spec.ts
Normal file
23
src/app/pages/BoardThreads/op/op.component.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { OPComponent } from './op.component';
|
||||
|
||||
describe('OPComponent', () => {
|
||||
let component: OPComponent;
|
||||
let fixture: ComponentFixture<OPComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ OPComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(OPComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
18
src/app/pages/BoardThreads/op/op.component.ts
Normal file
18
src/app/pages/BoardThreads/op/op.component.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import { SinglePost } from '../../../models/post';
|
||||
|
||||
@Component({
|
||||
selector: 'op-single',
|
||||
templateUrl: './op.component.html',
|
||||
styleUrls: ['./op.component.css']
|
||||
})
|
||||
export class OPComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
@Input() op: SinglePost
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user