diff --git a/controllers/tablerdata.go b/controllers/tablerdata.go index af53571..ed6e865 100644 --- a/controllers/tablerdata.go +++ b/controllers/tablerdata.go @@ -8,8 +8,8 @@ func SampleNavbarMenu() TablerMenu { Title: "Dashboards", Icon: "home", Children: []*TablerMenuItem{ - {Title: "Default", URL: "index.html"}, - {Title: "Crypto", URL: "dashboard-crypto.html"}, + {Title: "Default", URL: "index.html", Icon: "dashboard"}, + {Title: "Crypto", URL: "dashboard-crypto.html", Icon: "currency-bitcoin"}, }, }, "layout": { @@ -17,27 +17,27 @@ func SampleNavbarMenu() TablerMenu { Icon: "layout-2", Columns: 2, Children: []*TablerMenuItem{ - {Title: "Boxed", URL: "layout-boxed.html"}, - {Title: "Combined", URL: "layout-combo.html"}, - {Title: "Condensed", URL: "layout-condensed.html"}, - {Title: "Fluid", URL: "layout-fluid.html"}, - {Title: "Fluid vertical", URL: "layout-fluid-vertical.html"}, - {Title: "Horizontal", URL: "layout-horizontal.html"}, - {Title: "Navbar dark", URL: "layout-navbar-dark.html"}, - {Title: "Navbar overlap", URL: "layout-navbar-overlap.html"}, - {Title: "Navbar sticky", URL: "layout-navbar-sticky.html"}, - {Title: "Right vertical", URL: "layout-vertical-right.html"}, - {Title: "Vertical", URL: "layout-vertical.html"}, - {Title: "Vertical transparent", URL: "layout-vertical-transparent.html"}, + {Title: "Boxed", URL: "layout-boxed.html", Icon: "layout-navbar"}, + {Title: "Combined", URL: "layout-combo.html", Icon: "layout-navbar"}, + {Title: "Condensed", URL: "layout-condensed.html", Icon: "layout-navbar"}, + {Title: "Fluid", URL: "layout-fluid.html", Icon: "layout-navbar"}, + {Title: "Fluid vertical", URL: "layout-fluid-vertical.html", Icon: "layout-navbar"}, + {Title: "Horizontal", URL: "layout-horizontal.html", Icon: "layout-navbar"}, + {Title: "Navbar dark", URL: "layout-navbar-dark.html", Icon: "layout-navbar"}, + {Title: "Navbar overlap", URL: "layout-navbar-overlap.html", Icon: "layout-navbar"}, + {Title: "Navbar sticky", URL: "layout-navbar-sticky.html", Icon: "layout-navbar"}, + {Title: "Right vertical", URL: "layout-vertical-right.html", Icon: "layout-navbar"}, + {Title: "Vertical", URL: "layout-vertical.html", Icon: "layout-navbar"}, + {Title: "Vertical transparent", URL: "layout-vertical-transparent.html", Icon: "layout-navbar"}, }, }, "help": { Title: "Help", Icon: "lifebuoy", Children: []*TablerMenuItem{ - {Title: "Documentation", URL: "https://tabler.io/docs"}, - {Title: "Changelog", URL: "changelog.html"}, - {Title: "Source code", URL: "https://github.com/tabler/tabler"}, + {Title: "Documentation", URL: "https://tabler.io/docs", Icon: "book"}, + {Title: "Changelog", URL: "changelog.html", Icon: "list"}, + {Title: "Source code", URL: "https://github.com/tabler/tabler", Icon: "brand-github"}, {Title: "Sponsor project!", URL: "https://github.com/sponsors/codecalm", Color: "pink", Icon: "heart"}, }, }, diff --git a/storage/templates/tabler/includes/icon.html b/storage/templates/tabler/includes/icon.html new file mode 100644 index 0000000..437c856 --- /dev/null +++ b/storage/templates/tabler/includes/icon.html @@ -0,0 +1,21 @@ +{{define "tabler_icon"}} + + {{if eq . "home"}} + {{else if eq . "layout-2"}} + {{else if eq . "lifebuoy"}} + {{else}} + {{end}} + +{{end}} + +{{define "tabler_icon_small"}} + + {{if eq . "book"}} + {{else if eq . "list"}} + {{else if eq . "brand-github"}} + {{else if eq . "heart"}} + {{else if eq . "layout-navbar"}} + {{else}} + {{end}} + +{{end}} diff --git a/storage/templates/tabler/includes/navbar-menu.html b/storage/templates/tabler/includes/navbar-menu.html index 50bbb1f..879b53d 100644 --- a/storage/templates/tabler/includes/navbar-menu.html +++ b/storage/templates/tabler/includes/navbar-menu.html @@ -1,10 +1,10 @@ {{define "tabler_navbar_menu"}} -{{end}} \ No newline at end of file +{{end}}