Commit Graph

2440 Commits

Author SHA1 Message Date
Claudio Yanes
f70128a3de
Prevent overflow of long links and words
When a word (or any string withtout breakpoints (spaces, dashes....), making links the most common place where this becamoes an issue)  is wider than its container, the text will simply overflow any container, including the viewport. This commit fixes this behaviour by making the word-drap strategy of the browser more aggresive.
2022-03-09 17:58:01 +00:00
Jacky Zhao
4dcb8c62fd Merge pull request #62 from claudio4/hugo 2022-03-07 10:45:07 -08:00
Jacky Zhao
651bfc5cd2
Merge pull request #62 from claudio4/hugo 2022-03-07 10:45:07 -08:00
Claudio Yanes
620d4ae8f7 Merge branch 'jackyzha0-hugo' into hugo 2022-03-07 18:28:14 +00:00
Claudio Yanes
6079420178 Merge branch 'jackyzha0-hugo' into hugo 2022-03-07 18:28:14 +00:00
Claudio Yanes
5de94e0d14 Merge branch 'hugo' of https://github.com/jackyzha0/quartz into jackyzha0-hugo 2022-03-07 18:27:45 +00:00
Claudio Yanes
b96c60edfc Merge branch 'hugo' of https://github.com/jackyzha0/quartz into jackyzha0-hugo 2022-03-07 18:27:45 +00:00
Claudio Yanes
29e2934dc2 Format JS 2022-03-07 18:25:02 +00:00
Claudio Yanes
978d5ca1ae Format JS 2022-03-07 18:25:02 +00:00
Jacky Zhao
e7d299fa61 fix: hide popover on mobile to prevent overflow 2022-03-04 23:55:07 -08:00
Jacky Zhao
907270992d fix: hide popover on mobile to prevent overflow 2022-03-04 23:55:07 -08:00
Claudio Yanes
30a6697c5b Update makefile and docs
The artifacts produced by hugo-obsidian are now expected to be placed in
the assets/indices directory. This commit reflects this change in the
Makefile and in the docs.
2022-03-04 22:27:21 +00:00
Claudio Yanes
6f9283e95b Update makefile and docs
The artifacts produced by hugo-obsidian are now expected to be placed in
the assets/indices directory. This commit reflects this change in the
Makefile and in the docs.
2022-03-04 22:27:21 +00:00
Claudio Yanes
06a83a1825 Add .gitkeep to assets/indices 2022-03-04 04:14:42 +00:00
Claudio Yanes
0fad5570d3 Add .gitkeep to assets/indices 2022-03-04 04:14:42 +00:00
Claudio Yanes
4e1e39bff4 Remove unnecessary scrollbars
The margin property can escape the parent node and move it alongside
its child. This happens with singlePage div and the body, resulting in
scrollbars appearing as the body has the size of the viewport but
does not align with it. This phenomenon can be always observed
in the vertical axis and it can also be observed in the horizontal axis
when the viewport it’s not wide enough (mostly in mobile).

Using paddings prevents this “extra space” from scraping and displacing
the body.

Also, the value 100vw does not take into account the space taken by the
vertical scrollbar, thus making the body wider than the actual viewport,
producing a horizontal scrollbar.
2022-03-04 04:12:43 +00:00
Claudio Yanes
dc9b421e21 Remove unnecessary scrollbars
The margin property can escape the parent node and move it alongside
its child. This happens with singlePage div and the body, resulting in
scrollbars appearing as the body has the size of the viewport but
does not align with it. This phenomenon can be always observed
in the vertical axis and it can also be observed in the horizontal axis
when the viewport it’s not wide enough (mostly in mobile).

Using paddings prevents this “extra space” from scraping and displacing
the body.

Also, the value 100vw does not take into account the space taken by the
vertical scrollbar, thus making the body wider than the actual viewport,
producing a horizontal scrollbar.
2022-03-04 04:12:43 +00:00
Claudio Yanes
58b2d1dda9 Add attribute property to scripts from jsdelivr
Adding the integrity attribute protects the website (by refusing to load
the script) against malicious modifications of the script
in the case of jsdelivr gets hacked
2022-03-04 03:34:45 +00:00
Claudio Yanes
8779e72c77 Add attribute property to scripts from jsdelivr
Adding the integrity attribute protects the website (by refusing to load
the script) against malicious modifications of the script
in the case of jsdelivr gets hacked
2022-03-04 03:34:45 +00:00
Claudio Yanes
1929b466c0 Move popover to the end of the page
The popover script doesn’t ever start in until the DOM has finished
Loading, so wait for the script to be downloaded and parsed before
Showing the content to the user makes no sense.
2022-03-04 03:24:32 +00:00
Claudio Yanes
7f6523337c Move popover to the end of the page
The popover script doesn’t ever start in until the DOM has finished
Loading, so wait for the script to be downloaded and parsed before
Showing the content to the user makes no sense.
2022-03-04 03:24:32 +00:00
Claudio Yanes
a1c6b89740 Fix fetchData
The fetchData function suffer from a race condition. If the function is
called before the promise finishes, it will result in another pair of
HTTP request. This does not only make the function useless but
Actually, it makes it harmful as the data might be redownloaded twice.

