Started attempt at formalising component system used in BookStack

Added a document to try to define things.
Updated the loading so components are registed dynamically.
Added some standardised ways to reference other elems & define options
This commit is contained in:
Dan Brown
2020-06-24 20:38:08 +01:00
parent 71e7dd5894
commit 76d02cd472
10 changed files with 213 additions and 116 deletions

View File

@ -1,10 +1,10 @@
<div dropdown class="dropdown-container" id="export-menu">
<div dropdown-toggle class="icon-list-item"
<div component="dropdown" class="dropdown-container" id="export-menu">
<div refs="dropdown@toggle" class="icon-list-item"
aria-haspopup="true" aria-expanded="false" aria-label="{{ trans('entities.export') }}" tabindex="0">
<span>@icon('export')</span>
<span>{{ trans('entities.export') }}</span>
</div>
<ul class="wide dropdown-menu" role="menu">
<ul refs="dropdown@menu" class="wide dropdown-menu" role="menu">
<li><a href="{{ $entity->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $entity->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $entity->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>