Giter VIP home page Giter VIP logo

keydown's Introduction

KeyDown

KeyDown is another 'Presentation System in a single HTML page' inspired by Showoff, Slidedown, HTML5 Rocks, with a little Presentation Zen thrown in.

It uses the excellent deck.js and its extensions for the presentation.

Build Status at Travis.

Our Github Pages is a Sample Presentation

Usage

$ gem install keydown

Generate a Template

Get started by making a sample project:

$ keydown generate my_presentation

This will make:

| - my_presentation/
  | - css/               - Keydown CSS and a file for you to customize
  | - deck.js/
  | - images/            - Some Keydown images, but also for you
  | - js/                - Keydown JavaScript, and a file for you to customize
  | - slides.md

Write your presentation in Markdown

Edit slides.md and write your presentation as if it were going to be HTML (because it will be):

!SLIDE

# This is my talk

!SLIDE

## I hope you enjoy it

!SLIDE code

    def foo
      :bar
    end

!NOTES

  * make sure to explain the use of Ruby symbols	

!SLIDE

Google is [here](http://google.com)

!SLIDE

# Questions?

!NOTE blocks will be ignored when generating the HTML.

Generate the Deck

$ keydown slides slides.md

..will generate slides.html

Present

Give your presentation! Open slides.html in a browser and talk away:

  • left, right arrows to navigate through slides

Usage

Presentation Title

An optional first H1 before a !SLIDE is treated as the presentation title in the HTML <title>.

Slide classes

Any text that follows !SLIDE will be added to the slide as CSS classes.

!SLIDE dark

You can define your own CSS classes (see below).

Images

Your presentation will be generated in the same directory as your Markdown file. So URI references via relative paths are fine. So feel free to use the local images directory (see the generate task above).

Full Screen background images

Keydown supports slides with full screen background images, including attribution text.

!SLIDE

# This slide has a background image

}}} images/sunset.jpg

This slide will have sunset.jpg as a full-bleed background image. Its aspect ratio will be preserved.

If you wish to have attribution text, an icon (currently Flickr and Creative Commons graphics are supported via flickr and cc respectively), and link the text, separate the text with :: like this:

!SLIDE

# This slide has a background image
 
}}} images/sunset.jpg::cprsize::flickr::http:://flickr.com/cprsize

Syntax Highlighting

Code syntax highlighting is done via CodeMirror.

Mark your code by block escaping via @@@ or ```

For Ruby:

@@@ ruby
    def foo
      :bar
    end
@@@

For JavaScript

``` js
    function foo() {
      return 'bar';
    }
```

For ERb:

@@@ rhtml
    <%= @post.created_at.to_s(:fancy) %>
@@@

Custom CSS

All css files in the css directory will be linked into your presentation HTML file.

Custom JavaScript.

All JavaScript files in the js directory will be linked in your presentation HTML file.

Deck.js Extensions

Any extension CSS and JS will be loaded if copied into the project.

Requirements

For Use

  • Ruby and Rubygems
  • Other dependent gems will be installed

For Development

  • RSpec
  • Nokogiri
  • Other dependent gems will be installed

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Thanks & Attribution

Thanks to:

  • HTML5 Rocks guys for the original great presentation template
  • @nakajima & Slidedown for some parsing
  • Caleb for making deck.js & testing it with Jasmine
  • The various Github guys for Albino, Gollum, etc.

Copyright

Copyright © Infews LLC. See LICENSE for details.

keydown's People

Contributors

dburkes avatar grig avatar trobrock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keydown's Issues

working with chinese character

Hi

I am completely new to ruby, and I installed the whole environment just to use keydown.

The Chinese character requires UTF-8 encode to work well (in Python or other language)

Since I am new to Ruby, could you tell me how to fix this?

I put my error info down below for your reference.

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/lib/keydown/s
lidedeck.rb:48:in match': invalid byte sequence in GBK (ArgumentError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/ lib/keydown/slidedeck.rb:48:inmatch'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/
lib/keydown/slidedeck.rb:48:in set_title' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/ lib/keydown/slidedeck.rb:16:ininitialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/
lib/keydown/tasks/slides.rb:22:in new' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/ lib/keydown/tasks/slides.rb:22:inslides'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.14.6/li
b/thor/task.rb:22:in run' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.14.6/li b/thor/invocation.rb:118:ininvoke_task'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.14.6/li
b/thor.rb:263:in dispatch' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.14.6/li b/thor/base.rb:389:instart'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/keydown-0.9.2/
bin/keydown:6:in <top (required)>' from C:/RailsInstaller/Ruby1.9.3/bin/keydown:19:inload'
from C:/RailsInstaller/Ruby1.9.3/bin/keydown:19:in `

'

First line of first slide is lost

Unless it has an html tag in front of it, I think.

# Continuous Integration

!SLIDE

Matthew Kocher
@mkocher

will not work, while

# Continuous Integration

!SLIDE

# Matthew Kocher
@mkocher

will work.

How to add script tags?

Hey,

I wondered how to add script tags to slides - it should work with markdown, but somehow
they are always displayed in the slide (although working).

Example: https://gist.github.com/6bd2de515cbb864d02b0
it seems to work, but the content of the script tags is always displayed on the slide

what I want to do is use coffeescript for interactive presentations (therefore it can be used
with an additional compiler script and type="text/coffeescript" - which also works fine, but results in the
same output in the slides as above...

any idea how I could do this?

Thanks a lot,
Christoph

In firefox it is completely messed up

Firefox doesn't seem to respect the size of a slide, because everything is just a giant collage when you open even the example slides.

PS: The original deck.js works just fine

The example slide

The example slide seems not work well with Firefox 8, 9, 10, 11a, 12a (nightly build), especially the text alignment.

Transisitions for individual slide elements

How do you specify nested slides/substeps ie: transitions for individual elements on the page.

Example in desk.js:

<section class="slide">
  <h2>Extensions</h2>
  <p>Core gives you basic slide functionality...</p>        
  <ul>
     <li class="slide">
        <h3>deck.goto</h3>
        <p>Adds a shortcut key to jump to any slide number...</p>
     </li>
     <li class="slide">...</li> 
     <li class="slide">...</li>
     <li class="slide">...</li>
  </ul>
</section>

swiss.css overrides the project's css

I was hoping to use the CSS file that is created for the project, to modify some parts of the presentation. Unfortunately the swiss.css file is the last link inserted into the deck, so it is difficult to make any changes (like background color) without modifying swiss.css directly, which I was hoping to avoid.

  <head>
    <title>ipv6_atl</title>
    <meta charset='utf-8'>
    <meta content='width=1024, user-scalable=no' name='viewport'>
    <!-- deck.js's core css -->
    <link href="deck.js/core/deck.core.css" rel="stylesheet" type="text/css"/>
    <!-- deck.js extension CSS files -->
    <link href="deck.js/extensions/codemirror/deck.codemirror.css" rel="stylesheet" type="text/css"/>
    <link href="deck.js/extensions/goto/deck.goto.css" rel="stylesheet" type="text/css"/>
    <link href="deck.js/extensions/hash/deck.hash.css" rel="stylesheet" type="text/css"/>
    <link href="deck.js/extensions/menu/deck.menu.css" rel="stylesheet" type="text/css"/>
    <link href="deck.js/extensions/navigation/deck.navigation.css" rel="stylesheet" type="text/css"/>
    <link href="deck.js/extensions/scale/deck.scale.css" rel="stylesheet" type="text/css"/>
    <link href="deck.js/extensions/status/deck.status.css" rel="stylesheet" type="text/css"/>
    <!-- all css in the css dir: Keydown CSS, your custom CSS, and themes from deck.js -->
    <link href="css/keydown.css" rel="stylesheet" type="text/css"/>
    <link href="css/default.css" rel="stylesheet" type="text/css"/>
    <link href="css/horizontal-slide.css" rel="stylesheet" type="text/css"/>
    <link href="css/ipv6_atl.css" rel="stylesheet" type="text/css"/>
    <link href="css/swiss.css" rel="stylesheet" type="text/css"/>
    <!-- Modernizr (provided for legacy browsers) -->
    <script src="deck.js/support/modernizr.custom.js" type="text/javascript"></script>
  </head>

Handling multiple slide files

Hi,

I'm just curious how you feel about a situation where one has multiple markdown files for organizing slide material but would like those composed into a single html file for delivery.

Does keydown support this in a way I haven't figured out? If not, are there any plans to?

background images gone?

in 0.9.0, background images by }}} filename seem to be gone; I cannot see them anymore...

BTW, I think the default theme is much less appealing than the previous version; it is almost "plain text" now.

File to import not found or unreadable: compass/css3. (Sass::SyntaxError)

Getting the error "File to import not found or unreadable: compass/css3. (Sass::SyntaxError)" running the command "keydown slides slides.md".

Just installed keydown, generated a new project and the the "keydown slides slides.md" command.

Any ideas what's wrong?

OS Mac 10.9.2
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
compass (1.0.0.alpha.19)
compass-core (1.0.0.alpha.19)
compass-import-once (1.0.4)

Gary

Math support

Hello,

Your work could be a first class work if math was supported (with LaTex syntax for example)

Thanks in advance

are you really using Pygments for highlighting?

what I see in the source code is CodeRay instead of Pygments as documented... the latter seems to support much more languages; I was struggling with one language (R) listed in the support list of Pygments, but it could not be highlighted with keydown.

Error on Mac

I just followed the instruction and when I try to generate the HTML it gives me this

Creating Keydown presentation from slides.md
(sass):1: File to import not found or unreadable: compass/css3. (Sass::SyntaxError)
Load path: /Library/Ruby/Gems/2.0.0/gems/compass-1.0.3/frameworks/compass/stylesheets
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/import_node.rb:66:in `rescue in import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/import_node.rb:45:in `import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/import_node.rb:28:in `imported_file'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/import_node.rb:37:in `css_import?'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:311:in `visit_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/stack.rb:79:in `block in with_base'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/stack.rb:115:in `with_frame'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/stack.rb:79:in `with_base'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:158:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:52:in `map'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:52:in `visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:36:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:157:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/visitors/perform.rb:8:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/root_node.rb:36:in `css_tree'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/tree/root_node.rb:20:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.13/lib/sass/engine.rb:268:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/keydown-0.9.2/lib/keydown/tasks/slides.rb:34:in `block in slides'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:46:in `identical?'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:72:in `on_conflict_behavior'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:113:in `invoke_with_conflict_check'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
    from /Library/Ruby/Gems/2.0.0/gems/keydown-0.9.2/lib/keydown/tasks/slides.rb:33:in `slides'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Library/Ruby/Gems/2.0.0/gems/keydown-0.9.2/bin/keydown:6:in `<top (required)>'
    from /usr/bin/keydown:23:in `load'
    from /usr/bin/keydown:23:in `<main>'

Syntax highlighting of HTML

How do I so syntax highlighting of HTML? This doesn't work:

``` html
    <!-- include jasmine source files here... -->
    <link rel="stylesheet" type="text/css" href="lib/jasmine-1.3.1/jasmine.css">
```

Nor

``` js
    <!-- include jasmine source files here... -->
    <link rel="stylesheet" type="text/css" href="lib/jasmine-1.3.1/jasmine.css">
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.