Skip to content

Commit 59b462a

Browse files
author
roadiz-ci
committed
styles: Upgraded Backoffice user-panel and admin-menu sub-nav items
1 parent 1ccf8ea commit 59b462a

14 files changed

+79
-95
lines changed

src/Resources/app/less/login/login.less

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,38 +115,27 @@
115115
width: @login-BarW;
116116
height: 70px;
117117
background-color: var(--accent-color);
118-
top: 0px; left: 0;
118+
top: 0; left: 0;
119119
text-align: center;
120120

121121
@media (min-width: @screen-sm-min) {
122122
height: 116px;
123123
}
124124

125-
&:before {
126-
content: "";
127-
display: inline-block;
128-
height: 100%;
129-
vertical-align: middle;
130-
131-
}
132-
133125
.uk-icon-rz-roadiz-icon {
134126
vertical-align: middle;
135127
display: inline-block;
136128
font-size: 55px;
137129
}
138130

139-
picture,
140-
img,
141-
svg,
142-
object {
143-
position: relative;
144-
max-width: 80%;
145-
height: auto;
146-
max-height: 100px;
147-
vertical-align: middle;
148-
display: inline-block;
149-
width: auto;
131+
img, svg, object {
132+
display: block;
133+
height: 100%;
134+
width: 100%;
135+
object-fit: contain;
136+
object-position: center;
137+
margin: 0 auto;
138+
padding: 10px;
150139
}
151140
}
152141

src/Resources/app/less/panels/entries_panel/admin_entries.less

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,25 +154,32 @@
154154
&:before, &:after {
155155
display: none;
156156
}
157-
i {
158-
font-size: 20px;
159-
}
160157
& > a {
161-
padding: 5px 10px 5px 7px;
158+
padding: 0;
159+
display: flex;
160+
gap: 10px;
161+
align-items: center;
162+
}
163+
i {
164+
font-size: 16px;
165+
width: 16px;
162166
}
163167
.info {
164-
display: inline-block;
165-
background-color: transparent;
166-
height: 43px;
167-
line-height: 43px;
168-
left: 28px;
169-
font-size: @default-font-size;
170-
color: var(--admin-entries-subnav-text-color);
171-
.box-shadow(0px 0px 0px rgba(0,0,0,0));
168+
display: block;
169+
position: relative;
170+
background-color: transparent;
171+
height: auto;
172+
line-height: 1.2em;
173+
left: 0;
174+
padding: 5px 0;
175+
white-space: normal;
176+
font-size: @default-font-size;
177+
color: var(--admin-entries-subnav-text-color);
178+
.box-shadow(0px 0px 0px rgba(0,0,0,0));
172179

173-
&:after {
174-
display: none;
175-
}
180+
&:after {
181+
display: none;
182+
}
176183
}
177184
&:hover {
178185
background-color: #F5F5F5;

src/Resources/app/less/panels/user_panel/user_panel.less

Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
transition: font-size ease 1s;
2525
}
2626

