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>
|
||||
</div>
|
||||
|
||||
<div class="logged-in-menu">
|
||||
<a class="menu-link" routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)">
|
||||
<my-global-icon iconName="user" aria-hidden="true"></my-global-icon>
|
||||
<ng-container i18n>My account</ng-container>
|
||||
</a>
|
||||
<ul class="logged-in-menu">
|
||||
<li>
|
||||
<a class="menu-link" routerLink="/my-account" routerLinkActive="active" #settingsLink (click)="onActiveLinkScrollToAnchor(settingsLink)">
|
||||
<my-global-icon iconName="user" aria-hidden="true"></my-global-icon>
|
||||
<ng-container i18n>My account</ng-container>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)">
|
||||
<my-global-icon class="channel-icon" iconName="channel" aria-hidden="true"></my-global-icon>
|
||||
<ng-container i18n>My library</ng-container>
|
||||
</a>
|
||||
<li>
|
||||
<a class="menu-link" routerLink="/my-library" routerLinkActive="active" #libraryLink (click)="onActiveLinkScrollToAnchor(libraryLink)">
|
||||
<my-global-icon class="channel-icon" iconName="channel" aria-hidden="true"></my-global-icon>
|
||||
<ng-container i18n>My library</ng-container>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<a class="menu-link" *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
|
||||
<my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
|
||||
<ng-container i18n>Administration</ng-container>
|
||||
</a>
|
||||
</div>
|
||||
<li>
|
||||
<a class="menu-link" *ngIf="userHasAdminAccess" [routerLink]="getFirstAdminRouteAvailable()" routerLinkActive="active">
|
||||
<my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
|
||||
<ng-container i18n>Administration</ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div *ngIf="!isLoggedIn" class="login-buttons-block">
|
||||
<my-login-link className="peertube-button-link orange-button w-100 text-truncate"></my-login-link>
|
||||
<ul *ngIf="!isLoggedIn" class="login-buttons-block">
|
||||
<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">
|
||||
<my-signup-label [requiresApproval]="requiresApproval"></my-signup-label>
|
||||
</a>
|
||||
</div>
|
||||
<li>
|
||||
<a *ngIf="isRegistrationAllowed()" routerLink="/signup" class="peertube-button-link create-account-button text-truncate">
|
||||
<my-signup-label [requiresApproval]="requiresApproval"></my-signup-label>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ng-container *ngFor="let menuSection of menuSections" >
|
||||
<div [ngClass]="[ menuSection.key, 'menu-block' ]">
|
||||
<div i18n class="block-title">{{ menuSection.title }}</div>
|
||||
<ul [ngClass]="[ menuSection.key, 'menu-block' ]">
|
||||
<li i18n class="block-title">{{ menuSection.title }}</li>
|
||||
|
||||
<a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active">
|
||||
<my-global-icon *ngIf="link.icon" [iconName]="link.icon" [ngClass]="link.iconClass" aria-hidden="true"></my-global-icon>
|
||||
<ng-container>{{ link.shortLabel }}</ng-container>
|
||||
</a>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a class="menu-link" *ngFor="let link of menuSection.links" [routerLink]="link.path" routerLinkActive="active">
|
||||
<my-global-icon *ngIf="link.icon" [iconName]="link.icon" [ngClass]="link.iconClass" aria-hidden="true"></my-global-icon>
|
||||
<ng-container>{{ link.shortLabel }}</ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
|
@ -137,23 +151,44 @@
|
|||
<div class="footer-links">
|
||||
<button *ngIf="isLoggedIn === false" (click)="openLanguageChooser()" class="button-unstyle" i18n>Interface: {{ currentInterfaceLanguage }}</button>
|
||||
|
||||
<div>
|
||||
<a i18n routerLink="/about/instance">Contact</a>
|
||||
<a i18n href="https://joinpeertube.org/help" i18n-title title="Get help using PeerTube" target="_blank" rel="noopener noreferrer">Help</a>
|
||||
<a i18n href="https://joinpeertube.org/faq" i18n-title title="FAQ (Frequently Asked Questions) - about PeerTube" target="_blank" rel="noopener noreferrer">FAQ</a>
|
||||
<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>
|
||||
<button (click)="openHotkeysCheatSheet()" class="button-unstyle" i18n>Keyboard shortcuts</button>
|
||||
</div>
|
||||
<ul class="d-flex flex-wrap">
|
||||
<li>
|
||||
<a i18n routerLink="/about/instance">Contact</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a i18n href="https://joinpeertube.org/help" i18n-title title="Get help using PeerTube" target="_blank" rel="noopener noreferrer">Help</a>
|
||||
</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 class="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>
|
||||
<ul class="d-flex footer-copyleft" i18n-title title="powered by PeerTube - CopyLeft 2015-2023">
|
||||
<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">
|
||||
<span aria-label="copyleft" class="d-inline-block" style="transform: rotateY(180deg)">©</span> 2015-2023
|
||||
</a>
|
||||
</div>
|
||||
<li>
|
||||
<a href="https://github.com/Chocobozzz/PeerTube/blob/develop/LICENSE" target="_blank" rel="noopener noreferrer">
|
||||
<span aria-label="copyleft" class="d-inline-block" style="transform: rotateY(180deg)">©</span> 2015-2023
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
|
@ -6,6 +6,23 @@ $menu-link-icon-size: 22px;
|
|||
$menu-link-icon-margin-right: 18px;
|
||||
$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 {
|
||||
@include disable-default-a-behaviour;
|
||||
@include padding-left($menu-lateral-padding);
|
||||
|
@ -289,11 +306,6 @@ my-actor-avatar {
|
|||
}
|
||||
|
||||
.footer-links {
|
||||
> div {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
a,
|
||||
button {
|
||||
@include margin-right(8px);
|
||||
|
|
Loading…
Reference in a new issue