Extensions

This commit is contained in:
Gauvain Boiché
2020-04-04 23:28:30 +02:00
parent 3a964fe237
commit 155e626426
286 changed files with 10757 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
<form action="{{ S_CONFIRM_ACTION }}" method="post">
<h3>{{ MESSAGE_TITLE }}</h3>
<p>{{ MESSAGE_TEXT }}</p>
<fieldset>
<dl>
<dt><strong>{{ lang('DICE_ROLL_NOTATION_CURRENT') }}</strong></dt>
<dd>{{ ROLL_DATA['notation'] }}</dd>
</dl>
<hr class="dashed">
<dl>
<dt><strong>{{ lang('DICE_ROLL_NOTATION_NEW') ~ lang('COLON') }}</strong></dt>
<dd><input class="inputbox" name="notation" type="text" title="{{ lang('DICE_ROLL_NOTATION') }}" placeholder="{{ lang('DICE_ROLL_NOTATION_NEW') }}" value="{{ ROLL_DATA['notation'] }}" maxlength="255" /></dd>
</dl>
</fieldset>
<br>
<fieldset class="submit-buttons">
<input class="button" type="button" name="confirm" value="{{ lang('SUBMIT') }}" />
<input class="button button-secondary" type="button" name="cancel" value="{{ lang('CANCEL') }}" />
</fieldset>
</form>

View File

