Skip to content

Commit ec60c6c

Browse files
authored
Merge pull request #478 from testmycode/better-css
Better css in points
2 parents f2068a8 + 46dc1fd commit ec60c6c

File tree

11 files changed

+247
-208
lines changed

11 files changed

+247
-208
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ LABEL name tmc-server
33

44
ADD Gemfile /app/Gemfile
55
ADD Gemfile.lock /app/Gemfile.lock
6-
RUN bundle install --system
6+
RUN bundle install --system --gemfile /app/Gemfile
77
ADD . /app
8-

app/assets/stylesheets/_breadcrumb.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
$breadcrumb-grey: #e9ecef;
2+
13
.breadcumb-nav {
2-
background-color: #e9ecef;
4+
align-items: center;
5+
background-color: $breadcrumb-grey;
36
border-radius: 0.25rem;
47
display: flex;
5-
align-items: center;
68
padding-right: 1rem;
79

810
.breadcrumb {

app/assets/stylesheets/_footer.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
$footer-height: 5rem;
2+
13
.footer {
2-
height: 5rem;
4+
height: $footer-height;
35
background-color: rgb(54, 116, 214);
46
}
57

app/assets/stylesheets/main.scss

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Submissions status*/
2+
@import "breadcrumb";
3+
24
.error,
35
.failure,
46
.fail {
@@ -145,7 +147,10 @@ div.stack-trace {
145147
}
146148

147149
.scrollable {
150+
align-self: center;
151+
height: 70vh;
148152
overflow: auto;
153+
width: 95vw;
149154
}
150155

151156
div.feedback-question {
@@ -166,6 +171,19 @@ form.single-button {
166171
table {
167172
border-collapse: collapse;
168173
width: 100%;
174+
175+
&.points {
176+
min-width: 100%;
177+
text-align: center;
178+
tbody tr:nth-child(odd) {
179+
background-color: lighten($breadcrumb-grey, 4%);
180+
}
181+
}
182+
183+
&.points tr.admin * {
184+
color: #808080;
185+
}
186+
169187
}
170188

171189
table > * > tr > td {
@@ -177,24 +195,20 @@ table > * > tr > th {
177195
border: 0;
178196
}
179197

180-
tr.table-totals > td {
181-
font-weight: bold;
182-
}
183-
184-
/* Points tables */
185-
186-
table.points {
187-
width: auto;
188-
}
189-
190-
table.points tr.admin * {
191-
color: gray;
198+
table.points > * > tr > th {
199+
text-align: center;
200+
max-width: 5rem;
201+
word-wrap: break-word;
192202
}
193203

194204
table.points > * > tr > td {
195205
text-align: center;
196206
}
197207

208+
tr.table-totals > td {
209+
font-weight: bold;
210+
}
211+
198212
/* Code reviews */
199213

200214
.code-review {
@@ -460,3 +474,14 @@ td.hljs-ln-code {
460474
margin-right: 1rem;
461475
min-width: 200px;
462476
}
477+
478+
.points-container {
479+
align-content: stretch;
480+
display: flex;
481+
flex-direction: column;
482+
}
483+
484+
.filter-form input[type="checkbox"],
485+
select {
486+
margin: 0.2rem;
487+
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
@import "breadcrumb";
2+
13
.course-point-header {
24
display: flex;
3-
justify-content: space-between;
45
align-items: center;
6+
justify-content: space-between;
7+
}
8+
9+
.point-cell {
10+
border: 1px solid darken($breadcrumb-grey, 5%);
511
}

app/helpers/extra_field_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def extra_field_checkbox(prefix, field, value)
6565
return '' if field.field_type == :html
6666
field_name = prefix + field.name
6767
field_tag = check_box_tag(field_name, '1', !value.blank?)
68-
bs_labeled_field(raw(field.name.humanize), field_tag, order: :label_last)
68+
labeled_field(raw(field.name.humanize), field_tag, :order => :label_last, :super_class => "checkbox")
6969
end
7070

7171
def extra_field_value(value_record)

app/views/layouts/application.html.erb

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,25 @@
2929
<body class="default">
3030
<div class="everything-wrapper">
3131
<%= render partial: 'layouts/navigation' %>
32-
<div id="everything">
33-
<div class="container container-fluid well-large" id="content-area">
34-
<div id="breadcrumb">
35-
<div class="row">
36-
<div class="col-md-12">
37-
<%= render 'twitter-bootstrap/breadcrumbs' %>
32+
<div id="everything">
33+
<div class="container container-fluid well-large" id="content-area">
34+
<div id="breadcrumb">
35+
<div class="row">
36+
<div class="col-md-12">
37+
<%= render 'twitter-bootstrap/breadcrumbs' %>
38+
</div>
3839
</div>
3940
</div>
41+
<% if @show_page_presence %>
42+
<div id="page-presence"></div>
43+
<% end %>
44+
<%= bootstrap_flash %>
45+
<%= yield %>
46+
<br>
4047
</div>
41-
<% if @show_page_presence %>
42-
<div id="page-presence"></div>
43-
<% end %>
44-
<%= bootstrap_flash %>
45-
<%= yield %>
46-
<br>
4748
</div>
49+
<div class="everything-push"></div>
4850
</div>
49-
<div class="everything-push">
50-
</div>
51-
</div>
5251
<%= render partial: 'layouts/footer' %>
5352
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" integrity="sha256-/BfiIkHlHoVihZdc6TFuj7MmJ0TWcWsMXkeDFwhi0zw=" crossorigin="anonymous"></script>
5453
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.1.0/highlightjs-line-numbers.min.js" integrity="sha256-ORy35NeVPhp5u86UDEs69WrNPjYJ899tayoT/y0NJ/I=" crossorigin="anonymous"></script>

app/views/participants/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1>List of participants</h1>
22

3-
<%= form_tag(participants_path, :method => :get) do %>
3+
<%= form_tag(participants_path, :method => :get, :class => "filter-form") do %>
44
<div style="float: left">
55
<%= render :partial => 'participants/filter_controls' %>
66
</div>

0 commit comments

Comments
 (0)