Skip to content

Commit

Permalink
fix: rename sectionTitle to section-title
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Jan 30, 2021
1 parent ea584b8 commit 4dedd06
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/client/assets/style/code.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pre {
background: var(--color-white);
border-radius: 10px;
min-width: 50%;
max-width: 90%;
max-width: 70%;
width: auto;
}

Expand Down
1 change: 1 addition & 0 deletions packages/client/assets/style/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ p {

ul {
margin: 0 auto;
width: fit-content;
}

li {
Expand Down
1 change: 1 addition & 0 deletions packages/client/assets/style/customize.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
.swiper-container {
background: #f5f5f5;
height: 100vh;
width: 100%;
}

.swiper-slide {
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/components/Assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const Assistant = () => (
<A url="https://webslides.tv/demos/components#slide=2">Others</A>
<hr style={hrCss} />
<SmallTitle>Fusuma</SmallTitle>
<code>{`<!-- sectionTitle -->`}</code>:
<code>{`<!-- section-title -->`}</code>:
<A url="https://hiroppy.github.io/fusuma/intro/#slide=16">
<code>.section-title</code>
</A>
Expand Down Expand Up @@ -148,11 +148,11 @@ export const Assistant = () => (
},
{
title: 'Adding Title to Sidebar',
content: <code>{`sectionTitle: title`}</code>,
content: <code>{`section-title: title`}</code>,
url: 'https://hiroppy.github.io/fusuma/intro/#slide=16',
},
{
title: 'Adding Agenda UI via SectionTitle',
title: 'Adding Agenda UI via section-title',
content: <code>contents</code>,
url: 'https://hiroppy.github.io/fusuma/intro/#slide=17',
},
Expand Down
1 change: 1 addition & 0 deletions packages/client/src/components/SlideCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if (process.env.UI.PAGINATION) {
}

if (process.env.UI.EFFECT === 'fade') {
console.log('zzzz');
swiperComponents.push(EffectFade);
import('swiper/components/effect-fade/effect-fade.min.css');
} else if (process.env.UI.EFFECT === 'cube') {
Expand Down
2 changes: 1 addition & 1 deletion packages/fusuma/src/configs/fusumarc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function init(baseDir) {

// scaffold
await mkdirAsync(join(baseDir, 'slides'));
info('init', 'Created slides directory');
info('init', 'Created /slides');

{
const data = await readFileAsync(join(__dirname, 'templates', '0-title.md'), 'utf8');
Expand Down
6 changes: 6 additions & 0 deletions packages/fusuma/src/configs/templates/0-title.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!-- classes: title -->

# Hello😃

---

<!-- section-title: Bye👋 -->

## Bye👋
5 changes: 5 additions & 0 deletions packages/fusuma/src/configs/templates/fusumarc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ slide:
pagination: # bullets | progressbar | fraction
effect: # fade | cube | flip
code:
languages:
- javascript
- html
- css
- markdown
plugins: []
theme: default
4 changes: 2 additions & 2 deletions packages/mdx-loader/__tests__/__snapshots__/index.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const slides = [props => <>
export const fusumaProps = [{
note: 'This is Note!',
classes: 'class!',
sectionTitle: 'sectionTitle!',
sectionTitle: 'section-title!',
screen: 'true'
}];

Expand All @@ -93,7 +93,7 @@ export default function MDXContent({
/* classes: class! */
}
{
/* sectionTitle: sectionTitle! */
/* section-title: section-title! */
}
<h1>{\`Hello\`}</h1>
{
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx-loader/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Sample = () => <div>sample</div>;
This is Note!
-->
<!-- classes: class! -->
<!-- sectionTitle: sectionTitle! -->
<!-- section-title: section-title! -->
# Hello
<!-- content -->
<!-- screen -->
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx-loader/src/mdxPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function mdxPlugin() {
const prefix = p.split('\n')[0];
const attr = rest.map((r) => r.trim());

if (prefix === 'sectionTitle') {
if (prefix === 'section-title') {
props.sectionTitle = attr.join('');
return;
}
Expand Down
2 changes: 1 addition & 1 deletion samples/advanced/slides/01-chart.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: Charts -->
<!-- section-title: Charts -->

## Charts

Expand Down
2 changes: 1 addition & 1 deletion samples/advanced/slides/02-math.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: Math -->
<!-- section-title: Math -->

## Math

Expand Down
2 changes: 1 addition & 1 deletion samples/debug/slides/01-many-pages.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: many pages -->
<!-- section-title: many pages -->

<a href="https://github.com/hiroppy/fusuma/issues/110" rel="noopener" aria-label="issue110">
https://github.com/hiroppy/fusuma/issues/110
Expand Down
4 changes: 2 additions & 2 deletions samples/debug/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../../packages/client/assets/style/themes/default.css';
/* @import '../../packages/client/assets/style/themes/webpack.css'; */
/* @import '../../packages/client/assets/style/themes/default.css'; */
@import '../../packages/client/assets/style/themes/webpack.css';
/* @import '../../packages/client/assets/style/themes/babel.css'; */
/* @import '../../packages/client/assets/style/themes/node.css'; */

Expand Down
2 changes: 1 addition & 1 deletion samples/intro/slides/02-fusuma.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: What is fusuma? -->
<!-- section-title: What is fusuma? -->

## What is Fusuma?

Expand Down
6 changes: 3 additions & 3 deletions samples/intro/slides/04-slide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: Syntax Provided by Fusuma -->
<!-- section-title: Syntax Provided by Fusuma -->

## Syntaxes Provided by Fusuma

Expand Down Expand Up @@ -101,7 +101,7 @@ The class name of `<!-- block-start -->` isn't mandatory.
## Declare Section Title

```md
<!-- sectionTitle: this is the second slide! -->
<!-- section-title: this is the second slide! -->

## ✌️
```
Expand Down Expand Up @@ -131,7 +131,7 @@ In addition, it is also added to sidebar's list.

<br />

Converts the page number and title name specified by `sectionTitle` into a list component.
Converts the page number and title name specified by `section-title` into a list component.

---

Expand Down
2 changes: 1 addition & 1 deletion samples/intro/slides/05-mdx.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: mdx -->
<!-- section-title: mdx -->

## mdx

Expand Down
2 changes: 1 addition & 1 deletion samples/intro/slides/06-themes.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: Themes -->
<!-- section-title: Themes -->

## Themes

Expand Down
2 changes: 1 addition & 1 deletion samples/intro/slides/07-presenter-mode.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- sectionTitle: Presenter Mode -->
<!-- section-title: Presenter Mode -->

## Presenter Mode

Expand Down
4 changes: 2 additions & 2 deletions site/docs/guides/slide-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Makes explicit declarations to create a table of contents. and it is also added

```md
<!-- slide.md -->
<!-- sectionTitle: This is the first slide! -->
<!-- section-title: This is the first slide! -->

## Hello
```
Expand All @@ -49,7 +49,7 @@ Makes explicit declarations to create a table of contents. and it is also added

## Generating Table of Contents

Insert titles written as `sectionTitle` to ToC component automatically.
Insert titles written as `section-title` to ToC component automatically.

```md
<!-- toc.md -->
Expand Down

0 comments on commit 4dedd06

Please sign in to comment.