Commit Graph

127 Commits

Author SHA1 Message Date
zhixuan
0af9d23e49
feat(article): add scroll for table (#428)
* feat: table can't scroll & delete scrollbar style for Chromium

* Undo some line breaks

* Add a table with overflow to exampleSite
2022-01-20 12:09:25 +01:00
zhixuan
ca260db07e
fix(shortcode): conflict with gist shortcode (#455) 2022-01-19 01:12:29 +01:00
Jimmy Cai
4764a92df3
refactor(search): avoid issue with one character keyword (#447)
* refactor(search): avoid issue with one character keyword

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

* Remove keyword sorts

* fix typo: secion -> section

* fix(search): avoid matching html entity

* Use | operator to concatenate keywords

Idea from https://github.com/CaiJimmy/hugo-theme-stack/pull/436

* Add missing `matchCount`

* Limit preview length

* Don't add ellipsis to title

* add comment to `processMatches`

* Initialize DOMParser only once

* Remove marker function

* Deal with blank search

* Use const keyword for constant arrays
2022-01-18 23:19:30 +01:00
Jimmy Cai
4e2c8e74be
fix: add missing diff syntax highlight (#445)
closes: https://github.com/CaiJimmy/hugo-theme-stack/issues/434
2021-12-28 10:48:22 +01:00
Jimmy Cai
661e59b85d
feat: social menu (#401) 2021-10-23 11:58:55 +02:00
Jimmy Cai
626265bcfd
refactor(article): better support for svg and external images (#326) 2021-08-25 12:20:15 +02:00
SSpirits
9f734a0647
feat(comments): DisqusJS integration (#307)
* add comment provider: DisqusJS

* Simplify `if` condition, and format code

* Load disqusjs.scss only when it's enabled

* Use `let` instead of `var`

Co-authored-by: sspirits <admin@lv5.moe>
Co-authored-by: Jimmy Cai <github@jimmycai.com>
2021-08-15 19:19:51 +02:00
zhixuan
bcbba1eed0
fix(article): change .article-time classname to .article-lastmod (#306) 2021-08-15 11:12:56 +02:00
Jimmy Cai
24915a912f
feat(article): copy button for highlight block (#295)
This button only shows on highlighted code blocks, because it uses the wrapper div.highlight
2021-08-08 18:15:27 +02:00
Jimmy Cai
3b9e248bfd
feat(article): add scrollbar to TOC (#293)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/236
2021-08-08 17:03:48 +02:00
Jimmy Cai
5539a42b30
fix(article): unordered TOC style (#292)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/283
2021-08-08 16:47:58 +02:00
zhixuan
99c4c89f0a
feat(article): add video shortcode (#280) 2021-07-27 10:42:06 +02:00
Simon Guest
44e3d20bad
feat(article): use markdownify for licence in article (#273)
* Use markdownify for licence in article

So we can use links, e.g. to credits for main photo.

* refactor: move .article-copyright style to partials/layout/article

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2021-07-25 19:50:52 +02:00
Bachrul uluum
dcfc7b5589
feat(article): reading time (#204)
* add reading time feature

* Revert change in jsconfig.json

* feat: add article.readingTime param, and improve style

* Revert change in jsconfig.json x2

* Remove reading time in compact layout

It doesn't look right to me for now

* feat: add i18n support to reading time string

* Hide footer.article-time when there's not content

Co-authored-by: Jimmy Cai <github@jimmycai.com>
2021-07-23 18:37:30 +02:00
Jimmy Cai
1857909fe4 fix(menu): remove horizontal menu margin on mobile 2021-07-09 12:20:13 +02:00
WingLim
46908815fc
chore: add toggleEl type (#256) 2021-07-06 12:25:27 +02:00
zhixuan
7ebe7e1af8
fix(article): add white-space: nowrap to back button text (#245) 2021-06-25 20:09:35 +02:00
Jimmy Cai
41fa65cbf5
feat: Table of Contents (#232)
Currently, the new table of contents is disabled by default. I will change that after several versions.

-------------

* feat: Table of Content (WIP)

* fix: set scratch inside define block

* fix(toc): darkmode text color

* feat: unify page layout, and add config to disable toc

* feat: add scroll-behavior: smooth to html

* fix: use <ol> for TOC. And Disable TOC by default for now

* refactor: use css flexbox for article page with toc

enable toc for example site

* feat(i18n): add i18n entry for "Back" and "Table of Contents"

* style: remove unused `keep-sidebar` class

* doc: add table of contents as feature
2021-06-21 18:44:54 +02:00
k
dda55f87e2
feat: change the page vertical scrollbar styles (#227)
* fix: take out [data-scheme="dark"] from :root

Taking out the [data-scheme="dark"] from :root allows us to fix the
precedence of CSS when the [data-scheme="dark"] is placed in the <html>
tag. This is needed in order to make the dark styles accesible from the
<html> elment, this will allow us to change the vertical scrollbar
styles following the dark and light schemes.

* change document.body.dataset.scheme to document.documentElement.dataset.scheme

When the dark mode is on or when the light mode is on, the
[data-scheme="light"] or [data-scheme="dark"], respectively, will be
placed in the <html> tag. Allowing us to access the dark and light color
schemes from the <html> to change the vertical scrollbar styles
according to the current color scheme.

* feat: change the page vertical scrollbar styles

This change will make the vertical scrollbar styles to follow the dark
and light color scheme modes. Also, this change will make the vertical
scrollbar to look consistent in both, Chromium and Firefox.

* make the scrollbar-track background-color transparent

The body has this transition: 'transition: background-color 0.3s ease
0s'. Making the scrollbar-track background-color transparent allow us to
appreciate that transition in the scrollbar-track when switching the
background-color.

* Move [data-scheme=dark] back to :root block

* fix(comment/waline): detect dark mode from html tag

* feat: apply custom scrollbar style to all elements

Co-authored-by: Jimmy Cai <jimmehcai@gmail.com>
2021-06-20 15:49:35 +02:00
Jimmy Cai
495a3b0289
refactor: rewrite grid system & style changes (#231)
* refactor(WIP): add new SCSS mixin `respond`

Theme's stylesheet mixes the use of max-width and min-width for responsive design, and it's horrible.

* refactor: update variable.scss to use @mixin respond

* refactor(grid): adjust sidebar max-width

* refactor(partials/article.scss): use `@include respond`

* refactor(layout/article.scss): delete unused SCSS and migrate to `@include respond`

* Adjust left sidebar max-width on xl screen

* fix: right sidebar not sticky

* refactor(breakpoint): simplify `@mixin respond`

* refactor(breakpoints): improve warning message

* fix(breakpoint): return only the requested breakpoint

* fix: add missing padding to .article-details
2021-06-20 12:53:10 +02:00
k
028ae12ea5
fix: set the scrollbar-track background to transparent (#228)
The body has this transition: 'transition: background-color 0.3s ease
0s'. Setting the scrollbar-track's background-color of the horizontal
scrollbar of the Archives page to transparent will make us to appreciate
that transition when switching the background-color.
2021-06-19 20:48:40 +02:00
k
58e8fadafe
feat: change horizontal scrollbar styles (#211)
* feat: change horizontal scrollbar styles

Change the horizontal scrollbar styles in Archives page following the
dark and light themes styles.  This horizontal scrollbar is at the top
of the Archives page. When I visit this page, the scrollbar stole my
attention. Unfortunately, it's the client (our browser) who decides its
styles;  this change is introduced to avoid that situation.

Co-authored-by: Miguel Angel <man98@me.com>

* remove scrollbar height and border-radius

In order to match the theme presentation
(https://i.imgur.com/cCiHOGS.jpg), the previous defined `height: 7px` and
`border-radius: 10px` for the scrollbar have been deleted.

* fix: set the horizontal scrollbar's height and width to `auto`

In Firefox the horizontal scrollbar looks very small. With a width set
to `auto`, it looks bigger and better. In Chromium, without an automatic
height, the new color changes do not appear.

Now the horizontal scrollbar looks consistent in both chromium and firefox.

* style: format list.scss

Co-authored-by: Miguel Angel <man98@me.com>
Co-authored-by: Jimmy Cai <github@jimmycai.com>
Co-authored-by: Jimmy Cai <jimmehcai@gmail.com>
2021-06-12 11:32:54 +02:00
Jimmy Cai
d5268a41e0
refactor(article): add default padding (#166)
* refactor(article): add default padding

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

* fix(article): video iframe margin

* fix: remove youtube iframe border
2021-03-07 12:51:47 +01:00
Yihui Xie
38eb9c4eaf
fix(article): also define the padding for div under .article-content (#162)
Fixes rstudio/blogdown#591: not only `<p>` but also `<div>` could be the direct child of `.article-content`, so we also need the padding for `<div>`. The `div`s are generated by Pandoc, instead of Hugo's Markdown renderer. I think it will be great to support both ways.
2021-03-06 20:41:46 +01:00
Jimmy Cai
0429678d57
fix(scss): remove unnecessary import (#146) 2021-02-17 10:29:40 +01:00
Jimmy Cai
326c052a24
fix(article): code background (#139)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/126
2021-02-11 21:22:02 +01:00
Junwoo Hwang
9914bba42c
fix: remove word-wrap property for Safari (#131) 2021-02-11 19:05:12 +01:00
Akatsuki Rui
a37ebbe2aa
assets: fix font-family fallback (#130)
If not have monospace, fonts will fallback to sans-serif when these fonts not available.
2021-02-11 19:00:59 +01:00
Jimmy Cai
90e259f31e
fix(colorScheme): dispatch onColorSchemeChange at page load (#118) 2021-01-04 10:52:14 +01:00
Jimmy Cai
f2955aac27
refactor(article): improve category tag style (#94) 2020-12-25 09:59:02 +01:00
Jimmy Cai
80be1b2435
fix(article): twitter_simple shortcode text color (#90)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/85
2020-12-24 11:24:26 +01:00
Jimmy Cai
3326cf886a
fix: dark mode toggle inconsistent positioning (#89) 2020-12-24 11:06:58 +01:00
Jimmy Cai
de79b8a470
fix(list): add missing object-fit property to compact list (#87) 2020-12-24 10:43:09 +01:00
Jimmy Cai
358e63e799
feat(darkmode): dark mode toggle (#82)
* feat(darkmode): initial support for dark mode toggle

* fix(darkmode): add svg icons

* feat(darkmode): dispatch onColorSchemeChange event

* add head/darkmode

* feat(darkmode); add colorScheme config

* style: remove empty line

* refactor(darkmode): simplify code

* style: add comment for darkmode config

* i18n support for dark mode toggle

* Some renaming
2020-12-23 19:03:40 +01:00
Jimmy Cai
7d841cf237
feat(list): add subsection support (#81)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/48
2020-12-22 21:14:50 +01:00
Jimmy Cai
e606dca404
refactor(article): remove color tag & add custom category color (#75)
closes: https://github.com/CaiJimmy/hugo-theme-stack/issues/71
2020-12-22 19:43:14 +01:00
Jimmy Cai
31c42bcfe7
refactor(gallery): rewrite gallery (#79)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/70
2020-12-22 19:35:37 +01:00
Jimmy Cai
54571f036b
refactor(ts): import script using new Hugo Module logic (#77)
Allows user to overwrite a specific script.

Note: The required version of Hugo might bump up.
2020-12-21 22:34:54 +01:00
Jimmy Cai
efa7ff14b7 refactor(search): remove .search-result--title style 2020-11-06 12:13:12 +01:00
Jimmy Cai
c018f4967a feat(search): i18n support 2020-11-06 11:49:30 +01:00
Jimmy Cai
f5d45458fd refactor(search): create Search class 2020-11-06 11:33:51 +01:00
Jimmy Cai
b97e86a7a7 style: remove empty line in main.ts 2020-11-06 11:33:33 +01:00
Jimmy Cai
2736fec285 refactor: create createElement.ts 2020-11-06 11:12:48 +01:00
Jimmy Cai
b3df22940d
Merge branch 'master' into template-search 2020-10-31 23:37:36 +01:00
Jimmy Cai
be416830ad feat: add support for custom SCSS
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/43
2020-10-31 23:36:16 +01:00
Jimmy Cai
c666c79800
Merge branch 'master' into template-search 2020-10-17 10:45:17 +02:00
Jimmy Cai
5c55bd2d33 feat(widget): new archive widget style 2020-10-17 10:34:36 +02:00
Jimmy Cai
49e568faac
refactor: add .section-title (#36)
For the small title before the card

Remove .widget-title, .archive-date, .taxonomy-type from SCSS, as they all share the same style.
2020-10-12 20:49:56 +02:00
Jimmy Cai
c266204f98
Merge branch 'master' into template-search 2020-10-10 10:05:31 +02:00
Jimmy Cai
0c5e6af9d3
refactor(article): remove uppercase style of tags 2020-10-10 09:14:27 +02:00