Skip to content

Commit db75712

Browse files
authored
add comparison-slider (#7)
1 parent 08c2fb0 commit db75712

File tree

7 files changed

+30
-5
lines changed

7 files changed

+30
-5
lines changed

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@iconify-json/simple-icons": "^1.1.110",
4949
"@iconify/react": "^5.0.1",
5050
"highlight.js": "^11.11.1",
51+
"img-comparison-slider": "^8.0.6",
5152
"marked": "^13.0.0",
5253
"marked-highlight": "^2.2.1",
5354
"marked-katex-extension": "^5.0.1",

public/004.jpg

30 KB
Loading

src/components/body.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import { marked } from 'marked';
44
import markedKatex from 'marked-katex-extension';
55
import { markedHighlight } from 'marked-highlight';
66
import hljs from 'highlight.js';
7-
import 'highlight.js/styles/base16/gruvbox-dark-hard.css';
7+
//import 'highlight.js/styles/base16/gruvbox-dark-hard.css';
88
// import 'highlight.js/styles/base16/github.css';
9-
// import 'highlight.js/styles/tokyo-night-dark.css';
9+
import 'highlight.js/styles/tokyo-night-dark.css';
1010
// import 'highlight.js/styles/pojoaque.css';
1111

12+
import 'img-comparison-slider';
13+
1214
const renderer = new marked.Renderer();
1315
renderer.table = (header, body) => {
1416
return `<div class="uk-overflow-auto uk-width-1-1"><table class="uk-table uk-table-small uk-text-small uk-table-divider"> ${header} ${body} </table></div>`;

src/scss/classic-theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
@import url('https://fonts.googleapis.com/css2?family=Georgia:ital,wght@0,400;0,700;1,400;1,700&display=swap');
77
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
88

9+
// material design colors
10+
@import 'material-design-color/material-color';
11+
912
// font families
1013
$global-font-family: 'Merriweather', 'Georgia', 'Inter';
1114
$base-heading-font-family: 'Garamond', 'EB Garamond';
@@ -44,6 +47,8 @@ $button-primary-background: $theme-color;
4447
$global-primary-background: $accent-color;
4548
$text-primary-color: $theme-color-fg;
4649

50+
$base-focus-outline-style: none;
51+
4752
// uikit imports
4853
@import 'uikit/src/scss/variables-theme.scss';
4954
@import 'uikit/src/scss/mixins-theme.scss';

src/scss/theme.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ $button-primary-background: $theme-color;
4343
$global-primary-background: $accent-color;
4444
$text-primary-color: $theme-color-fg;
4545

46+
$base-focus-outline-style: none;
47+
4648
// uikit imports
4749
@import 'uikit/src/scss/variables-theme.scss';
4850
@import 'uikit/src/scss/mixins-theme.scss';

template.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ abstract: |
5858
body:
5959
- title: Media examples
6060
text: |
61+
### Mediafile Path
6162
Files in `public/` can be referenced directly: `<img src="001.jpg" />`
6263
64+
### UIKit Components
65+
This template supports all UIKit components.
66+
To check available components, refer to the [UIKit documentation](https://getuikit.com/docs).
6367
[Slideshow](https://getuikit.com/docs/slideshow) example
6468
6569
</div>
@@ -83,13 +87,16 @@ body:
8387
</div>
8488
8589
[Grid system](https://getuikit.com/docs/grid) example
86-
<div class="uk-child-width-1-2 uk-child-width-1-3@m" uk-grid>
90+
<div class="uk-grid-small uk-child-width-1-2 uk-child-width-1-3@m" uk-grid>
8791
<div>
8892
<img src="001.jpg">
8993
<span class="uk-text-meta">Fig1 - caption example</figcaption>
9094
</div>
9195
<div>
92-
<img src="002.jpg">
96+
<img-comparison-slider>
97+
<img slot="first" src="002.jpg" />
98+
<img slot="second" src="004.jpg" />
99+
</img-comparison-slider>
93100
<span class="uk-text-meta">Fig2 - caption example</figcaption>
94101
</div>
95102
<div>
@@ -100,7 +107,7 @@ body:
100107
101108
[Video](https://getuikit.com/docs/video) and [Slider](https://getuikit.com/docs/slider) component example
102109
<div uk-slider>
103-
<div class="uk-slider-items uk-child-width-1-1 uk-child-width-1-2@m uk-grid">
110+
<div class="uk-slider-items uk-grid-small uk-child-width-1-1 uk-child-width-1-2@m uk-grid">
104111
<div>
105112
<video
106113
src="https://yootheme.com/site/images/media/yootheme-pro.mp4"
@@ -217,6 +224,7 @@ body:
217224
$$ \begin{CD} A @>a>> B \\ @VbVV @AAcA \\ C @= D \end{CD} $$
218225
[KaTeX supports a wide range of mathematical symbols and equations](https://katex.org/docs/support_table.html), ensuring your technical content is both clear and visually appealing.
219226
With markdown for text formatting and KaTeX for mathematical expressions, our template empowers you to communicate complex ideas effectively. Whether you're writing a scientific paper or a technical blog post, harnessing these tools will elevate your content and engage your readers.
227+
220228
- title: Color Palette
221229
text: |
222230
To customize the theme, edit UIkit variables in [theme.scss](https://github.com/denkiwakame/academic-project-template/blob/project-page/src/scss/theme.scss). Material Design colors are available as variables (e.g. `$clr-blue-50` ). For the full set of colors, please visit [Material Design Color System](https://m2.material.io/design/color/the-color-system.html#tools-for-picking-colors).

0 commit comments

Comments
 (0)