tchinchow / story-customized

Beautiful responsive Hugo blog theme focused on simplicity and elegance, with many extra features including presentations, math typesetting, mermaidJs flowcharts, image carousels, maps & GPX, integration, embedded video player, music notation, and search.
https://story-customized.tchinchow.net/
MIT License
0 stars 0 forks source link

[FEATURE] Add the possibility to render keyboard keys #4

Open tchinchow opened 3 years ago

tchinchow commented 3 years ago

Is your feature request related to a problem? Please describe. Some procedures describe the use of keyboard shortcuts however it is not easy to make these shortcuts stand out.

Describe the solution you'd like It would be great if the Story theme could include a feature that allows rendering keyboard keys.

Describe alternatives you've considered A possible implementation could use a mix of Story "feature" and Hugo "shortcode".

OSS CSS already exist and blend very well with Story's design: https://github.com/monsterbrain/keyboard-keys

tchinchow commented 3 years ago

Feature has been merged into master and looks OK.

tchinchow commented 3 years ago

Current implementation requires to add the "feature-kbd-keys" Story feature however there should be no need for this.

Indeed, we should we able to just use the Hugo shortcode and CSS files would be included on the fly automatically. The following code should do the job:

{{ if .HasShortcode "kbd-key" }}
tchinchow commented 3 years ago

I just stumbled upon this web site and it seems that their keyboard has support for more keys than ours. Can we upgrade ours ?