27+
h1, h2, h3, h4, h5, h6 {
28+
padding: 0 10px;
29+
}
30+
2731
&-container{
2832
padding-bottom:0;
2933

@@ -34,17 +38,12 @@
3438

3539
.uk-icon-button {
3640
text-shadow: 0 1px 0 rgba(0,0,0,.8);
37-
font-size: 16px;
38-
line-height: 34px;
41+
font-size: 12px;
42+
width: 30px;
43+
height: 30px;
44+
line-height: 29px;
3945
opacity: 0.3;
4046

41-
@media (min-width: @screen-sm-min) and (max-width: @screen-md-max) {
42-
font-size: 12px;
43-
width: 30px;
44-
height: 30px;
45-
line-height: 29px;
46-
}
47-
4847
&:hover {
4948
opacity: 0.8;
5049
}
@@ -109,8 +108,6 @@
109108
}
110109

111110
@media screen and (max-width: @screen-lg-max) {
112-
width:90px;
113-
114111
#cms-version {
115112
a {
116113
display: block;
@@ -125,12 +122,12 @@
125122
}
126123

127124
.user-actions {
128-
padding: 15px 0px;
125+
padding: 15px 10px;
129126

130127
@media (max-width: @screen-xs-max) {
131128
display: block;
132-
position:fixed;
133-
top:50px;
129+
position: fixed;
130+
top: 50px;
134131
right:0;
135132
bottom:0;
136133
width:80%;
@@ -154,31 +151,24 @@
154151
.box-sizing();
155152
padding: 0;
156153

157-
&:before {
158-
content:"";
159-
display: inline-block;
160-
vertical-align: middle;
161-
height: 100%;
162-
}
163-
164154
a {
155+
position: relative;
165156
font-size: 55px;
166157
color: #333333;
167-
display: inline-block;
158+
display: block;
168159
text-decoration: none;
169-
opacity: 0.95;
170-
transition: opacity ease 0.5s;
171-
padding-left: 0px;
172-
width: 99%; // on Firefox, prevent line-return
173-
vertical-align: middle;
160+
padding: 0;
161+
height: 100%;
162+
width: 100%;
174163

175164
img, svg, object {
176165
display: block;
177-
max-width: 95%;
178-
height: auto;
179-
width: auto;
180-
max-height: 110px;
166+
height: 100%;
167+
width: 100%;
168+
object-fit: contain;
169+
object-position: center;
181170
margin: 0 auto;
171+
padding: 10px;
182172
}
183173

184174
&:hover {
@@ -201,14 +191,14 @@
201191
}
202192

203193
.user-actions {
204-
border-top: 1px solid var(--user-panel-border-color);
205-
206194
@media (min-width: @screen-sm-min) {
195+
margin: 20px 0 0 0;
196+
border-top: 1px solid var(--user-panel-border-color);
207197
display: flex;
208-
flex-wrap: wrap;
198+
flex-direction: column;
209199
align-items: center;
210200
justify-content: center;
211-
gap: 5px;
201+
gap: 10px;
212202
}
213203
}
214204

@@ -244,15 +234,6 @@
244234
&:hover {
245235
border: 3px solid #333;
246236
}
247-
@media (max-width: @screen-lg-max) {
248-
width:56px;
249-
height:56px;
250-
251-
img{
252-
width:56px;
253-
height:56px;
254-
}
255-
}
256237
}
257238
#cms-version {
258239
position: absolute;

src/Resources/app/less/vars.less

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,15 @@
7373

7474
/* -------- PANEL SIZES -------- */
7575

76-
@user-panel-width: 150px;
76+
@user-panel-width: 90px;
7777
@user-panel-sm-width: 90px;
78-
@user-panel-lg-width: 120px;
79-
@user-panel-xl-width: 150px;
78+
@user-panel-lg-width: 90px;
79+
@user-panel-xl-width: 90px;
8080

8181
@entries-panel-width: 60px;
8282
@entries-panel-lg-width: 70px;
8383
@entries-panel-xl-width: 70px;
84+
8485
@trees-panel-width: 270px;
8586
@trees-panel-lg-width: 270px;
8687
@trees-panel-xl-width: 350px;
@@ -92,8 +93,8 @@
9293
@user-panel-color: #4d4d4d;
9394
@user-panel-text-color: #d8d8d8;
9495
@user-panel-text-alt-color: #b7b7b7;
95-
@user-picture-size: 80px;
96-
@user-picture-size-mini: 70px;
96+
@user-picture-size: 56px;
97+
@user-picture-size-mini: 56px;
9798
@user-panel-border-color: rgba(199,199,204, 0.14);
9899

99100

src/Resources/views/admin/blocks/adminImage.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="company">
22
{% if themeServices.adminImage %}
3-
<a class="admin-image" href="{{ path('adminHomePage') }}">{{ themeServices.adminImage|display({width:150}) }}</a>
3+
<a class="admin-image" href="{{ path('adminHomePage') }}">{{- themeServices.adminImage|display({ picture: true, width: 180, quality: 70 }) -}}</a>
44
{% else %}
55
<a class="uk-icon-rz-roadiz-icon" href="{{ path('adminHomePage') }}"></a>
66
{% endif %}

src/Resources/views/admin/blocks/loginImage.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="login-logo">
22
{% if themeServices.adminImage %}
3-
{{ themeServices.adminImage|display({width:150}) }}
3+
{{- themeServices.adminImage|display({ picture: true, width: 200, quality: 70 }) -}}
44
{% else %}
55
<i class="uk-icon-rz-roadiz-icon"></i>
66
{% endif %}

src/Resources/views/panels/user_panel.html.twig

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,32 @@
1010
{% include '@RoadizRozier/admin/blocks/adminImage.html.twig' %}
1111
<div class="user-actions-menu">
1212
{% if app.user and app.user.id %}
13-
<a id="user-picture" href="{{ path('usersEditPage', {'id':app.user.id }) }}">
13+
<a id="user-picture"
14+
data-uk-tooltip="{animation:true}"
15+
title="{{ app.user.identifier }}"
16+
href="{{ path('usersEditPage', {'id':app.user.id }) }}"
17+
>
1418
<img width="200"
1519
height="200"
1620
class="uk-thumbnail"
1721
src="{{ app.user.pictureUrl }}"
1822
alt="{{ app.user.identifier }}" />
1923
</a>
20-
<h3 class="mobile-hidden">{{ "hello.%name%"|trans({'%name%': app.user.identifier}) }}</h3>
2124
{% elseif app.user %}
2225
{% set displayName = app.user.nickname|default(app.user.givenName|default(app.user.name)) %}
2326
{% if app.user.picture %}
24-
<span id="user-picture">
27+
<span
28+
id="user-picture"
29+
title="{{ displayName }}"
30+
data-uk-tooltip="{animation:true}"
31+
>
2532
<img width="200"
2633
height="200"
2734
class="uk-thumbnail"
2835
src="{{ app.user.picture }}"
2936
alt="{{ displayName }}" />
3037
</span>
3138
{% endif %}
32-
<h3 class="mobile-hidden">{{ "hello.%name%"|trans({'%name%': displayName }) }}</h3>
3339
{% endif %}
3440
<nav class="user-actions">
3541
<a class="uk-icon-button uk-icon-rz-earth"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
<script src="{{ asset('js/vendor.e61f574696a873492b95.js', 'Rozier') }}" defer type="text/javascript"></script>
2+
<script src="{{ asset('js/vendor.8ad668c89c46f8e422da.js', 'Rozier') }}" defer type="text/javascript"></script>
33

4-
<script src="{{ asset('js/app.e61f574696a873492b95.js', 'Rozier') }}" defer type="text/javascript"></script>
4+
<script src="{{ asset('js/app.8ad668c89c46f8e422da.js', 'Rozier') }}" defer type="text/javascript"></script>
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

2-
<script src="{{ asset('js/simple.e61f574696a873492b95.js', 'Rozier') }}" defer type="text/javascript"></script>
2+
<script src="{{ asset('js/simple.8ad668c89c46f8e422da.js', 'Rozier') }}" defer type="text/javascript"></script>
33

src/static/css/app.892de7354f4b82eed554.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/static/css/app.892de7354f4b82eed554.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)