@@ -0,0 +1,291 @@
{% include 'overall_header.html' %}
{% INCLUDECSS '@phpbbstudio_dice/dice_display.css' %}
{% INCLUDECSS '@phpbbstudio_dice/dice_page.css' %}
{% macro boolean(title, icon, status) %}
<div>
<i class="icon fa-{{ icon }} fa-fw" aria-hidden="true"></i>
<div class="dice-result-boolean-{% if status %}true{% else %}false{% endif %}">
<i class="icon fa-fw" aria-hidden="true"></i>
<span class="sr-only">{% if status %}{{ lang('YES') }}{% else %}{{ lang('NO') }}{% endif %}</span>
</div>
</div>
{% endmacro %}
{% from _self import boolean as bool %}
<section class="dice-section">
<h2 class="dice-title">{{ lang('DICE_ROLL_PAGE_DICE_TESTER') }}</h2>
<form name="dice_tst" action="{{ U_DICE_ACTION }}" method="post">
<fieldset class="dice-fieldset panel bg3">
<select class="dice-skin" id="skin" name="skin" title="{{ lang('DICE_SKIN') }}">
{{ SKIN_OPTIONS }}
</select>
<input class="dice-input" id="notation" name="notation" placeholder="{{ lang('DICE_ROLL_NOTATION') }}" value="{{ NOTATION }}" type="text">
</fieldset>
<div class="dice-options">
<div class="dice-submit panel bg3">
<input class="button" id="submit" name="submit" type="submit" value="{{ lang('DICE_ROLL_DICE') }}">
</div>
</div>
</form>
</section>
{% if S_DICE_SUBMIT %}
<div class="dice-result panel bg1">
<h4 class="dice-title">{{ lang('DICE_ROLL_PAGE_RESULT') }}</h4>
<hr class="dashed">
{% include '@phpbbstudio_dice/dice_roll.html' %}
</div>
{% endif %}
<hr>
<section class="dice-section dice-limit">
<h2 class="dice-title">{{ lang('DICE_ROLL_PAGE_LIMITATIONS') }}</h2>
<div class="rules clearfix">
<div class="column1">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_ROLLS_POST') }}</dt>
<dd>{% if LIMIT_DICE_ROLLS %}{{ LIMIT_DICE_ROLLS }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_DICE_QTY') }}</dt>
<dd>{% if LIMIT_DICE_QTY %}{{ LIMIT_DICE_QTY }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_SIDES_DICE') }}</dt>
<dd>{% if LIMIT_DICE_SIDES %}{{ LIMIT_DICE_SIDES }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_ALLOWED_SIDES') }}</dt>
<dd>{% if DICE_ALLOWED_ONLY %}{{ lang('DICE_ROLL_PAGE_ONLY_ALLOWED_SIDES') }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_AVAIL_SIDES') }}</dt>
<dd>{{ DICE_ALLOWED_SIDES|join(lang('COMMA_SEPARATOR')) }}</dd>
</dl>
</div>
<div class="column2">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_FUDGE_DICE') ~ lang('COLON') }}</dt>
<dd>{% if LIMIT_DICE_FUDGE %}{{ LIMIT_DICE_FUDGE }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_PERCENT_DICE') ~ lang('COLON') }}</dt>
<dd>{% if LIMIT_DICE_PC %}{{ LIMIT_DICE_PC }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EXPLODING_DICE') ~ lang('COLON') }}</dt>
<dd>{% if LIMIT_DICE_EXPLODE %}{{ LIMIT_DICE_EXPLODE }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_PENETRATING_DICE') ~ lang('COLON') }}</dt>
<dd>{% if LIMIT_DICE_PEN %}{{ LIMIT_DICE_PEN }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_COMPOUNDING_DICE') ~ lang('COLON') }}</dt>
<dd>{% if LIMIT_DICE_COMP %}{{ LIMIT_DICE_COMP }}{% else %}{{ lang('DICE_ROLL_PAGE_UNLIMITED') }}{% endif %}</dd>
</dl>
</div>
</div>
</section>
<hr>
<section class="dice-section">
<h2 class="dice-title">{{ lang('DICE_ROLL_PAGE_P_1_TITLE') }}</h2>
<p>
{{ lang('DICE_ROLL_PAGE_P_1') }}
</p>
<dl class="dice-list details clearfix">
<dt>{{ lang('DICE_ROLL_PAGE_LIST_1') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_1_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_2') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_2_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_3') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_3_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_4') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_4_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_5') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_5_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_6') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_6_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_7') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_7_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_8') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_8_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_9') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_9_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_10') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_10_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_11') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_11_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_12') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_12_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_13') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_13_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_LIST_14') }}</dt>
<dd>{{ lang('DICE_ROLL_PAGE_LIST_14_2') }}</dd>
</dl>
<div>
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_2_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_2') }}
</p>
</div>
<hr class="dice-hr">
<div>
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_3_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_3') }}
</p>
<div class="clearfix">
<div class="column1">
<div class="dice-options dice-example panel bg1">{{ lang('DICE_ROLL_PAGE_EXAMPLE_1_TITLE') }}</div>
<p>
{{ lang('DICE_ROLL_PAGE_EXAMPLE_1') }}
</p>
</div>
<div class="column2">
<div class="dice-options dice-example panel bg1">{{ lang('DICE_ROLL_PAGE_EXAMPLE_2_TITLE') }}</div>
{{ lang('DICE_ROLL_PAGE_EXAMPLE_2') }}
</div>
</div>
<hr class="dice-hr">
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_4_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_4') ~ lang('COLON') }}
</p>
<div class="dice-example panel bg1 clearfix">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_1') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_1_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_2') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_2_2') }}</dd>
</dl>
</div>
<hr class="dice-hr">
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_5_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_5') ~ lang('COLON') }}
</p>
<p class="dice-list">
{{ lang('DICE_ROLL_PAGE_P_6') }}
</p>
<p>
{{ lang('DICE_ROLL_PAGE_P_7') ~ lang('COLON') }}
</p>
<div class="dice-options dice-example panel bg1">
{{ lang('DICE_ROLL_PAGE_EXAMPLE_3') }}
</div>
<p>
{{ lang('DICE_ROLL_PAGE_P_8') }}
</p>
<hr class="dice-hr">
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_9_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_9') }}
</p>
<div class="clearfix">
<div class="column1">
<p class="dice-options"><em>{{ lang('DICE_ROLL_PAGE_EXAMPLE_4_TITLE') }}</em></p>
<div class="dice-options dice-example panel bg1">{{ lang('DICE_ROLL_PAGE_EXAMPLE_4') }}</div>
</div>
<div class="column2">
<p class="dice-options"><em>{{ lang('DICE_ROLL_PAGE_EXAMPLE_5_TITLE') }}</em></p>
<div class="dice-options dice-example panel bg1">{{ lang('DICE_ROLL_PAGE_EXAMPLE_5') }}</div>
</div>
</div>
<p>
{{ lang('DICE_ROLL_PAGE_P_10') ~ lang('COLON') }}
</p>
<div class="dice-example panel bg1 clearfix">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_EXAMPLE_6') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EXAMPLE_6_TITLE') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EXAMPLE_7') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EXAMPLE_7_TITLE') }}</dd>
</dl>
</div>
</div>
<hr class="dice-hr">
<div>
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_11_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_11') ~ lang('COLON') }}
</p>
<div class="dice-example panel bg1 clearfix">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_EXAMPLE_8_TITLE') }}</dt> <dd>
<i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EXAMPLE_8') }} <span class="dice-example">{{ lang('DICE_ROLL_PAGE_EXAMPLE_8_BIS') }}</span></dd>
<dt>{{ lang('DICE_ROLL_PAGE_EXAMPLE_9_TITLE') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EXAMPLE_9') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EXAMPLE_10_TITLE') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EXAMPLE_10') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EXAMPLE_11_TITLE') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EXAMPLE_11') }}</dd>
</dl>
</div>
</div>
<hr class="dice-hr">
<div>
<h3 class="dice-type">{{ lang('DICE_ROLL_PAGE_P_12_TITLE') }}</h3>
<p>
{{ lang('DICE_ROLL_PAGE_P_12') ~ lang('COLON') }}
</p>
<div class="dice-example panel bg1 clearfix">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_3') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_3_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_4') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_4_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_5') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_5_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_6') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_6_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_7') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_7_2') }}</dd>
</dl>
</div>
<p>
{{ lang('DICE_ROLL_PAGE_P_13') ~ lang('COLON') }}
</p>
<div class="dice-example panel bg1 clearfix">
<dl class="details">
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_8') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_8_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_9') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_9_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_10') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_10_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_11') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_11_2') }}</dd>
<dt>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_12') }}</dt> <dd><i class="icon fa-chevron-right fa-fw icon-blue" aria-hidden="true"></i>{{ lang('DICE_ROLL_PAGE_EX_DETAILS_12_2') }}</dd>
</dl>
</div>
</div>
</section>
{% include 'overall_footer.html' %}

