diff --git a/public/assets/css/app.css b/public/assets/css/app.css index ec06c04929c608bd70dff2e817031b9261178c8a..ed87657ff09fa1500c9123160d4491a5b7c44d5f 100644 --- a/public/assets/css/app.css +++ b/public/assets/css/app.css @@ -335,8 +335,11 @@ table.label-table > tbody > tr > td { .text-grey { color:lightgrey; } -.text-dark-grey { - color: #9a9a9a; +.text-grey { + color:lightgrey; +} +.text-dimgrey { + color: dimgrey; } .links-container:hover .fa.text-grey, td:hover .fa.text-grey, p:hover .fa.text-grey, h4:hover .fa.text-grey, h1:hover .fa.text-grey { color: dimgrey; @@ -559,4 +562,33 @@ li.nav-item { } .example-source a { color: #0A53BE; -} \ No newline at end of file +} + +/* Specifies the size of the audio container */ +audio { + width: 95px; + height: 25px; + margin-bottom: -7px; +} + +audio::-webkit-media-controls-panel { + -webkit-justify-content: center; + height: 25px; +} + +/* Removes the timeline */ +audio::-webkit-media-controls-timeline { + display: none !important; +} + +/* Removes the time stamp */ +audio::-webkit-media-controls-current-time-display { + display: none; +} +audio::-webkit-media-controls-time-remaining-display { + display: none; +} +/* Removes mute-button */ +audio::-webkit-media-controls-mute-button { + display: none; +} diff --git a/src/Controller/LabelController.php b/src/Controller/LabelController.php index b3f89e32812ae618f4e71485f2fda3935bbf6824..16fc959a0f625bcd8be2a965c716a3f35e558a44 100644 --- a/src/Controller/LabelController.php +++ b/src/Controller/LabelController.php @@ -66,6 +66,7 @@ class LabelController extends AppBaseController */ public function new(ManagerRegistry $doctrine, Request $request, $masterType, $category, LabelRepository $labelRepository, LabelManager $labelManager): Response { + $owner = null; if ($masterType === Label::MASTER_PERSONAL) { $owner = $this->getUser(); } diff --git a/templates/entry/_comments.html.twig b/templates/entry/_comments.html.twig index 3c7c02e41e805aae4f3c09907be67dec368286c7..8f006152cd485f48a83ae4f316ee31830ba11dda 100644 --- a/templates/entry/_comments.html.twig +++ b/templates/entry/_comments.html.twig @@ -84,17 +84,24 @@ <div class="arrow-link comment-block" id="comment{{ parent.id }}" data-parent-id="{{ parent.id }}"> <a class="text-black" data-bs-toggle="collapse" href="#{{ discriminator }}-{{ key }}" role="button" aria-expanded="false" aria-controls="collapseExample"> - <i class="fa fa-comment fa-2x"></i> + <i class="fa fa-comment fa-2x pe-2"></i> + + <div class=" d-none d-sm-inline-block"> + <span class="fst-italic text-dark-grey"> + {{ comment.user }} - {{ comment.date }} + </span> + {{ _self.actions(entry, commentKey, ['edit', 'delete'], '', 'Comments') }} + </div> </a> <div class="collapse" id="{{ discriminator }}-{{ key }}"> - {{ comment.text|nl2br }} - <div class=" pt-2"> - <span class="fst-italic text-dark-grey"> - {{ "Par"|trans }} {{ comment.user }} {{ "le"|trans }} {{ comment.date }} - </span> + <div class="d-sm-none"> + <span class="fst-italic text-dark-grey"> + {{ comment.user }} - {{ comment.date }} + </span> {{ _self.actions(entry, commentKey, ['edit', 'delete'], '', 'Comments') }} </div> + {{ comment.text|nl2br }} </div> </div> @@ -104,12 +111,12 @@ {% macro actions(entry, key, operations, title, category) %} {% if 'edit' in operations %} - <a href="#" data-url="{{ path('app_entry_edit_block', {id: entry.id, blockId: key, blockCategory: category}) }}" class="modal-form"><i class="fa fa-pencil-square fa-fixed-sized text-grey" title=""></i></a> + <a href="#" data-url="{{ path('app_entry_edit_block', {id: entry.id, blockId: key, blockCategory: category}) }}" class="modal-form"><i class="fa fa-pencil-square fa-fixed-sized text-dimgrey" title=""></i></a> {% endif %} {% if 'delete' in operations %} <a href="#" data-href="{{ path('app_entry_delete_block', {id: entry.id, blockId: key, blockCategory: category}) }}" - data-confirm="{{ "Confirmer la suppression ?"|trans }}" data-bs-toggle="modal" data-bs-target="#confirm-dialog"><i class="fa fa-trash fa-fixed-sized text-grey" title=""></i></a> + data-confirm="{{ "Confirmer la suppression ?"|trans }}" data-bs-toggle="modal" data-bs-target="#confirm-dialog"><i class="fa fa-trash fa-fixed-sized text-dimgrey" title=""></i></a> {% endif %} {% endmacro %} \ No newline at end of file diff --git a/templates/entry/_entryAttributes.html.twig b/templates/entry/_entryAttributes.html.twig index 56f312dfc66186c69f450ce1e3a5232e791e7cef..52ebc58b949f6f386b9c1266f986ff3bff3d3455 100644 --- a/templates/entry/_entryAttributes.html.twig +++ b/templates/entry/_entryAttributes.html.twig @@ -39,23 +39,25 @@ {### PRONUNCIATION ######### SET KEY ##########} {% set pronunciationKey = '[Items][0][Sense][Pronunciations]['~key~']' %} <li id="{{ pronunciation.id }}"> - <div class="links-container"> + <div class="links-container"> {% if pronunciation.accent is defined %}{{ pronunciation.accent }} :{% endif %} {{ pronunciation.api }} {% for sound in pronunciation.sounds|default([]) %} - <div> - <audio controls style="scale: 75%"> - <source src="{{ sound.url }}" type="audio/ogg"> - {# <source src="horse.mp3" type="audio/mpeg">#} - Your browser does not support the audio element. - </audio> - </div> + <div class="d-inline-block"> + {{ sound.accent }} + <audio controls> + <source src="{{ sound.url }}" type="audio/ogg"> + {# <source src="horse.mp3" type="audio/mpeg">#} + Your browser does not support the audio element. + </audio> + </div> {% endfor %} {{ _self.actions(entry, pronunciationKey, ['comment'], "", 'Comments') }} {{ _self.actions(entry, pronunciationKey, ['edit', 'delete'], '', 'Pronunciations') }} <br> </div> + </li> {% endfor %} </ol>