When using line numbers with table style, the border radius for the
corresponding codeblocks leads to annoying gaps between the line numbers
and the actual code.
This commit removes the border radius when the corresponding element is
displayed inside a table (which is the case when line numbers are used
with table format).
The PaperMod theme uses a border-radius for codeblocks by default. The
div that contains the corresponding code element uses the default
background color, independent of the selected theme (dark vs. light).
This causes an incorrect coloring in the corners of code blocks.
This commits overwrites the background color of the surrounding div with
the current theme color.
Many of the CSS files had no semicolon after the last rule in a block,
which is proper syntax, but it's annoying when adding more rules. Since
omitting the semicolons doesn't really have a benefit, I've decided to
add them.
* add buttons to copy code block contents
Adds a clickable "copy" link in the top-right corner of each code block.
If available, uses the navigator.clipboard API. Falls back to selecting
the text and calling document.execCommand('copy') to copy text.
* hides copy button unless mouse is hovering over code block
* change text of copy button when text is copied
* add translation keys for copy button text `code_copy` and `code_copied`
* To disable use `Params.disableCodeCopy: true` in site config
Usage:
{{< figure align=center src="image.jpg" >}}
Parameter values:
- 'center': align image and captions to center of page
- anything else neglected
* Appends "#center" to the image's URL in order to utilize existing CSS
rules for centering images.
- fix menu element becoming inactive
change class active -> focus
- set input type seach #198
- add a reset func
- add script to clear searchbox
when clicked on X sign
- fix header height
61px->60px
- check for elements before displaying
- align theme-toggle
- rm unnecessary elements
- rm theme-toggle class
- rm menu class
* adds Breadcrumb nav above title of single page/post
* add enabler var 'ShowBreadCrumbs'
* introduce i18n var "home"
usage:
in site config:
Params:
ShowBreadCrumbs: true
in page front-matter:
ShowBreadCrumbs: false