Commit Graph

76 Commits

Author SHA1 Message Date
Aditya Telange a57641a24b
fix theme-toggle shown when js is disabled 2021-02-12 10:49:03 +05:30
Aditya Telange 6f8edf1ffa
change theme-switch from 'a' to 'button'
and refactor
2021-02-12 10:48:04 +05:30
Aditya Telange f8781e2cc8
Improve header
- fix header height
       61px->60px
    - check for elements before displaying
    - align theme-toggle
    - rm unnecessary elements
    - rm theme-toggle class
    - rm menu class
2021-01-31 17:09:38 +05:30
Aditya Telange b4933eadd6
header: use .KeyName for accesskey search
in menu

- .Name doesn't work with emojis
- .URL doesn't work with url such as 'search/'
2020-12-18 22:50:04 +05:30
Aditya Telange 6c83df566c
header: add accesskey (Alt + /) for search
in menu

- Alt + /: jumps to search page if in menu
2020-12-18 22:05:02 +05:30
Aditya Telange a150c3449a
Link AccessKeys shortcut in title of elements 2020-12-18 20:02:05 +05:30
Aditya Telange 09aba49bf0
header: rm class attributes [WIP]
from hugov0.79.0
2020-12-13 22:29:06 +05:30
Aditya Telange 153740bbac
header: add title attribute to menus 2020-12-13 20:17:01 +05:30
Aditya Telange b7f5dd10f1 language-switch: humanize only Lang code
- displays weird text :/
- amend to ad11fe1
2020-12-11 17:20:50 +05:30
Aditya Telange 9c09564590
header: fix trailing slash '/' in menu URL
closes #122
2020-12-11 00:18:08 +05:30
Aditya Telange 7a0e742def
header: improve menu location indicator
- fix non-highlight on subdirs
- menu url need not have leading or trailing slashes
- fix non-highlight with multilingual config
2020-12-01 13:59:31 +05:30
Aditya Telange ad11fe16ed
language-switch: rm humanize on 'displayFullLangName'
- displays weird text :/
2020-11-28 23:04:32 +05:30
Aditya Telange b301d60f03
theme-switch: Improve theme switch logic (#86)
- removes unnecessary local-storage item removal
- less inline script on build
- assumes `defaultTheme as auto when value is not `dark` or `light`
- should work according to table at docs
2020-11-26 09:10:24 +05:30
Aditya Telange b7169d2259
language-switch: enable emojify
- languageName: ":country_emoji:"
 can now be displayed as emoji
2020-11-08 23:07:51 +05:30
Itay Cohen 3064e8cfc5
theme-switch: Enable theme toggle unless specifically disabled (#69)
Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2020-11-04 14:04:45 +05:30
Aditya Telange 12b6b132e4 Revert "theme-switch-button: improve logic"
This reverts commit 0eed773e6d.
2020-11-03 20:21:10 +05:30
Aditya Telange 0eed773e6d
theme-switch-button: improve logic
- owner can set dark/light/auto default theme
- theme toggle will be enabled on all theme modes unless disbaled
- if disableThemeToggle is true, user won't be able to switch themes,
here auto (a/c to system theme) also works

for #69
2020-11-03 20:07:59 +05:30
Aditya Telange b239f42f6b
Add accesskeys (attribute specifies a shortcut key to activate/focus an element.)
c - ToC Open/Close
g- Go To Top
h - Home (according to current lang)
t - Theme toggle

more: https://www.w3schools.com/tags/att_global_accesskey.asp
2020-10-30 01:15:43 +05:30
Aditya Telange c33dabf3a2
header: add Language switch (#54)
* language-switch: init
* header: move logo-switches together
2020-10-26 22:19:05 +05:30
Aditya Telange 3826200b7c
nav-label: accessibility 2020-10-17 00:05:10 +05:30
Aditya Telange 3edc160c59
nav-label: init
* label can be set differently from title
* label can have an optional icon with preffered size

* in site config =>
params:
  label:
    text: "Home"
    icon: /apple-touch-icon.png
    iconHeight: 35
2020-10-16 23:56:56 +05:30
Aditya Telange a9e00a3640
theme: set proper conditions
for having default-theme with theme-toggle

* can set/unset default theme
* for default-theme: dark/light : theme-toggle will not be visible
* theme-toggle with defaultheme: auto is functional

fixes #25 for #15
2020-10-05 14:34:44 +05:30
Aditya Telange 994c0b56e1
noscript: add noscript tags
* hide theme-toggle and
    * go-to-top button
    when js is disabled
2020-10-05 14:07:23 +05:30
Aditya Telange 6a9e9e129a
theme-switch-button: init feature (#15)
* thanks to https://feathericons.com for svgs
* can be disabled in site config
   Params:
     disableThemeToggle : true
2020-10-04 20:43:24 +05:30
Aditya Telange af19236002
header: rm unnecessary logo link 2020-10-04 20:25:39 +05:30
Aditya Telange 016dd6e9fa
(lint) remove unnecessary whitespace
created by hugo's {{ }}
2020-09-23 12:52:32 +05:30
Aditya Telange 6770e5e552
menu : add menu location indicator
credits for fix with [.IsMenuCurrent](https://gohugo.io/functions/ismenucurrent/): https://stackoverflow.com/a/56454338
2020-09-20 19:03:43 +05:30
Aditya Telange 2eef3fcc12
automatic theme based on browser theme
usage: add to config
    params:
        defaultTheme: "auto"
2020-09-17 15:28:03 +05:30
Aditya Telange eeb70f3f89
automatic-theme : remove 2020-09-06 20:16:51 +05:30
Aditya Telange e35915a561
support Multilingual navigation
add reading time as i18n
2020-08-25 14:04:59 +05:30
Aditya Telange e17d61b46c
menu : save menu scroll position in localstorage
(ux improve)
2020-08-21 21:03:05 +05:30
Aditya Telange 84ec2bc75f rm redundant code 2020-07-26 20:12:48 +05:30
Aditya Telange 28aa04ddb6 baseof: separate into header, footer 2020-07-21 15:36:30 +05:30
Aditya Telange 8a0783adfb new layout
- create baseof
    - separate list, single
    - header, footer
2020-07-20 20:32:07 +05:30
Aditya Telange 2e0ef75edf separate head 2020-07-20 20:13:51 +05:30
Aditya Telange e6f516da62 theme: don't include set-theme inline 2020-07-20 19:46:19 +05:30
Aditya Telange 2884ee2055 add styles from assets
- bundle an-old-hope and style
    - minify
2020-07-20 19:17:39 +05:30
Paramtamtam 91dabb761f
Update header.html 2020-05-25 10:42:32 +05:00
Ryan Harter 98a6d49c5e
Merge pull request #1 from nanxiaobei/master
rebase
2020-05-22 17:12:46 -05:00
nanxiaobei bcfd902a30 simplify code 2020-03-10 01:50:02 +08:00
nanxiaobei ae2b0c9d96 update html format 2020-03-09 23:56:47 +08:00
Ryan Harter c021eace22 Adds support for custom css. 2020-03-04 22:30:42 -06:00
南小北 35cf31b81f
Update month value 2019-10-20 18:20:15 +08:00
nanxiaobei c163b43b9a Fix Dark Mode logic 2019-10-17 03:02:35 +08:00
nanxiaobei 6725cb9806 Refine Dark Mode code 2019-10-16 11:27:49 +08:00
nanxiaobei a1b778c68a Add Dark Mode core code 2019-10-16 04:15:16 +08:00
nanxiaobei ba297661ff Add dark mode 2019-10-15 01:31:07 +08:00
nanxiaobei ee1f7e5aee Add list dynamic background 2019-09-15 06:55:10 +08:00
nanxiaobei dedfb5a865 Update template order 2019-09-07 20:31:12 +08:00
Pedro Gomes 6143cd2035
Include open graph template in header 2019-09-04 20:28:40 +07:00