set up new workflow and migrate to .forgejo dir (#5)
Some checks failed
Deploy / deploy (push) Failing after 39s
Some checks failed
Deploy / deploy (push) Failing after 39s
Co-authored-by: Benjamin Palko <benjaminpalko@hotmail.com> Reviewed-on: #5
This commit is contained in:
parent
c37955c51b
commit
f526f5c0aa
99 changed files with 1866 additions and 1470 deletions
|
|
@ -1,9 +1,11 @@
|
|||
### megamenu
|
||||
|
||||
A megamenu is a large, horizontal menu where each item opens a popover to show a large block of navigation links. Megamenu must be used once, on top of the page. Inside each popover, you can use a daisyUI menu, or any custom content. Megamenu fits better on large screens only, and for small screens, you can hide the megamenu and show the content in a dropdown or a drawer.
|
||||
|
||||
[megamenu docs](https://daisyui.com/components/megamenu/)
|
||||
|
||||
#### Class names
|
||||
|
||||
- component: `megamenu`
|
||||
- part: `megamenu-active`
|
||||
- modifier: `megamenu-wide`, `megamenu-full`
|
||||
|
|
@ -11,53 +13,69 @@ A megamenu is a large, horizontal menu where each item opens a popover to show a
|
|||
- size: `megamenu-xs`, `megamenu-sm`, `megamenu-md`, `megamenu-lg`, `megamenu-xl`
|
||||
|
||||
#### Syntax
|
||||
|
||||
```html
|
||||
<button class="btn sm:hidden" popovertarget="my-megamenu-1">Menu</button>
|
||||
<div class="megamenu max-sm:megamenu-vertical {MODIFIER} p-2 border border-base-300" id="my-megamenu-1" popover>
|
||||
<span class="megamenu-active"></span>
|
||||
<div
|
||||
class="megamenu max-sm:megamenu-vertical {MODIFIER} border-base-300 border p-2"
|
||||
id="my-megamenu-1"
|
||||
popover
|
||||
>
|
||||
<span class="megamenu-active"></span>
|
||||
|
||||
<button popovertarget="item-1">button 1</button>
|
||||
<div id="item-1" popover>
|
||||
{CONTENT}
|
||||
</div>
|
||||
|
||||
<button popovertarget="item-2">button 2</button>
|
||||
<div id="item-2" popover>
|
||||
{CONTENT}
|
||||
</div>
|
||||
<button popovertarget="item-1">button 1</button>
|
||||
<div id="item-1" popover>{CONTENT}</div>
|
||||
|
||||
<button popovertarget="item-2">button 2</button>
|
||||
<div id="item-2" popover>{CONTENT}</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Example of megamenu-wide with lots of menu items
|
||||
|
||||
```html
|
||||
<button class="btn sm:hidden" popovertarget="my-megamenu-2">Menu</button>
|
||||
<div class="megamenu max-sm:megamenu-vertical megamenu-wide w-full p-2 border border-base-300" id="my-megamenu-2" popover>
|
||||
<span class="megamenu-active"></span>
|
||||
<button popovertarget="c1">One</button>
|
||||
<div id="c1" popover>
|
||||
<div class="flex max-sm:flex-col items-start">
|
||||
<ul class="menu w-full md:menu-horizontal">
|
||||
<li>
|
||||
<a>first column menu item</a>
|
||||
<ul><li><a>sub menu item</a></li></ul>
|
||||
</li>
|
||||
<li>
|
||||
<a>second column menu item</a>
|
||||
<ul><li><a>sub menu item</a></li></ul>
|
||||
</li>
|
||||
<li>
|
||||
<a>third column menu item</a>
|
||||
<ul><li><a>sub menu item</a></li></ul>
|
||||
</li>
|
||||
</ul>
|
||||
<img src="{image-url}" class="md:max-w-sm max-md:w-auto" alt="sample image at the end of the megamenu">
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="megamenu max-sm:megamenu-vertical megamenu-wide border-base-300 w-full border p-2"
|
||||
id="my-megamenu-2"
|
||||
popover
|
||||
>
|
||||
<span class="megamenu-active"></span>
|
||||
<button popovertarget="c1">One</button>
|
||||
<div id="c1" popover>
|
||||
<div class="flex items-start max-sm:flex-col">
|
||||
<ul class="menu md:menu-horizontal w-full">
|
||||
<li>
|
||||
<a>first column menu item</a>
|
||||
<ul>
|
||||
<li><a>sub menu item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a>second column menu item</a>
|
||||
<ul>
|
||||
<li><a>sub menu item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a>third column menu item</a>
|
||||
<ul>
|
||||
<li><a>sub menu item</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<img
|
||||
src="{image-url}"
|
||||
class="max-md:w-auto md:max-w-sm"
|
||||
alt="sample image at the end of the megamenu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
|
||||
#### Rules
|
||||
|
||||
- {MODIFIER} is optional and can have one of the modifier class names and one of the size class names
|
||||
- `megamenu-active` span is mandatory. it's the indicator that moves under the active item
|
||||
- Each button must have a corresponding popover with the same id as the popovertarget value. HTML IDs must be unique.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue