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

How can I add a vertical slides #12

Closed
JamborJan opened this issue Feb 18, 2015 · 20 comments
Closed

How can I add a vertical slides #12

JamborJan opened this issue Feb 18, 2015 · 20 comments
Milestone

Comments

@JamborJan
Copy link

Adding new horizontal slides is easy with ---but how do I add a vertical slide above or underneath of a slide?

The reveal.js manual says something like the following but this is not working.

        <section>Single Horizontal Slide</section>
        <section>
            <section>Vertical Slide 1</section>
            <section>Vertical Slide 2</section>
        </section>
@JamborJan
Copy link
Author

According to this source: http://www.relishapp.com/jedcn/reveal-ck/docs/slides-with-markdown#creating-a-single-column-of-vertical-slides

The vertical slides should be possible with ***which I tested and unfortunately it didn't work.

@JamborJan
Copy link
Author

I can use the html notation instead of markdown but then I have to use completely html in a section. Is this the right way to do it?

#### Heading markdown

I cannot add vertical slides

---
<section>
<h4>Heading html</h4>

<ul>
<li>I can add vertical slides with section tags</li>
<li>everything needs to be html</li>
<li>no markdown</li>
</ul>

</section>

<section>
<h4>Even Tables work here</h4>
<table>
<thead>
    <tr>
        <th>Item</th>
        <th>Value</th>
        <th>Quantity</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>Apples</td>
        <td>$1</td>
        <td>7</td>
    </tr>
</tbody>
</table>

</section>
---
End

@jacksingleton
Copy link
Owner

Hey thanks for bringing this up!

I didn't include the vertical slides in this release as I was trying to keep it very minimal - but it would be trivial to add.

Just need to decide what separator to use.

What do you think would look best? The default was actually "\n\n" or two blank lines. This looks nice in markdown but had the odd effect of pushing everything into a vertical slide while you were editing the markdown and happened to have two newlines in a row momentarily.

@JamborJan
Copy link
Author

What about the 3 asterisks like mentioned in the one source I posted?

At the moment 3 asterisks make a line, don't know if this is something which is required / needed / used.

It would make it easy:

  • 3 dashes = new horizontal slide
  • 3 asterisks = new vertical slide

@jacksingleton
Copy link
Owner

Sure, will be in the next release!

@jacksingleton jacksingleton added this to the 0.2 milestone Feb 18, 2015
@birdsarah
Copy link

Hi, I don't think this has been included yet, and I just wanted to chip in. Am loving hacker-slides, but I use *** to give me a horizontal line on a page. (see screenshot). I'd like to not lose that feature.

screenshot from 2015-07-17 16 23 33

@jacksingleton
Copy link
Owner

Thanks @birdsarah, will pick something other than '***'

@ar-jan
Copy link

ar-jan commented Feb 19, 2016

Hi! I'm trying out Hacker Slides. Has the option for vertical slides been added?

@jacksingleton
Copy link
Owner

@ar-jan I'm afraid this didn't make it into the last release. I might be able to do another release this weekend.

@ar-jan
Copy link

ar-jan commented Feb 19, 2016

That would be great - then I might use it on Monday :)

@zeigerpuppy
Copy link

Vertical slides would be great, it really helps in organising slides well
The standard reveal.js syntax is

-- 

two dashes for vertical slides (instead of --- for a usual slide)

@jeau
Copy link
Contributor

jeau commented Apr 12, 2016

with this standard syntax (two dashes), the solution is quite simple

Jack, you only have to add this line just after line 40 in this file js/slides.js

'data-separator-vertical': "^-( *)-( *-*)*"

@jacksingleton
Copy link
Owner

Thanks @jeau

It will be slightly more work than that in order to get the preview to auto-scroll to the correct vertical slide.

Here is the line where we change the slide automatically:

https://github.com/jacksingleton/hacker-slides/blob/master/static/js/index.js#L46

Following the method calls back from there (all in the same file) will get you to currentCursorSlide which needs to know about the vertical slides.

If you have the time to give it a go and test locally I'd welcome a PR! Please reach out if you have any questions or run into any issues.

Jack

@jeau
Copy link
Contributor

jeau commented Apr 13, 2016

You are right. I did not verify the editor field before launching this fix.

I try to solve the problem but I don't understand the principle of the numbering of the horizontal and vertical slides

@jeau
Copy link
Contributor

jeau commented Apr 13, 2016

I found a response to my question. We must send two arguments: the first for the horizontal slide number, the second for me vertical slide number (if there)

args: [currentSlide.h, currentSlide.v]

il will send a PR ASAP.

Jeau

@zeigerpuppy
Copy link

happy to test changes here too,

I made the change to slide.js after line 40, but I guess some other changes are required before vertical slides will work!

@higyigma
Copy link

Please give updates! Love it, just wish it had vertical as everyone else has said.

@jacksingleton
Copy link
Owner

@jeau has put in the PR and I should have time to review merge and publish an update this weekend.

@zeigerpuppy that would be really helpful, especially if you could give it a go before the weekend

Thanks for helping out everyone :)

@jacksingleton jacksingleton modified the milestones: 0.4, 0.2 Apr 25, 2016
@jacksingleton
Copy link
Owner

HackerSlides 0.4 with support for vertical slides using '--' on a new line is now available in the app store.

Thanks @jeau !

@zeigerpuppy
Copy link

zeigerpuppy commented Apr 26, 2016

Working great, thanks!
one little issue though, not sure if it's related to the change, but when typing the heading of a new slide and the preview is updating to the new slide, the editor seems to drop some key presses, ( type "Heading" and "eading" comes out).

Ok, a bit more testing, the problem is quite general, seems to drop a character when the preview updates (OS X 10.9, Firefox)
looks like this is the same as #21
maybe vertical slides have resurrected this problem?
I'll open a new issue.

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

No branches or pull requests

7 participants