Skip to content
Snippets Groups Projects
Commit 791c859e authored by Jonny Ngo Luong's avatar Jonny Ngo Luong
Browse files

feat: added navbar and a minimal styling of components

parent 404290ae
No related branches found
No related tags found
1 merge request!7Resolve "Frontend: Vise annonser"
<h1>SellPoint</h1>
<div class="navbar">
<a class="logo" href="/">SELLPOINT</a>
<nav>
<a href="/">/</a>
<a href="/annonse">/annonse</a>
<a href="/annonse/ny">/annonse/ny</a>
</nav>
</div>
<router-outlet></router-outlet>
\ No newline at end of file
<div class="wrapper">
<router-outlet></router-outlet>
</div>
div.navbar {
background-color: #666;
display: flex;
justify-content: space-between;
align-items: center;
height: 70px;
a.logo {
padding: 10px;
background-color: white;
width: 200px;
margin-left: 10px;
}
nav {
a{
padding: 10px;
margin: 10px;
background-color: white;
}
}
}
div.wrapper {
padding: 10px;
}
<h3>{{post.getTitle}}</h3>
<h3>Tittel: {{post.getTitle}}</h3>
<img [src]="post.getImageUrl">
<p>{{post.getDescription}}</p>
<p>Beskrivelse: {{post.getDescription}}</p>
<br>
<p>Publiseringstidspunkt: {{post.getTimestamp}}</p>
<p>Eier: {{post.getOwner}}</p>
\ No newline at end of file
<p>Eier: {{post.getOwner}}</p>
<h3>Lag annonse</h3>
<div class="postform">
<h3>Lag annonse</h3>
<app-text-input [(inputModel)]="title" label="Tittel" (blur)="checkForm()"></app-text-input>
<app-text-input [(inputModel)]="title" label="Tittel" (blur)="checkForm()"></app-text-input>
<app-text-input [(inputModel)]="description" label="Beskrivelse" (blur)="checkForm()"></app-text-input>
<app-text-input [(inputModel)]="description" label="Beskrivelse" (blur)="checkForm()"></app-text-input>
<app-number-input [(inputModel)]="price" label="Pris" (blur)="checkForm()"></app-number-input>
<app-number-input [(inputModel)]="price" label="Pris" (blur)="checkForm()"></app-number-input>
<app-select [(inputModel)]="categoryid" (change)="checkForm()" label="Kategori">
<option value="0" selected hidden>Velg kategori</option>
<option *ngFor="let category of categories" [value]="category.getCategoryId">{{category.getName}}</option>
</app-select>
<app-select [(inputModel)]="categoryid" (change)="checkForm()" label="Kategori">
<option value="0" selected hidden>Velg kategori</option>
<option *ngFor="let category of categories" [value]="category.getCategoryId">{{category.getName}}</option>
</app-select>
<app-text-input [(inputModel)]="imageUrl" label="Bilde URL" (blur)="showImage(imageUrl)"></app-text-input>
<img [src]="displayImageUrl" (error)="showImage('https://i.stack.imgur.com/y9DpT.jpg')">
<app-text-input [(inputModel)]="imageUrl" label="Bilde URL" (blur)="showImage(imageUrl)"></app-text-input>
<img [src]="displayImageUrl" (error)="showImage('https://i.stack.imgur.com/y9DpT.jpg')">
<p>{{statusMessage}}</p>
<p>{{statusMessage}}</p>
<app-button (click)="publishPost()" text="Publiser"></app-button>
<app-button (click)="publishPost()" text="Publiser"></app-button>
</div>
div.postform {
display: flex;
flex-direction: column;
}
<p (click)="goToPost()">{{post.getTitle}}</p>
<div class="postthumb">
<a href="javascript:void(0)"(click)="goToPost()">{{post.getTitle}}</a>
</div>
div.postthumb {
padding: 10px;
margin: 10px;
background-color: rgba(0,0,0,.1);
}
/* You can add global styles to this file, and also import other style files */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment