Skip to content

Commit

Permalink
Merge branch 'master' into exercises-are-now-buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
yammesicka authored Apr 5, 2024
2 parents 3713ea1 + 50b8734 commit 1424387
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
11 changes: 3 additions & 8 deletions lms/static/comments.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const FLAKE_COMMENTED_LINE_COLOR = '#fac4c3';
const HOVER_LINE_STYLE = '1px solid #0d0d0f';
const HOVER_LINE_COLOR = '#0d0d0f';


function removeMark(lineElement) {
Expand All @@ -20,13 +20,8 @@ function hoverLine(targets, hover) {
const [lineTarget, addCommentTarget] = targets;
if (lineTarget.dataset && lineTarget.dataset.vimbackground === 'true') {return;}
const commentOpacity = (hover === true) ? '1' : '0';
let parsedColor = hover;
if (hover === true) {
parsedColor = HOVER_LINE_STYLE;
} else if (hover === false) {
parsedColor = 'none';
}
lineTarget.style.border = parsedColor;
const parsedColor = (hover === true) ? HOVER_LINE_COLOR : '';
lineTarget.style.borderColor = parsedColor;
addCommentTarget.style.opacity = commentOpacity;
}

Expand Down
13 changes: 6 additions & 7 deletions lms/static/my.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ a {
overflow: auto;
padding: 0.75rem;
text-align: center;
border-right: #00000000 8px solid;
border-left: #00000000 8px solid;
border-inline: #00000000 8px solid;
transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

Expand Down Expand Up @@ -536,6 +535,8 @@ button.our-button-narrow, a.our-button-narrow {
flex-direction: column;
flex-basis: 70vw;
flex-grow: 4;
flex-shrink: 1;
min-width: 0;
}

.code-view-container {
Expand Down Expand Up @@ -959,12 +960,10 @@ code#user-code {
flex-direction: row;
justify-content: start;
cursor: pointer;
min-width: 0;
width: 100%;
/* Nice trick: with flex-grow: 1; and width: 0;
* the line fits the container width
* */
width: 0;
flex-grow: 1;
flex-shrink: 1;
border-inline-start: 1px solid #00000000;
}

.grader-add {
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/exercises.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1 id="exercises-head">{{ _('Exercises') }}</h1>
{% set details = {'page': 'view', 'icon': 'check-circle-o', 'text': _('Check'), 'css': 'checked', 'page_id': exercise['solution_id']} %}
{% endif -%}
<a href="{{ details['page'] }}/{{ details['page_id'] }}" class="exercise-link">
<div class="exercise" {%- if exercise.grade_color %} style="border-right: 8px solid {{ exercise.grade_color }};" {%- endif -%}>
<div class="exercise" {%- if exercise.grade_color %} style="border-inline-start-color: 8px solid {{ exercise.grade_color }};" {%- endif -%}>
<div class="right-side {{ direction }}-language">
<i class="fa fa-{{ details['icon'] }} exercise-status-icon" aria-hidden="true"></i>
<div class="exercise-number me-3">{{ exercise['exercise_number'] }}</div>
Expand Down

0 comments on commit 1424387

Please sign in to comment.