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

Add header and footer directives #22

Merged
merged 11 commits into from
May 14, 2018
Merged

Add header and footer directives #22

merged 11 commits into from
May 14, 2018

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented May 13, 2018

This PR adds header and footer local directives.

---
header: "Header content"
footer: "Footer content"
---

# Slide contents

The content specified in a header directive is added to first of each slide with wrapping by <header> element. The content of a footer directive also adds to last of each slide with wrapping by <footer>.

<section>
  <header>Header content</header>
  <h1>Slide contents</h1>
  <footer>Footer content</footer>
</section>

Marpit just inserts corresponding elements. When you want to place these contents in the marginals of slide, the using theme must support fixed position. If not, you would simply see these contents as the part of slide content.

Unlike the footer directive in pre-released Marp, Marpit's directives support markdown syntax for inline text. You can style text as **bold**, _italic_, and so on.

ToDo

  • Add test case about inline markdown syntax
     
  • Update README.md
    • header and footer directives
    • How to style these contents on theme

@yhatt yhatt merged commit f04a34c into master May 14, 2018
@yhatt yhatt deleted the marginal-directives branch May 14, 2018 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant