Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONCD-903 Update How-to instructions in transcription view to a button #2492

Merged
merged 5 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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