hematite 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +58 -0
  4. data/_config.yml +33 -0
  5. data/_data/strings/en.yml +32 -0
  6. data/_data/strings/es.yml +33 -0
  7. data/_includes/img/hamburger_menu.svg +78 -0
  8. data/_includes/img/search_icon.svg +99 -0
  9. data/_includes/katex_includes.html +26 -0
  10. data/_includes/nav/page_navigation.html +10 -0
  11. data/_includes/nav/pages_list.html +17 -0
  12. data/_includes/nav/pinned_page.html +12 -0
  13. data/_includes/nav/sidebar.html +25 -0
  14. data/_layouts/calendar.html +36 -0
  15. data/_layouts/default.html +31 -0
  16. data/_layouts/page.html +5 -0
  17. data/_layouts/post.html +42 -0
  18. data/_sass/_animations.scss +16 -0
  19. data/_sass/_calendar.scss +63 -0
  20. data/_sass/_colors.scss +73 -0
  21. data/_sass/_elements.scss +125 -0
  22. data/_sass/_layout.scss +224 -0
  23. data/_sass/_nav.scss +180 -0
  24. data/_sass/_rogue.scss +50 -0
  25. data/_sass/_sizes.scss +18 -0
  26. data/_sass/hematite.scss +10 -0
  27. data/assets/html/all_tags.html +26 -0
  28. data/assets/img/favicon.svg +12 -0
  29. data/assets/js/AnimationUtil.mjs +72 -0
  30. data/assets/js/AsyncUtil.mjs +18 -0
  31. data/assets/js/DateUtil.mjs +123 -0
  32. data/assets/js/PageAlert.mjs +143 -0
  33. data/assets/js/UrlHelper.mjs +118 -0
  34. data/assets/js/assertions.mjs +9 -0
  35. data/assets/js/dropdownExpander.mjs +78 -0
  36. data/assets/js/layout/calendar.mjs +478 -0
  37. data/assets/js/layout/post.mjs +65 -0
  38. data/assets/js/linkButtonGenerator.mjs +45 -0
  39. data/assets/js/main.mjs +19 -0
  40. data/assets/js/search.mjs +358 -0
  41. data/assets/js/sidebar.mjs +97 -0
  42. data/assets/js/string_data.mjs +19 -0
  43. data/assets/js/strings.mjs +167 -0
  44. data/assets/plugin/katex/README.md +119 -0
  45. data/assets/plugin/katex/contrib/auto-render.min.js +1 -0
  46. data/assets/plugin/katex/contrib/copy-tex.min.css +1 -0
  47. data/assets/plugin/katex/contrib/copy-tex.min.js +1 -0
  48. data/assets/plugin/katex/contrib/mathtex-script-type.min.js +1 -0
  49. data/assets/plugin/katex/contrib/mhchem.min.js +1 -0
  50. data/assets/plugin/katex/contrib/render-a11y-string.min.js +1 -0
  51. data/assets/plugin/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  52. data/assets/plugin/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  53. data/assets/plugin/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  54. data/assets/plugin/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  55. data/assets/plugin/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  56. data/assets/plugin/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  57. data/assets/plugin/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  58. data/assets/plugin/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  59. data/assets/plugin/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  60. data/assets/plugin/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  61. data/assets/plugin/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  62. data/assets/plugin/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  63. data/assets/plugin/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  64. data/assets/plugin/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  65. data/assets/plugin/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  66. data/assets/plugin/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  67. data/assets/plugin/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  68. data/assets/plugin/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  69. data/assets/plugin/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  70. data/assets/plugin/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  71. data/assets/plugin/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  72. data/assets/plugin/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  73. data/assets/plugin/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  74. data/assets/plugin/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  75. data/assets/plugin/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  76. data/assets/plugin/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  77. data/assets/plugin/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  78. data/assets/plugin/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  79. data/assets/plugin/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  80. data/assets/plugin/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  81. data/assets/plugin/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  82. data/assets/plugin/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  83. data/assets/plugin/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  84. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  85. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  86. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  87. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  88. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  89. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  90. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  91. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  92. data/assets/plugin/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  93. data/assets/plugin/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  94. data/assets/plugin/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  95. data/assets/plugin/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  96. data/assets/plugin/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  97. data/assets/plugin/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  98. data/assets/plugin/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  99. data/assets/plugin/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  100. data/assets/plugin/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  101. data/assets/plugin/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  102. data/assets/plugin/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  103. data/assets/plugin/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  104. data/assets/plugin/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  105. data/assets/plugin/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  106. data/assets/plugin/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  107. data/assets/plugin/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  108. data/assets/plugin/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  109. data/assets/plugin/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  110. data/assets/plugin/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  111. data/assets/plugin/katex/katex.min.css +1 -0
  112. data/assets/plugin/katex/katex.min.js +1 -0
  113. data/assets/search_data.json +36 -0
  114. data/assets/style.scss +15 -0
  115. metadata +170 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 1db52ef0febaa2a32beb6313442243f90416063b26eb923c30edbfe8dc3f831b
