aggiornato per uso di taiwind
This commit is contained in:
13
web/templates/components/collapse.html
Normal file
13
web/templates/components/collapse.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{define "flowbite_collapse"}}
|
||||
<button data-collapse-toggle="collapseExample" type="button" class="flex w-full items-center justify-between rounded-lg bg-gray-100 px-5 py-2.5 text-left text-sm font-medium text-gray-500 hover:bg-gray-200" aria-expanded="false" aria-controls="collapseExample">
|
||||
<span>Toggle collapse</span>
|
||||
<svg data-accordion-icon class="h-3 w-3 shrink-0" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5 5 1 1 5"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div id="collapseExample" class="hidden">
|
||||
<div class="rounded-b-lg border border-gray-200 p-5">
|
||||
<p class="text-sm text-gray-500">Collapsed content.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
16
web/templates/components/dropdown.html
Normal file
16
web/templates/components/dropdown.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{define "flowbite_dropdown"}}
|
||||
<button id="dropdownDefaultButton" data-dropdown-toggle="dropdown" class="inline-flex items-center rounded-lg bg-blue-700 px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-blue-800" type="button">
|
||||
Dropdown
|
||||
<svg class="ms-3 h-2.5 w-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div id="dropdown" class="z-10 hidden w-44 divide-y divide-gray-100 rounded-lg bg-white shadow-sm">
|
||||
<ul class="py-2 text-sm text-gray-700" aria-labelledby="dropdownDefaultButton">
|
||||
<li><a href="#" class="block px-4 py-2 hover:bg-gray-100">Dashboard</a></li>
|
||||
<li><a href="#" class="block px-4 py-2 hover:bg-gray-100">Settings</a></li>
|
||||
<li><a href="#" class="block px-4 py-2 hover:bg-gray-100">Sign out</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
17
web/templates/components/flash.html
Normal file
17
web/templates/components/flash.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{{define "flowbite_flash"}}
|
||||
{{if .FlashSuccess}}
|
||||
<div class="mb-4 flex items-center rounded-lg border border-green-200 bg-green-50 p-4 text-green-800" role="alert">
|
||||
<span class="text-sm font-medium">{{.FlashSuccess}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .FlashError}}
|
||||
<div class="mb-4 flex items-center rounded-lg border border-red-200 bg-red-50 p-4 text-red-800" role="alert">
|
||||
<span class="text-sm font-medium">{{.FlashError}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .FlashWarning}}
|
||||
<div class="mb-4 flex items-center rounded-lg border border-yellow-200 bg-yellow-50 p-4 text-yellow-800" role="alert">
|
||||
<span class="text-sm font-medium">{{.FlashWarning}}</span>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
25
web/templates/components/modal.html
Normal file
25
web/templates/components/modal.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{{define "flowbite_modal"}}
|
||||
<div id="{{.ModalID}}" tabindex="-1" aria-hidden="true" class="fixed left-0 right-0 top-0 z-50 hidden h-[calc(100%-1rem)] max-h-full w-full items-center justify-center overflow-y-auto overflow-x-hidden p-4 md:inset-0">
|
||||
<div class="relative max-h-full w-full max-w-2xl">
|
||||
<div class="relative rounded-lg bg-white shadow-sm">
|
||||
<div class="flex items-start justify-between rounded-t border-b p-4 md:p-5">
|
||||
<h3 class="text-xl font-semibold text-gray-900">{{.ModalTitle}}</h3>
|
||||
<button type="button" class="ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900" data-modal-hide="{{.ModalID}}" aria-label="Close modal">
|
||||
<span class="sr-only">Close modal</span>
|
||||
<svg class="h-3 w-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="space-y-4 p-4 md:p-5">
|
||||
{{template .ModalBodyTemplate .}}
|
||||
</div>
|
||||
{{if .ModalFooterTemplate}}
|
||||
<div class="flex items-center rounded-b border-t border-gray-200 p-4 md:p-5">
|
||||
{{template .ModalFooterTemplate .}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
21
web/templates/components/navbar.html
Normal file
21
web/templates/components/navbar.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{define "flowbite_navbar"}}
|
||||
<nav class="border-gray-200 bg-white">
|
||||
<div class="mx-auto flex max-w-screen-xl flex-wrap items-center justify-between p-4">
|
||||
<a href="#" class="flex items-center space-x-3 rtl:space-x-reverse">
|
||||
<span class="self-center whitespace-nowrap text-2xl font-semibold">Trustcontact</span>
|
||||
</a>
|
||||
<button data-collapse-toggle="navbar-default" type="button" class="inline-flex h-10 w-10 items-center justify-center rounded-lg p-2 text-sm text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 md:hidden" aria-controls="navbar-default" aria-expanded="false">
|
||||
<span class="sr-only">Open main menu</span>
|
||||
<svg class="h-5 w-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="hidden w-full md:block md:w-auto" id="navbar-default">
|
||||
<ul class="mt-4 flex flex-col rounded-lg border border-gray-100 bg-gray-50 p-4 font-medium md:mt-0 md:flex-row md:space-x-8 md:border-0 md:bg-white md:p-0 rtl:space-x-reverse">
|
||||
<li><a href="#" class="block rounded-sm bg-blue-700 px-3 py-2 text-white md:bg-transparent md:p-0 md:text-blue-700" aria-current="page">Home</a></li>
|
||||
<li><a href="#" class="block rounded-sm px-3 py-2 text-gray-900 hover:bg-gray-100 md:p-0 md:hover:bg-transparent md:hover:text-blue-700">About</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{{end}}
|
||||
20
web/templates/components/tabs.html
Normal file
20
web/templates/components/tabs.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{{define "flowbite_tabs"}}
|
||||
<div class="mb-4 border-b border-gray-200">
|
||||
<ul class="-mb-px flex flex-wrap text-center text-sm font-medium" id="default-tab" data-tabs-toggle="#default-tab-content" role="tablist">
|
||||
<li class="me-2" role="presentation">
|
||||
<button class="inline-block rounded-t-lg border-b-2 p-4" id="profile-tab" data-tabs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button>
|
||||
</li>
|
||||
<li class="me-2" role="presentation">
|
||||
<button class="inline-block rounded-t-lg border-b-2 p-4" id="dashboard-tab" data-tabs-target="#dashboard" type="button" role="tab" aria-controls="dashboard" aria-selected="false">Dashboard</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="default-tab-content">
|
||||
<div class="hidden rounded-lg bg-gray-50 p-4" id="profile" role="tabpanel" aria-labelledby="profile-tab">
|
||||
<p class="text-sm text-gray-500">Profile tab content.</p>
|
||||
</div>
|
||||
<div class="hidden rounded-lg bg-gray-50 p-4" id="dashboard" role="tabpanel" aria-labelledby="dashboard-tab">
|
||||
<p class="text-sm text-gray-500">Dashboard tab content.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user