templates/partials/grimoire.html.twig line 1

Open in your IDE?
  1. {% embed 'includes/details.html.twig' with {
  2.     summary: 'grimoire.title'|trans,
  3.     id: 'grimoire'
  4. } %}
  5.     {% import 'macros/forms.html.twig' as forms %}
  6.     {% block body %}
  7.     <div class="pad-wrapper">
  8.         <div class="pad pad--growable js--pad"></div>
  9.         <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512" class="pad-wrapper__icon"><!--! Font Awesome Pro 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M246.6 361.4C252.9 367.6 256 375.8 256 384s-3.125 16.38-9.375 22.62l-96 96c-12.5 12.5-32.75 12.5-45.25 0l-96-96c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L96 402.8v-293.5L54.63 150.6c-12.5 12.5-32.75 12.5-45.25 0s-12.5-32.75 0-45.25l96-96c12.5-12.5 32.75-12.5 45.25 0l96 96C252.9 111.6 256 119.8 256 128s-3.125 16.38-9.375 22.62c-12.5 12.5-32.75 12.5-45.25 0L160 109.3v293.5l41.38-41.38C213.9 348.9 234.1 348.9 246.6 361.4z"/></svg>
  10.     </div>
  11.     {% include 'partials/grimoire/demon-bluffs.html.twig' %}
  12.     <ul class="button-list mt-4">
  13.         <li>{% include 'partials/grimoire/add-token.html.twig' %}</li>
  14.         <li>{% include 'partials/grimoire/add-reminder.html.twig' %}</li>
  15.         <li>{% include 'partials/grimoire/add-traveller.html.twig' %}</li>
  16.         <li>{% include 'partials/grimoire/add-fabled.html.twig' %}</li>
  17.         <li>{% include 'partials/grimoire/show-tokens.html.twig' %}</li>
  18.         <li><button type="button" class="button button--full-height" id="reset-height">{{ 'grimoire.grimoire.reset_height'|trans }}</button></li>
  19.         <li><button type="button" class="button button--full-height button--warning" id="clear-grimoire" data-confirm="{{ 'grimoire.grimoire.clear_grimoire_warning'|trans }}">{{ 'grimoire.grimoire.clear_grimoire'|trans }}</button></li>
  20.     </ul>
  21.     <details id="grimoire-settings" class="pad pad--bluffs mt-4">
  22.         <summary class="pad__title">{{ 'grimoire.grimoire.token_settings'|trans }}</summary>
  23.         <div>
  24.             <div class="mt-4">
  25.                 {{ forms.switch({
  26.                     node: 'div',
  27.                     label: 'grimoire.grimoire.show_night_order'|trans,
  28.                     name: 'show-night-order',
  29.                     id: 'show-night-order',
  30.                     checked: true
  31.                 }) }}
  32.             </div>
  33.             <div class="mt-4">
  34.                 {{ forms.range({
  35.                     label: 'grimoire.grimoire.character_size'|trans,
  36.                     name: 'token-size',
  37.                     id: 'token-size',
  38.                     output: 'token-size-output',
  39.                     min: 0.5,
  40.                     max: 2,
  41.                     step: 0.1,
  42.                     value: 1
  43.                 }) }}
  44.             </div>
  45.             <div class="mt-4">
  46.                 {{ forms.range({
  47.                     label: 'grimoire.grimoire.reminder_size'|trans,
  48.                     name: 'reminder-size',
  49.                     id: 'reminder-size',
  50.                     output: 'reminder-size-output',
  51.                     min: 0.5,
  52.                     max: 2,
  53.                     step: 0.1,
  54.                     value: 1
  55.                 }) }}
  56.             </div>
  57.         </div>
  58.     </details>
  59.     {% endblock %}
  60. {% endembed %}
  61. <template id="token-template">
  62.     <button type="button" class="token token--movable js--token--wrapper"></button>
  63. </template>
  64. <template id="character-template">
  65.     <span class="character js--character js--character--leaves">
  66.         <span class="character__image">
  67.             <img src="" alt="" class="character__icon js--character--image" width="177" height="124" loading="lazy">
  68.         </span>
  69.         <svg viewBox="0 0 150 150" class="character__text">
  70.             <path d="M 13 75 C 13 160, 138 160, 138 75" id="curve" fill="transparent"></path>
  71.             <text width="150" x="66.6%" text-anchor="middle" class="character__name">
  72.                 <textPath xlink:href="#curve" style="fill: currentColor;" class="js--character--name"></textPath>
  73.             </text>
  74.         </svg>
  75.         <span class="character__shroud">
  76.             <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="character__ghost-vote"><!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M96 80c0-26.5 21.5-48 48-48H432c26.5 0 48 21.5 48 48V384H96V80zm313 47c-9.4-9.4-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L409 161c9.4-9.4 9.4-24.6 0-33.9zM0 336c0-26.5 21.5-48 48-48H64V416H512V288h16c26.5 0 48 21.5 48 48v96c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V336z"/></svg>
  77.         </span>
  78.         <span class="character__player-name js--character--player-name"></span>
  79.     </span>
  80. </template>
  81. <template id="reminder-list-template">
  82.     <li class="tick-select reminder-list__item js--reminder-list--item">
  83.         <input type="checkbox" class="tick-select__checkbox reminder-list__checkbox sr-only js--reminder-list--checkbox">
  84.         <button type="button" class="tick-select__highlight reminder-list__button no-btn js--reminder-list--button"></button>
  85.     </li>
  86. </template>
  87. <template id="reminder-template">
  88.     <span class="tick-select__icon reminder">
  89.         <span class="reminder__image">
  90.             <img src="" alt="" class="reminder__icon js--reminder--image" width="177" height="124" loading="lazy">
  91.         </span>
  92.         <svg viewBox="0 0 150 150" class="reminder__text">
  93.             <path d="M 13 75 C 13 -10, 138 -10, 138 75" id="curve-top" fill="transparent"></path>
  94.             <text width="150" x="66.6%" text-anchor="middle" class="reminder__name" dominant-baseline="hanging">
  95.                 <textPath xlink:href="#curve-top" style="fill: currentColor;" class="js--reminder--name"></textPath>
  96.             </text>
  97.         </svg>
  98.         <svg viewBox="0 0 150 150" class="reminder__text">
  99.             <path d="M 13 75 C 13 160, 138 160, 138 75" id="curve-base" fill="transparent"></path>
  100.             <text width="150" x="66.6%" text-anchor="middle" class="reminder__name">
  101.                 <textPath xlink:href="#curve-base" style="fill: currentColor;" class="js--reminder--text"></textPath>
  102.             </text>
  103.         </svg>
  104.     </span>
  105. </template>
  106. {% embed 'includes/dialog.html.twig' with {
  107.     id: 'token',
  108.     background: 'hide',
  109.     hideClickBackground: false
  110. } %}
  111.     {% block title %}
  112.         <form class="settable-title" data-multiple="{{ 'grimoire.token_list.title'|trans|e('html_attr') }}">
  113.             <span class="settable-title__title js--settable-title--title">{{ 'grimoire.token.title'|trans }}</span>
  114.             <input type="text" class="settable-title__input settable-title__input--full js--settable-title--input" list="token-title-list" hidden>
  115.             <datalist id="token-title-list">
  116.                 <option value="{{ 'grimoire.token.title'|trans|e('html_attr') }}" class="js--settable-title--start">
  117.                 <option value="{{ 'grimoire.token.title'|trans|e('html_attr') }}" class="js--settable-title--previous">
  118.                 <option value="{{ 'grimoire.token_list.title'|trans|e('html_attr') }}">
  119.                 <option value="{{ 'grimoire.grimoire.bluffs'|trans|e('html_attr') }}">
  120.             </datalist>
  121.         </form>
  122.     {% endblock %}
  123.     {% block body %}
  124.         <ul class="token-display js--token--holder"></ul>
  125.         <p class="token-display__additional mt-4">
  126.             <button type="button" class="button js--token--add">{{ 'grimoire.token_list.add'|trans }}</button>
  127.         </p>
  128.     {% endblock %}
  129. {% endembed %}
  130. {% embed 'includes/dialog.html.twig' with {
  131.     id: 'character-show',
  132.     background: 'blur'
  133. } %}
  134.     {% block title %}<span id="character-show-name">{{ 'grimoire.character_show.title'|trans }}</span>{% endblock %}
  135.     {% block body %}
  136.     <p id="character-show-ability" class="character-show__ability"></p>
  137.     <ul class="button-list">
  138.         <li><button type="button" class="button button--full-height" id="character-show-token">{{ 'grimoire.character_show.show'|trans }}</button></li>
  139.         <li><button type="button" class="button button--full-height" id="character-shroud-toggle">{{ 'grimoire.character_show.shroud'|trans }}</button></li>
  140.         <li><button type="button" class="button button--full-height" id="character-rotate">{{ 'grimoire.character_show.rotate'|trans }}</button></li>
  141.         <li><button type="button" class="button button--full-height" id="character-reminder">{{ 'grimoire.character_show.reminder'|trans }}</button></li>
  142.         <li><button type="button" class="button button--full-height" id="character-replace">{{ 'grimoire.character_show.replace'|trans }}</button></li>
  143.         <li><button type="button" class="button button--full-height" id="character-ghost-vote">{{ 'grimoire.character_show.ghost_vote'|trans }}</button></li>
  144.     </ul>
  145.     <p class="mt-4">
  146.         <label for="character-name-input" class="d-block text-small">{{ 'messages.player_name'|trans }}</label>
  147.         <input type="text" class="input" name="character-name-input" id="character-name-input" list="character-name-input-options">
  148.         <datalist id="character-name-input-options"></datalist>
  149.         <button type="button" class="button mt-2" id="character-name">{{ 'grimoire.character_show.player_name'|trans }}</button>
  150.     </p>
  151.     <p class="mt-4"><small>{{ 'grimoire.character_show.recent_reminders'|trans }}</small></p>
  152.     <ul id="character-show-reminders" class="button-list button-list--reminder is-show-all"></ul>
  153.     <p class="mt-4"><button type="button" class="button button--warning" id="character-remove">{{ 'grimoire.character_show.remove'|trans }}</button></p>
  154.     <p id="character-show-first-night-reminder" class="character-show__night-reminder"></p>
  155.     <p id="character-show-other-night-reminder" class="character-show__night-reminder"></p>
  156.     {% endblock %}
  157. {% endembed %}
  158. {% embed 'includes/dialog.html.twig' with {
  159.     id: 'reminder-show',
  160.     background: 'blur'
  161. } %}
  162.     {% block title %}<span id="reminder-show-name">{{ 'grimoire.reminder_show.title'|trans }}</span>{% endblock %}
  163.     {% block body %}
  164.     <div id="reminder-show-token" class="character-show__token"></div>
  165.     <p class="mt-4"><button type="button" class="button button--warning" id="reminder-remove">{{ 'grimoire.reminder_show.remove'|trans }}</button></p>
  166.     {% endblock %}
  167. {% endembed %}
  168. <template id="token-entry-template">
  169.     <li class="token-display__item js--token--item">
  170.         <div class="js--token--show"></div>
  171.         <p class="character-show__ability mt-4 js--token--ability"></p>
  172.         <button type="button" class="token-display__remove js--token--remove" aria-label="{{ 'grimoire.reminder_show.remove'|trans }}">
  173.             <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512" aria-hidden="true"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path style="fill: currentColor;" d="M135.2 17.7C140.6 6.8 151.7 0 163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3zM32 128H416V448c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16V432c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"/></svg>
  174.         </button>
  175.     </li>
  176. </template>