-
Notifications
You must be signed in to change notification settings - Fork 9
feat: footer tweaks #476
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
Merged
Merged
feat: footer tweaks #476
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1575066
feat: footer tweaks
dmaduzia a7600f8
refactor: address comment
dmaduzia b963bb9
feat: robustify navigation component
dmaduzia fb8e212
refactor: utilize predefined @screen md query
dmaduzia 2e7a351
feat: turn hoa footer logo into a link
dmaduzia 2755217
chore: add missing translation, update partners list
dmaduzia 5a50366
fix: bring back roadmap
dmaduzia 539ec69
fix: bring back text-center class on vertical menus
dmaduzia 56fa3b6
Chore/a11y improvements b light (#477)
dmaduzia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 26 additions & 7 deletions
33
libs/blog/layouts/ui-layouts/src/lib/footer/footer.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 28 additions & 8 deletions
36
libs/blog/layouts/ui-layouts/src/lib/footer/footer.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,43 @@ | ||
al-footer-logo { | ||
.logo-container { | ||
grid-area: logo; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
al-navigation { | ||
.navigation-component { | ||
grid-area: nav; | ||
} | ||
|
||
.social-media-container { | ||
grid-area: social; | ||
.partners-container { | ||
grid-area: partners; | ||
} | ||
|
||
.al-container { | ||
justify-items: center; | ||
row-gap: 1rem; | ||
grid-template-areas: | ||
'logo social' | ||
'nav nav'; | ||
'logo' | ||
'partners' | ||
'nav'; | ||
|
||
align-items: start; | ||
} | ||
|
||
@media (min-width: 640px) { | ||
.al-container { | ||
justify-items: stretch; | ||
grid-template-areas: | ||
'logo partners' | ||
'nav nav'; | ||
} | ||
|
||
.logo-container { | ||
justify-self: center; | ||
} | ||
} | ||
|
||
@screen lg { | ||
@screen xl { | ||
.al-container { | ||
grid-template-areas: 'logo nav social'; | ||
grid-template-areas: 'logo nav partners'; | ||
} | ||
} |
85 changes: 83 additions & 2 deletions
85
libs/blog/layouts/ui-layouts/src/lib/footer/footer.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,102 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { BreakpointObserver } from '@angular/cdk/layout'; | ||
import { NgOptimizedImage } from '@angular/common'; | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
computed, | ||
inject, | ||
input, | ||
} from '@angular/core'; | ||
import { toSignal } from '@angular/core/rxjs-interop'; | ||
import { TranslocoDirective } from '@jsverse/transloco'; | ||
import { map } from 'rxjs'; | ||
|
||
import { NavigationComponent } from '@angular-love/blog/layouts/ui-navigation'; | ||
import { | ||
NavigationComponent, | ||
NavItem, | ||
} from '@angular-love/blog/layouts/ui-navigation'; | ||
import { PartnersComponent } from '@angular-love/blog/partners/ui-partners'; | ||
|
||
import { FooterLogoComponent } from './components/footer-logo.component'; | ||
import { FooterSocialMediaIconsComponent } from './components/footer-social-media-icons.component'; | ||
import { hoaHireUs, partnersList } from './partners'; | ||
|
||
@Component({ | ||
selector: 'al-footer', | ||
imports: [ | ||
NavigationComponent, | ||
FooterLogoComponent, | ||
FooterSocialMediaIconsComponent, | ||
PartnersComponent, | ||
NgOptimizedImage, | ||
TranslocoDirective, | ||
], | ||
templateUrl: './footer.component.html', | ||
styleUrl: './footer.component.scss', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class FooterComponent { | ||
readonly theme = input.required<'light' | 'dark'>(); | ||
readonly hoaLogoSrc = computed(() => | ||
this.theme() === 'dark' | ||
? 'assets/HOA_logo_white.png' | ||
: 'assets/HOA_logo_blue.png', | ||
); | ||
|
||
currentYear = new Date().getFullYear(); | ||
readonly partnersList = partnersList; | ||
readonly hoaHireUs = hoaHireUs; | ||
|
||
private readonly _breakpointObserver = inject(BreakpointObserver); | ||
|
||
readonly isXlScreen = toSignal( | ||
this._breakpointObserver | ||
.observe('(min-width: 1280px)') | ||
.pipe(map(({ matches }) => matches)), | ||
); | ||
|
||
readonly navItems: NavItem[] = [ | ||
{ | ||
translationPath: 'nav.guides', | ||
link: ['guides'], | ||
dataTestId: 'navigation-guides', | ||
}, | ||
{ | ||
translationPath: 'nav.about', | ||
link: ['about'], | ||
dataTestId: 'navigation-about', | ||
}, | ||
{ | ||
translationPath: 'nav.news', | ||
link: ['news'], | ||
dataTestId: 'navigation-news', | ||
}, | ||
{ | ||
translationPath: 'nav.become_author', | ||
link: ['become-author'], | ||
dataTestId: 'navigation-become-author', | ||
}, | ||
{ | ||
translationPath: 'nav.meetups', | ||
link: ['https://meetup.angular.love/'], | ||
externalLink: true, | ||
dataTestId: 'navigation-meetups', | ||
}, | ||
{ | ||
translationPath: 'nav.newsletter', | ||
link: ['newsletter'], | ||
dataTestId: 'navigation-newsletter', | ||
}, | ||
{ | ||
translationPath: 'nav.in_depth', | ||
link: ['angular-in-depth'], | ||
dataTestId: 'navigation-in-depth', | ||
}, | ||
{ | ||
translationPath: 'nav.partnership', | ||
link: ['mailto:[email protected]'], | ||
externalLink: true, | ||
dataTestId: 'navigation-partnership', | ||
}, | ||
]; | ||
} |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,6 +12,7 @@ import { FastSvgComponent } from '@push-based/ngx-fast-svg'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LanguagePickerComponent, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NavigationComponent, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NavItem, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
} from '@angular-love/blog/layouts/ui-navigation'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -33,7 +34,7 @@ import { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<al-header-logo /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<al-navigation class="hidden lg:block" [showNewsletter]="false" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<al-navigation class="hidden lg:block" [navItems]="navItems" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<div class="flex flex-row items-center"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<al-language-picker | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -84,6 +85,25 @@ import { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
export class HeaderComponent { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
readonly navItems: NavItem[] = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
translationPath: 'nav.guides', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
link: ['guides'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dataTestId: 'navigation-guides', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
translationPath: 'nav.news', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
link: ['news'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dataTestId: 'navigation-news', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
translationPath: 'nav.meetups', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
link: ['https://meetup.angular.love/'], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
externalLink: true, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dataTestId: 'navigation-meetups', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
86
to
88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same navigation items array is duplicated in both HeaderComponent and HeaderMobileMenuComponent. Consider extracting this to a shared constant or service to avoid duplication.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
readonly language = input.required<string>(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
readonly theme = input.required<'light' | 'dark'>(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
layout
property is being passed to the navigation component but this property was removed in the refactored NavigationComponent. This will cause a template error.Copilot uses AI. Check for mistakes.