From bc3d72ccee6c744b60d35341d12306d9336622d0 Mon Sep 17 00:00:00 2001 From: Guillermo Guerrero Ibarra Date: Sat, 19 Mar 2022 18:52:26 +0100 Subject: Menu as mouse over. (#348) --- README.md | 11 ++++++++++- exampleSite/config.toml | 2 ++ layouts/partials/nav.html | 2 +- static/js/front.js | 7 +++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6868188..f17baa9 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ Leave the `googleAnalytics` key empty to disable it. ### Logo -A logo can be selected, two parameters `logo` and `logo_small` can be defined. By default `logo` is used for medium and big screens and the `logo_small` value will be used when the site is rendered on small screens. Also there is the posibility to disable the logo and render a alternative text. +A logo can be selected, two parameters `logo` and `logo_small` can be defined. By default `logo` is used for medium and big screens and the `logo_small` value will be used when the site is rendered on small screens. Also there is the possibility to disable the logo and render a alternative text. ```toml [params] @@ -345,6 +345,15 @@ The social links on the right side are configured as a top-level menu. pre = "" ``` +### Menu behavior + +The dropdown menu is displayed by default when the user clicks on the menu item. However, you can also use the `dropdown_mouse_over` setting to change this behavior and use the mouse over instead. + +```toml +[params] + dropdown_mouse_over = true +``` + ### Blog post thumbnails After creating a new post you can define a banner by entering the relative path to the image. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 77849f7..bb31873 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -445,6 +445,8 @@ paginate = 10 # Format dates with Go's time formatting date_format = "January 2, 2006" + dropdown_mouse_over = false + disabled_logo = false logo_text = "Universal" diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 632a396..aebc1e7 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,5 +1,5 @@