Merge pull request #43 from Simple2B/svyat/fix/breadcrubs

add tooltip to breadcrumbs
This commit is contained in:
Костя Столярский 2023-05-11 10:18:38 +03:00 committed by GitHub
commit 6179d2d198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,10 +4,14 @@
{% for breadcrumb in breadcrumbs %}
<li class="inline-flex items-center">
{% if not loop.index==breadcrumbs|length %}
<a href="{{ breadcrumb.url }}" class="inline-flex items-center text-sm truncate w-30 font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white">
<a href="{{ breadcrumb.url }}" class="inline-flex items-center text-sm truncate w-24 font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white" data-tooltip-target="breadcrumb-{{loop.index}}-tooltip" data-tooltip-placement="bottom">
{% else %}
<span class="inline-flex items-center text-sm truncate w-40 font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white">
<span class="inline-flex items-center text-sm truncate w-40 font-medium text-gray-700 hover:text-blue-600 dark:text-gray-400 dark:hover:text-white" data-tooltip-target="breadcrumb-{{loop.index}}-tooltip" data-tooltip-placement="bottom">
{% endif %}
<div id="breadcrumb-{{loop.index}}-tooltip" role="tooltip" class="delay-100 absolute z-[100] invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-700 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
{{ breadcrumb.label }}
<div class="tooltip-arrow" data-popper-arrow></div>
</div>
<!-- prettier-ignore -->
<!--svg for all types of breadcrumb-->
{% if breadcrumb.type == "MyBookList" or breadcrumb.type == "AuthorBookList" %}

2
build_static.sh Normal file
View File

@ -0,0 +1,2 @@
yarn js;
yarn css;

View File

@ -1,13 +1,13 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "class",
darkMode: 'class',
content: [
"./app/templates/**/*.html",
"./src/js/**/*.js",
"./node_modules/flowbite/**/*.js",
'./app/templates/**/*.html',
'./src/js/**/*.js',
'./node_modules/flowbite/**/*.js',
],
theme: {
extend: {},
},
plugins: [require("flowbite/plugin")],
plugins: [require('flowbite/plugin')],
};