Commit graph

177 commits

Author SHA1 Message Date
Jacob Zhong
4be110e540
refactor(widget): taxonomy widget (#763)
* Add link to navbar sections and refactor names

* Prevent duplicate tags and categories information

* Add style to the widget links

* refactor: add `taxonomy` widget

Replaces `categories` and `tag-cloud` widget.

* style: remove unused `font_size_{{ .Count }}` in `taxonomy` widget

---------

Co-authored-by: Jimmy Cai <hi@jimmycai.com>
2023-08-27 18:26:53 +02:00
Jimmy Cai
5063e8f0b8 Merge branch 'master' into canary 2023-08-24 21:36:55 +02:00
Jimmy Cai
41c3033d1a
feat(article): add style to <kbd> tag (#862)
* fix: set `unsafe` to true for exampleSite

To display `<kbd>` tag correctly

* feat(article): add style to `kbd` tag

* feat: improve `<kbd>` style
2023-08-15 13:15:32 +02:00
Jimmy Cai
4e2e90da4c
fix: page translation links overflow (#861)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/788
2023-08-15 12:46:29 +02:00
Jimmy Cai
eefa686661
fix: add word-break: break-word; to <a> and <code> (#860)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/746
2023-08-15 11:47:48 +02:00
Jimmy Cai
f7e442cabb
fix(search): reset lastSearch variable if keywords are empty (#858)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/832
2023-08-12 13:03:45 +02:00
Mehedi Hasan
26d2859f70
fix: very poor color contrast for default text (#845)
Resolves #754

Co-authored-by: Nick Kocharhook <nick@kocharhook.com>
2023-08-12 11:57:02 +02:00
Jacob Zhong
1bd4dcd415
fix(sidebar): add padding-bottom to the right sidebar (#765)
Add bottom padding to the right sidebar
2023-07-12 09:12:58 +08:00
rock G
3ff06fe033
fix: anchor link need decode (#719) 2022-12-05 21:21:37 +01:00
cubercsl
21bd04ec89
fix(codeblock): pass through the options of chroma (#715)
* fix(codeblock): pass through the options of chroma

Pass through the options of chroma highlighting processing for whom
may use some options in codeblock.

This commit fix problem with the following scenarios:
```python {linenos=true}
print("Hello World")
```

Signed-off-by: cubercsl <2014cais01@gmail.com>

* fix(codeblock): margin of no highlight codeblock

This commit fix the wrong margin value of the codeblock which
can not highlight.

The margin is now use the value of ".article-content pre"

Signed-off-by: cubercsl <2014cais01@gmail.com>

Signed-off-by: cubercsl <2014cais01@gmail.com>
2022-12-03 13:14:37 +01:00
Jimmy Cai
b03390d237
Revert "Merge branch 'canary' into master" (#712)
Revert "Merge branch 'canary' into master (#711)"

This reverts commit 8a597a5c9c.
2022-10-29 17:14:19 +02:00
Jimmy Cai
8a597a5c9c
Merge branch 'canary' into master (#711)
* refactor(i18n): simplify the structure of the translation file

* chore: prepare repository for v4.0.0-alpha

* chore: modify go.mod to v4

* refactor: migrate theme configuration to TOML

* fix: exampleSite not using correct theme

* feat: add favicon from assets folder

* refactor: drop linear grandient background feature

remove node-vibrant from dependencies

* feat: use Hugo's code block render hook to implement code copy button

Now it can have i18n support

* refactor: delete color.ts

* refactor: delete Emoji support post from example site

* refactor: drop support for `hidden` field in front matter

* feat: upgrade to PhotoSwipe v5

* chore: bump the required hugo version to 0.100.0

* refactor: remove PhotoSwipe from external.yaml

* fix: extra margin in search result

* fix: incorrect markdown heading level in example site

* refactor: remove some usages of `default` in template

No longer needed thanks to Hugo's configuration merge

* fix: one line codeblock style in firefox

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/564

* feat: add style to new codeblock

* feat: i18n support for codeblock copy text

* fix(menu): jitter when closing menu

It's caused by flexbox gap property, which can't animate

* fix(search): long text overflows under the Search icon

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/515
2022-10-29 17:02:24 +02:00
Jimmy Cai
b0ab8e8ef0 Merge branch 'master' into canary 2022-10-29 13:51:05 +00:00
MartinAramayo
30e033c660
feat(article): make long KaTeX equations scrollable in the x-axis (#706)
* Make long KaTeX equations scrollable in the x-axis

Suggested from: https://katex.org/docs/issues.html, I have tested it adding a long equation and activating a phone user agent.

* refactor: move KaTeX style to article.scss
2022-10-29 14:38:44 +02:00
星の光
ae497c4789
refactor(grid): avoid sidebar layout shift when main content loads slowly (#677)
Co-authored-by: Luguoba <80254980+luguoba@users.noreply.github.com>
2022-10-21 13:06:06 +02:00
Allen Guan
e1a85aa5cd
refactor(highlight): extract common parts of styles and keep line number visible when scrolling (#681)
* merge highlight.scss

* show line number when scroll
2022-10-02 11:38:42 +02:00
Jimmy Cai
655b5102c4 fix(article): footnote reference does not work
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/632
2022-07-28 16:48:37 +00:00
Jimmy Cai
7f94ce9847 fix(search): long text overflows under the Search icon
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/515
2022-06-13 08:36:48 +00:00
Jimmy Cai
1e5cced034 fix(menu): jitter when closing menu
It's caused by flexbox gap property, which can't animate
2022-06-12 14:53:53 +00:00
Jimmy Cai
7a710cbb55 feat: add style to new codeblock 2022-06-12 14:23:26 +00:00
Jimmy Cai
7b2fda70a4 fix: one line codeblock style in firefox
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/564
2022-06-12 14:06:08 +00:00
Jimmy Cai
cdf50c757c fix: extra margin in search result 2022-06-12 12:37:30 +00:00
Jimmy Cai
9d4ab5afcf feat: upgrade to PhotoSwipe v5 2022-06-12 12:10:17 +00:00
Jimmy Cai
b63e6a9c62 refactor: delete color.ts 2022-06-12 11:31:41 +00:00
Jimmy Cai
de08e29b00 feat: use Hugo's code block render hook to implement code copy button
Now it can have i18n support
2022-06-12 11:31:32 +00:00
Jimmy Cai
abf0c773aa refactor: drop linear grandient background feature
remove node-vibrant from dependencies
2022-06-12 10:55:57 +00:00
rmdhnreza
3d09c23284
feat(article): GitLab Snippets Shortcode (#627) 2022-06-11 11:04:20 +02:00
lonzzi
7142de24cc
fix(article): TOC link not working when the heading starts with digits (#603) 2022-06-11 00:39:16 +02:00
cubercsl
9aa6b4925b
fix(style): toc counter is incorrect when there are <a> in heading (#601)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/495, https://github.com/CaiJimmy/hugo-theme-stack/issues/589
2022-06-11 00:34:19 +02:00
Simon Guest
772b9e3ba8
fix(article): regression in article copyright link box-shadow (#611)
Somewhere between hugo 0.88.1 and 0.98.0, box-shadow got applied
to the article copyright, which is an ugly regression.
2022-06-08 18:21:28 +02:00
Simon Guest
955bb8dd7f
feat(shortcodes): add quote shortcode, and example (#414)
* Add quote shortcode, and example

* Use trim to improve whitespace

* Allow for quote with neither author nor source

* Format code and move quote.scss to article.scss

This style is only used on the article page, so it makes more sense to have it there.

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-06-08 17:59:23 +02:00
Spence Churchill
5e350b92e8
refactor: rename "Related contents" to "Related content" (#567) 2022-06-05 17:20:08 +02:00
Allen Guan
58b1e0706a
feat: add general.scss and change link hover style (#550) 2022-06-05 17:00:14 +02:00
Jimmy Cai
5699510c36 refactor(article): remove article toolbar style 2022-03-19 22:41:37 +00:00
Jimmy Cai
6f60f4f552
fix: disable external image lightbox (#525) 2022-03-04 10:31:57 +01:00
Jimmy Cai
985af924e7
feat: new left sidebar layout (#524)
* feat: more compact menu style

* add compact option to sidebar

* fix mobile menu style
2022-03-04 10:24:21 +01:00
FarisZR
0d0375a7fc
feat: add RTL Support and update demo site to Show Arabic/RTL content (#519)
* add LanguageDirection variable

* add .direction-rtl and .direction-ltr clases

* margin -right > margin-inline-end

* keep Codeblocks LTR

* switch to logical properties

* left -> inset-inline-start

* Add Arabic/RTL placeholder text

* Add arabic language

* remove space

* use Html Dir instead of class

* Move codeblock code to layout/article.css and fix 4 spaces codeblocks

* remove unused clases
2022-03-04 00:25:34 +01:00
Felix Niederwanger
e22664be13
feat(widget): add category widget (#475)
* Add category widget

Adds the ability to add a category to the widgets.

* Adapt to new widget scheme

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2022-03-03 23:47:10 +01:00
Jimmy Cai
d806226ec8 fix: article-details gap 2022-03-03 22:39:04 +00:00
Jimmy Cai
8abaa444c1 refactor: add flexbox gap to .article-details 2022-03-03 22:36:17 +00:00
Jimmy Cai
04cdbcfedf
refactor: Use flexbox gap (#520) 2022-03-03 23:11:19 +01:00
Jimmy Cai
2712887c7c
feat: multilingual site switch (#512)
* feat: multilingual site switch

* fix menu item margin

switch to flexbox gap
2022-02-27 10:51:02 +01:00
Jimmy Cai
b3b8fa73ef
feat(article): add link to translated content (#511) 2022-02-27 09:48:57 +01:00
Jimmy Cai
4d552a9df5
feat: article page widget support (#488)
* feat: article page widget support

* refactor: get rid of article toolbar

Same 3 column layout for article page and homepage

* add missing space
2022-02-26 23:45:25 +01:00
Jimmy Cai
0fbbc12949 fix: check if paragraph exists before accessing it's textContent
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/490
2022-02-12 13:23:38 +00:00
Jimmy Cai
4b0dbb4630 fix(article): code block background style in light theme
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/489, https://github.com/CaiJimmy/hugo-theme-stack/issues/492
2022-02-11 20:36:52 +00:00
Jimmy Cai
d75dbe2b6e
fix: copy code button does not work when line number is enabled (#487)
* fix: copy code button does not work when line number is enabled

* fix pre style

* Add gist shortcode to exampleSite
2022-02-06 20:32:37 +01:00
Jimmy Cai
88beecd101
fix: hyperlinked image (#485)
* fix: hyperlinked image

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/410

* feat: add support to inline images

* Remove unused code

* Remove data-alt-html
2022-02-06 19:58:10 +01:00
Jimmy Cai
67d5156507
fix: disqus dark mode (#478)
* fix: disqus dark mode

* remove color-scheme

add custom chrome scrollbar style (removed in https://github.com/CaiJimmy/hugo-theme-stack/pull/428)
2022-01-30 10:57:16 +01:00
Zoroark
2b40a32d47
feat(article): Scrollspy for the table of contents (#425)
* Add first try at scrollspy (broken right now)

* Scrollspy actually works now

* Fix VS Code errors by setting JS version

* Recompute offsets when window size changes

* Improve list compatibility for toc active selection

Support up to 6 levels of indentation, properly support <ol>

* Remove debug string

* Add more docs in smoothAnchors

* Use a map to match ids to navigation elements
2022-01-22 10:35:08 +01:00