diff --git a/README.md b/README.md index ace07d7..621639a 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,13 @@ Clean and minimal personal blog and portfolio theme for Hugo. [View demo](https://ezhil-hugo.netlify.com/) - + + ## Features * Clean and minimal +* Dark mode (Auto detect from OS) * Responsive * Supports tags * Social media links @@ -65,6 +67,9 @@ paginate = 10 featherIconsCDN = true # Specify favicon (icons/i.png maps to static/icons/i.png). No favicon if not defined. favicon = "icons/myicon.png" + # Switch to dark mode or auto detect mode from OS (Optional). + # "dark" will set mode to dark and "auto" will switch to dark mode if OS is in dark mode. + mode = "dark" # "dark" or "auto" # Main menu which appears below site header. [[menu.main]] diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6eb3bc5..e5476bc 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -11,12 +11,13 @@ pygmentscodefences = true pygmentscodefencesguesssyntax = true googleAnalytics = "UA-123-45" -disqusShortname = "localhost" +disqusShortname = "ezhil-demo" [params] subtitle = "Clean and minimal personal [blog theme for Hugo](https://github.com/vividvilla/ezhil)" disableDisqusTypes = ["page"] featherIconsCDN = true + mode = "auto" # "dark" or "auto" [[menu.main]] name = "Home" @@ -43,11 +44,6 @@ name = "Github" icon = "github" url = "https://github.com/vividvilla/ezhil" -[[params.social]] -name = "Twitter" -icon = "twitter" -url = "https://twitter.com/gohugoio" - [[params.social]] name = "RSS" icon = "rss" diff --git a/exampleSite/content/posts/post-7.md b/exampleSite/content/posts/post-7.md new file mode 100644 index 0000000..174b948 --- /dev/null +++ b/exampleSite/content/posts/post-7.md @@ -0,0 +1,14 @@ +--- +title: "How to test dark mode?" +description: "Here is how you can setup dark mode for Ezhil and test on various OS like iOS, Android, macOS and Windows 10." +date: 2018-03-18T12:13:38+05:30 +--- + +You can set dark mode as default by setting `params.mode` to `dark` in `config.toml` or set it to `auto` which will detect based on your OS and switch to dark mode. For more details [refer documentation](https://github.com/vividvilla/ezhil#configuration) + +Here is how you can switch based on your OS + +* [iOS](https://www.howtogeek.com/440078/how-to-enable-dark-mode-on-your-iphone-and-ipad/) +* [Android](https://9to5google.com/2018/12/17/android-dark-mode-theme-pie/) +* [macOS](https://support.apple.com/en-in/HT208976) +* [Windows 10](https://www.cnet.com/how-to/turn-on-the-dark-mode-in-windows-10/) diff --git a/images/screenshot-dark.png b/images/screenshot-dark.png new file mode 100644 index 0000000..b02a39d Binary files /dev/null and b/images/screenshot-dark.png differ diff --git a/images/screenshot-light.png b/images/screenshot-light.png new file mode 100644 index 0000000..e77ae6a Binary files /dev/null and b/images/screenshot-light.png differ diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2d02a73..a04ec31 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -17,7 +17,7 @@ {{- if (in (.Site.Params.excludedTypes | default (slice "page")) .Type) -}} {{- else -}}