Skip to content

Commit 1b2c443

Browse files
In Blazor Server template, show login UI on small screens too. Fixes #13003
1 parent e8c9952 commit 1b2c443

File tree

6 files changed

+120
-12
lines changed
  • src
    • Components
      • Blazor
        • Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css
        • testassets/StandaloneApp/wwwroot/css
      • Samples/BlazorServerApp/wwwroot/css
      • test/testassets/ComponentsApp.Server/wwwroot/css
    • ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp

6 files changed

+120
-12
lines changed

src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/site.css

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
1+
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
22

33
html, body {
44
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
@@ -36,10 +36,16 @@ app {
3636
justify-content: flex-end;
3737
}
3838

39-
.main .top-row > a {
39+
.main .top-row > a, .main .top-row .btn-link {
40+
white-space: nowrap;
4041
margin-left: 1.5rem;
4142
}
4243

44+
.main .top-row a:first-child {
45+
overflow: hidden;
46+
text-overflow: ellipsis;
47+
}
48+
4349
.sidebar {
4450
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
4551
}
@@ -131,9 +137,17 @@ app {
131137
}
132138

133139
@media (max-width: 767.98px) {
134-
.main .top-row {
140+
.main .top-row:not(.auth) {
135141
display: none;
136142
}
143+
144+
.main .top-row.auth {
145+
justify-content: space-between;
146+
}
147+
148+
.main .top-row a, .main .top-row .btn-link {
149+
margin-left: 0;
150+
}
137151
}
138152

139153
@media (min-width: 768px) {

src/Components/Blazor/testassets/StandaloneApp/wwwroot/css/site.css

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ app {
3636
justify-content: flex-end;
3737
}
3838

39-
.main .top-row > a {
39+
.main .top-row > a, .main .top-row .btn-link {
40+
white-space: nowrap;
4041
margin-left: 1.5rem;
4142
}
4243

44+
.main .top-row a:first-child {
45+
overflow: hidden;
46+
text-overflow: ellipsis;
47+
}
48+
4349
.sidebar {
4450
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
4551
}
@@ -111,10 +117,37 @@ app {
111117
color: red;
112118
}
113119

120+
#blazor-error-ui {
121+
background: lightyellow;
122+
bottom: 0;
123+
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
124+
display: none;
125+
left: 0;
126+
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
127+
position: fixed;
128+
width: 100%;
129+
z-index: 1000;
130+
}
131+
132+
#blazor-error-ui .dismiss {
133+
cursor: pointer;
134+
position: absolute;
135+
right: 0.75rem;
136+
top: 0.5rem;
137+
}
138+
114139
@media (max-width: 767.98px) {
115-
.main .top-row {
140+
.main .top-row:not(.auth) {
116141
display: none;
117142
}
143+
144+
.main .top-row.auth {
145+
justify-content: space-between;
146+
}
147+
148+
.main .top-row a, .main .top-row .btn-link {
149+
margin-left: 0;
150+
}
118151
}
119152

120153
@media (min-width: 768px) {

src/Components/Samples/BlazorServerApp/wwwroot/css/site.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ app {
3636
justify-content: flex-end;
3737
}
3838

39-
.main .top-row > a {
39+
.main .top-row > a, .main .top-row .btn-link {
40+
white-space: nowrap;
4041
margin-left: 1.5rem;
4142
}
4243

44+
.main .top-row a:first-child {
45+
overflow: hidden;
46+
text-overflow: ellipsis;
47+
}
48+
4349
.sidebar {
4450
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
4551
}
@@ -131,9 +137,17 @@ app {
131137
}
132138

133139
@media (max-width: 767.98px) {
134-
.main .top-row {
140+
.main .top-row:not(.auth) {
135141
display: none;
136142
}
143+
144+
.main .top-row.auth {
145+
justify-content: space-between;
146+
}
147+
148+
.main .top-row a, .main .top-row .btn-link {
149+
margin-left: 0;
150+
}
137151
}
138152

139153
@media (min-width: 768px) {

src/Components/test/testassets/ComponentsApp.Server/wwwroot/css/site.css

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ app {
3636
justify-content: flex-end;
3737
}
3838

39-
.main .top-row > a {
39+
.main .top-row > a, .main .top-row .btn-link {
40+
white-space: nowrap;
4041
margin-left: 1.5rem;
4142
}
4243

44+
.main .top-row a:first-child {
45+
overflow: hidden;
46+
text-overflow: ellipsis;
47+
}
48+
4349
.sidebar {
4450
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
4551
}
@@ -111,10 +117,37 @@ app {
111117
color: red;
112118
}
113119

120+
#blazor-error-ui {
121+
background: lightyellow;
122+
bottom: 0;
123+
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
124+
display: none;
125+
left: 0;
126+
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
127+
position: fixed;
128+
width: 100%;
129+
z-index: 1000;
130+
}
131+
132+
#blazor-error-ui .dismiss {
133+
cursor: pointer;
134+
position: absolute;
135+
right: 0.75rem;
136+
top: 0.5rem;
137+
}
138+
114139
@media (max-width: 767.98px) {
115-
.main .top-row {
140+
.main .top-row:not(.auth) {
116141
display: none;
117142
}
143+
144+
.main .top-row.auth {
145+
justify-content: space-between;
146+
}
147+
148+
.main .top-row a, .main .top-row .btn-link {
149+
margin-left: 0;
150+
}
118151
}
119152

120153
@media (min-width: 768px) {

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/Shared/MainLayout.Auth.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</div>
66

77
<div class="main">
8-
<div class="top-row px-4">
8+
<div class="top-row px-4 auth">
99
<LoginDisplay />
1010
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
1111
</div>

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorServerWeb-CSharp/wwwroot/css/site.css

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,16 @@ app {
3636
justify-content: flex-end;
3737
}
3838

39-
.main .top-row > a {
39+
.main .top-row > a, .main .top-row .btn-link {
40+
white-space: nowrap;
4041
margin-left: 1.5rem;
4142
}
4243

44+
.main .top-row a:first-child {
45+
overflow: hidden;
46+
text-overflow: ellipsis;
47+
}
48+
4349
.sidebar {
4450
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
4551
}
@@ -131,9 +137,17 @@ app {
131137
}
132138

133139
@media (max-width: 767.98px) {
134-
.main .top-row {
140+
.main .top-row:not(.auth) {
135141
display: none;
136142
}
143+
144+
.main .top-row.auth {
145+
justify-content: space-between;
146+
}
147+
148+
.main .top-row a, .main .top-row .btn-link {
149+
margin-left: 0;
150+
}
137151
}
138152

139153
@media (min-width: 768px) {

0 commit comments

Comments
 (0)