more babel stuff
This commit is contained in:
parent
8f6db2fe11
commit
691f0b0340
10 changed files with 46 additions and 46 deletions
|
@ -1,5 +1,5 @@
|
|||
{% extends 'base.html' %}
|
||||
{% block title %}Home{% endblock %}
|
||||
{% block title %}{{ _('Home') }}{% endblock %}
|
||||
{% set homeLink = 'active' %}
|
||||
{% block additionalHeadItems %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/toastify.css') }}">
|
||||
|
@ -92,14 +92,14 @@
|
|||
let buttonCharsText = toggleButton.querySelector('.cw-btn-chars');
|
||||
|
||||
collapseElement.addEventListener('show.bs.collapse', function () {
|
||||
buttonText.textContent = 'Hide content';
|
||||
buttonText.textContent = "{{ _('Hide content') }}";
|
||||
buttonCharsText.classList.add('d-none');
|
||||
cwText.classList.remove('text-center');
|
||||
cwText.classList.remove('fw-bold');
|
||||
});
|
||||
|
||||
collapseElement.addEventListener('hide.bs.collapse', function () {
|
||||
buttonText.textContent = 'Show content';
|
||||
buttonText.textContent = "{{ _('Show content') }}";
|
||||
buttonCharsText.classList.remove('d-none');
|
||||
cwText.classList.add('text-center');
|
||||
cwText.classList.add('fw-bold');
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<tr id="emoji-{{emoji.name}}" class="emoji-row">
|
||||
<td><img src="/{{ emoji.image }}" width="28" height="28" class="emoji"></td>
|
||||
<td>{{ emoji.name.capitalize() }}</td>
|
||||
<td>{{ emoji.name }}</td>
|
||||
<td><code>{{ emoji.relative_path }}</code></td>
|
||||
<td>
|
||||
<div id="actions">
|
||||
<button class="btn btn-sm btn-outline-danger" hx-target="#emoji-{{emoji.name}}" hx-delete="{{ url_for('api.deleteEmoji', emoji_name=emoji.relative_path) }}"><i class="bi bi-trash me-1"></i> Delete</button>
|
||||
<button class="btn btn-sm btn-outline-danger" hx-target="#emoji-{{emoji.name}}" hx-delete="{{ url_for('api.deleteEmoji', emoji_name=emoji.relative_path) }}"><i class="bi bi-trash me-1"></i> {{ _('Delete') }}</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<tr id="pack-{{pack.name}}" class="emoji-pack-row">
|
||||
<td><img src="/{{ pack.preview_image }}" width="28" height="28" class="emoji"></td>
|
||||
<td><a data-bs-toggle="collapse" href="#pack-collapse-{{pack.name}}" class="text-decoration-none" title="Click to see all emojis in this pack">{{ pack.name }} <i class="bi bi-chevron-down small ms-1"></i></a></td>
|
||||
<td><a data-bs-toggle="collapse" href="#pack-collapse-{{pack.name}}" class="text-decoration-none" title="{{ _('Click to see all emojis in this pack') }}">{{ pack.name }} <i class="bi bi-chevron-down small ms-1"></i></a></td>
|
||||
{% if json_pack %}
|
||||
<td>{{ pack.website }}</td>
|
||||
<td>{{ formatRelativeTime(pack.exportedAt) }}</td>
|
||||
|
@ -8,7 +8,7 @@
|
|||
<td><code>{{ pack.relative_path }}</code></td>
|
||||
<td>
|
||||
<div id="actions">
|
||||
<button class="btn btn-sm btn-outline-danger" hx-target="#pack-{{pack.name}}" hx-delete="{{ url_for('api.deleteEmojiPack', pack_name=pack.name) }}"><i class="bi bi-trash me-1"></i> Delete</button>
|
||||
<button class="btn btn-sm btn-outline-danger" hx-target="#pack-{{pack.name}}" hx-delete="{{ url_for('api.deleteEmojiPack', pack_name=pack.name) }}"><i class="bi bi-trash me-1"></i> {{ _('Delete') }}</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#rules" aria-expanded="false" aria-controls="collapseTwo">
|
||||
<i class="bi bi-exclamation-triangle me-2 fs-4"></i> Rules
|
||||
<i class="bi bi-exclamation-triangle me-2 fs-4"></i> {{ _('Rules') }}
|
||||
</button>
|
||||
</h2>
|
||||
<div id="rules" class="accordion-collapse collapse" data-bs-parent="#rules-accordion">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<div class="accordion-item">
|
||||
<h2 class="accordion-header">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#rules" aria-expanded="false" aria-controls="collapseTwo">
|
||||
<i class="bi bi-exclamation-triangle me-2 fs-4"></i> Rules
|
||||
<i class="bi bi-exclamation-triangle me-2 fs-4"></i> {{ _('Rules') }}
|
||||
</button>
|
||||
</h2>
|
||||
<div id="rules" class="accordion-collapse collapse">
|
||||
|
|
|
@ -64,22 +64,22 @@
|
|||
#}
|
||||
<button type="submit" class="btn btn-primary col-lg-4" id="ask-btn">
|
||||
<span class="me-1 spinner-border spinner-border-sm htmx-indicator" aria-hidden="true"></span>
|
||||
<span class="visually-hidden" role="status">Loading...</span>
|
||||
Ask
|
||||
<span class="visually-hidden" role="status">{{ _('Loading...') }}</span>
|
||||
{{ _('Ask') }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div id="response-container"></div>
|
||||
{% else %}
|
||||
<br>
|
||||
<h2 class="text-center">New questions cannot be asked right now.</h2>
|
||||
<h2 class="text-center">{{ _('New questions cannot be asked right now.') }}</h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if combined %}
|
||||
<div class="col-lg-8 col-xxl-9">
|
||||
{% if cfg.showQuestionCount == true %}
|
||||
<h3 class="fs-4">{{ len(combined) }} <span class="fw-light">question(s)</span></h3>
|
||||
<h3 class="fs-4">{{ totalQuestionCount }} <span class="fw-light">{{ _('question(s)') }}</span></h3>
|
||||
{% endif %}
|
||||
<div id="top-response-container"></div>
|
||||
<div id="questions-container">
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
#}
|
||||
<button type="submit" class="btn btn-primary col-sm-2" id="ask-btn">
|
||||
<span class="me-1 spinner-border spinner-border-sm htmx-indicator" aria-hidden="true"></span>
|
||||
<span class="visually-hidden" role="status">Loading...</span>
|
||||
Ask
|
||||
<span class="visually-hidden" role="status">{{ _('Loading...') }}</span>
|
||||
{{ _('Ask') }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -73,7 +73,7 @@
|
|||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<h2 class="text-center">New questions cannot be asked right now.</h2>
|
||||
<h2 class="text-center">{{ _('New questions cannot be asked right now.') }}</h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'snippets/layout/questions_list.html' %}
|
||||
|
|
|
@ -64,16 +64,16 @@
|
|||
<circle fill="currentColor" cx="11.124" cy="52.749" r="6.12"/>
|
||||
<circle fill="currentColor" cx="6.122" cy="20.759" r="6.12"/>
|
||||
</svg>
|
||||
Share on Fediverse
|
||||
{{ _('Share on Fediverse') }}
|
||||
</button>
|
||||
</li>
|
||||
<li><a class="dropdown-item" target="_blank" href="https://twitter.com/intent/tweet?text={{ urllib.parse.quote(trimContent(question.content, cfg.trimContentAfter) + ' — ' + trimContent(answer.content, cfg.trimContentAfter),safe='') }}%20{{ urllib.parse.quote(cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id), safe='') }}"><i class="bi bi-twitter me-1"></i> Share on Twitter</a></li>
|
||||
<li><a class="dropdown-item" target="_blank" href="https://twitter.com/intent/tweet?text={{ urllib.parse.quote(trimContent(question.content, cfg.trimContentAfter) + ' — ' + trimContent(answer.content, cfg.trimContentAfter),safe='') }}%20{{ urllib.parse.quote(cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id), safe='') }}"><i class="bi bi-twitter me-1"></i> {{ _('Share on Twitter') }}</a></li>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center gap-1" target="_blank" href="https://bsky.app/intent/compose?text={{ urllib.parse.quote(trimContent(question.content, cfg.trimContentAfter) + ' — ' + trimContent(answer.content, cfg.trimContentAfter),safe='') }}%20{{ urllib.parse.quote(cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id), safe='') }}">
|
||||
<svg width="16" height="16" class="me-1" viewBox="0 0 568 501" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="currentColor" d="M123.121 33.6637C188.241 82.5526 258.281 181.681 284 234.873C309.719 181.681 379.759 82.5526 444.879 33.6637C491.866 -1.61183 568 -28.9064 568 57.9464C568 75.2916 558.055 203.659 552.222 224.501C531.947 296.954 458.067 315.434 392.347 304.249C507.222 323.8 536.444 388.56 473.333 453.32C353.473 576.312 301.061 422.461 287.631 383.039C285.169 375.812 284.017 372.431 284 375.306C283.983 372.431 282.831 375.812 280.369 383.039C266.939 422.461 214.527 576.312 94.6667 453.32C31.5556 388.56 60.7778 323.8 175.653 304.249C109.933 315.434 36.0535 296.954 15.7778 224.501C9.94525 203.659 0 75.2916 0 57.9464C0 -28.9064 76.1345 -1.61183 123.121 33.6637Z" fill="black"/>
|
||||
</svg>
|
||||
Share on Bluesky
|
||||
{{ _('Share on Bluesky') }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -81,24 +81,24 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="16" height="16" class="me-1">
|
||||
<path d="M6.27051 7.62976C8.86829 7.07312 10.816 4.76401 10.816 2H13.8463V7.15152H17.4826V10.7879H13.8463V16.2424C13.8463 16.7566 14.044 17.4493 14.7554 17.9091C15.2296 18.2156 16.2397 18.3671 17.7857 18.3636V22H13.5432C11.0329 22 8.99778 19.9649 8.99778 17.4545V10.7879H6.27051V7.62976Z"></path>
|
||||
</svg>
|
||||
Share on Tumblr
|
||||
{{ _('Share on Tumblr') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="d-block d-lg-none"><button class="dropdown-item nativeShareBtn" onclick="nativeShare(`{{ trimContent(question.content, cfg.trimContentAfter) }}`, `{{ trimContent(answer.content, cfg.trimContentAfter) }}`, `{{ cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id) }}`)"><i class="bi bi-share me-1"></i> Share on other apps...</button>
|
||||
<li class="d-block d-lg-none"><button class="dropdown-item nativeShareBtn" onclick="nativeShare(`{{ trimContent(question.content, cfg.trimContentAfter) }}`, `{{ trimContent(answer.content, cfg.trimContentAfter) }}`, `{{ cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id) }}`)"><i class="bi bi-share me-1"></i> {{ _('Share on other apps...') }}</button>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-basic pt-2 pb-2 no-arrow text-body-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Miscellaneous menu"><i class="bi bi-three-dots"></i></button>
|
||||
<button class="btn btn-basic pt-2 pb-2 no-arrow text-body-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" aria-label="{{ _('Miscellaneous menu') }}"><i class="bi bi-three-dots"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><button class="dropdown-item" onclick="copy({{ question.id }})"><i class="bi bi-copy me-1"></i> Copy link</button></li>
|
||||
<li><button class="dropdown-item" onclick="copy({{ question.id }})"><i class="bi bi-copy me-1"></i> {{ _('Copy link') }}</button></li>
|
||||
{% if not noManageBtns %}
|
||||
{% if logged_in %}
|
||||
{% if not question.pinned %}
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.pinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin me-1"></i> Pin</button></li>
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.pinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin me-1"></i> {{ _('Pin') }}</button></li>
|
||||
{% else %}
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.unpinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin-angle me-1"></i> Unpin</button></li>
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.unpinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none" data-deletetarget data-target="question-{{ question.id }}"><i class="bi bi-pin-angle me-1"></i> {{ _('Unpin') }}</button></li>
|
||||
{% endif %}
|
||||
<li><button class="bg-hover-danger text-danger dropdown-item" hx-post="{{ url_for('api.returnToInbox', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none" data-deletetarget data-target="question-{{ question.id }}"><i class="bi bi-arrow-return-left me-1"></i> Return to inbox</button></li>
|
||||
<li><button class="bg-hover-danger text-danger dropdown-item" hx-post="{{ url_for('api.returnToInbox', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none" data-deletetarget data-target="question-{{ question.id }}"><i class="bi bi-arrow-return-left me-1"></i> {{ _('Return to inbox') }}</button></li>
|
||||
{# will implement later
|
||||
{% if not cfg.noDeleteConfirm %}
|
||||
<button type="button" class="btn btn-outline-danger" data-bs-toggle="modal" data-bs-target="#question-modal"><i class="bi bi-trash me-1"></i> Delete</button>
|
||||
|
@ -181,16 +181,16 @@
|
|||
<circle fill="currentColor" cx="11.124" cy="52.749" r="6.12"/>
|
||||
<circle fill="currentColor" cx="6.122" cy="20.759" r="6.12"/>
|
||||
</svg>
|
||||
Share on Fediverse
|
||||
{{ _('Share on Fediverse') }}
|
||||
</button>
|
||||
</li>
|
||||
<li><a class="dropdown-item" target="_blank" href="https://twitter.com/intent/tweet?text={{ urllib.parse.quote(trimContent(question.content, cfg.trimContentAfter) + ' — ' + trimContent(answer.content, cfg.trimContentAfter),safe='') }}%20{{ urllib.parse.quote(cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id), safe='') }}"><i class="bi bi-twitter me-1"></i> Share on Twitter</a></li>
|
||||
<li><a class="dropdown-item" target="_blank" href="https://twitter.com/intent/tweet?text={{ urllib.parse.quote(trimContent(question.content, cfg.trimContentAfter) + ' — ' + trimContent(answer.content, cfg.trimContentAfter),safe='') }}%20{{ urllib.parse.quote(cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id), safe='') }}"><i class="bi bi-twitter me-1"></i> {{ _('Share on Twitter') }}</a></li>
|
||||
<li>
|
||||
<a class="dropdown-item d-flex align-items-center gap-1" target="_blank" href="https://bsky.app/intent/compose?text={{ urllib.parse.quote(trimContent(question.content, cfg.trimContentAfter) + ' — ' + trimContent(answer.content, cfg.trimContentAfter),safe='') }}%20{{ urllib.parse.quote(cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id), safe='') }}">
|
||||
<svg width="16" height="16" class="me-1" viewBox="0 0 568 501" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="currentColor" d="M123.121 33.6637C188.241 82.5526 258.281 181.681 284 234.873C309.719 181.681 379.759 82.5526 444.879 33.6637C491.866 -1.61183 568 -28.9064 568 57.9464C568 75.2916 558.055 203.659 552.222 224.501C531.947 296.954 458.067 315.434 392.347 304.249C507.222 323.8 536.444 388.56 473.333 453.32C353.473 576.312 301.061 422.461 287.631 383.039C285.169 375.812 284.017 372.431 284 375.306C283.983 372.431 282.831 375.812 280.369 383.039C266.939 422.461 214.527 576.312 94.6667 453.32C31.5556 388.56 60.7778 323.8 175.653 304.249C109.933 315.434 36.0535 296.954 15.7778 224.501C9.94525 203.659 0 75.2916 0 57.9464C0 -28.9064 76.1345 -1.61183 123.121 33.6637Z" fill="black"/>
|
||||
</svg>
|
||||
Share on Bluesky
|
||||
{{ _('Share on Bluesky') }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -198,24 +198,24 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="16" height="16" class="me-1">
|
||||
<path d="M6.27051 7.62976C8.86829 7.07312 10.816 4.76401 10.816 2H13.8463V7.15152H17.4826V10.7879H13.8463V16.2424C13.8463 16.7566 14.044 17.4493 14.7554 17.9091C15.2296 18.2156 16.2397 18.3671 17.7857 18.3636V22H13.5432C11.0329 22 8.99778 19.9649 8.99778 17.4545V10.7879H6.27051V7.62976Z"></path>
|
||||
</svg>
|
||||
Share on Tumblr
|
||||
{{ _('Share on Tumblr') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="d-block d-lg-none"><button class="dropdown-item nativeShareBtn" onclick="nativeShare(`{{ trimContent(question.content, cfg.trimContentAfter) }}`, `{{ trimContent(answer.content, cfg.trimContentAfter) }}`, `{{ cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id) }}`)"><i class="bi bi-share me-1"></i> Share on other apps...</button>
|
||||
<li class="d-block d-lg-none"><button class="dropdown-item nativeShareBtn" onclick="nativeShare(`{{ trimContent(question.content, cfg.trimContentAfter) }}`, `{{ trimContent(answer.content, cfg.trimContentAfter) }}`, `{{ cfg.instance.fullBaseUrl + url_for('viewQuestion',question_id=question.id) }}`)"><i class="bi bi-share me-1"></i> {{ _('Share on other apps...') }}</button>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-basic pt-2 pb-2 no-arrow text-body-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Miscellaneous menu"><i class="bi bi-three-dots"></i></button>
|
||||
<button class="btn btn-basic pt-2 pb-2 no-arrow text-body-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" aria-label="{{ _('Miscellaneous menu') }}"><i class="bi bi-three-dots"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><button class="dropdown-item" onclick="copy({{ question.id }})"><i class="bi bi-copy me-1"></i> Copy link</button></li>
|
||||
<li><button class="dropdown-item" onclick="copy({{ question.id }})"><i class="bi bi-copy me-1"></i> {{ _('Copy link') }}</button></li>
|
||||
{% if not noManageBtns %}
|
||||
{% if logged_in %}
|
||||
{% if not question.pinned %}
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.pinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin me-1"></i> Pin</button></li>
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.pinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin me-1"></i> {{ _('Pin') }}</button></li>
|
||||
{% else %}
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.unpinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin-angle me-1"></i> Unpin</button></li>
|
||||
<li><button class="dropdown-item" hx-post="{{ url_for('api.unpinQuestion', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none"><i class="bi bi-pin-angle me-1"></i> {{ _('Unpin') }}</button></li>
|
||||
{% endif %}
|
||||
<li><button class="bg-hover-danger text-danger dropdown-item" hx-post="{{ url_for('api.returnToInbox', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none" data-deletetarget data-target="question-{{ question.id }}"><i class="bi bi-arrow-return-left me-1"></i> Return to inbox</button></li>
|
||||
<li><button class="bg-hover-danger text-danger dropdown-item" hx-post="{{ url_for('api.returnToInbox', question_id=question.id) }}" hx-target="#top-response-container" hx-swap="none" data-deletetarget data-target="question-{{ question.id }}"><i class="bi bi-arrow-return-left me-1"></i> {{ _('Return to inbox') }}</button></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
{{ question.content | render_markdown }}
|
||||
</div>
|
||||
<button class="z-0 cw-btn btn btn-sm btn-secondary shadow text-center w-100 sticky-bottom" type="button" data-bs-toggle="collapse" data-bs-target="#question-cw-{{ question.id }}" aria-expanded="false" aria-controls="question-cw-{{ question.id }}">
|
||||
<span class="fw-medium cw-btn-text">Show content</span>
|
||||
<span class="text-body-secondary cw-btn-chars">({{ len(question.content) }} characters)</span>
|
||||
<span class="fw-medium cw-btn-text">{{ _('Show content') }}</span>
|
||||
<span class="text-body-secondary cw-btn-chars">({{ _("{} characters").format(len(question.content)) }})</span>
|
||||
</button>
|
||||
{% else %}
|
||||
{{ question.content | render_markdown }}
|
||||
|
|
|
@ -15,18 +15,18 @@
|
|||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header border-0">
|
||||
<h1 class="modal-title fs-5 fw-normal" id="q-modal-label">Share on Fediverse</h1>
|
||||
<h1 class="modal-title fs-5 fw-normal" id="q-modal-label">{{ _('Share on Fediverse') }}</h1>
|
||||
<button type="button" class="btn-close d-flex align-items-center fs-5" data-bs-dismiss="modal" aria-label="Close"><i class="bi bi-x-lg"></i></button>
|
||||
</div>
|
||||
<div class="modal-body py-0">
|
||||
<div class="form-group mb-3">
|
||||
<label for="fediInstance" class="form-label">Fediverse instance domain:</label>
|
||||
<label for="fediInstance" class="form-label">{{ _('Fediverse instance domain:') }}</label>
|
||||
<input type="text" id="fediInstance" name="fediInstance" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer pt-1 border-0">
|
||||
<button type="button" class="btn btn-outline-secondary flex-fill flex-lg-grow-0" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary flex-fill flex-lg-grow-0" data-bs-dismiss="modal" id="q-modal-submit">Share</button>
|
||||
<button type="button" class="btn btn-outline-secondary flex-fill flex-lg-grow-0" data-bs-dismiss="modal">{{ _('Cancel') }}</button>
|
||||
<button type="button" class="btn btn-primary flex-fill flex-lg-grow-0" data-bs-dismiss="modal" id="q-modal-submit">{{ _('Share') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,14 +75,14 @@
|
|||
let buttonCharsText = toggleButton.querySelector('.cw-btn-chars');
|
||||
|
||||
collapseElement.addEventListener('show.bs.collapse', function () {
|
||||
buttonText.textContent = 'Hide content';
|
||||
buttonText.textContent = "{{ _('Hide content') }}";
|
||||
buttonCharsText.classList.add('d-none');
|
||||
cwText.classList.remove('text-center');
|
||||
cwText.classList.remove('fw-bold');
|
||||
});
|
||||
|
||||
collapseElement.addEventListener('hide.bs.collapse', function () {
|
||||
buttonText.textContent = 'Show content';
|
||||
buttonText.textContent = "{{ _('Show content') }}";
|
||||
buttonCharsText.classList.remove('d-none');
|
||||
cwText.classList.add('text-center');
|
||||
cwText.classList.add('fw-bold');
|
||||
|
@ -93,7 +93,7 @@
|
|||
function copy(questionId) {
|
||||
navigator.clipboard.writeText("{{ cfg.instance.fullBaseUrl }}/q/" + questionId + "/");
|
||||
Toastify({
|
||||
text: "Successfully copied link to clipboard!",
|
||||
text: "{{ _('Successfully copied link to clipboard!') }}",
|
||||
duration: 3000,
|
||||
gravity: "top",
|
||||
position: "right",
|
||||
|
@ -105,7 +105,7 @@
|
|||
function copyFull(text) {
|
||||
navigator.clipboard.writeText(text);
|
||||
Toastify({
|
||||
text: "Successfully copied text to clipboard!",
|
||||
text: "{{ _('Successfully copied text to clipboard!') }}",
|
||||
duration: 3000,
|
||||
gravity: "top",
|
||||
position: "right",
|
||||
|
|
Loading…
Add table
Reference in a new issue