fix format buttons

pull/211/head
Aevann 2023-10-05 17:57:22 +03:00
parent 4bcd56c17d
commit 20ef42b9e2
9 changed files with 55 additions and 31 deletions

View File

@ -4557,7 +4557,7 @@ ul.comment-section {
padding: 0.5rem 0.75rem;
min-height: 84px;
}
.comment-format, .ghostdiv {
.format-btns, .ghostdiv {
display: flex;
align-items: center;
bottom: 0;

View File

@ -259,9 +259,11 @@
<div class="text-small font-weight-bold mt-1" id="charcount-edit-{{c.id}}" style="right: 1rem; bottom: 0.5rem; z-index: 3"></div>
{{macros.emoji_btn('comment-edit-reply-' ~ c.id)}}
{{macros.gif_btn('comment-edit-reply-' ~ c.id)}}
{{macros.file_btn('file-edit-reply-' ~ c.id)}}
<div class="format-btns">
{{macros.emoji_btn('comment-edit-reply-' ~ c.id)}}
{{macros.gif_btn('comment-edit-reply-' ~ c.id)}}
{{macros.file_btn('file-edit-reply-' ~ c.id)}}
</div>
<a class="text-small mt-3 d-inline-block" href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a>
@ -554,9 +556,11 @@
<input hidden name="formkey" value="{{v|formkey}}">
<textarea data-fullname="{{c.fullname}}" required autocomplete="off" minlength="1" maxlength="10000" name="body" form="reply-to-c_{{c.id}}" data-id="{{c.id}}" class="file-ta comment-box form-control rounded" id="reply-form-body-{{c.id}}" rows="3" data-preview="message-reply-{{c.id}}" data-nonce="{{g.nonce}}" data-oninput="markdown(this);handle_disabled(this)"></textarea>
{{macros.emoji_btn('reply-form-body-' ~ c.id)}}
{{macros.gif_btn('reply-form-body-' ~ c.id)}}
{{macros.file_btn('file-upload-reply-' ~ c.fullname, not get_setting('dm_media'))}}
<div class="format-btns">
{{macros.emoji_btn('reply-form-body-' ~ c.id)}}
{{macros.gif_btn('reply-form-body-' ~ c.id)}}
{{macros.file_btn('file-upload-reply-' ~ c.fullname, not get_setting('dm_media'))}}
</div>
<div class="ml-auto">
<span id="upload-prog-{{c.fullname}}" class="d-none mt-1 mr-2">

View File

@ -8,7 +8,7 @@
<label for="input-message" class="mt-3">Your message</label>
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" maxlength="10000" id="input-message" form="contactform" name="message" class="file-ta form-control" required></textarea>
<div class="mt-1">
<div class="format-btns">
{{macros.emoji_btn('input-message')}}
{{macros.gif_btn('input-message')}}
{{macros.file_btn('file-upload')}}

View File

@ -193,9 +193,11 @@
<div class="text-small font-weight-bold mt-1" id="charcount-post-edit" style="right: 1rem; bottom: 0.5rem; z-index: 3"></div>
{{macros.emoji_btn('post-edit-box-' ~ p.id)}}
{{macros.gif_btn('post-edit-box-' ~ p.id)}}
{{macros.file_btn('file-upload-edit-' ~ p.id)}}
<div class="format-btns">
{{macros.emoji_btn('post-edit-box-' ~ p.id)}}
{{macros.gif_btn('post-edit-box-' ~ p.id)}}
{{macros.file_btn('file-upload-edit-' ~ p.id)}}
</div>
<a class="text-small mt-3 d-inline-block" href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a>
<button type="submit" form="post-edit-form-{{p.id}}" class="btn btn-primary ml-2 fl-r" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()">Save Edit</button>

View File

@ -61,7 +61,9 @@
<input minlength={{minlength}} maxlength={{maxlength}} pattern="{{pattern}}" autocomplete="off" id="{{id}}-body" type="text" name="{{form_name}}" class="form-control" placeholder='{{placeholder_text}}' value="{% if contents %}{{contents}}{% endif %}" {% if disabled %}disabled{% endif %}>
<div class="d-flex mt-2">
{% if show_emojis %}
{{macros.emoji_btn(id ~ '-body')}}
<div class="format-btns">
{{macros.emoji_btn(id ~ '-body')}}
</div>
{% endif %}
<small class="ml-1">{{below_text}}</small>
<input autocomplete="off" class="btn btn-primary ml-auto" id="{{id}}-save" type="submit" value="{{button_text}}" {% if disabled %}disabled{% endif %}>
@ -80,9 +82,11 @@
<textarea autocomplete="off" id="{{id}}-text" class="file-ta form-control rounded" placeholder="{{placeholder_text}}" rows="3" name="{{form_name}}" form="{{id}}-form" maxlength="{{maxlength}}">{% if contents %}{{contents}}{% endif %}</textarea>
{% if show_extras %}
{{macros.emoji_btn(id ~ '-text')}}
{{macros.gif_btn(id ~ '-text')}}
{{macros.file_btn('file-upload-common-' ~ id)}}
<div class="format-btns">
{{macros.emoji_btn(id ~ '-text')}}
{{macros.gif_btn(id ~ '-text')}}
{{macros.file_btn('file-upload-common-' ~ id)}}
</div>
{% endif %}
<div class="d-flex mt-1">

View File

@ -30,7 +30,9 @@
<label class='mt-4' for="title">Post Title</label>
<textarea autocomplete="off" class="form-control" id="post-title" type="text" name="title" placeholder="Required" value="{{title}}" minlength="1" maxlength="500" required data-nonce="{{g.nonce}}" data-oninput="checkForRequired();savetext()"></textarea>
{{macros.emoji_btn('post-title')}}
<div class="format-btns">
{{macros.emoji_btn('post-title')}}
</diV>
<div id="urlblock">
<label for="URL" class="mt-3">URL</label>
@ -56,9 +58,11 @@
<div class="ghostdiv" style="display:none"></div>
<div class="text-small font-weight-bold mt-1" id="character-count-submit-text-form" style="right: 1rem; bottom: 0.5rem; z-index: 3"></div>
{{macros.emoji_btn('post-text')}}
{{macros.gif_btn('post-text')}}
{{macros.file_btn('file-upload-submit')}}
<div class="format-btns">
{{macros.emoji_btn('post-text')}}
{{macros.gif_btn('post-text')}}
{{macros.file_btn('file-upload-submit')}}
</div>
<div id="preview" class="preview my-3"></div>
<div class="form-text text-small mt-1 mb-3"><a href="/formatting" {% if v and v.newtab %}data-target="t" target="_blank"{% endif %}>Formatting help</a></div>

View File

@ -40,7 +40,9 @@
<input hidden name="formkey" value="{{v|formkey}}">
<input maxlength=100 autocomplete="off" id="flair_htmlbody-{{deviceType}}" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if u.flair %}{{u.flair}}{% endif %}">
<div class="d-flex">
{{macros.emoji_btn('flair_htmlbody-' ~ deviceType)}}
<div class="format-btns">
{{macros.emoji_btn('flair_htmlbody-' ~ deviceType)}}
</div>
<div class="custom-control custom-checkbox ml-2 mt-1">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="locked-{{deviceType}}" name="locked" {% if u.flairchanged %}checked{% endif %}>

View File

@ -193,9 +193,11 @@
<input hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" id="input-message" form="message" name="message" rows="3" minlength="1" maxlength="10000" class="file-ta form-control b2 mt-1" data-preview="message-preview" data-nonce="{{g.nonce}}" data-oninput="markdown(this);handle_disabled(this)"></textarea>
{{macros.emoji_btn('input-message')}}
{{macros.gif_btn('input-message')}}
{{macros.file_btn('file-upload-macro', not get_setting('dm_media'))}}
<div class="format-btns">
{{macros.emoji_btn('input-message')}}
{{macros.gif_btn('input-message')}}
{{macros.file_btn('file-upload-macro', not get_setting('dm_media'))}}
</div>
<div class="d-flex">
<input type="submit" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()" value="Submit" class="btn btn-primary ml-auto handle_disabled disabled" disabled>
@ -496,9 +498,11 @@
<input class="mt-1" hidden name="formkey" value="{{v|formkey}}">
<textarea autocomplete="off" id="input-message-mobile" form="message-mobile" name="message" rows="3" minlength="1" maxlength="10000" class="file-ta form-control" data-preview="message-preview-mobile" data-nonce="{{g.nonce}}" data-oninput="markdown(this);handle_disabled(this)" required></textarea>
{{macros.emoji_btn('input-message-mobile')}}
{{macros.gif_btn('input-message-mobile')}}
{{macros.file_btn('file-upload-mobile')}}
<div class="format-btns">
{{macros.emoji_btn('input-message-mobile')}}
{{macros.gif_btn('input-message-mobile')}}
{{macros.file_btn('file-upload-mobile')}}
</div>
<div class="d-flex">
<input type="submit" data-nonce="{{g.nonce}}" data-onclick="remove_dialog()" value="Submit" class="btn btn-primary ml-auto handle_disabled disabled" disabled>

View File

@ -135,9 +135,11 @@
<div class="text-small font-weight-bold mt-1" id="charcount-{{target_fullname}}" style="right: 1rem; bottom: 0.5rem; z-index: 3"></div>
{{emoji_btn('reply-form-body-' ~ target_fullname)}}
{{gif_btn('reply-form-body-' ~ target_fullname)}}
{{file_btn('file-upload-reply-' ~ target_fullname)}}
<div class="format-btns">
{{emoji_btn('reply-form-body-' ~ target_fullname)}}
{{gif_btn('reply-form-body-' ~ target_fullname)}}
{{file_btn('file-upload-reply-' ~ target_fullname)}}
</div>
<button type="button" id="save-reply-to-{{target_fullname}}" form="reply-to-{{target_fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r handle_disabled disabled" disabled data-nonce="{{g.nonce}}" data-onclick="post_comment('{{target_fullname}}', '{{hide}}')">Comment</button>
@ -337,8 +339,10 @@
<span id="loading-indicator" class="d-none"></span>
</div>
{{emoji_btn('input-text-chat')}}
{{file_btn('file', False, True)}}
<div class="format-btns">
{{emoji_btn('input-text-chat')}}
{{file_btn('file', False, True)}}
</div>
<textarea id="input-text-chat" minlength="1" maxlength="{% if SITE == 'rdrama.net' %}200{% else %}1000{% endif %}" {% if g.browser in ("iphone","mac") %}style="font-size:16px!important"{% endif %} class="file-ta form-control ml-2" placeholder="Message" autocomplete="off" autofocus rows="1"></textarea>