0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-08 10:00:10 +00:00

Standardised dropdown list item styles, Extracted page editor toolbar

- Updated all dropdown list item actions into three specific styles:
  icon-item, text-item & label-item. Allows a stronger structure while
  prevents mixing of styles as we were getting for header dropdown in
  dark mode.
- Extracted out page editor top toolbar to its own view file & split
  editor switch options to different markdown options.
This commit is contained in:
Dan Brown 2022-04-20 14:03:47 +01:00
parent 492ffff0a4
commit 214992650d
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
16 changed files with 171 additions and 95 deletions
resources/js/components

View file

@ -131,7 +131,7 @@ class AutoSuggest {
return this.hideSuggestions();
}
this.list.innerHTML = suggestions.map(value => `<li><button type="button">${escapeHtml(value)}</button></li>`).join('');
this.list.innerHTML = suggestions.map(value => `<li><button type="button" class="text-item">${escapeHtml(value)}</button></li>`).join('');
this.list.style.display = 'block';
for (const button of this.list.querySelectorAll('button')) {
button.addEventListener('blur', this.hideSuggestionsIfFocusedLost.bind(this));

View file

@ -96,7 +96,7 @@ class CodeEditor {
this.historyDropDown.classList.toggle('hidden', historyKeys.length === 0);
this.historyList.innerHTML = historyKeys.map(key => {
const localTime = (new Date(parseInt(key))).toLocaleTimeString();
return `<li><button type="button" data-time="${key}">${localTime}</button></li>`;
return `<li><button type="button" data-time="${key}" class="text-item">${localTime}</button></li>`;
}).join('');
}