Now fetchData is not a function but rather the promise by itself.
Previous callers are expected to await the variable instead, this
should be not concern as awaiting a promise multiple time in
JavaScript is completely safe.
2022-03-04 02:25:30 +00:00
Claudio Yanes
7e0f2e4449 Fix fetchData
The fetchData function suffer from a race condition. If the function is
called before the promise finishes, it will result in another pair of
HTTP request. This does not only make the function useless but
Actually, it makes it harmful as the data might be redownloaded twice.

Now fetchData is not a function but rather the promise by itself.
Previous callers are expected to await the variable instead, this
should be not concern as awaiting a promise multiple time in
JavaScript is completely safe.
2022-03-04 02:25:30 +00:00
Claudio Yanes
6846d314d6 Move css and js to appropriate files
Having the CSS and JS in the html template produces pages larger
than necessary, as each page need to contain all the js/css.
Separating them in appropriate files allow the browser to just download
them once and use them for all the pages. This is even more effective
with an aggressive cache policy for the js and css, something that can
be done without fear thanks to the implemented cache-busting.
Also, having then in separate files allows us to use Hugo pipelines
for minimizing the code.
2022-03-04 02:07:51 +00:00
Claudio Yanes
1313bd9779 Move css and js to appropriate files
Having the CSS and JS in the html template produces pages larger
than necessary, as each page need to contain all the js/css.
Separating them in appropriate files allow the browser to just download
them once and use them for all the pages. This is even more effective
with an aggressive cache policy for the js and css, something that can
be done without fear thanks to the implemented cache-busting.
Also, having then in separate files allows us to use Hugo pipelines
for minimizing the code.
2022-03-04 02:07:51 +00:00
Jacky Zhao
4b257252ac fix backlinks not using baseurl 2022-02-28 08:24:29 -08:00
Jacky Zhao
5234fae080 fix backlinks not using baseurl 2022-02-28 08:24:29 -08:00
Jacky Zhao
58332d0b30 bump hugo-obsidian to support root 2022-02-28 07:30:59 -08:00
Jacky Zhao
0ee0855e1c bump hugo-obsidian to support root 2022-02-28 07:30:59 -08:00
Jacky Zhao
03a276a00a fix: explicitly set root as current directory to fix ignore files 2022-02-28 07:14:55 -08:00
Jacky Zhao
e06e341468 fix: explicitly set root as current directory to fix ignore files 2022-02-28 07:14:55 -08:00
Jacky Zhao
3ca62f9ab0 add screenshot to readme 2022-02-23 12:28:25 -05:00
Jacky Zhao
73e526a7d5 add screenshot to readme 2022-02-23 12:28:25 -05:00
Jacky Zhao
3b998a320b fix: relink search button (move outside content load listener) 2022-02-22 13:36:08 -05:00
Jacky Zhao
cdc4f1a840 fix: relink search button (move outside content load listener) 2022-02-22 13:36:08 -05:00
Jacky Zhao
15ff24a483 fix links being broken for pages with spaces 2022-02-20 21:40:10 -05:00
Jacky Zhao
714b4fcfa3 fix links being broken for pages with spaces 2022-02-20 21:40:10 -05:00
Jacky Zhao
85dea2ed79 rtl docs 2022-02-17 10:49:41 -05:00
Jacky Zhao
9c04ca0266 rtl docs 2022-02-17 10:49:41 -05:00
Jacky Zhao
c49adb26d6 docs updates 2022-02-17 10:44:39 -05:00
Jacky Zhao
388a2bf78b docs updates 2022-02-17 10:44:39 -05:00
Jacky Zhao
ce4c95b8ab fix #54: root all image urls 2022-02-15 23:03:02 -05:00
Jacky Zhao
f192f9a23d fix #54: root all image urls 2022-02-15 23:03:02 -05:00
Jacky Zhao
cf4e921ca4 fix relative pathing for dynamic fetch 2022-02-15 22:54:20 -05:00
Jacky Zhao
3b3e6ec3b2 fix relative pathing for dynamic fetch 2022-02-15 22:54:20 -05:00
Jacky Zhao
6b680a43bb change output to static instead of data 2022-02-15 19:42:45 -05:00
Jacky Zhao
8e85e274f6 change output to static instead of data 2022-02-15 19:42:45 -05:00
Jacky Zhao
fdf1d9bbe3 feat: dynamically fetch indices 2022-02-15 19:39:14 -05:00
Jacky Zhao
fcd5d2807d feat: dynamically fetch indices 2022-02-15 19:39:14 -05:00
Jacky Zhao
556d6799f2 feat: add rtl support as part of #47 2022-02-15 17:12:08 -05:00