Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ready to contribute #46

Merged
merged 7 commits into from
Nov 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Contributing to Marp core

Thank you for taking the time to read how to contribute to Marp core! This is the guideline for contributing to Marp core.

But this document hardly has contents! We are following [the contributing guideline of marp-team projects](https://github.com/marp-team/marp/blob/master/.github/CONTRIBUTING.md). Please read these guidelines this before starting work in marp-core.

- [**Code of Conduct**](https://github.com/marp-team/marp/blob/master/.github/CODE_OF_CONDUCT.md)
- [**Report issue**](https://github.com/marp-team/marp/blob/master/.github/CONTRIBUTING.md#report-issue)
- [**Pull request**](https://github.com/marp-team/marp/blob/master/.github/CONTRIBUTING.md#pull-request)
- [**Release**](https://github.com/marp-team/marp/blob/master/.github/CONTRIBUTING.md#release)

## Development

```bash
# Build
yarn build

# Watch
yarn watch

# Output type definitions
yarn types
```

### Official theme

Marp core has some built-in official themes in `themes` folder. They should load when Marp class is initialized.

#### Requirements

- All of built-in theme have to support `invert` class. It provides an inverted color scheme from default color. Please also see [yhatt/marp#77](https://github.com/yhatt/marp/issues/77).
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- No longer work with Node v6.14.2 and v6.14.3 ([#45](https://github.com/marp-team/marp-core/pull/45))

### Added

- Ready to allow contributing by adding [guideline for marp-core](./.github/CONTRIBUTING.md) ([#46](https://github.com/marp-team/marp-core/pull/46))

### Fixed

- Force reflow on updated fitting elements in Edge ([#43](https://github.com/marp-team/marp-core/pull/43))
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

In order to use on Marp tools, we have extended from the slide deck framework **[Marpit](https://github.com/marp-team/marpit)**. You can use the practical Markdown syntax, advanced features, and official themes.

### :warning: _marp-core is under construction and not ready to use._

## Basic usage

We provide `Marp` class, that is inherited from [Marpit](https://github.com/marp-team/marpit).
Expand Down Expand Up @@ -68,6 +66,17 @@ Marp Markdown is based on [Marpit](https://github.com/marp-team/marpit) and [Com
- Line breaks in paragraph will convert to `<br>` tag.
- Auto convert URL like text into hyperlink.

### [Built-in official themes][themes]

We provide bulit-in official themes for Marp. See more details in [themes].

| Default | Gaia | Uncover |
| :-----------------------------------: | :-----------------------------------: | :-----------------------------------: |
| [![](https://bit.ly/2Op7Bp6)][themes] | [![](https://bit.ly/2QhDq4S)][themes] | [![](https://bit.ly/2DqZvvh)][themes] |
| `<!-- theme: default -->` | `<!-- theme: gaia -->` | `<!-- theme: uncover -->` |

[themes]: ./themes/

### Emoji support

Emoji shortcode (like `:smile:`) and Unicode emoji 😄 will convert into the SVG vector image provided by [twemoji](https://github.com/twitter/twemoji) <img src="https://twemoji.maxcdn.com/2/svg/1f604.svg" alt="😄" width="16" height="16" />. It could render emoji with high resolution.
Expand Down Expand Up @@ -228,7 +237,9 @@ You can modify KaTeX further settings by passing an object of sub-options.

- By default, marp-core will use [online web-font resources through jsDelivr CDN](https://cdn.jsdelivr.net/npm/katex@latest/dist/fonts/). You have to set path to fonts directory if you want to use local resources. If you set `false`, we will not manipulate the path (Use KaTeX's original path: `fonts/KaTeX_***-***.woff2`).

<!-- ## [Work in progress] Themes -->
## Contributing

Are you interested in contributing? Please see [CONTRIBUTING.md](.github/CONTRIBUTING.md).

## Author

Expand All @@ -238,4 +249,4 @@ Managed by [@marp-team](https://github.com/marp-team).

## License

[MIT License](LICENSE)
This package releases under the [MIT License](LICENSE).
85 changes: 85 additions & 0 deletions themes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Marp-core built-in themes

We provide some nice official themes in marp-core. You can choose a favorite theme by using [Marpit `theme` directive](https://marpit.marp.app/directives?id=theme) in your Markdown.

Screenshots were taken from the rendered result of [an example][example].

[example]: example.md

### `invert` class

The all of built-in themes support `invert` class to use the inverted color scheme.

```markdown
<!-- class: invert -->
```

## Default

[![](https://user-images.githubusercontent.com/3993388/48039490-53be1b80-e1b8-11e8-8179-0e6c11d285e2.png)][example]
[![invert](https://user-images.githubusercontent.com/3993388/48039492-5456b200-e1b8-11e8-9975-c9e4029d9036.png)][example]

The default theme of Marp. It is based on [GitHub markdown style](https://github.com/sindresorhus/github-markdown-css), but optimized to the slide deck. Slide contents will be always vertically centered.

```markdown
<!-- theme: default -->
```

## Gaia

[![](https://user-images.githubusercontent.com/3993388/48039493-5456b200-e1b8-11e8-9c49-dd5d66d76c0d.png)][example]
[![invert](https://user-images.githubusercontent.com/3993388/48039494-5456b200-e1b8-11e8-8bb5-f4a250e902e1.png)][example]

Gaia theme is based on the classic design of [yhatt/marp](https://github.com/yhatt/marp).

Originally, this theme was created for a maintainer to use, and it's inspired from [azusa-colors](https://github.com/sanographix/azusa-colors/) keynote template.

```markdown
<!-- theme: gaia -->
```

### Features

#### `lead` class

![lead](https://user-images.githubusercontent.com/3993388/48040058-c62ffb00-e1ba-11e8-876d-c182a30714c6.png)

Contents of the slide will align to left-top by Gaia's default. But you can use `lead` class to be centering like [uncover theme](#uncover). It is useful for the leading page like a title slide.

```markdown
<!--
theme: gaia
class: lead
-->
```

> :information_source: Marpit's [Spot directive](https://marpit.marp.app/directives?id=apply-to-a-single-page-spot-directives) would be useful to apply `lead` class only into a current page.
>
> ```markdown
> <!-- _class: lead -->
> ```

#### Color scheme

![gaia](https://user-images.githubusercontent.com/3993388/48040059-c62ffb00-e1ba-11e8-8026-fa3511844ec7.png)

Gaia theme supports an additional color scheme by `gaia` class.

```markdown
<!-- class: gaia -->
```

## Uncover

[![](https://user-images.githubusercontent.com/3993388/48039495-5456b200-e1b8-11e8-8c82-ca7f7842b34d.png)][example]
[![invert](https://user-images.githubusercontent.com/3993388/48039496-54ef4880-e1b8-11e8-9c22-f3309b101e3c.png)][example]

Uncover theme has three design concepts: simple, minimal, and modern. It's inspired from many slide deck frameworks, especially [reveal.js](https://revealjs.com/).

```markdown
<!-- theme: uncover -->
```

### :warning: Restrictions

[Auto scaling for code block](https://github.com/marp-team/marp-core#auto-scaling-features) is disabled because uncover theme uses the elastic style that has not compatible with it.
12 changes: 12 additions & 0 deletions themes/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
theme: default
class:
---

# marp-core

The core of Marp converter

###### Created by [marp-team](https://github.com/marp-team/)

![bg right 50%](https://github.com/marp-team.png)