Skip to content

Commit 4543520

Browse files
committed
Fix styling issues
1 parent 9d557c8 commit 4543520

21 files changed

Lines changed: 63 additions & 165 deletions

File tree

assets/css/main.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/main.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.

assets/sass/layout/_header.scss

Lines changed: 20 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,6 @@ article {
5555
margin-left: -12px;
5656
}
5757

58-
/*.user-menu.navbar-nav {
59-
li {
60-
a {
61-
padding-top: $navbar-padding-vertical;
62-
padding-bottom: $navbar-padding-vertical;
63-
padding-left: 0.75rem;
64-
padding-right: 0.75rem;
65-
}
66-
}
67-
}*/ // TODO: CHECK FOR REMOVAL #1442
68-
6958
a.navbar-brand:hover,
7059
a.navbar-dropdown > a:hover,
7160
.navbar-toggler:hover,
@@ -85,53 +74,6 @@ article {
8574
background-color: rgba(0,0,0,0.1);
8675
}
8776
}
88-
/*
89-
.navbar-brand + .navbar-text {
90-
float: left;
91-
font-size: $font-size-small;
92-
color: $gray-lighter;
93-
}
94-
95-
.navbar-toggle .badge {
96-
position: absolute;
97-
right: -10px;
98-
top: 4px;
99-
}
100-
.navbar-toggle {
101-
&:focus,
102-
&:hover {
103-
background-color: #fff;
104-
@include focus-with-background-and-color;
105-
106-
.icon-bar {
107-
background-color: #000000;
108-
}
109-
}
110-
}
111-
112-
.navbar-header {
113-
.visible-xs {
114-
max-width: 250px;
115-
white-space: nowrap;
116-
overflow: hidden;
117-
text-overflow: ellipsis;
118-
}
119-
@media (max-width: $grid-float-breakpoint-max) {
120-
.instance-selector {
121-
margin-left: 30px;
122-
}
123-
124-
.navbar-nav.instance-selector {
125-
li.open {
126-
a {
127-
background-color: #005eb8;
128-
color: #fff;
129-
}
130-
}
131-
}
132-
}
133-
}
134-
*/ // TODO: CHECK FOR REMOVAL #1442
13577
.navbar-dropdown {
13678
div.dropdown-backdrop {
13779
display: none;
@@ -141,79 +83,31 @@ article {
14183
white-space: nowrap;
14284
overflow: hidden;
14385
text-overflow: ellipsis;
144-
max-width: 70vw;
14586
display: block;
14687
}
147-
148-
@media (max-width: $screen-md-max) {
149-
li.dropdown > a.dropdown-toggle {
150-
max-width: 55vw;
151-
}
152-
}
153-
154-
@media (max-width: $screen-sm-max) {
155-
li.dropdown > a.dropdown-toggle {
156-
max-width: 45vw;
157-
}
158-
}
159-
160-
@media (max-width: $screen-xs-max) {
161-
li.dropdown > a.dropdown-toggle {
162-
max-width: 45vw;
163-
}
164-
165-
li.open > ul.dropdown-menu {
166-
& > li > a{
167-
color: #dadada;
168-
}
169-
}
170-
}
17188
}
172-
/*
173-
ul.visible-xs {
174-
margin: 0;
89+
}
17590

176-
li {
177-
border: 1px solid;
178-
border-top: none;
179-
border-color: #236aa7;
180-
border-color: rgba(0, 0, 0, 0.25);
181-
a {
182-
color: white;
183-
padding: 10px 15px !important;
184-
}
185-
}
186-
ul.dropdown-menu {
187-
padding: 0;
91+
// Make the left side (brand + course dropdown) flexible
92+
.topbar .d-flex.align-items-center.ps-2 {
93+
flex: 1 1 auto;
94+
min-width: 0;
18895

189-
li {
190-
border: none;
191-
border-top: 1px solid;
96+
.navbar-dropdown {
97+
flex: 1 1 start;
98+
min-width: 0;
19299

193-
button[type="submit"] {
194-
color: #dadada;
195-
height: 2.63em;
196-
&:hover,
197-
&:focus {
198-
@include focus-with-background-and-color;
199-
background-color: #236aa7;
200-
background-color: rgba(0, 0, 0, 0.1);
201-
}
202-
}
203-
}
204-
}
205-
.header {
206-
border-left: none;
207-
border-right: none;
208-
padding: 0.2em 1em;
100+
li.dropdown {
101+
min-width: 0;
209102

210-
h4 {
211-
font-size: 1em;
212-
font-weight: bolder;
213-
color: #ffffff;
214-
margin: 0;
215-
}
216-
}
217-
}
218-
*/ // TODO: CHECK FOR REMOVAL #1442
103+
> a.dropdown-toggle {
104+
max-width: 100%;
105+
}
106+
}
107+
}
108+
}
109+
110+
// Ensure the right side doesn't shrink
111+
.topbar .d-flex.gap-2 {
112+
flex: 0 0 auto;
219113
}

assets/sass/legacy/_main.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ table.results-table tbody tr:last-child td {
389389
table.results-table .category-row {
390390
font-weight: bold;
391391
}
392+
table.results-table .collapse-if-empty {
393+
padding: 0;
394+
width: 0;
395+
}
392396

393397
div.rst-tabs div.html-box {
394398
padding: 1em;

course/templates/course/archive.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>{{ year }}</h2>
2525
{% endfor %}
2626

2727
{% if not instances and not siteadvert %}
28-
<div class="panel-body">
28+
<div class="card-body">
2929
<p class="panel-default-text">
3030
{% translate "NO_COURSES_FOUND" %}
3131
</p>

course/templates/course/groups.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
<div class="col-md-5">
4949

5050
<div class="card">
51-
<div class="card-header bg-primary text-white">
51+
<div class="card-header text-bg-primary">
5252
{% translate "MY_GROUPS" %}
5353
</div>
54-
<table class="table mb-0">
54+
<table class="aplus-table-bordered table mb-0">
5555
{% for group in groups %}
5656
<tr>
5757
<td>{{ group.members.all|names }}</td>

course/templates/course/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2>{% translate "MY_COURSES" %}</h2>
2222
{% include "course/_course_cards.html" with instances=my_instances condensed=False %}
2323
</div>
2424
{% else %}
25-
<div class="panel-body">
25+
<div class="card-body">
2626
<p class="panel-default-text">
2727
{% translate "MY_COURSES_EMPTY" %}
2828
</p>
@@ -68,7 +68,7 @@ <h3 class="card-title">{{ advert.title }}</h3>
6868
{% endif %}
6969
</div>
7070
{% if not all_instances and not siteadvert %}
71-
<div class="panel-body">
71+
<div class="card-body">
7272
<p class="panel-default-text">
7373
{% translate "NO_COURSES_FOUND" %}
7474
</p>

deviations/templates/deviations/list_dl.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<form method="post" class="form-horizontal">
3131
{% csrf_token %}
3232
<div class="card">
33-
<div class="card-header bg-primary">
34-
<h5 class="card-title text-white">{% translate "DEADLINE_DEVIATIONS" %}</h5>
33+
<div class="card-header text-bg-primary">
34+
<h5 class="card-title">{% translate "DEADLINE_DEVIATIONS" %}</h5>
3535
</div>
3636
<table class="table table-striped aplus-table-bordered table-sm filtered-table ordered-table grouped-table mb-0" data-default-sort-column="6" data-default-sort-order="desc">
3737
<thead>

deviations/templates/deviations/list_submissions.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<form method="post" class="form-horizontal">
3131
{% csrf_token %}
3232
<div class="card">
33-
<div class="card-header bg-primary">
34-
<h5 class="card-title text-white">{% translate "SUBMISSION_DEVIATIONS" %}</h5>
33+
<div class="card-header text-bg-primary">
34+
<h5 class="card-title">{% translate "SUBMISSION_DEVIATIONS" %}</h5>
3535
</div>
3636
<table class="table table-striped aplus-table-bordered table-sm filtered-table ordered-table grouped-table mb-0" data-default-sort-column="4" data-default-sort-order="desc">
3737
<thead>

deviations/templates/deviations/override_dl.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<form method="post" class="form-horizontal">
1515
{% csrf_token %}
1616
<div class="card">
17-
<div class="card-header bg-primary">
18-
<h5 class="card-title text-white">{% translate "SELECT_DEVIATIONS_TO_BE_OVERRIDDEN" %}</h5>
17+
<div class="card-header text-bg-primary">
18+
<h5 class="card-title">{% translate "SELECT_DEVIATIONS_TO_BE_OVERRIDDEN" %}</h5>
1919
</div>
2020
<table class="table table-striped table-bordered table-sm filtered-table ordered-table grouped-table">
2121
<thead>

0 commit comments

Comments
 (0)