forked from rDrama/rDrama
1
0
Fork 0

fully use the new macros

master
Aevann 2023-10-05 14:11:03 +03:00
parent 4274d1633f
commit 36688139f8
6 changed files with 17 additions and 15 deletions

View File

@ -184,3 +184,7 @@ h1, h2, h3, h4, h5, h6 {
margin-bottom: 0.3rem;
}
}
#shrink .format * {
font-size: 1.3rem !important;
}

View File

@ -4570,6 +4570,8 @@ ul.comment-section {
padding: 0.3rem 0.4rem;
font-size: 1rem;
color: var(--gray-200);
margin-top: auto !important;
margin-bottom: auto !important;
}
.format:hover {
color: var(--black);

View File

@ -61,7 +61,7 @@
<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 %}
<div class="ml-2"><i class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('{{id}}-body')" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></i></div>
{{macros.emoji_btn(id ~ '-body')}}
{% 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 %}>

View File

@ -29,7 +29,9 @@
</div>
<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>
<button type="button" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('post-title')" class="btn btn-secondary format d-inline-block m-0" id="emoji-reply-btn-2" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"><i class="fas fa-smile-beam"></i></button>
{{macros.emoji_btn('post-title')}}
<div id="urlblock">
<label for="URL" class="mt-3">URL</label>
<input autocomplete="off" class="form-control" id="post-url" name="url" type="url" placeholder="Optional if you have text." value="{{request.values.get('url','')}}" required data-nonce="{{g.nonce}}" data-oninput="checkForRequired();savetext();checkRepost();autoSuggestTitle()">

View File

@ -40,7 +40,8 @@
<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">
<div class="format pl-0"><i class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('flair_htmlbody-{{deviceType}}')" data-bs-toggle="modal" data-bs-target="#emojiModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add Emoji"></i></div>
{{macros.emoji_btn('flair_htmlbody-' ~ deviceType)}}
<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 %}>
<label class="custom-control-label" for="locked-{{deviceType}}">locked</label>

View File

@ -116,7 +116,7 @@
<button type="button" class="btn btn-secondary format m-0 mr-1 font-weight-bolder text-uppercase" data-nonce="{{g.nonce}}" data-onclick="getGifs('{{textarea_id}}')" data-bs-toggle="modal" data-bs-target="#gifModal" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Add GIF">GIF</button>
{% endmacro %}
{% macro file_btn(input_id, disabled) %}
{% macro file_btn(input_id, disabled, image_only) %}
<label class="btn btn-secondary format m-0" for="{{input_id}}" {% if g.is_tor or disabled %}disabled{% endif %}>
<i class="fas fa-{% if image_only %}image{% else %}file{% endif %}"></i>
<input autocomplete="off" id="{{input_id}}" accept="image/*{% if not image_only %}, video/*, audio/*{% endif %}" type="file" multiple="multiple" name="file" {% if g.is_tor or disabled %}disabled{% endif %} hidden>
@ -334,20 +334,13 @@
<span id="typing-indicator"></span>
<span id="loading-indicator" class="d-none"></span>
</div>
<span class="my-auto">
<i class="btn btn-secondary fas fa-smile-beam" style="font-size:1.3rem!important" data-nonce="{{g.nonce}}" data-onclick="loadEmojis('input-text-chat')" data-bs-toggle="modal" data-bs-target="#emojiModal"></i>
</span>
<span class="my-auto ml-1">
<label class="btn btn-secondary format mb-0">
<div class="mr-3" style="font-size:12px"><i class="fas fa-image" style="font-size:1.3rem!important"></i></div>
<input autocomplete="off" id="file" accept="image/*" type="file" name="file" {% if g.is_tor %}disabled{% endif %} hidden>
</label>
</span>
{{emoji_btn('input-text-chat')}}
{{file_btn('input-text-chat', False, True)}}
<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" placeholder="Message" autocomplete="off" autofocus rows="1"></textarea>
<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>
<i id="chatsend" data-nonce="{{g.nonce}}" data-onclick="send()" class="btn btn-secondary fas fa-reply ml-3 my-auto" style="transform:rotateY(180deg);font-size:1.3rem!important"></i>
<i id="chatsend" data-nonce="{{g.nonce}}" data-onclick="send()" class="btn btn-secondary fas fa-reply ml-1 my-auto" style="transform:rotateY(180deg);font-size:1.3rem!important"></i>
</div>
<div id="ghostdiv-chat" class="ghostdiv" style="display: none"><span></span></div>
</div>