Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing Footer #15

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions postrify-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion postrify-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postrify-frontend",
"version": "0.0.0",
"version": "0.0.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
28 changes: 22 additions & 6 deletions postrify-frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,36 @@ import { RouterOutlet } from '@angular/router';
import { ApiService } from './services/api.service';
import { HeaderComponent } from './header/header.component';
import { ToastComponent } from './toast/toast.component';
import { FooterComponent } from './footer/footer.component';

@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, HeaderComponent, ToastComponent],
imports: [RouterOutlet, HeaderComponent, ToastComponent, FooterComponent],
template: `
<app-header></app-header>
<router-outlet></router-outlet>
<app-toast></app-toast>
<div class="app-container">
<app-header></app-header>
<main class="content">
<router-outlet></router-outlet>
<app-toast></app-toast>
</main>
<app-footer></app-footer>
</div>
`,
styles: [
`
:host {
display: block;
.app-container {
display: flex;
flex-direction: column;
min-height: 100vh;
}

.content {
flex: 1;
}

app-footer {
margin-top: auto;
}
`,
],
Expand Down
22 changes: 22 additions & 0 deletions postrify-frontend/src/app/footer/footer.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { FooterComponent } from './footer.component';

describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [FooterComponent],
}).compileComponents();

fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
171 changes: 171 additions & 0 deletions postrify-frontend/src/app/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
import { Component } from '@angular/core';
import packageJson from '../../../package.json';

@Component({
selector: 'app-footer',
standalone: true,
template: `
<footer class="footer">
<div class="version-date">
<span>Version: {{ version }}</span> -
<span>{{ currentDate }}</span>
</div>
<div class="social-icons">
<a href="mailto:[email protected]" aria-label="Email">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-mail"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"
/>
<path d="M3 7l9 6l9 -6" />
</svg>
</a>
<a
href="https://github.com/jorbush/postrify"
target="_blank"
aria-label="Repository"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-album"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"
/>
<path d="M12 4v7l2 -2l2 2v-7" />
</svg>
</a>
<a
href="https://github.com/jorbush"
target="_blank"
aria-label="GitHub"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-brand-github"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"
/>
</svg>
</a>
<a
href="https://www.linkedin.com/in/jordi-bonet-valiente-69140418b/"
target="_blank"
aria-label="LinkedIn"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-brand-linkedin"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"
/>
<path d="M8 11l0 5" />
<path d="M8 8l0 .01" />
<path d="M12 16l0 -5" />
<path d="M16 16v-3a2 2 0 0 0 -4 0" />
</svg>
</a>
<a
href="https://jorbush-software.com/"
target="_blank"
aria-label="Portfolio"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
class="icon icon-tabler icons-tabler-outline icon-tabler-folder"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2"
/>
</svg>
</a>
</div>
</footer>
`,
styles: [
`
.footer {
text-align: center;
padding: 1rem;
background-color: var(--footer-bg);
color: var(--footer-text);
}

.version-date {
margin-bottom: 0.5rem;
font-size: 0.875rem;
}

.social-icons {
display: flex;
justify-content: center;
gap: 1rem;
}

.social-icons svg {
width: 24px;
height: 24px;
transition: transform 0.3s ease;
stroke: var(--footer-text);
}

.social-icons svg:hover {
transform: scale(1.2);
stroke: var(--primary-color-hover);
}
`,
],
})
export class FooterComponent {
version: string = packageJson.version;
currentDate: string = new Date().toLocaleDateString();
}
4 changes: 4 additions & 0 deletions postrify-frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
--disabled-color: #6c757d;
--error-color: #dc3545;
--text-color: #333333;
--footer-bg: #f0f0f0;
--footer-text: #333333;
}

@font-face {
Expand Down Expand Up @@ -69,4 +71,6 @@ body.dark-mode {
--disabled-color: #6c757d;
--error-color: #f06565;
--text-color: #ffffff;
--footer-bg: #1a1a1a;
--footer-text: #ffffff;
}
Loading