Commit graph

155 commits

Author SHA1 Message Date
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
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
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