View File

@@ -0,0 +1,102 @@
{% if S_DICE_ENABLED and (S_ROLL_ADD or S_ROLL_DELETE or S_ROLL_EDIT) %}
{% if S_DICE_REVIEW %}
{% INCLUDECSS '@phpbbstudio_dice/dice_display.css' %}
{% INCLUDEJS '@phpbbstudio_dice/js/dice_display.js' %}
{% endif %}
{% INCLUDEJS '@phpbbstudio_dice/js/dice.js' %}
{% INCLUDECSS '@phpbbstudio_dice/dice.css' %}
<!--suppress HtmlFormInputWithoutLabel -->
<div class="panel bg3 panel-container" id="dice-panel">
<div class="inner">
<p>{{ lang('DICE_ROLLS_EXPLAIN') }}</p>
{% if S_ROLL_ADD %}
<fieldset class="fields2">
{# The dice roll indicator that indicated if a roll has been added - HIDDEN #}
<input class="hidden" id="dice_indicator" name="dice_indicator" type="checkbox"{% if S_DICE_INDICATOR %} checked="checked"{% endif %}>
<dl>
<dt><label for="dice_notation">{{ lang('DICE_ROLL_NOTATION') ~ lang('COLON') }}</label></dt>
<dd><input class="inputbox" id="dice_notation" name="dice_notation" title="{{ lang('DICE_ROLL_NOTATION') }}" maxlength="255" type="text" /></dd>
</dl>
</fieldset>
<fieldset class="submit-buttons">
<button class="button{% if S_DICE_LIMIT %} button-secondary{% endif %}" id="dice_roll" type="button" data-url="{{ U_DICE_ADD }}" data-icons="fa-cube fa-exclamation-triangle" data-text="{% if not S_DICE_LIMIT %}{{ lang('DICE_ROLL_LIMIT_REACHED') }}{% else %}{{ lang('DICE_ROLL_DICE') }}{% endif %}"{% if S_DICE_LIMIT %} disabled{% endif %}>
<i class="icon {% if S_DICE_LIMIT %}fa-exclamation-triangle{% else %}fa-cube{% endif %} fa-fw" aria-hidden="true"></i>
<span>{% if S_DICE_LIMIT %}{{ lang('DICE_ROLL_LIMIT_REACHED') }}{% else %}{{ lang('DICE_ROLL_DICE') }}{% endif %}</span>
</button>
</fieldset>
{% endif %}
<div class="panel{% if not dice_rolls|length %} hidden{% endif %} file-list-container">
<div class="inner">
<table class="table1 zebra-list fixed-width-table" id="dice_table">
<thead>
<tr>
<th class="dice-roll-id">{{ lang('DICE_ROLL_ID') }}</th>
<th class="dice-roll-notation">{{ lang('DICE_ROLL_NOTATION') }}</th>
<th class="dice-roll-time">{{ lang('DICE_ROLL_TIME') }}</th>
<th class="dice-roll-actions">{{ lang('DICE_ROLL_ACTIONS') }}</th>
</tr>
</thead>
<tbody class="responsive-skip-empty file-list" id="dice_tbody">
{# Dice roll table row template, copied and then deleted by dice.js #}
<tr id="dice_template">
<td class="dice-roll-id"></td>
<td class="dice-roll-notation"></td>
<td class="dice-roll-time"></td>
<td class="dice-roll-actions">
<button class="button-secondary" name="dice_insert" title="{{ lang('PLACE_INLINE') }}" type="button" data-roll-id="" data-roll-notation="">
<i class="icon fa-sign-in fa-fw icon-green" aria-hidden="true"></i>
<span class="sr-only">{{ lang('PLACE_INLINE') }}</span>
</button>
{% if S_ROLL_EDIT %}
<a class="button-secondary" href="{{ U_DICE_EDIT }}" title="{{ lang('DICE_ROLL_EDIT') }}" data-ajax="dice_edit">
<i class="icon fa-pencil fa-fw icon-orange" aria-hidden="true"></i>
<span class="sr-only">{{ lang('DICE_ROLL_EDIT') }}</span>
</a>
{% endif %}
{% if S_ROLL_DELETE %}
<a class="button-secondary" href="{{ U_DICE_DELETE }}" title="{{ lang('DICE_ROLL_DELETE') }}" data-ajax="dice_delete">
<i class="icon fa-trash fa-fw icon-red" aria-hidden="true"></i>
<span class="sr-only">{{ lang('DICE_ROLL_DELETE') }}</span>
</a>
{% endif %}
</td>
</tr>
{% for roll in dice_rolls %}
<tr>
<td class="dice-roll-id">{{ roll.ROLL_ID }}</td>
<td class="dice-roll-notation">{{ roll.ROLL_NOTATION }}</td>
<td class="dice-roll-time">{{ roll.ROLL_TIME }}</td>
<td class="dice-roll-actions">
<button class="button-secondary" name="dice_insert" title="{{ lang('PLACE_INLINE') }}" type="button" data-roll-id="{{ roll.ROLL_ID|e('js') }}" data-roll-notation="{{ roll.ROLL_NOTATION|e('js') }}">
<i class="icon fa-sign-in fa-fw icon-green" aria-hidden="true"></i>
<span class="sr-only">{{ lang('PLACE_INLINE') }}</span>
</button>
{% if S_ROLL_EDIT %}
<a class="button-secondary" href="{{ roll.U_EDIT }}" title="{{ lang('DICE_ROLL_EDIT') }}" data-ajax="dice_edit">
<i class="icon fa-pencil fa-fw icon-orange" aria-hidden="true"></i>
<span class="sr-only">{{ lang('DICE_ROLL_EDIT') }}</span>
</a>
{% endif %}
{% if S_ROLL_DELETE %}
<a class="button-secondary" href="{{ roll.U_DELETE }}" title="{{ lang('DICE_ROLL_DELETE') }}" data-ajax="dice_delete">
<i class="icon fa-trash fa-fw icon-red" aria-hidden="true"></i>
<span class="sr-only">{{ lang('DICE_ROLL_DELETE') }}</span>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,19 @@
{# The dice roll template that is used as a replacement in a post for display #}
<div>
<em>{{ OUTPUT }}</em>
<br>
<strong>{{ NOTATION }}{{ lang('COLON') }}</strong>&nbsp;
{% for dice in DISPLAY %}
{% if not loop.first %}{{ dice.OPERATOR }}{% endif %}
[
{% for roll in dice.ROLLS %}
<div class="dice-display{% if roll.TOOLTIP %} dice-tooltip{% if roll.TOOLTIP['S_HIGHEST'] %} dice-roll-highest{% elseif roll.TOOLTIP['S_LOWEST'] %} dice-roll-lowest{% endif %}{% endif %}"{% if roll.TOOLTIP %} data-tooltip="{{ roll.TOOLTIP|join(lang('COMMA_SEPARATOR')) }}{% if roll.COMPOUNDED_ROLLS %} | {{ roll.COMPOUNDED_ROLLS|join(lang('COMMA_SEPARATOR')) }}{% endif %}"{% endif %}>
{% if roll.IMAGE %}<img src="{{ roll.IMAGE }}" alt="{{ roll.ROLL }}" height="{{ DICE_IMG_HEIGHT }}" width="{{ DICE_IMG_WIDTH }}">{% else %}{{ roll.ROLL }}{% endif %}
</div>
{% endfor %}
]
{{ dice.ADDITIONS }}
{% endfor %}
<strong>&#61; {{ TOTAL }}</strong>
</div>

View File

@@ -0,0 +1,12 @@
{% if DICE_ROLLS_OUTLINE|length %}
<dl class="attachbox dice-box">
<dt>
<i class="icon fa-cube fa-fw" aria-hidden="true"></i>
{{ lang('DICE_ROLLS') }}
</dt>
{% for roll in DICE_ROLLS_OUTLINE %}
<dd>{{ roll }}</dd>
{% endfor %}
</dl>
{% endif %}

View File

@@ -0,0 +1,12 @@
{% if postrow.DICE_ROLLS_OUTLINE|length %}
<dl class="attachbox dice-box">
<dt>
<i class="icon fa-cube fa-fw" aria-hidden="true"></i>
{{ lang('DICE_ROLLS') }}
</dt>
{% for roll in postrow.DICE_ROLLS_OUTLINE %}
<dd>{{ roll }}</dd>
{% endfor %}
</dl>
{% endif %}

View File

@@ -0,0 +1,8 @@
{# Use same if statement as logged in #}
{% if S_DICE_NAVBAR_HEADER_USER_PROFILE_APPEND %}
<li class="rightside" data-skip-responsive="true">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_NAVBAR_HEADER_QUICK_LINKS_AFTER %}
<li>
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_NAVBAR_HEADER_QUICK_LINKS_BEFORE %}
<li>
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_NAVBAR_HEADER_USER_PROFILE_APPEND %}
<li class="rightside" data-skip-responsive="true">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_FOOTER_BREADCRUMB_APPEND %}
<span class="crumb">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</span>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_FOOTER_TEAMLINK_AFTER %}
<li class="rightside" data-last-responsive="true">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_FOOTER_TEAMLINK_BEFORE %}
<li class="rightside" data-last-responsive="true">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_FOOTER_TIMEZONE_AFTER %}
<li class="rightside">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_FOOTER_TIMEZONE_BEFORE %}
<li class="rightside">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,11 @@
{% if S_DICE_MCP_DISPLAY %}
{% if not definition.INCLUDED_DICEDISPLAYCSS %}
{% INCLUDECSS '@phpbbstudio_dice/dice_display.css' %}
{% DEFINE INCLUDED_DICEDISPLAYCSS = true %}
{% endif %}
{% if not definition.INCLUDED_DICEDISPLAYJS %}
{% INCLUDEJS '@phpbbstudio_dice/js/dice_display.js' %}
{% DEFINE INCLUDED_DICEDISPLAYJS = true %}
{% endif %}
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_HEADER_NAVIGATION_APPEND %}
<li data-last-responsive="true">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,7 @@
{% if S_DICE_OVERALL_HEADER_NAVIGATION_PREPEND %}
<li data-last-responsive="true">
<a href="{{ path('phpbbstudio_dice') }}" title="{{ lang('DICE_DICE') }}" role="menuitem">
<i class="icon fa-cube fa-fw" aria-hidden="true"></i><span>{{ lang('DICE_DICE') }}</span>
</a>
</li>
{% endif %}

