Skip to content

Commit

Permalink
CONCD-903 Update How-to instructions in transcription view to a button (
Browse files Browse the repository at this point in the history
#2492)

* CONCD-903 Update How-to instructions in transcription view to a button (WiP)

* CONCD-903 don't hide the button

* CONCD-903 as long as the guide is open, the button should be navy

* CONCD-903 adding a little margin
  • Loading branch information
rasarkar committed Aug 15, 2024
1 parent 7aa2263 commit 78b0b63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions concordia/static/js/src/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ function openOffcanvas() {
guide.style.borderWidth = '0 0 thick thick';
guide.style.borderStyle = 'solid';
guide.style.borderColor = '#0076ad';
document.getElementById('open-guide').style.display = 'none';
document.addEventListener('keydown', function (event) {
if (event.key == 'Escape') {
closeOffcanvas();
}
});
document.getElementById('open-guide').style.background = '#002347';
}

function closeOffcanvas() {
let guide = document.getElementById('guide-sidebar');
guide.classList.add('offscreen');

guide.style.border = 'none';
document.getElementById('open-guide').style.display = 'block';

document.getElementById('open-guide').style.background = '#0076AD';
}

$('#open-guide').on('click', openOffcanvas);
Expand Down
10 changes: 1 addition & 9 deletions concordia/static/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1116,16 +1116,8 @@ $card-progress-height: 12px;

/* How to Guide */
#open-guide {
transform: rotate(-90deg) translateY(-50%);
position: absolute;
border-radius: 0;
right: 0;
font-size: 0.75rem;
margin-right: -55px;
margin-top: 39px;
max-height: 32px;
white-space: nowrap;
width: 110px;
}

#close-guide {
Expand All @@ -1139,7 +1131,7 @@ $card-progress-height: 12px;
width: 450px;
position: absolute; /* Stay in place */
z-index: 1; /* Stay on top */
top: 129px;
top: 135px;
right: 0;
overflow: hidden auto; /* Disable horizontal scrolling */
transition: 0.3s;
Expand Down
4 changes: 3 additions & 1 deletion concordia/templates/transcriptions/asset_detail/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ <h2 id="message-contributors" {% if transcription_status == 'not_started' %}hidd
<a class="font-weight-bold" id="quick-tips" data-toggle="modal" data-target="#tutorial-popup" role="button">
<u>Campaign Tips</u>
</a>
{% if guides %}
<button id="open-guide" class="btn btn-primary mx-1" type="button">How-To Guide</button>
{% endif %}
</div>
{% endif %}
</div>
Expand All @@ -64,7 +67,6 @@ <h2 id="message-contributors" {% if transcription_status == 'not_started' %}hidd
{{ transcription.text }}
</textarea>
{% if guides %}
<button id="open-guide" class="btn btn-primary" type="button">How-To Guide</button>
{% include "transcriptions/asset_detail/guide.html" %}
{% endif %}
</div>
Expand Down

0 comments on commit 78b0b63

Please sign in to comment.