Skip to content

Commit

Permalink
docs: uwu
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMeche committed May 3, 2024
1 parent 6e1e70d commit adb1462
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 52 deletions.
8 changes: 4 additions & 4 deletions adev/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@defer (when isBrowser) {
<adev-progress-bar />
<adev-progress-bar />
}
<button (click)="focusFirstHeading()" class="adev-skip">Skip to main content</button>

<div class="adev-nav"></div>
@if (displaySecondaryNav()) {
<adev-secondary-navigation />
<adev-secondary-navigation />
}
<div class="docs-app-main-content">
<!--
Expand All @@ -22,9 +22,9 @@
}
}
}
<router-outlet />
<router-outlet />

@if (displayFooter()) {
<footer adev-footer></footer>
<footer adev-footer></footer>
}
</div>
9 changes: 9 additions & 0 deletions adev/src/app/core/layout/navigation/navigation.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
>
<a aria-label="Angular homepage" routerLink="/">
<!-- Logo Symbol -->
@if(!isUwu) {
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 223 236" width="32">
<g clip-path="url(#a)">
<path
Expand Down Expand Up @@ -125,6 +126,14 @@
</clipPath>
</defs>
</svg>
} @else {
<img
src="assets/images/uwu.png"
style="width: auto"
alt="Angular logo"
width="32"
height="57"/>
}
</a>

<!-- Version picker for v18+ -->
Expand Down
5 changes: 4 additions & 1 deletion adev/src/app/core/layout/navigation/navigation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
isApple,
IS_SEARCH_DIALOG_OPEN,
} from '@angular/docs';
import {NavigationEnd, Router, RouterLink} from '@angular/router';
import {ActivatedRoute, NavigationEnd, Router, RouterLink} from '@angular/router';
import {filter, map, startWith} from 'rxjs/operators';
import {DOCS_ROUTES, REFERENCE_ROUTES, TUTORIALS_ROUTES} from '../../../routes';
import {GITHUB, MEDIUM, X, YOUTUBE} from '../../constants/links';
Expand Down Expand Up @@ -83,6 +83,9 @@ export class Navigation implements OnInit {
readonly PRIMARY_NAV_ID = PRIMARY_NAV_ID;
readonly SECONDARY_NAV_ID = SECONDARY_NAV_ID;

// We can't use the ActivatedRouter queryParams as we're outside the router outlet
readonly isUwu = 'location' in globalThis ? location.search.includes('uwu') : false;

miniMenuPositions = [
new ConnectionPositionPair(
{originX: 'end', originY: 'center'},
Expand Down

0 comments on commit adb1462

Please sign in to comment.