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-744 Adjust height of How To #2323

Merged
merged 5 commits into from
Mar 26, 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
4 changes: 1 addition & 3 deletions concordia/static/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ ul.nav-secondary {
flex: initial !important;
}

#transcription-input {
#transcription-input-container {
width: 99% !important;
}

Expand Down Expand Up @@ -482,7 +482,6 @@ $card-progress-height: 12px;
.view-transcriptions--item-detail & {
top: 0;
}

}

.concordia-object-card .card-actions .btn {
Expand Down Expand Up @@ -1086,7 +1085,6 @@ $card-progress-height: 12px;
position: absolute;
border-radius: 0;
right: 0;
top: 129px;
font-size: 0.75rem;
margin-right: -55px;
margin-top: 39px;
Expand Down
13 changes: 13 additions & 0 deletions concordia/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,18 @@ <h2 class="h3 font-weight-normal text-center text-lg-left">Follow

{% include "fragments/common-scripts.html" %}

<script type="text/javascript">
function setTutorialHeight() {
var $carouselItems = $("#card-carousel .carousel-item");
var heights = $carouselItems.map(function() {
return $(this).height();
});
var maxHeight = Math.max.apply(this, heights);
$carouselItems.height(maxHeight);
}
</script>


{% block body_scripts %}{% endblock body_scripts %}

<script type="text/javascript">
Expand Down Expand Up @@ -309,6 +321,7 @@ <h2 class="h3 font-weight-normal text-center text-lg-left">Follow
clearCache();
{% endif %}
{% if asset %}
setTutorialHeight();
$('#tutorial-popup').modal('show');
localStorage.setItem(keyName, "true");
{% endif %}
Expand Down
25 changes: 11 additions & 14 deletions concordia/templates/transcriptions/asset_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,15 @@ <h2 id="message-contributors" {% if transcription_status == 'not_started' %}hidd
<span class="sr-only">Loading...</span>
</div>
</div>
<textarea readonly class="form-control rounded flex-grow-1 d-print-none" name="text" id="transcription-input" placeholder="{% if transcription_status == 'not_started' or transcription_status == 'in_progress' %}Go ahead, start typing. You got this!{% else %}Nothing to transcribe{% endif %}" aria-label="Transcription input">
{{ transcription.text }}
</textarea>
<div class="d-flex flex-column flex-grow-1" id="transcription-input-container">
<textarea readonly class="form-control rounded flex-grow-1 d-print-none" name="text" id="transcription-input" placeholder="{% if transcription_status == 'not_started' or transcription_status == 'in_progress' %}Go ahead, start typing. You got this!{% else %}Nothing to transcribe{% endif %}" aria-label="Transcription input">
{{ transcription.text }}
</textarea>
{% if guides %}
<button id="open-guide" class="btn btn-primary" type="button" onclick="openOffcanvas()">How-To Guide</button>
{% include "fragments/_how-to-guide.html" %}
{% endif %}
</div>

<div class="print-transcription-text" aria-hidden="true" style="display: none;">{{ transcription.text }}</div>

Expand Down Expand Up @@ -522,10 +528,6 @@ <h2 id="tag-label" class="border-top pt-3 pb-2"><a
</form>
</div>
</div>
{% if guides %}
<button id="open-guide" class="btn btn-primary" type="button" onclick="openOffcanvas()">How-To Guide</button>
{% include "fragments/_how-to-guide.html" %}
{% endif %}
</div>
<div id="help-container" class="mt-1 d-print-none">
<div class="row p-3 bg-light justify-content-sm-between">
Expand Down Expand Up @@ -1147,7 +1149,7 @@ <h5>{{ card.display_heading }}</h5>
guide.style.borderWidth = "0 0 thick thick";
guide.style.borderStyle = "solid";
guide.style.borderColor = "#0076ad";
document.getElementById("open-guide").style.display = "none";
openGuide.style.display = "none";
document.addEventListener('keydown', function(e) {
if (e.key == "Escape") {
closeOffcanvas();
Expand Down Expand Up @@ -1185,12 +1187,7 @@ <h5>{{ card.display_heading }}</h5>
</script>
<script>
$("#tutorial-popup").on("shown.bs.modal", function() {
var $carouselItems = $("#card-carousel .carousel-item");
var heights = $carouselItems.map(function() {
return $(this).height();
});
var maxHeight = Math.max.apply(this, heights);
$carouselItems.height(maxHeight);
setTutorialHeight();
});
</script>
{% endblock body_scripts %}
Loading