Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit e21d70f

Browse files
committed
feat(client): add some options
1 parent 535f2eb commit e21d70f

File tree

8 files changed

+15
-21
lines changed

8 files changed

+15
-21
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ The following properties are provided, but you can change the css directly if yo
134134
--base-font-size: 2.4rem;
135135
--base-font-weight: 300;
136136
--base-align: center;
137-
--base-max-slide-size: 1280px;
137+
--base-max-width: 1280px;
138+
--base-outer-margin: 24px;
138139

139140
--color-title: #464646;
140141
--color-base: #545454;

packages/client/assets/style/code.css

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pre[class*='language-'] {
1313
min-width: 50%;
1414
max-width: 100%;
1515
width: fit-content;
16-
margin: var(--code-align, auto);
1716
}
1817

1918
code {

packages/client/assets/style/customize.css

+7-8
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,22 @@
2020
.swiper-slide {
2121
display: flex;
2222
align-items: center;
23-
text-align: center;
24-
justify-content: center;
23+
justify-content: var(--base-align);
2524
overflow-y: auto;
26-
}
27-
28-
.slide-box {
2925
color: var(--color-base);
3026
text-align: var(--base-align);
3127
background: var(--color-background);
3228
position: relative;
3329
}
3430

3531
.slide-internal-box {
36-
padding: 16px;
32+
display: flex;
33+
flex-direction: column;
34+
padding: var(--base-outer-margin);
3735
text-align: inherit;
38-
max-width: var(--base-max-slide-size);
39-
margin: auto;
36+
align-items: center;
37+
justify-content: var(--base-align);
38+
max-width: var(--base-max-width);
4039
min-width: 320px;
4140
z-index: 2;
4241
}

packages/client/assets/style/grid.css

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
flex-wrap: wrap;
55
margin-left: auto;
66
margin-right: auto;
7+
max-width: 100%;
78
}
89

910
.grid:after {

packages/client/assets/style/variables.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
--base-font-size: 2.4rem;
66
--base-font-weight: 300;
77
--base-align: center;
8-
--base-max-slide-size: 1280px;
8+
--base-max-size: 1280px;
9+
--base-outer-margin: 24px;
910

1011
--h1-font-size: 5.6rem;
1112
--h1-font-weight: 300;

packages/client/src/components/SlideCore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const SlideCore = ({ slides, onChangeSlideIndex }) => (
6666
{slides.map(({ slide: Slide, fusumaProps: { classes, sectionTitle, background } }, i) => (
6767
<SwiperSlide
6868
key={i /* mdx-loaderでhash作成 */}
69-
className={classnames('slide-box', classes, sectionTitle ? 'section-title' : undefined)}
69+
className={classnames(classes, sectionTitle ? 'section-title' : undefined)}
7070
data-hash={`slide-${i + 1}`}
7171
>
7272
{background && <div className="slide-background-div" style={{ background }} />}

packages/fusuma/src/configs/templates/style.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
/* --base-font-size: 2.4rem; */
1414
/* --base-font-weight: 300; */
1515
/* --base-align: center; */
16-
/* --base-max-slide-size: 1280px; */
16+
/* --base-max-width: 1280px; */
17+
/* --base-outer-margin: 24px; */
1718
/* --code-font-size: 1.8rem; */
1819
/* --h1-font-size: 5.6rem; */
1920
/* --h2-font-size: 5.6rem; */

samples/themes/style.css

-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ a {
1717
background: var(--color-background);
1818
}
1919

20-
.slide-box {
21-
/* set the default align */
22-
text-align: center;
23-
24-
/* set the default font-color */
25-
color: var(--color-base);
26-
}
27-
2820
.column:last-child {
2921
text-align: left;
3022
}

0 commit comments

Comments
 (0)