View File

@@ -0,0 +1,6 @@
{% if S_DICE_ENABLED and (S_ROLL_ADD or S_ROLL_DELETE or S_ROLL_EDIT) %}
{# The Dice Rolls tab below the posting editor #}
<li id="dice-panel-tab" class="tab">
<a href="#dice" data-subpanel="dice-panel" role="tab" aria-controls="dice-panel">{{ lang('DICE_ROLLS') }}</a>
</li>
{% endif %}

View File

@@ -0,0 +1,3 @@
{% if S_DICE_ENABLED and (S_ROLL_ADD or S_ROLL_DELETE or S_ROLL_EDIT) %}
{% include '@phpbbstudio_dice/dice_posting.html' %}
{% endif %}

View File

@@ -0,0 +1,12 @@
{% if topic_review_row.DICE_ROLLS_OUTLINE|length %}
<dl class="attachbox dice-box">
<dt>
<i class="icon fa-cube fa-fw" aria-hidden="true"></i>
{{ lang('DICE_ROLLS') }}
</dt>
{% for roll in topic_review_row.DICE_ROLLS_OUTLINE %}
<dd>{{ roll }}</dd>
{% endfor %}
</dl>
{% endif %}

View File

@@ -0,0 +1,12 @@
{% if postrow.DICE_ROLLS_OUTLINE|length %}
<dl class="attachbox dice-box">
<dt>
<i class="icon fa-cube fa-fw" aria-hidden="true"></i>
{{ lang('DICE_ROLLS') }}
</dt>
{% for roll in postrow.DICE_ROLLS_OUTLINE %}
<dd>{{ roll }}</dd>
{% endfor %}
</dl>
{% endif %}

View File

@@ -0,0 +1,5 @@
{% if S_DICE_DISPLAY %}
{% INCLUDECSS '@phpbbstudio_dice/dice_display.css' %}
{% INCLUDEJS '@phpbbstudio_dice/js/dice_display.js' %}
{% endif %}

View File

@@ -0,0 +1,285 @@
/**
* phpBB Studio's Dice extension for the phpBB Forum Software package.
*
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
(function($) { // Avoid conflicts with other libraries
/**
* Set up an empty array that will contain all our functions.
*/
let dice = {};
'use strict';
/**
* Set up all our elements
* @var {object} $rollTable The table where all rolls are listed
* @var {object} $rollButton The button to create a roll
* @var {object} $rollInsert The buttons inside the dice rolls table that insert a roll into the textarea
* @var {object} $rollNotation The inputbox where the dice notation is filled in
* @var {object} $rollIndicator The hidden checkbox indicating that new rolls were added
* @var {object} $rollTemplate The row template that is used to add new table rows
*/
let $rollTable = $('#dice_table');
let $rollButton = $('#dice_roll');
let $rollInsert = $('[name="dice_insert"]');
let $rollNotation = $('#dice_notation');
let $rollIndicator = $('#dice_indicator');
let $rollTemplate = $('#dice_template');
$(function() {
// Get the roll template row
dice.rollTemplate = $rollTemplate[0].outerHTML;
$rollTemplate.remove();
// Bind all 'Insert roll into textarea'-buttons
$rollInsert.each(function() {
$(this).on('click', function() {
// Send the roll identifier and notation to the function
dice.insertRollRow($(this).data('roll-id'), $(this).data('roll-notation'));
});
});
// Bind the 'Create a roll'-button
$rollButton.on('click', function(event) {
/**
* @var {string} action The AJAX action
* @var {string} notation The roll notation
*/
let action = $rollButton.data('url'),
notation = $rollNotation.val();
/**
* Set up a 'Create a roll'-function
*
* @returns {void}
*/
let rollDice = function() {
// Set a loading indicator
let $loadingIndicator = phpbb.loadingIndicator();
// Set up the AJAX request
let request = $.ajax({
url: action,
type: 'GET',
data: {notation: notation},
cache: false,
success: dice.getRollResponse,
});
// After the request (success or error) remove the loading indicator
request.always(function() {
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
$loadingIndicator.fadeOut(phpbb.alertTime);
}
});
};
// Call the 'Create a roll'-function
rollDice();
// Prevent any default actions by clicking on the button
event.preventDefault();
});
});
/**
* Response handler for adding a dice roll.
*
* @param {array} response
* @param {bool} response.ROLL_SUCCESS
* @param {bool} response.ROLL_LIMIT
* @param {array} response.ROLL_DATA
* @param {string} response.MESSAGE_TITLE
* @param {string} response.MESSAGE_TEXT
* @returns {void}
*/
dice.getRollResponse = function (response) {
phpbb.clearLoadingTimeout();
// Show the response message
phpbb.alert(response.MESSAGE_TITLE, response.MESSAGE_TEXT);
if (response.ROLL_SUCCESS) {
// If the request is successful, we auto close the message after 2 seconds
phpbb.closeDarkenWrapper(2000);
// We reset the notation input field
dice.setRollNotation('');
// We set the indicator that a roll was added
dice.setRollIndicator();
// We add the roll to the table
dice.setRollRow(response.ROLL_DATA);
// We toggle the roll button if necessary
dice.toggleRollButton(response.ROLL_LIMIT);
}
};
/**
* Set a roll notation.
*
* @param {string} value The roll notation
* @returns {void}
*/
dice.setRollNotation = function(value) {
$rollNotation.val(value);
};
/**
* Set the roll indicator as true.
*
* @returns {void}
*/
dice.setRollIndicator = function() {
$rollIndicator.prop('checked', true);
};
/**
* Toggle the roll button if necessary.
*
* @param {bool} status The status for the roll button (enabled|disabled)
* @returns {void}
*/
dice.toggleRollButton = function(status) {
// If the status is different than the current, we swap some thing around
if (status !== $rollButton.prop('disabled')) {
let icon = $rollButton.find('i'),
span = $rollButton.find('span'),
text = span.text();
// Toggle class
$rollButton.toggleClass('button-secondary');
// Toggle icons
icon.toggleClass($rollButton.data('icons'));
// Toggle text
span.text($rollButton.data('text'));
$rollButton.data('text', text);
}
// Set the status
$rollButton.prop('disabled', status);
};
/**
* Add a roll row to the table.
*
* @param {array} roll The roll data
* @param {int} roll.id The roll identifier
* @param {string} roll.notation The roll notation
* @param {string} roll.time The roll time
* @returns {void}
*/
dice.setRollRow = function(roll) {
// Make sure the table is no longer hidden.
$rollTable.parent('.inner').parent('.panel').removeClass('hidden');
// Get the row template
let row = $(dice.rollTemplate);
// Set the data
row.find('.dice-roll-id').html(roll.id);
row.find('.dice-roll-notation').html(roll.notation);
row.find('.dice-roll-time').html(roll.time);
row.find('.dice-roll-actions button')
.data('roll-id', roll.id)
.data('roll-notation', roll.notation)
.on('click', function() {
// Bind a click event for this button
dice.insertRollRow(roll.id, roll.notation);
});
row.find('.dice-roll-actions a').attr('href', function(i, url) {
return url + '/' + roll.id;
}).each(function() {
// Register this newly created ajax callback
let $this = $(this),
ajax = $this.attr('data-ajax'),
filter = $this.attr('data-filter');
if (ajax !== 'false') {
let fn = (ajax !== 'true') ? ajax : null;
filter = (filter !== undefined) ? phpbb.getFunctionByName(filter) : null;
phpbb.ajaxify({
selector: this,
refresh: $this.attr('data-refresh') !== undefined,
filter: filter,
callback: fn
});
}
});
// Append the row
$rollTable.css('display', 'none').append(row).slideDown('slow').removeAttr('style');
};
/**
* Insert a roll into the textarea.
*
* @param {int} id The roll identifier
* @param {string} notation The roll notation
* @returns {void}
*/
dice.insertRollRow = function(id, notation) {
insert_text('[roll=' + id + ']' + notation + '[/roll]');
};
/**
* Add a callback for deleting a roll.
*
* @param {array} response The response array
* @param {bool} response.ROLL_SUCCESS Successful deletion indicator
* @param {bool} response.ROLL_LIMIT Limit max rolls reached
* @param {int} response.ROLL_ID The roll identifier
* @returns {void}
*/
phpbb.addAjaxCallback('dice_delete', function(response) {
if (response.ROLL_SUCCESS) {
// We toggle the roll button if necessary
dice.toggleRollButton(response.ROLL_LIMIT);
// Remove the row
$(this).parents('tr').slideUp('slow', function() {
$(this).remove();
});
/**
* @var {RegExp} pattern Regular expression to find the dice bbcode in the text
* @var {object} textarea The textarea
*/
let roll_id = response.ROLL_ID,
pattern = new RegExp('\\[roll=' + roll_id + '\\].*?\\[\\/roll\\]', 'gi'),
textarea = document.forms[form_name].elements[text_name];
textarea.value = textarea.value.replace(pattern, '');
}
});
/**
* Add a callback for editing a roll.
*
* @param {array} response The response array
* @param {bool} response.ROLL_SUCCESS Successful deletion indicator
* @param {int} response.ROLL_DATA The roll data
* @returns {void}
*/
phpbb.addAjaxCallback('dice_edit', function(response) {
if (response.ROLL_SUCCESS) {
let row = $(this).parents('tr'),
roll = response.ROLL_DATA,
pattern = new RegExp('\\[roll=' + roll.id + '\\].*?\\[\\/roll\\]', 'gi'),
textarea = document.forms[form_name].elements[text_name];
row.find('.dice-roll-notation').html(roll.notation);
textarea.value = textarea.value.replace(pattern, '[roll=' + roll.id +']' + roll.notation + '[/roll]');
}
});
})(jQuery); // Avoid conflicts with other libraries

