diff options
author | Kim <1877318+kimsible@users.noreply.github.com> | 2020-07-23 15:09:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 15:09:15 +0200 |
commit | ed5bb517266c80904c44bf44a335f1003f5aa277 (patch) | |
tree | 80671a21fb8c13ab47a65f01b64222a3a1e96a47 /client/src/app/+my-account | |
parent | 345b4a22a8432cfd8c9c9f24634821d58c215b9a (diff) | |
download | PeerTube-ed5bb517266c80904c44bf44a335f1003f5aa277.tar.gz PeerTube-ed5bb517266c80904c44bf44a335f1003f5aa277.tar.zst PeerTube-ed5bb517266c80904c44bf44a335f1003f5aa277.zip |
Improve navigation sub-menu and tabs effects (#2971)
* Improve nav border and colors on active and non-active
* Remove margin-top effect on active nav
* Use opacity / bold instead of color change on nav
* Remove dropdown items label in sub-menu and add a class active
* Position sub-menu to fixed
* Autoclose dropdown sub-menu only on outside click
* Remove open dropdown on hover in sub-menu
* Show reusable h1 for dropdown item in sub-menu
* Put reusable sub-menu h1 styles to mixins
* Add icons to sub-menu dropdown-item h1
* Make all the sub-menu accessible with focus
Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Diffstat (limited to 'client/src/app/+my-account')
10 files changed, 41 insertions, 21 deletions
diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.html b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.html index b2e8210d3..e8d44a45e 100644 --- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.html +++ b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channels.component.html | |||
@@ -1,4 +1,8 @@ | |||
1 | <h1 class="sr-only" i18n>My channels</h1> | 1 | <h1> |
2 | <my-global-icon iconName="channel" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>My channels</ng-container> | ||
4 | </h1> | ||
5 | |||
2 | <div class="video-channels-header"> | 6 | <div class="video-channels-header"> |
3 | <a class="create-button" routerLink="create"> | 7 | <a class="create-button" routerLink="create"> |
4 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> | 8 | <my-global-icon iconName="add" aria-hidden="true"></my-global-icon> |
diff --git a/client/src/app/+my-account/my-account-history/my-account-history.component.html b/client/src/app/+my-account/my-account-history/my-account-history.component.html index cfa5ca636..cff46a41d 100644 --- a/client/src/app/+my-account/my-account-history/my-account-history.component.html +++ b/client/src/app/+my-account/my-account-history/my-account-history.component.html | |||
@@ -1,4 +1,8 @@ | |||
1 | <h1 class="sr-only" i18n>History</h1> | 1 | <h1> |
2 | <my-global-icon iconName="history" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>My history</ng-container> | ||
4 | </h1> | ||
5 | |||
2 | <div class="top-buttons"> | 6 | <div class="top-buttons"> |
3 | <div class="history-switch"> | 7 | <div class="history-switch"> |
4 | <p-inputSwitch [(ngModel)]="videosHistoryEnabled" (ngModelChange)="onVideosHistoryChange()"></p-inputSwitch> | 8 | <p-inputSwitch [(ngModel)]="videosHistoryEnabled" (ngModelChange)="onVideosHistoryChange()"></p-inputSwitch> |
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html index 090ec7b44..be5d41f3b 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html +++ b/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html | |||
@@ -1,4 +1,8 @@ | |||
1 | <h1 class="sr-only" i18n>Ownership changes</h1> | 1 | <h1> |
2 | <my-global-icon iconName="download" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>My ownership changes</ng-container> | ||
4 | </h1> | ||
5 | |||
2 | <p-table | 6 | <p-table |
3 | [value]="videoChangeOwnerships" | 7 | [value]="videoChangeOwnerships" |
4 | [lazy]="true" | 8 | [lazy]="true" |
diff --git a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html index ce41360bf..3b4c3022e 100644 --- a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html +++ b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html | |||
@@ -1,4 +1,8 @@ | |||
1 | <h1 class="sr-only" i18n>Subscriptions</h1> | 1 | <h1> |
2 | <my-global-icon iconName="subscriptions" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>My subscriptions</ng-container> | ||
4 | </h1> | ||
5 | |||
2 | <div class="no-results" i18n *ngIf="pagination.totalItems === 0">You don't have any subscriptions yet.</div> | 6 | <div class="no-results" i18n *ngIf="pagination.totalItems === 0">You don't have any subscriptions yet.</div> |
3 | 7 | ||
4 | <div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> | 8 | <div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> |
diff --git a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html index 4caa076a3..98a2039cc 100644 --- a/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html +++ b/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html | |||
@@ -1,4 +1,8 @@ | |||
1 | <h1 class="sr-only" i18n>Imports</h1> | 1 | <h1> |
2 | <my-global-icon iconName="cloud-download" aria-hidden="true"></my-global-icon> | ||
3 | <ng-container i18n>My imports</ng-container> | ||
4 | </h1> | ||
5 | |||
2 | <p-table | 6 | <p-table |
3 | [value]="videoImports" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" | 7 | [value]="videoImports" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions" |
4 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" | 8 | [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" |
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html index 1ba2c35ef..8d69c3a5a 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.html | |||
@@ -1,6 +1,10 @@ | |||
1 | <div class="video-playlists-header"> | 1 | <h1> |
2 | <h1 i18n>Playlists <span class="badge badge-secondary">{{ pagination.totalItems }}</span></h1> | 2 | <my-global-icon iconName="playlists" aria-hidden="true"></my-global-icon> |
3 | <ng-container i18n>My playlists</ng-container> <span class="badge badge-secondary">{{ pagination.totalItems }}</span> | ||
4 | </h1> | ||
5 | |||
3 | 6 | ||
7 | <div class="video-playlists-header"> | ||
4 | <input type="text" placeholder="Search your playlists" i18n-placeholder [(ngModel)]="videoPlaylistsSearch" (ngModelChange)="onVideoPlaylistSearchChanged()" /> | 8 | <input type="text" placeholder="Search your playlists" i18n-placeholder [(ngModel)]="videoPlaylistsSearch" (ngModelChange)="onVideoPlaylistSearchChanged()" /> |
5 | 9 | ||
6 | <a class="create-button" routerLink="create"> | 10 | <a class="create-button" routerLink="create"> |
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss index 41e7851fd..4381d74b0 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlists.component.scss | |||
@@ -41,10 +41,6 @@ | |||
41 | input[type=text] { | 41 | input[type=text] { |
42 | @include peertube-input-text(300px); | 42 | @include peertube-input-text(300px); |
43 | } | 43 | } |
44 | |||
45 | h1 { | ||
46 | font-size: 1.5rem; | ||
47 | } | ||
48 | } | 44 | } |
49 | 45 | ||
50 | @media screen and (max-width: $small-view) { | 46 | @media screen and (max-width: $small-view) { |
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html index cb149b607..6d098b507 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html | |||
@@ -1,9 +1,10 @@ | |||
1 | <div class="videos-header"> | 1 | <h1> |
2 | <h1 i18n>Videos <span class="badge badge-secondary">{{ pagination.totalItems }}</span></h1> | 2 | <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon> |
3 | <ng-container i18n>My videos</ng-container><span class="badge badge-secondary"> {{ pagination.totalItems }}</span> | ||
4 | </h1> | ||
3 | 5 | ||
6 | <div class="videos-header"> | ||
4 | <input type="text" placeholder="Search your videos" i18n-placeholder [(ngModel)]="videosSearch" (ngModelChange)="onVideosSearchChanged()" /> | 7 | <input type="text" placeholder="Search your videos" i18n-placeholder [(ngModel)]="videosSearch" (ngModelChange)="onVideosSearchChanged()" /> |
5 | |||
6 | <div class="fake-element"></div> | ||
7 | </div> | 8 | </div> |
8 | 9 | ||
9 | <my-videos-selection | 10 | <my-videos-selection |
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss index 18c1ae288..9225fc5fd 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss | |||
@@ -6,12 +6,6 @@ | |||
6 | justify-content: space-between; | 6 | justify-content: space-between; |
7 | margin: 20px 0 50px; | 7 | margin: 20px 0 50px; |
8 | 8 | ||
9 | h1, | ||
10 | .fake-element { | ||
11 | flex: 1; | ||
12 | font-size: 1.5rem; | ||
13 | } | ||
14 | |||
15 | input[type=text] { | 9 | input[type=text] { |
16 | @include peertube-input-text(300px); | 10 | @include peertube-input-text(300px); |
17 | } | 11 | } |
diff --git a/client/src/app/+my-account/my-account.component.scss b/client/src/app/+my-account/my-account.component.scss index fd47aec86..a5bb499b4 100644 --- a/client/src/app/+my-account/my-account.component.scss +++ b/client/src/app/+my-account/my-account.component.scss | |||
@@ -1,3 +1,6 @@ | |||
1 | @import '_variables'; | ||
2 | @import '_mixins'; | ||
3 | |||
1 | .row { | 4 | .row { |
2 | flex-direction: column; | 5 | flex-direction: column; |
3 | width: 100%; | 6 | width: 100%; |
@@ -5,4 +8,6 @@ | |||
5 | & > my-top-menu-dropdown:nth-child(1) { | 8 | & > my-top-menu-dropdown:nth-child(1) { |
6 | flex-grow: 1; | 9 | flex-grow: 1; |
7 | } | 10 | } |
11 | |||
12 | @include sub-menu-h1; | ||
8 | } | 13 | } |