Skip to content

Commit 9822016

Browse files
committed
Add frontend mock-up.
1 parent c0f8e17 commit 9822016

23 files changed

+835
-614
lines changed

package-lock.json

Lines changed: 536 additions & 274 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@
3030
"@angular/compiler-cli": "^18.2.0",
3131
"@types/chrome": "^0.0.280",
3232
"@types/jasmine": "~5.1.0",
33+
"autoprefixer": "^10.4.20",
3334
"jasmine-core": "~5.2.0",
3435
"karma": "~6.4.0",
3536
"karma-chrome-launcher": "~3.2.0",
3637
"karma-coverage": "~2.2.0",
3738
"karma-jasmine": "~5.1.0",
3839
"karma-jasmine-html-reporter": "~2.1.0",
40+
"postcss": "^8.4.47",
41+
"tailwindcss": "^3.4.14",
3942
"typescript": "~5.5.2"
4043
}
4144
}

public/favicon.ico

-14.7 KB
Binary file not shown.

src/app/app.component.html

Lines changed: 3 additions & 334 deletions
Large diffs are not rendered by default.

src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Component } from '@angular/core';
2-
import { RouterOutlet } from '@angular/router';
2+
import { RouterOutlet, RouterLink, RouterLinkActive } from '@angular/router';
33

44
@Component({
55
selector: 'app-root',
66
standalone: true,
7-
imports: [RouterOutlet],
7+
imports: [RouterOutlet, RouterLink, RouterLinkActive],
88
templateUrl: './app.component.html',
99
styleUrl: './app.component.css'
1010
})

src/app/app.routes.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
import { Routes } from '@angular/router';
22

3-
export const routes: Routes = [];
3+
import { HomeComponent } from './home/home.component';
4+
import { SettingsComponent } from './settings/settings.component';
5+
6+
export const routes: Routes = [
7+
{ path: '', title: 'Home', component: HomeComponent},
8+
{ path: 'settings', title: 'Settings', component: SettingsComponent },
9+
{ path: '', redirectTo: '/home', pathMatch: 'full' }
10+
];

src/app/home/home.component.css

Whitespace-only changes.

src/app/home/home.component.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<div class="h-full flex flex-col">
2+
<div class="w-full h-10 p-1 px-2 space-x-2 bg-cyan-500 flex flex-row">
3+
<div>
4+
<img src="icon128.png" class="h-full">
5+
</div>
6+
<div class="relative grow">
7+
<input class="w-full h-full pr-4 pl-8 bg-cyan-600 font-sans text-lg placeholder:text-cyan-400 text-white rounded-md transition duration-300 ease focus:outline-none focus:border-slate-400 hover:border-slate-300 shadow-sm focus:shadow" placeholder="Search browsing history">
8+
<div class="absolute left-0 top-0 rounded bg-transparent p-1.5 text-center text-cyan-400 transition-all shadow-sm hover:shadow focus:shadow-none active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none">
9+
<!-- https://cdn.jsdelivr.net/npm/[email protected]/24/outline/magnifying-glass.svg -->
10+
<svg viewBox="0 0 16 16" class="w-5 h-5 fill-current stroke-current stroke-0">
11+
<path fill-rule="evenodd" d="M9.965 11.026a5 5 0 1 1 1.06-1.06l2.755 2.754a.75.75 0 1 1-1.06 1.06l-2.755-2.754ZM10.5 7a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z" clip-rule="evenodd" />
12+
</svg>
13+
</div>
14+
</div>
15+
<div>
16+
<a routerLink="settings" routerLinkActive="active" ariaCurrentWhenActive="page">
17+
<!-- https://cdn.jsdelivr.net/npm/[email protected]/24/outline/cog-6-tooth.svg -->
18+
<svg viewBox="0 0 24 24" class="h-full py-0.5 fill-none stroke-current text-white stroke-1">
19+
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
20+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
21+
</svg>
22+
</a>
23+
</div>
24+
</div>
25+
<div class="w-full justify-items-center bg-slate-100 grow">
26+
<app-results></app-results>
27+
</div>
28+
</div>
29+
<!-- <div class="flex m-2">
30+
<div class="w-1/3 bg-blue-500 p-5 flex flex-col">
31+
<div class="text-white flex-1">
32+
Some text
33+
</div>
34+
<button class="bg-white rounded-full mt-5 px-5 py-2">Action Button</button>
35+
</div>
36+
<div class="w-1/3 bg-amber-500 p-5 flex flex-col">
37+
<div class="text-white flex-1">
38+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ut nibh et dolor vestibulum commodo eu in
39+
nulla. Etiam molestie diam at mollis mollis
40+
</div>
41+
<button class="bg-white rounded-full mt-5 px-5 py-2">Action Button</button>
42+
</div>
43+
<div class="w-1/3 bg-green-500 p-5 flex flex-col">
44+
<div class="text-white flex-1">
45+
Sed eget tortor ullamcorper, mollis nibh ut, pretium augue.
46+
</div>
47+
<button class="bg-white rounded-full mt-5 px-5 py-2">Action Button</button>
48+
</div>
49+
<div class="w-1/4 bg-cyan-500 p-5 flex flex-col">
50+
<div class="text-white flex-1">
51+
Short text
52+
</div>
53+
<button class="bg-white rounded-full mt-5 px-5 py-2">Action Button</button>
54+
</div>
55+
56+
</div> -->

src/app/home/home.component.spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { HomeComponent } from './home.component';
4+
5+
describe('HomeComponent', () => {
6+
let component: HomeComponent;
7+
let fixture: ComponentFixture<HomeComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [HomeComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(HomeComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});

src/app/home/home.component.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Component } from '@angular/core';
2+
import { RouterOutlet, RouterLink } from '@angular/router';
3+
import { ResultsComponent } from '../results/results.component';
4+
5+
@Component({
6+
selector: 'app-home',
7+
standalone: true,
8+
imports: [RouterOutlet, RouterLink, ResultsComponent],
9+
templateUrl: './home.component.html',
10+
styleUrl: './home.component.css'
11+
})
12+
export class HomeComponent {
13+
14+
}

0 commit comments

Comments
 (0)