Skip to content

Commit a6114ce

Browse files
committed
Refactor mobile menu styles and structure for improved layout and consistency
1 parent af8fb68 commit a6114ce

File tree

2 files changed

+26
-219
lines changed

2 files changed

+26
-219
lines changed
Lines changed: 5 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.media-player {
1+
.mobile-menu {
22
display: flex;
33
flex-direction: row;
4-
height: 96px;
4+
height: 56px;
55
background-color: var(--mat-sidenav-container-background-color, var(--mat-sys-surface));
66
}
77

@@ -17,192 +17,13 @@
1717
}
1818

1919
.mobile-nav-button-content {
20-
display: flex;
21-
flex-direction: column;
20+
display: flex;
21+
flex-direction: column;
2222
align-items: center;
2323
}
2424

2525
.mobile-footer {
2626
justify-content: space-around;
2727
padding: 0;
2828
height: 56px;
29-
}
30-
31-
.media-player-small {
32-
height: env(titlebar-area-height, 33px) !important;
33-
}
34-
35-
/* .draggable {
36-
-webkit-app-region: drag;
37-
flex-grow: 2;
38-
flex-shrink: 1;
39-
} */
40-
41-
.media-controls-container {
42-
align-self: center;
43-
flex: 2 2 auto;
44-
-webkit-app-region: no-drag;
45-
}
46-
47-
.media-audio-container {
48-
align-self: center;
49-
flex: 2 2 auto;
50-
}
51-
52-
.media-player-small .media-controls-container {
53-
align-self: flex-start;
54-
}
55-
56-
.media-player-small .media-controls {
57-
flex-grow: 0;
58-
flex-shrink: 0;
59-
text-align: left;
60-
}
61-
62-
.media-info {
63-
/* flex: 0 1 auto; */
64-
flex: 1 1 calc(33%);
65-
display: flex;
66-
flex-direction: row;
67-
}
68-
69-
.media-controls {
70-
/* flex: 2 2 auto; */
71-
flex: 2 2 auto;
72-
width: 360px;
73-
74-
text-align: center;
75-
justify-content: center;
76-
display: flex;
77-
flex-direction: column;
78-
/* padding-top: 1.4em; */
79-
}
80-
81-
.media-player-small .media-controls {
82-
width: auto;
83-
}
84-
85-
.media-audio {
86-
/* padding-top: 1.4em; */
87-
padding-right: 1.4em;
88-
flex: 1 1 calc(33%);
89-
display: flex;
90-
text-align: right;
91-
}
92-
93-
.music-album {
94-
height: 100%;
95-
}
96-
97-
.music-title {
98-
font-size: 0.8em;
99-
overflow: hidden;
100-
text-overflow: ellipsis;
101-
display: -webkit-box;
102-
-webkit-line-clamp: 2; /* number of lines to show */
103-
line-clamp: 2;
104-
-webkit-box-orient: vertical;
105-
font-weight: 700;
106-
margin-bottom: 0.4em;
107-
}
108-
109-
.music-artist {
110-
color: rgba(255, 255, 255, 0.5);
111-
font-size: 0.65em;
112-
overflow: hidden;
113-
text-overflow: ellipsis;
114-
display: -webkit-box;
115-
-webkit-line-clamp: 1; /* number of lines to show */
116-
line-clamp: 1;
117-
-webkit-box-orient: vertical;
118-
}
119-
120-
.media-info-text {
121-
padding: 0.8em;
122-
align-self: center;
123-
}
124-
125-
.media-timeline {
126-
width: 100%;
127-
display: flex;
128-
flex-direction: row;
129-
font-size: 0.8em;
130-
131-
justify-content: center;
132-
}
133-
134-
.media-timeline-1 {
135-
flex: 1 1 auto;
136-
width: 100px;
137-
align-self: center;
138-
}
139-
140-
.media-timeline-2 {
141-
flex: 2 2 auto;
142-
align-self: center;
143-
}
144-
145-
.media-timeline-3 {
146-
flex: 1 1 auto;
147-
width: 100px;
148-
align-self: center;
149-
}
150-
151-
/* .media-slider {
152-
transform: scale(0.5);
153-
} */
154-
155-
/* @media only screen and (max-height: 200px) {
156-
.media-player {
157-
position: absolute;
158-
top: 0;
159-
left: 0;
160-
right: 0;
161-
height: 100%;
162-
width: 100%;
163-
z-index: 1000;
164-
}
165-
}
166-
167-
@media only screen and (max-width: 780px) {
168-
.hide-small {
169-
display: none !important;
170-
}
171-
} */
172-
173-
.youtube-video {
174-
width: 100%;
175-
display: inline-block;
176-
margin-top: 0.2em;
177-
aspect-ratio: 16 / 9;
178-
}
179-
180-
.media-player-large {
181-
height: 256px;
182-
}
183-
184-
.media-player-maximized {
185-
position: absolute;
186-
top: 0;
187-
bottom: 0;
188-
right: 0;
189-
z-index: 1000;
190-
height: 100%;
191-
}
192-
193-
.floating-maximize {
194-
position: absolute;
195-
right: 10px;
196-
top: 80px;
197-
z-index: 1001;
198-
}
199-
200-
.media-player-logo {
201-
margin-left: 6px;
202-
}
203-
204-
@media only screen and (min-height: 201px) {
205-
.media-player-logo {
206-
display: none;
207-
}
208-
}
29+
}
Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,29 @@
1-
<div class="mobile-menu media-player-small">
2-
1+
<div class="mobile-menu">
32
<mat-toolbar class="mobile-footer" color="primary">
4-
<button
5-
mat-button
6-
class="mobile-nav-button"
7-
[routerLink]="['/feed']">
8-
<div class="mobile-nav-button-content">
9-
<mat-icon>notes</mat-icon>
10-
<span>{{ 'App.Feed' | translate }}</span>
11-
</div>
12-
</button>
13-
<button
14-
mat-button
15-
class="mobile-nav-button"
16-
[routerLink]="['/people']">
3+
<button mat-button class="mobile-nav-button" [routerLink]="['/feed']">
4+
<div class="mobile-nav-button-content">
5+
<mat-icon>notes</mat-icon>
6+
<span>{{ 'App.Feed' | translate }}</span>
7+
</div>
8+
</button>
9+
<button mat-button class="mobile-nav-button" [routerLink]="['/people']">
1710
<div class="mobile-nav-button-content">
1811
<mat-icon>people</mat-icon>
1912
<span>{{ 'App.People' | translate }}</span>
2013
</div>
2114
</button>
22-
23-
<button
24-
mat-button
25-
class="mobile-nav-button"
26-
[routerLink]="['/notifications']">
27-
<div class="mobile-nav-button-content">
28-
<mat-icon aria-hidden="false" [matBadgeHidden]="(ui.unreadNotifications$ | async) == 0" [matBadge]="ui.unreadNotifications$ | async">notifications</mat-icon>
29-
<span>{{ 'App.Notifications' | translate }}</span>
30-
</div>
31-
</button>
32-
<button
33-
mat-button
34-
class="mobile-nav-button"
35-
[routerLink]="['/p', appState.getPublicKey()]">
36-
<div class="mobile-nav-button-content">
37-
<mat-icon>person</mat-icon>
38-
<span>{{ 'App.Profile' | translate }}</span>
39-
</div>
40-
</button>
15+
<button mat-button class="mobile-nav-button" [routerLink]="['/notifications']">
16+
<div class="mobile-nav-button-content">
17+
<mat-icon aria-hidden="false" [matBadgeHidden]="(ui.unreadNotifications$ | async) == 0"
18+
[matBadge]="ui.unreadNotifications$ | async">notifications</mat-icon>
19+
<span>{{ 'App.Notifications' | translate }}</span>
20+
</div>
21+
</button>
22+
<button mat-button class="mobile-nav-button" [routerLink]="['/p', appState.getPublicKey()]">
23+
<div class="mobile-nav-button-content">
24+
<mat-icon>person</mat-icon>
25+
<span>{{ 'App.Profile' | translate }}</span>
26+
</div>
27+
</button>
4128
</mat-toolbar>
42-
4329
</div>

0 commit comments

Comments
 (0)