4
+ data.tar.gz: 18033f6c9e0d8ca6e76fa00982ab3be14995f255fa64ed68fb14b62767f6cef9
5
+ SHA512:
6
+ metadata.gz: 5e89fe9507664d740d9ce0e0f6c23b4f417cb73606676fb646929df4fa712ee88cf4dd86d6bbd9edac6c758f7f2546567743597b87bcf05435e8f4169c668b2e
7
+ data.tar.gz: 7f694307b34129302f6e1154d855e444b54bab2f24305243d292b87047dca1e34ca3f2db86847c91047b4f2847679f2d28b8c71ceb1f3b23e54b870b421c6f96
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Henry Heino
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Hematite
2
+
3
+ ![The dark variant of the Hematite Theme, showing a calendar](./screenshot.png)
4
+
5
+ A work-in-progress theme intended to be used for course websites.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Jekyll site's `Gemfile`:
10
+
11
+ ```ruby
12
+ gem "hematite"
13
+ ```
14
+
15
+ And add this line to your Jekyll site's `_config.yml`:
16
+
17
+ ```yaml
18
+ theme: hematite
19
+ ```
20
+
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install hematite
29
+
30
+
31
+
32
+ ## Usage
33
+
34
+ Further documentation for this is coming! For now, [minimal documentation](https://personalizedrefrigerator.github.io/jekyll-hematite-theme/) can be found on the theme's homepage.
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/personalizedrefrigerator/jekyll-hematite-theme). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
39
+
40
+ ## Development
41
+
42
+ ```md
43
+ TODO: Update this. This is still the default set of instructions.
44
+ ```
45
+
46
+ To set up your environment to develop this theme, run `bundle install`.
47
+
48
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
49
+
50
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
51
+ To add a custom directory to your theme-gem, please edit the regexp in `Hematite.gemspec` accordingly.
52
+
53
+ **Note:** All user-facing strings in JavaScript should go in `assets/js/string_data.mjs` to permit future localization.
54
+
55
+ ## License
56
+
57
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
58
+
data/_config.yml ADDED
@@ -0,0 +1,33 @@
1
+
2
+ # Settings for the demo site.
3
+ # `jekyll serve` does not auto-reload this file.
4
+ #
5
+ # See https://leo3418.github.io/collections/multilingual-jekyll-site/localize-strings
6
+ # for how localization works.
7
+
8
+ title: Hematite Theme
9
+ description: A Jekyll theme intended for course websites
10
+ permalink: pretty
11
+
12
+ hematite:
13
+ auto_invert_imgs: true
14
+
15
+ # Date options are as specified here:
16
+ # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
17
+ date_format:
18
+ # Short weekday (e.g. Thu for Thursday)
19
+ # weekday: short
20
+ # Long weekday (e.g. Monday)
21
+ weekday: long
22
+
23
+ # Use two digits for the month and day
24
+ month: 2-digit
25
+ day: 2-digit
26
+
27
+ # The full year
28
+ year: numeric
29
+
30
+ sidebar:
31
+ footer_html: 'This page was made with the Hematite Theme. <a href="https://github.com/personalizedrefrigerator/jekyll-hematite-theme">Contribute on GitHub</a>'
32
+
33
+
@@ -0,0 +1,32 @@
1
+ # See also assets/js/string_data.mjs
2
+
3
+ open_sidebar: 'Open sidebar'
4
+ close_sidebar: 'Close sidebar'
5
+ search_site_placeholder: 'Find in site...'
6
+ search_site_action: 'Search for "{0}"'
7
+ search_disabled_no_content: 'Missing text to search for!'
8
+ search_error: 'Error searching: {0}'
9
+ hide_search_results_action: 'Hide search results'
10
+ found_search_results: 'Found {0} result(s):'
11
+ copy_link_to_header: 'Copy link to section: "{0}"'
12
+ link_to_header_copied_alert: 'Link to "{0}" copied!'
13
+ sidebar_opened_announcement: 'Sidebar opened!'
14
+ sidebar_closed_announcement: 'Sidebar closed!'
15
+
16
+ invalid_date: 'Invalid date: {0}'
17
+ calendar_prev_btn: 'Previous {0}'
18
+ calendar_next_btn: 'Next {0}'
19
+ calendar_mode_week: 'Week'
20
+ calendar_mode_day: 'Day'
21
+ calendar_mode_month: 'Month'
22
+ calendar_choose_view_mode: 'Change calendar mode: '
23
+ calendar_went_next: 'Showing next {0}'
24
+ calendar_went_prev: 'Showing previous {0}'
25
+ calendar_changed_mode: 'Switched view mode to {0}'
26
+ calendar_header_date_range: '{0} through {1}'
27
+
28
+ tags: 'Tags'
29
+ untitled: 'Untitled'
30
+ all_tags_header: 'All Tags'
31
+ prev_post: '← {0}'
32
+ next_post: '{0} →'
@@ -0,0 +1,33 @@
1
+
2
+
3
+ open_sidebar: 'Abre Navegación'
4
+ close_sidebar: 'Cierre Navegación'
5
+ search_site_placeholder: 'Encuentre en el sitio...'
6
+ search_site_action: 'Busque «{0}»'
7
+ search_disabled_no_content: 'No hay texto con que puede buscar.'
8
+ search_error: 'Fue un error: «{0}»'
9
+ hide_search_results_action: 'Esconder resultados'
10
+ found_search_results: 'Encontrado {0} cosa(s):'
11
+ copy_link_to_header: 'Copie enlace de «{0}»'
12
+ link_to_header_copied_alert: '¡El enlace por «{0}» fue copiado!'
13
+ sidebar_opened_announcement: 'Navegación fue abierto.'
14
+ sidebar_closed_announcement: 'Navegación fue cerrado.'
15
+
16
+ invalid_date: 'Inválida fecha: {0}'
17
+ calendar_prev_btn: 'Anterior {0}'
18
+ calendar_next_btn: 'Próxima {0}'
19
+ calendar_mode_week: 'Semana'
20
+ calendar_mode_day: 'Día'
21
+ calendar_mode_month: 'Mes'
22
+ calendar_choose_view_mode: 'Cambia el modo del calendario: '
23
+ # TODO: Properly handle m/f articles here.
24
+ calendar_went_next: 'Mostrando la próxima {0}'
25
+ calendar_went_prev: 'Mostrando la próxima {0}'
26
+ calendar_changed_mode: 'Modo fue cambiado a {0}'
27
+ calendar_header_date_range: '{0} hasta {1}'
28
+
29
+ tags: 'Etiquetas'
30
+ untitled: 'No titulo'
31
+ all_tags_header: 'Todas las etiquetas'
32
+ prev_post: '← {0}'
33
+ next_post: '{0} →'
@@ -0,0 +1,78 @@
1
+ <svg
2
+ viewBox="0 0 64.0 64.0"
3
+ version="1.1"
4
+ id="hamburger_menu_root"
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ xmlns:svg="http://www.w3.org/2000/svg">
7
+ <style>
8
+ #hamburger_menu_root {
9
+ cursor: pointer;
10
+ width: 32px;
11
+ height: 32px;
12
+
13
+ transition: transform 0.4s ease;
14
+ }
15
+
16
+ #hamburger_menu_root .rect {
17
+ opacity:1;
18
+ fill: var(--primary-text-color);
19
+ cursor: pointer;
20
+
21
+ transform: translate(0, 0);
22
+ transition: transform 0.5s ease;
23
+ }
24
+
25
+ #hamburger_menu_root #top_rect {
26
+ transform-origin: 10px 10px;
27
+ --final-transform: translate(10px, 0px) rotate(45deg) scale(1.2, 0.6);
28
+ }
29
+
30
+ #hamburger_menu_root #mid_rect {
31
+ transform-origin: 5px 32px;
32
+ --final-transform: translate(7px, 24px) rotate(-45deg) scale(1.2, 0.6);
33
+ }
34
+
35
+ #hamburger_menu_root #bot_rect {
36
+ transform-origin: 55px 56px;
37
+
38
+ --final-transform: translate(-5px, 0px) rotate(48deg) scale(0, 0);
39
+ }
40
+
41
+ #hamburger_menu_root.close_btn .rect,
42
+ .close_btn > #hamburger_menu_root .rect {
43
+ transform: var(--final-transform);
44
+ }
45
+
46
+ #hamburger_menu_root:hover,
47
+ *:focus-visible > #hamburger_menu_root {
48
+ transform: scale(1.1);
49
+ }
50
+ </style>
51
+ <g
52
+ id="layer1">
53
+ <rect
54
+ id="top_rect"
55
+ width="43"
56
+ height="9"
57
+ x="10"
58
+ y="10"
59
+ ry="4.5"
60
+ class="rect" />
61
+ <rect
62
+ id="mid_rect"
63
+ width="43"
64
+ height="9"
65
+ x="10"
66
+ y="26.391266"
67
+ ry="4.5"
68
+ class="rect" />
69
+ <rect
70
+ id="bot_rect"
71
+ width="43"
72
+ height="9"
73
+ x="10"
74
+ y="44"
75
+ ry="4.5"
76
+ class="rect " />
77
+ </g>
78
+ </svg>
@@ -0,0 +1,99 @@
1
+ <!-- Should be embedded directly into an HTML file -->
2
+ <svg
3
+ viewBox="0 0 64 64"
4
+ version="1.1"
5
+ id="search_icon_svg">
6
+ <style>
7
+ #search_icon_svg {
8
+ width: 32px;
9
+ height: 32px;
10
+ }
11
+
12
+ #search_icon_svg .handle {
13
+ fill: var(--primary-text-color);
14
+ stroke: var(--primary-text-color);
15
+ stroke-width: 1;
16
+ transform-origin: top left;
17
+
18
+ transform: rotate(40deg);
19
+ transition: transform 0.3s ease;
20
+ }
21
+
22
+ #search_icon_svg.close_search .handle,
23
+ .close_search > #search_icon_svg .handle{
24
+ transform: rotate(0) scale(1.5, 1);
25
+ }
26
+
27
+ #search_icon_svg #handle_container {
28
+ transform: translate(38px, 33px);
29
+ transition: transform 0.4s ease;
30
+ }
31
+
32
+ #search_icon_svg.close_search #handle_container,
33
+ .close_search > #search_icon_svg #handle_container {
34
+ transform: translate(5px, 28px);
35
+ }
36
+
37
+ #search_icon_svg .glass {
38
+ fill: rgba(255, 255, 255, 0);
39
+ transition: fill 0.2s ease;
40
+ }
41
+
42
+ #search_icon_svg:hover .glass,
43
+ :focus-visible > #search_icon_svg .glass {
44
+ fill: rgba(124, 125, 125, 0.1);
45
+ }
46
+
47
+ #search_icon_svg.close_search .glass,
48
+ .close_search > #search_icon_svg .glass {
49
+ fill: rgba(0, 0, 0, 0);
50
+ }
51
+
52
+ #search_icon_svg .rim {
53
+ fill: none;
54
+ stroke: var(--primary-text-color);
55
+ stroke-width: 7;
56
+
57
+ transform-origin: center;
58
+ transition: transform 0.5s ease;
59
+ }
60
+
61
+ #search_icon_svg.close_search .rim,
62
+ .close_search > #search_icon_svg .rim {
63
+ transform: scale(1, 0);
64
+ }
65
+
66
+ #search_icon_svg {
67
+ transform: scale(0.9);
68
+ transition: transform 0.2s ease;
69
+ }
70
+
71
+ :focus-visible > #search_icon_svg,
72
+ :not([disabled]) > #search_icon_svg:hover {
73
+ transform: scale(1);
74
+ }
75
+ </style>
76
+ <g id="layer0">
77
+ <circle
78
+ class="glass"
79
+ cx="25"
80
+ cy="25"
81
+ r="18" />
82
+ </g>
83
+ <g id="layer1">
84
+ <circle
85
+ class="rim"
86
+ cx="25"
87
+ cy="25"
88
+ r="18" />
89
+ <g id="handle_container">
90
+ <rect
91
+ class="handle"
92
+ width="34"
93
+ height="7"
94
+ x="0"
95
+ y="0"
96
+ ry="3.5" />
97
+ </g>
98
+ </g>
99
+ </svg>
@@ -0,0 +1,26 @@
1
+
2
+ <!--
3
+ Include KaTeX resources/scripts
4
+ KaTeX can be enabled with page.katex.
5
+ -->
6
+
7
+ {% if page.katex %}
8
+
9
+ <!-- See the releases tab on https://github.com/KaTeX/KaTeX -->
10
+ <link
11
+ rel="stylesheet"
12
+ href="{{ "assets/plugin/katex/katex.min.css" | relative_url }}"
13
+ />
14
+
15
+ <script
16
+ defer
17
+ src="{{ "assets/plugin/katex/katex.min.js" | relative_url }}">
18
+ </script>
19
+
20
+ <script
21
+ defer
22
+ src="{{ "assets/plugin/katex/contrib/auto-render.min.js" | relative_url }}"
23
+ onload="renderMathInElement(document.body);">
24
+ </script>
25
+
26
+ {% endif %}
@@ -0,0 +1,10 @@
1
+ <header>
2
+ <!-- button title/alt text is set by JS -->
3
+ <button class="toggle_sidebar" id="toggle_sidebar_btn">
4
+ {% include img/hamburger_menu.svg %}
5
+ </button>
6
+ <a href="{{ "/" | absolute_url }}">{{ site.title | default "Untitled Site" }}</a>
7
+ <div class="spacer"></div>
8
+ </header>
9
+
10
+ {% include nav/sidebar.html %}
@@ -0,0 +1,17 @@
1
+
2
+ {% assign page_list = site.html_pages | sort: "sidebarindex" %}
3
+ {% for pl_sidebar_page in page_list %}
4
+ {% comment %}
5
+ Only include pages that have requested to be in the sidebar
6
+ {% endcomment %}
7
+ {% if pl_sidebar_page.sidebarindex %}
8
+ <!-- Page: {{ pl_sidebar_page.sidebarindex }} -->
9
+ {% assign pl_page_url = pl_sidebar_page.url %}
10
+ {% assign pl_page_title = pl_sidebar_page.title %}
11
+ {% include nav/pinned_page.html %}
12
+ {% endif %}
13
+ {% endfor %}
14
+
15
+ <!--
16
+ vim: nocin nosi
17
+ -->
@@ -0,0 +1,12 @@
1
+ {% if pl_page_url == page.url %}
2
+ {% assign clss = "current_page" %}
3
+ {% else %}
4
+ {% assign clss = "" %}
5
+ {% endif %}
6
+ {% if pl_page_title != "" %}
7
+ <li class="{{ clss }}">
8
+ <a href="{{ pl_page_url | absolute_url }}">
9
+ {{ pl_page_title }}
10
+ </a>
11
+ </li>
12
+ {% endif %}
@@ -0,0 +1,25 @@
1
+ <nav class="sidebar" id="sidebar">
2
+ <div class="search-container">
3
+ <!-- input placeholder and alt text should be set with JS -->
4
+ <input id="search_input" type="search"/>
5
+ <button class="search-btn" id="search_btn" aria-live="polite">
6
+ {% include img/search_icon.svg %}
7
+ </button>
8
+ </div>
9
+
10
+ <div class="search-results-container" aria-live="polite">
11
+ <ul class="search-results">
12
+
13
+ </ul>
14
+ </div>
15
+
16
+ <ul class="pinned-pages">
17
+ {% include nav/pages_list.html %}
18
+ </ul>
19
+
20
+ <footer>
21
+ {% if site.hematite.sidebar.footer_html %}
22
+ {{ site.hematite.sidebar.footer_html }}
23
+ {% endif %}
24
+ </footer>
25
+ </nav>
@@ -0,0 +1,36 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <h1>{{ page.title }}</h1>
6
+ <h2 id="calendar_title"></h2>
7
+ <div id="calendar_display" class='visual-calendar'></div>
8
+
9
+ <main>
10
+ {{ content }}
11
+ </main>
12
+
13
+ <script type="module">
14
+ import calendarSetup from "{{ 'assets/js/layout/calendar.mjs' | relative_url }}";
15
+ calendarSetup(
16
+ document.querySelector("main"),
17
+ document.querySelector("#calendar_display"),
18
+ {% if page.show_calendar_title %}
19
+ document.querySelector("#calendar_title"),
20
+ {% else %}
21
+ null,
22
+ {% endif %}
23
+ {% if page.include_posts %}
24
+ true
25
+ {% else %}
26
+ false
27
+ {% endif %}
28
+ );
29
+
30
+ // Remove the title if we're not using it — it can mess with
31
+ // screen readers
32
+ {% if page.show_calendar_title %}
33
+ {% else %}
34
+ document.querySelector("#calendar_title").remove();
35
+ {% endif %}
36
+ </script>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
3
+ <head>
4
+ <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
5
+ <meta charset="utf-8"/>
6
+ {% assign content_start = page.content | slice: 0, 100 %}
7
+ <meta name="description" content={{ page.description | default: content_start | strip_html | jsonify }}/>
8
+ <link rel="stylesheet" href="{{ "assets/style.css" | relative_url }}"/>
9
+ <link rel="icon" href="{{ page.favicon_path | default: site.favicon_path | default: "assets/img/favicon.svg" | absolute_url }}"/>
10
+ <script type="module" src="{{ "assets/js/main.mjs" | relative_url }}"></script>
11
+
12
+ {% include katex_includes.html %}
13
+
14
+ <title>{{ page.title }} — {{ site.title }}</title>
15
+ </head>
16
+ <body>
17
+ {% include nav/page_navigation.html %}
18
+
19
+ <div class="main-container">
20
+ {% if page.layout == "default" %}
21
+ <main>
22
+ {% endif %}
23
+ {{ content }}
24
+ {% if page.layout == "default" %}
25
+ </main>
26
+ {% endif %}
27
+ </div>
28
+
29
+ </body>
30
+ </html>
31
+
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {{ content }}
@@ -0,0 +1,42 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <h1>{{ page.title }}</h1>
6
+
7
+ <nav id="post_next_prev">
8
+ </nav>
9
+ <p id="post_date" class="post-assigned-date"></p>
10
+
11
+ <main>
12
+ {{ content }}
13
+ </main>
14
+
15
+ <div class="end-of-post-space"></div>
16
+
17
+ <hr/>
18
+ <nav id="post_tags">
19
+ <h1 id="tag_header_lbl"></h1>
20
+ </nav>
21
+
22
+ <script type="module">
23
+ import initPost from "{{ "assets/js/layout/post.mjs" | relative_url }}";
24
+ let pageData = {
25
+ {% if page.next %}
26
+ next: {
27
+ url: unescape("{{ page.next.url | relative_url | url_encode }}".replaceAll(/[+]/g, "%20")),
28
+ title: "{{ page.next.title | strip_html }}",
29
+ },
30
+ {% endif %}
31
+ {% if page.previous %}
32
+ previous: {
33
+ url: unescape("{{ page.previous.url | relative_url | url_encode }}".replaceAll(/[+]/g, "%20")),
34
+ title: "{{ page.previous.title | strip_html }}",
35
+ },
36
+ {% endif %}
37
+ tags: {{ page.tags | jsonify }},
38
+ date: {{ page.date | date_to_xmlschema | jsonify }}
39
+ };
40
+
41
+ initPost(pageData);
42
+ </script>
@@ -0,0 +1,16 @@
1
+ // Definitions of animation keyframes
2
+
3
+ @keyframes fade-in {
4
+ 0% { opacity: 0; }
5
+ 100% { opacity: 1; }
6
+ }
7
+
8
+ @keyframes grow-in {
9
+ 0% { transform: scale(1, 0); transform-origin: bottom center; }
10
+ 100% { transform: scale(1, 1); transform-origin: bottom center; }
11
+ }
12
+
13
+ @keyframes shrink-out {
14
+ 0% { transform: scale(1, 1); transform-origin: bottom center; }
15
+ 100% { transform: scale(1, 0); transform-origin: bottom center; }
16
+ }
@@ -0,0 +1,63 @@
1
+ @charset "utf-8";
2
+
3
+ .calendar-content {
4
+ display: grid;
5
+ grid-auto-rows: auto;
6
+
7
+ &.month-display {
8
+ grid-template-columns: repeat(7, 1fr);
9
+ }
10
+
11
+ &.week-display {
12
+ grid-template-columns: repeat(3, 1fr);
13
+ }
14
+
15
+ @media (max-width: 600px) {
16
+ &.week-display {
17
+ grid-template-columns: 1fr;
18
+ }
19
+
20
+ &.month-display {
21
+ overflow-x: scroll;
22
+ }
23
+ }
24
+ }
25
+
26
+ .visual-calendar > .controls {
27
+ display: flex;
28
+ flex-direction: row;
29
+ justify-content: space-between;
30
+
31
+ @media print {
32
+ display: none;
33
+ }
34
+ }
35
+
36
+ .calendar-card {
37
+ border: 1px solid var(--line-color-light);
38
+ padding-left: 5px;
39
+ padding-right: 5px;
40
+
41
+ > a {
42
+ font-size: 12pt;
43
+ text-align: center;
44
+ display: block;
45
+ }
46
+
47
+ > ul {
48
+ list-style: none;
49
+ padding: 0;
50
+
51
+ > :nth-child(2n + 1) {
52
+ background-color: var(--primary-background-color);
53
+ }
54
+
55
+ > :nth-child(2n) {
56
+ background-color: var(--secondary-background-color);
57
+ }
58
+ }
59
+
60
+ &.today {
61
+ box-shadow: inset 1px -2px 3px var(--shadow-color-light);
62
+ }
63
+ }