Use lists for the left menu
This commit is contained in:
parent
dcf5075ae4
commit
04bc2e2dbe
2 changed files with 93 additions and 46 deletions
|
@ -81,41 +81,55 @@
|
||||||
<my-notification (navigate)="onActiveLinkScrollToAnchor($event)"></my-notification>
|
<my-notification (navigate)="onActiveLinkScrollToAnchor($event)"></my-notification>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="logged-in-menu">
|
<ul class="logged-in-menu">
|
||||||
<a class="menu-link" routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)">
|
<li>
|
||||||
<my-global-icon iconName="user" aria-hidden="true"></my-global-icon>
|
<a class="menu-link" routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)">
|
||||||
<ng-container i18n>My account</ng-container>
|
<my-global-icon iconName="user" aria-hidden="true"></my-global-icon>
|
||||||
</a>
|
<ng-container i18n>My account</ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)">
|
<li>
|
||||||
<my-global-icon class="channel-icon" iconName="channel" aria-hidden="true"></my-global-icon>
|
<a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)">
|
||||||
<ng-container i18n>My library</ng-container>
|
<my-global-icon class="channel-icon" iconName="channel" aria-hidden="true"></my-global-icon>
|
||||||
</a>
|
<ng-container i18n>My library</ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<a class="menu-link" *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
|
<li>
|
||||||
<my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
|
<a class="menu-link" *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
|
||||||
<ng-container i18n>Administration</ng-container>
|
<my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
|
||||||
</a>
|
<ng-container i18n>Administration</ng-container>
|
||||||
</div>
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!isLoggedIn" class="login-buttons-block">
|
<ul *ngIf="!isLoggedIn" class="login-buttons-block">
|
||||||
<my-login-link className="peertube-button-link orange-button w-100 text-truncate"></my-login-link>
|
<li>
|
||||||
|
<my-login-link className="peertube-button-link orange-button w-100 text-truncate"></my-login-link>
|
||||||
|
</li>
|
||||||
|
|
||||||
<a *ngIf="isRegistrationAllowed()" routerLink="/signup" class="peertube-button-link create-account-button text-truncate">
|
<li>
|
||||||
<my-signup-label [requiresApproval]="requiresApproval"></my-signup-label>
|
<a *ngIf="isRegistrationAllowed()" routerLink="/signup" class="peertube-button-link create-account-button text-truncate">
|
||||||
</a>
|
<my-signup-label [requiresApproval]="requiresApproval"></my-signup-label>
|
||||||
</div>
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<ng-container *ngFor="let menuSection of menuSections" >
|
<ng-container *ngFor="let menuSection of menuSections" >
|
||||||
<div [ngClass]="[ menuSection.key, 'menu-block' ]">
|
<ul [ngClass]="[ menuSection.key, 'menu-block' ]">
|
||||||
<div i18n class="block-title">{{ menuSection.title }}</div>
|
<li i18n class="block-title">{{ menuSection.title }}</li>
|
||||||
|
|
||||||
<a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active">
|
<ul>
|
||||||
<my-global-icon *ngIf="link.icon" [iconName]="link.icon" [ngClass]="link.iconClass" aria-hidden="true"></my-global-icon>
|
<li>
|
||||||
<ng-container>{{ link.shortLabel }}</ng-container>
|
<a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active">
|
||||||
</a>
|
<my-global-icon *ngIf="link.icon" [iconName]="link.icon" [ngClass]="link.iconClass" aria-hidden="true"></my-global-icon>
|
||||||
</div>
|
<ng-container>{{ link.shortLabel }}</ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -137,23 +151,44 @@
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<button *ngIf="isLoggedIn === false" (click)="openLanguageChooser()" class="button-unstyle" i18n>Interface: {{ currentInterfaceLanguage }}</button>
|
<button *ngIf="isLoggedIn === false" (click)="openLanguageChooser()" class="button-unstyle" i18n>Interface: {{ currentInterfaceLanguage }}</button>
|
||||||
|
|
||||||
<div>
|
<ul class="d-flex flex-wrap">
|
||||||
<a i18n routerLink="/about/instance">Contact</a>
|
<li>
|
||||||
<a i18n href="https://joinpeertube.org/help" i18n-title title="Get help using PeerTube" target="_blank" rel="noopener noreferrer">Help</a>
|
<a i18n routerLink="/about/instance">Contact</a>
|
||||||
<a i18n href="https://joinpeertube.org/faq" i18n-title title="FAQ (Frequently Asked Questions) - about PeerTube" target="_blank" rel="noopener noreferrer">FAQ</a>
|
</li>
|
||||||
<a i18n routerLink="/about/instance" fragment="statistics">Stats</a>
|
|
||||||
<a i18n href="https://docs.joinpeertube.org/api-rest-reference.html" i18n-title title="API documentation" target="_blank" rel="noopener noreferrer">API</a>
|
<li>
|
||||||
<button (click)="openHotkeysCheatSheet()" class="button-unstyle" i18n>Keyboard shortcuts</button>
|
<a i18n href="https://joinpeertube.org/help" i18n-title title="Get help using PeerTube" target="_blank" rel="noopener noreferrer">Help</a>
|
||||||
</div>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a i18n href="https://joinpeertube.org/faq" i18n-title title="FAQ (Frequently Asked Questions) - about PeerTube" target="_blank" rel="noopener noreferrer">FAQ</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a i18n routerLink="/about/instance" fragment="statistics">Stats</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a i18n href="https://docs.joinpeertube.org/api-rest-reference.html" i18n-title title="API documentation" target="_blank" rel="noopener noreferrer">API</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<button (click)="openHotkeysCheatSheet()" class="button-unstyle" i18n>Keyboard shortcuts</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer-copyleft" i18n-title title="powered by PeerTube - CopyLeft 2015-2023">
|
<ul class="d-flex footer-copyleft" i18n-title title="powered by PeerTube - CopyLeft 2015-2023">
|
||||||
<a href="https://joinpeertube.org" class="me-1" target="_blank" rel="noopener noreferrer" i18n>powered by PeerTube</a>
|
<li>
|
||||||
|
<a href="https://joinpeertube.org" class="me-1" target="_blank" rel="noopener noreferrer" i18n>powered by PeerTube</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" target="_blank" rel="noopener noreferrer">
|
<li>
|
||||||
<span aria-label="copyleft" class="d-inline-block" style="transform: rotateY(180deg)">©</span> 2015-2023
|
<a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" target="_blank" rel="noopener noreferrer">
|
||||||
</a>
|
<span aria-label="copyleft" class="d-inline-block" style="transform: rotateY(180deg)">©</span> 2015-2023
|
||||||
</div>
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -6,6 +6,23 @@ $menu-link-icon-size: 22px;
|
||||||
$menu-link-icon-margin-right: 18px;
|
$menu-link-icon-margin-right: 18px;
|
||||||
$footer-links-base-opacity: .8;
|
$footer-links-base-opacity: .8;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
list-style: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-bottom {
|
||||||
|
li {
|
||||||
|
width: auto;
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.menu-link {
|
.menu-link {
|
||||||
@include disable-default-a-behaviour;
|
@include disable-default-a-behaviour;
|
||||||
@include padding-left($menu-lateral-padding);
|
@include padding-left($menu-lateral-padding);
|
||||||
|
@ -289,11 +306,6 @@ my-actor-avatar {
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-links {
|
.footer-links {
|
||||||
> div {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
a,
|
a,
|
||||||
button {
|
button {
|
||||||
@include margin-right(8px);
|
@include margin-right(8px);
|
||||||
|
|
Loading…
Reference in a new issue