View File

@@ -0,0 +1,53 @@
/**
* phpBB Studio's Dice extension for the phpBB Forum Software package.
*
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
(function($) { // Avoid conflicts with other libraries
'use strict';
let h = 38;
let w = 300;
let d = 'dice-tooltip';
let t = 'dice-tooltip-top';
let r = 'dice-tooltip-right';
let b = 'dice-tooltip-bottom';
let l = 'dice-tooltip-left';
let f = 'dice-tooltip-flip';
$(function() {
$('.dice-tooltip').each(function() {
let parent = $(this).parents('.content, dd').first(),
tt = $(this).offset().top,
pt = parent.offset().top,
th = $(this).height(),
ph = parent.height(),
tb = tt + th,
pb = pt + ph,
ts = $(this).offset().left,
ps = parent.offset().left,
pe = ps + parent.width();
if (tt - pt > h) {
$(this).addClass(t);
if (pe - ts < w) {
$(this).addClass(f);
}
} else if (pb - tb > h) {
$(this).addClass(b);
if (pe - ts < w) {
$(this).addClass(f);
}
} else if (pe - ts > w) {
$(this).addClass(r);
} else if (ts - ps > w) {
$(this).addClass(r);
} else { // Not able to place a tooltip
$(this).removeClass(d);
}
});
});
})(jQuery); // Avoid conflicts with other libraries

View File

@@ -0,0 +1,23 @@
/**
* phpBB Studio's Dice extension for the phpBB Forum Software package.
*
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
.dice-roll-actions,
.dice-roll-id {
width: 15%;
}
.dice-roll-notation,
.dice-roll-time {
width: 30%;
}
.dice-roll-notation,
.dice-roll-actions,
.dice-roll-time,
.dice-roll-id {
text-align: center;
}

View File

@@ -0,0 +1,153 @@
/**
* phpBB Studio's Dice extension for the phpBB Forum Software package.
*
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
.dice-display {
display: inline-block;
}
.dice-tooltip,
.dice-tooltip * {
box-sizing: border-box;
}
.dice-roll-highest { color: #1b9a1b; }
.dice-roll-lowest { color: #d31141; }
.dice-tooltip {
position: relative;
cursor: help;
}
.dice-tooltip:after,
.dice-tooltip:before {
opacity: 0;
position: absolute;
z-index: 99;
visibility: hidden;
transition: transform 200ms ease, opacity 200ms;
}
.dice-tooltip:before {
font-size: 10px;
font-weight: bold;
white-space: normal;
text-decoration: none;
background: #000000;
border-radius: 4px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
color: #ffffff;
padding: 5px 10px;
content: attr(data-tooltip);
}
.dice-tooltip:after {
border: 6px solid transparent;
width: 0;
height: 0;
content: "";
}
.dice-tooltip:hover:after,
.dice-tooltip:hover:before {
opacity: 0.85;
visibility: visible;
transform: translateY(0);
}
.dice-tooltip-top:before,
.dice-tooltip-top:after { transform: translateY(10px); }
.dice-tooltip-top:hover:after,
.dice-tooltip-top:hover:before { transform: translateY(0); }
.dice-tooltip-right:before,
.dice-tooltip-right:after { transform: translateX(0); }
.dice-tooltip-right:hover:after,
.dice-tooltip-right:hover:before { transform: translateX(10px); }
.dice-tooltip-bottom:before,
.dice-tooltip-bottom:after { transform: translateY(-10px); }
.dice-tooltip-bottom:hover:after,
.dice-tooltip-bottom:hover:before { transform: translateY(0); }
.dice-tooltip-left:before,
.dice-tooltip-left:after { transform: translateX(0); }
.dice-tooltip-left:hover:after,
.dice-tooltip-left:hover:before { transform: translateX(-10px); }
.dice-tooltip-top:before {
bottom: 100%;
left: 5px;
margin-bottom: 10px;
}
.dice-tooltip-top:after {
border-top-color: #000000;
border-bottom: none;
bottom: 101%;
left: calc(50% - 6px);
margin-bottom: 4px;
}
.dice-tooltip-left:before {
top: -15%;
right: 100%;
margin-right: 10px;
}
.dice-tooltip-left:after {
border-right: none;
border-left-color: #000000;
top: calc(50% - 3px);
right: 100%;
margin-top: -6px;
margin-right: 4px;
}
.dice-tooltip-right:before {
top: 15%;
left: 100%;
margin-left: 10px;
}
.dice-tooltip-right:after {
border-right-color: #000000;
border-left: none;
top: calc(50% - 6px);
left: calc(100% + 4px);
}
.dice-tooltip-bottom:before {
top: 100%;
left: 5px;
margin-top: 10px;
}
.dice-tooltip-bottom:after {
border-top: none;
border-bottom-color: #000000;
top: 100%;
left: calc(50% - 6px);
margin-top: 4px;
}
.dice-tooltip-flip:before {
right: 5px;
left: unset;
}
.dice-box {
background-color: rgba(255, 255, 255, 0.8);
width: 100%;
}
.dice-box dd {
min-height: 75px;
}

View File

@@ -0,0 +1,136 @@
/**
* phpBB Studio's Dice extension for the phpBB Forum Software package.
*
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
.dice-section {
font-size: 1rem;
color: #5b5b5b;
}
.dice-title {
font-size: 1.5rem;
border: none;
}
/* TEST DICE PART */
.dice-fieldset {
position: relative;
margin-bottom: 0;
padding: 0;
}
.dice-options {
text-align: center;
}
.dice-submit {
border-top-left-radius: 0;
border-top-right-radius: 0;
display: inline-block;
padding: 0 0.75rem 0.5rem;
}
.dice-skin {
font-size: 0.9rem;
border-radius: inherit;
position: absolute;
top: 0.5rem;
left: 0.5rem;
width: calc(150px - 1rem);
padding-top: calc(3px + 0.1rem);
padding-bottom: calc(4px + 0.1rem);
padding-left: 3px;
}
.dice-skin:focus {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.dice-input {
text-indent: 1rem;
border: 1px solid transparent;
border-radius: inherit;
width: calc(100% - 1rem - 152px);
margin: 0.5rem 1rem 0.5rem 150px;
padding: 0.25rem 0;
}
.dice-input:focus {
border: 1px inset #a1b0bc;
outline: none;
}
.dice-result {
font-size: 1rem;
margin-bottom: 1rem;
padding: 1rem;
}
/* FAQ PART */
.dice-limit {
font-size: 0.75rem;
}
.dice-section p {
font-size: 1rem;
}
.dice-type {
border-bottom: none;
color: #333333;
margin: 0 0 .5rem;
padding: 5px;
}
.dice-type:before {
font-family: FontAwesome, sans-serif;
color: #12a3eb;
margin-right: 1rem;
content: "\f1b2";
}
.dice-list,
dl.dice-list {
font-size: 0.9rem;
font-style: italic;
border-left: 2px solid #12a3eb;
margin-bottom: 1.5rem;
margin-left: calc(1.5rem - 15px);
padding: 0.75rem 1.5rem;
}
dl.dice-list dt { width: 15%; }
dl.dice-list dd { width: 80%; padding-left: 1rem; }
.dice-hr {
border-top: 2px solid #12a3eb;
width: 25%;
margin: 1rem auto;
}
div.dice-example,
span.dice-example {
font-size: 0.9rem;
border-radius: 3px;
color: #333333;
}
div.dice-example {
margin: 0 0 0.5rem;
padding: 16px;
}
span.dice-example {
background-color: rgba(0, 0, 0, 0.1);
margin: 0;
padding: 0.05rem 0.4rem;
}
div.dice-example dl.details dt,
div.dice-example dl.details dd {
font-size: 1rem;
}

View File

@@ -0,0 +1,36 @@
{% INCLUDE 'ucp_header.html' %}
<form id="ucp_dice_body" name="ucp_dice_body" method="post" action="{{ S_UCP_ACTION }}">
<h2>{{ lang('SETTINGS') }}</h2>
<div class="panel">
<div class="inner">
<fieldset>
<dl>
<dt>
<label for="dice_u_skin">{{ lang('UCP_DICE_USER') ~ lang('COLON') }}</label><br><span>{{ lang('UCP_DICE_USER_EXPLAIN') }}</span>
</dt>
<dd>
<select name="dice_u_skin" id="dice_u_skin">{{ USER_SKIN }}</select>
</dd>
</dl>
</fieldset>
</div>
</div>
<fieldset>
<dl>
<dt> </dt>
<dd>
<input type="submit" name="submit" id="submit" class="button1" value="{{ lang('SUBMIT') }}" tabindex="2" />
<input type="reset" value="{{ lang('RESET') }}" name="reset" class="button2" />
</dd>
</dl>
{{ S_HIDDEN_FIELDS }}
{{ S_FORM_TOKEN }}
</fieldset>
</form>
{% INCLUDE 'ucp_footer.html' %}