summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2019-12-04 14:03:04 +0000
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2019-12-04 14:03:04 +0000
commit175a15d0f7302d88d1f8abcdc116ce613cd7a26e (patch)
tree9d2128775b5ae0c46f4782b25444a89a4ee04505
parentecbb2e570a3d7970db88ea6f38ea7493cf1ffa96 (diff)
Convert to a dummy native packageHEADdebian/1.1.3+0archive/debian/1.1.3+0master
Closes: #946061
-rw-r--r--.gitignore16
-rw-r--r--CHANGELOG.md55
-rw-r--r--LICENSE176
-rw-r--r--MANIFEST.in1
-rw-r--r--README.md406
-rw-r--r--debian/changelog6
-rw-r--r--debian/clean1
-rw-r--r--debian/copyright8
-rw-r--r--debian/source/format2
-rw-r--r--debian/watch4
-rw-r--r--docs/Makefile130
-rw-r--r--docs/conf.py219
-rw-r--r--docs/index.rst106
-rw-r--r--examples/_assets/landscape.jpgbin51976 -> 0 bytes
-rw-r--r--examples/config-file/presentation.cfg6
-rw-r--r--examples/markdown/slides.md108
-rw-r--r--examples/multiple-files/1.md37
-rw-r--r--examples/multiple-files/2.rst60
-rw-r--r--examples/multiple-files/3.textile19
-rw-r--r--examples/other-features/slides.md15
-rw-r--r--examples/restructuredtext/slides.rst130
-rw-r--r--examples/textile/slides.textile105
-rw-r--r--setup.py49
-rw-r--r--src/landslide/__init__.py5
-rw-r--r--src/landslide/__main__.py2
-rw-r--r--src/landslide/generator.py575
-rw-r--r--src/landslide/macro.py177
-rwxr-xr-xsrc/landslide/main.py181
-rw-r--r--src/landslide/parser.py86
-rw-r--r--src/landslide/rst.py100
-rw-r--r--src/landslide/test-data/encoding.rst9
-rw-r--r--src/landslide/test-data/img.pngbin3669 -> 0 bytes
-rw-r--r--src/landslide/test-data/test.css1
-rw-r--r--src/landslide/test-data/test.js1
-rw-r--r--src/landslide/test-data/test.md114
-rw-r--r--src/landslide/tests.py266
-rw-r--r--src/landslide/themes/default/base.html190
-rw-r--r--src/landslide/themes/default/css/print.css93
-rw-r--r--src/landslide/themes/default/css/screen.css568
-rw-r--r--src/landslide/themes/default/js/slides.js580
-rw-r--r--src/landslide/themes/leapmotion/base.html183
-rw-r--r--src/landslide/themes/leapmotion/css/print.css93
-rw-r--r--src/landslide/themes/leapmotion/css/screen.css563
-rw-r--r--src/landslide/themes/leapmotion/js/slides.js634
-rw-r--r--src/landslide/themes/light/css/screen.css564
-rw-r--r--src/landslide/themes/ribbon/base.html78
-rw-r--r--src/landslide/themes/ribbon/css/defaults.scss38
-rw-r--r--src/landslide/themes/ribbon/css/print.css1
-rw-r--r--src/landslide/themes/ribbon/css/print.scss59
-rw-r--r--src/landslide/themes/ribbon/css/reset.scss42
-rw-r--r--src/landslide/themes/ribbon/css/screen.css672
-rw-r--r--src/landslide/themes/ribbon/css/screen.scss486
-rw-r--r--src/landslide/themes/ribbon/images/grid-16x10.pngbin3924 -> 0 bytes
-rw-r--r--src/landslide/themes/ribbon/images/grid-4x3.pngbin4501 -> 0 bytes
-rw-r--r--src/landslide/themes/ribbon/images/linen.pngbin35966 -> 0 bytes
-rw-r--r--src/landslide/themes/ribbon/images/ribbon.svg3
-rw-r--r--src/landslide/themes/ribbon/js/slides.js441
-rw-r--r--src/landslide/themes/ribbon/license.txt53
-rw-r--r--src/landslide/themes/tango/css/background.pngbin245 -> 0 bytes
-rw-r--r--src/landslide/themes/tango/css/screen.css577
-rw-r--r--src/landslide/utils.py45
-rw-r--r--src/landslide/watcher.py37
-rw-r--r--tox.ini10
63 files changed, 7 insertions, 9179 deletions
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 1e5f282..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-*.pyc
-build
-.idea
-landslide/.idea
-presentation.html
-*.pdf
-examples/.DS_Store
-*.swp
-src/landslide.egg-info/
-dist/
-*.komodoproject
-.komodotools
-landslide.sublime-project
-docs/_build
-venv
-.tox
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index da6b74f..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Changelog
-
-## v1.1.3
-
-- Identify each slide by a numbered class (#171) (dkg)
-- Fix theme image embedding regex to grab all images (#170)
-- Fix blockquote font size for rst (#161)
-- Fix display of RST image target links (#87)
-- Fix relative path generation (#147)
-- Add command line option for print version (#135)
-- Add use of '---' as a slide separator to textile files (#163)
-- README improvements (#88 and #101)
-- Improve image path regex and replacement (#177)
-
-## v1.1.2
-
-- Add support for Python 3
-- Allow support for copy_theme argument in CFG files (#139) (syscomet)
-- Improve MathJax rendering for Markdown files
-- Support math output (#144) (davidedelvento)
-- Allow presenter notes in slides with no heading in RST files (#141) (regebro)
-- And more...
-
-## v1.1.1
-
-### Fixes
-
-- Don't accidentally require watchdog (#134)
-
-## v1.1.0
-
-### Major Enhancements
-
-- Add CHANGELOG
-- Add "ribbon" theme from "shower" presentation tool (#129) (durden)
-- Add `-w` flag for watching/auto-regenerating slideshow (#71, #120) (jondkoon)
-
-### Minor Enhancements
-
-- Supress ReST rendering errors
-- CSS pre enhancements (#91) (roktas)
-- Add an example using presenter notes (#106) (netantho)
-- Run macros on headers also, to embed images (#74) (godfat)
-- Allow PHP code snippets to not require <?php (#127) (akrabat)
-- Allow for line numbers and emphasis with reStructuredText (#97) (copelco)
-- Add an option to strip presenter notes from output (#107) (aaugustin)
-
-### Fixes
-
-- Firefox offset bug on next slide (#73)
-- Fix base64 encoding issue (#109) (ackdesha)
-- Fix to embed images defined in CSS (#126) (akrabat)
-- Minor documentation fixes (#119, #131) (durden, spin6lock)
-- Use configured encoding when reading all embedded files (#125) (iguananaut)
-- Allow pygments lexer names that include special characters (#123) (shreyankg)
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index d9a10c0..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,176 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index 77859b1..0000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1 +0,0 @@
-graft src/landslide/themes
diff --git a/README.md b/README.md
deleted file mode 100644
index f865373..0000000
--- a/README.md
+++ /dev/null
@@ -1,406 +0,0 @@
-# Landslide
-
-Landslide generates a slideshow using from markdown, ReST, or textile. It
-builds off of Google's [html5slides][html5slides] template.
-
-The following markdown produces [this slideshow][sample].
-
- # Landslide
-
- ---
-
- # Overview
-
- Generate HTML5 slideshows from markdown, ReST, or textile.
-
- ![python](http://i.imgur.com/bc2xk.png)
-
- Landslide is primarily written in Python, but it's themes use:
-
- - HTML5
- - Javascript
- - CSS
-
- ---
-
- # Code Sample
-
- Landslide supports code snippets
-
- !python
- def log(self, message, level='notice'):
- if self.logger and not callable(self.logger):
- raise ValueError(u"Invalid logger set, must be a callable")
-
- if self.verbose and self.logger:
- self.logger(message, level)
-
-[html5slides]: http://code.google.com/p/html5slides/
-[sample]: http://adamzap.com/misc/presentation.html
-
-# Requirements
-
-`python` and the following modules:
-
-- `jinja2`
-- `pygments` for code blocks syntax coloration
-
-### Markup Conversion
-
-- `markdown` if you use Markdown syntax for your slide contents
-- `docutils` if you use ReStructuredText syntax for your slide contents
-- `textile` for textile support
-
-### Optional
-
-- `watchdog` for watching/auto-regeneration with the `-w` flag
-- [PrinceXML](http://www.princexml.com/) for PDF export
-
-# Installation
-
-Install the latest stable version of Landslide with a python package manager
-like `pip`:
-
- $ pip install landslide
-
-If you want to stay on the edge:
-
- $ git clone https://github.com/adamzap/landslide.git
- $ cd landslide
- $ python setup.py build
- $ sudo python setup.py install
-
-# Formatting
-
-## Markdown
-
-- Your Markdown source files must be suffixed by `.md`, `.markdn`, `.mdwn`,
- `.mdown` or `.markdown`
-- To create a title slide, render a single `h1` element (eg. `# My Title`)
-- Separate your slides with a horizontal rule (`---` in markdown) except at the
- end of md files
-- Your other slides should have a heading that renders to an `h1` element
-- To highlight blocks of code, put `!lang` where `lang` is the pygment
- supported language identifier as the first indented line
-
-## ReStructuredText
-
-- Your ReST source files must be suffixed by `.rst` or `.rest` (**`.txt` is not
- supported**)
-- Use headings for slide titles
-- Separate your slides using an horizontal rule (`----` in RST) except at the
- end of RST files
-
-## Textile
-
-- Separate your slides using `---`, just like in markdown
-
-# Rendering
-
-- Run `landslide slides.md` or `landslide slides.rst`
-- Enjoy your newly generated `presentation.html`
-
-Or get it as a PDF document if PrinceXML is installed and available on your
-system:
-
- $ landslide README.md -d readme.pdf
- $ open readme.pdf
-
-# Viewing
-
-- Press `h` to toggle display of help
-- Press `left arrow` and `right arrow` to navigate
-- Press `t` to toggle a table of contents for your presentation. Slide titles
- are links
-- Press `ESC` to display the presentation overview (Exposé)
-- Press `n` to toggle slide number visibility
-- Press `b` to toggle screen blanking
-- Press `c` to toggle current slide context (previous and next slides)
-- Press `e` to make slides filling the whole available space within the
- document body
-- Press `S` to toggle display of link to the source file for each slide
-- Press '2' to toggle notes in your slides (specify with the .notes macro)
-- Press '3' to toggle pseudo-3D display (experimental)
-- Browser zooming is supported
-
-# Commandline Options
-
-Several options are available using the command line:
-
- -h, --help show this help message and exit
- -c, --copy-theme Copy theme directory into current presentation source
- directory
- -b, --debug Will display any exception trace to stdin
- -d FILE, --destination=FILE
- The path to the to the destination file: .html or .pdf
- extensions allowed (default: presentation.html)
- -e ENCODING, --encoding=ENCODING
- The encoding of your files (defaults to utf8)
- -i, --embed Embed stylesheet and javascript contents,
- base64-encoded images in presentation to make a
- standalone document
- -l LINENOS, --linenos=LINENOS
- How to output linenos in source code. Three options
- availables: no (no line numbers); inline (inside <pre>
- tag); table (lines numbers in another cell, copy-paste
- friendly)
- -o, --direct-output Prints the generated HTML code to stdin; won't work
- with PDF export
- -q, --quiet Won't write anything to stdin (silent mode)
- -r, --relative Make your presentation asset links relative to current
- pwd; This may be useful if you intend to publish your
- html presentation online.
- -t THEME, --theme=THEME
- A theme name, or path to a landlside theme directory
- -v, --verbose Write informational messages to stdin (enabled by
- default)
- -w, --watch Watch the source directory for changes and
- auto-regenerate the presentation
- -x EXTENSIONS, --extensions=EXTENSIONS
- Comma-separated list of extensions for Markdown
- -m, --math-output Enable mathematical output using mathjax
-
-# Presentation Configuration
-
-Landslide allows to configure your presentation using a `cfg` configuration
-file, therefore easing the aggregation of source directories and the reuse of
-them across presentations. Landslide configuration files use the `cfg` syntax.
-If you know `ini` files, you get the picture. Below is a sample configuration
-file:
-
- [landslide]
- theme = /path/to/my/beautiful/theme
- source = 0_my_first_slides.md
- a_directory
- another_directory
- now_a_slide.markdown
- another_one.rst
- destination = myWonderfulPresentation.html
- css = my_first_stylesheet.css
- my_other_stylesheet.css
- js = jquery.js
- my_fancy_javascript.js
- relative = True
- linenos = inline
-
-Don't forget to declare the `[landslide]` section. All configuration files
-must end in the .cfg extension.
-
-To generate the presentation as configured, just run:
-
- $ cd /path/to/my/presentation/sources
- $ landslide config.cfg
-
-# Macros
-
-You can use macros to enhance your presentation:
-
-## Notes
-
-Add notes to your slides using the `.notes:` keyword, eg.:
-
- # My Slide Title
-
- .notes: These are my notes, hidden by default
-
- My visible content goes here
-
-You can toggle display of notes by pressing the `2` key.
-
-Some other macros are also available by default: `.fx: foo bar` will add the
-`foo` and `bar` classes to the corresponding slide `<div>` element, easing
-styling of your presentation using CSS.
-
-## QR Codes
-
-Add a QR Code to your presentation by using the `.qr` keyword:
-
- .qr: 450|http://github.com/adamzap/landslide
-
-# Presenter Notes
-
-You can also add presenter notes to each slide by following the slide content
-with a heading entitled "Presenter Notes". Press the 'p' key to open the
-presenter view.
-
-# Registering Macros
-
-Macros are used to transform the HTML contents of your slide.
-
-You can register your own macros by creating `landslide.macro.Macro` derived
-classes, implementing a `process(content, source=None)` method and returning
-a tuple containing the modified contents and some css classes you may be
-wanting to add to your slide `<div>` element. For example:
-
- !python
- import landslide
-
- class MyMacro(landslide.Macro):
- def process(self, content, source=None):
- return content + '<p>plop</p>', ['plopped_slide']
-
- g = landslide.generator.Generator(source='toto.md')
- g.register_macro(MyMacro)
- print g.render()
-
-This will render any slide as below:
-
- !html
- <div class="slide plopped_slide">
- <header><h2>foo</h2></header>
- <section>
- <p>my slide contents</p>
- <p>plop</p>
- </section>
- </div>
-
-# Advanced Usage
-
-## Setting Custom Destination File
-
- $ landslide slides.md -d ~/MyPresentations/presentation.html
-
-## Working with Directories
-
- $ landslide slides/
-
-## Working with Direct Output
-
- $ landslide slides.md -o | tidy
-
-## Using an Alternate Landslide Theme
-
- $ landslide slides.md -t mytheme
- $ landslide slides.md -t /path/to/theme/dir
-
-## Embedding Base-64-Encoded Images
-
- $ landslide slides.md -i
-
-## Exporting to PDF
-
- $ landslide slides.md -d presentation.pdf
-
-## Enabling mathematical notation
-
- Note that this require writing the slides in ReST format as well as
- using Docutils 0.8 or newer.
-
- $ landslide slides.rst -m
-
-## Enabling Markdown Extensions
-
-See documentation on available Markdown extensions
-[here](https://pythonhosted.org/Markdown/extensions/index.html):
-
- $ landslide slides.md -x abbr
-
-# Theming
-
-A Landslide theme is a directory following this simple structure:
-
- mytheme/
- |-- base.html
- |-- css
- | |-- print.css
- | `-- screen.css
- `-- js
- `-- slides.js
-
-If a theme does not provide HTML and JS files, those from the default theme
-will be used. CSS is not optional.
-
-Last, you can also copy the whole theme directory to your presentation one by
-passing the `--copy-theme` option to the `landslide` command:
-
- $ landslide slides.md -t /path/to/some/theme --copy-theme
-
-# User stylesheets and Javascripts
-
-If you don't want to bother making your own theme, you can include your own
-user css and js files to the generated presentation.
-
-This feature is only available if you use a landslide configuration file, by
-setting the `css` and/or `js` flags:
-
- [landslide]
- theme = /path/to/my/beautiful/theme
- source = slides.mdown
- css = custom.css
- js = jquery.js
- powerpoint.js
-
-These will link the ``custom.css`` stylesheet and both the ``jquery.js`` and
-``powerpoint.js`` files within the ``<head>`` section of the presentation html
-file.
-
-**NOTE:** Paths to the css and js files must be relative to the directory
-you're running the ``landslide`` command from.
-
-# Publishing your Presentation Online
-
-If you intend to publish your HTML presentation online, you'll have to use the
-`--relative` option, as well as the `--copy-theme` one to have all asset links
-relative to the root of your presentation;
-
- $ landslide slides.md --relative --copy-theme
-
-That way, you'll just have to host the whole presentation directory to
-a webserver. Of course, no Python nor PHP nor anything else than a HTTP
-webserver (like Apache) is required to host a landslide presentation.
-
-[Here's an example][akei-pres].
-
-[akei-pres]: http://www.akei.com/presentations/2011-Djangocong/index.html
-
-# Theme Variables
-
-The `base.html` must be a [Jinja2 template file][jinja-docs] where you can
-harness the following template variables:
-
-- `css`: the stylesheet contents, available via two keys, `print` and `screen`,
- both having:
- - a `path_url` key storing the url to the asset file path
- - a `contents` key storing the asset contents
-- `js`: the javascript contents, having:
- - a `path_url` key storing the url to the asset file path
- - a `contents` key storing the asset contents
-- `slides`: the slides list, each one having these properties:
- - `header`: the slide title
- - `content`: the slide contents
- - `number`: the slide number
-- `embed`: is the current document a standalone one?
-- `num_slides`: the number of slides in current presentation
-- `toc`: the Table of Contents, listing sections of the document. Each section
- has these properties available:
- - `title`: the section title
- - `number`: the slide number of the section
- - `sub`: subsections, if any
-
-[jinja-docs]: http://jinja.pocoo.org/2/documentation/templates
-
-# Styles Scope
-
-- To change HTML5 presentation styles, tweak the `css/screen.css` stylesheet
- bundled with the theme you are using
-- For PDF, modify the `css/print.css`
-
-# Authors
-
-## Original Author and Development Lead
-
-- Adam Zapletal (adamzap@gmail.com)
-
-## Co-Author
-
-- Nicolas Perriault (nperriault@gmail.com)
-
-## Contributors
-
-See https://github.com/adamzap/landslide/contributors
-
-## Base Template Authors and Contributors (html5-slides)
-
-- Marcin Wichary (mwichary@google.com)
-- Ernest Delgado (ernestd@google.com)
-- Alex Russell (slightlyoff@chromium.org)
diff --git a/debian/changelog b/debian/changelog
index 8f33493..64215f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+landslide (1.1.3+0) unstable; urgency=medium
+
+ * Convert to a dummy native package (Closes: #946061).
+
+ -- Andrej Shadura <andrewsh@debian.org> Wed, 04 Dec 2019 14:01:08 +0000
+
landslide (1.1.3-2) unstable; urgency=medium
* Remove the shipped Python 2 module (Closes: #936815).
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index 659ddbf..0000000
--- a/debian/clean
+++ /dev/null
@@ -1 +0,0 @@
-setup.py
diff --git a/debian/copyright b/debian/copyright
index 4d203ec..7322f98 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,4 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: Landside
-Upstream-Contact: Adam Zapletal <adamzap@gmail.com>
-Source: https://github.com/adamzap/landslide
-
-Files: *
-Copyright: Copyright 2010 Adam Zapletal
-Copyright: Copyright 2010 Google Inc
-License: Apache-2.0
Files: debian/*
Copyright: Copyright 2010 Damien Raude-Morvan <drazzib@debian.org>
diff --git a/debian/source/format b/debian/source/format
index 163aaf8..89ae9db 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-3.0 (quilt)
+3.0 (native)
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index c9f5a0d..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,4 +0,0 @@
-version=3
-
-opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/landslide-$1\.tar\.gz/,uversionmangle=s/-rc/~rc/ \
- https://github.com/adamzap/landslide/tags .*/v?(\d\S*)\.tar\.gz
diff --git a/docs/Makefile b/docs/Makefile
deleted file mode 100644
index 989f337..0000000
--- a/docs/Makefile
+++ /dev/null
@@ -1,130 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = _build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Landslide.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Landslide.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/Landslide"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Landslide"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- make -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/conf.py b/docs/conf.py
deleted file mode 100644
index 2a96238..0000000
--- a/docs/conf.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Landslide documentation build configuration file, created by
-# sphinx-quickstart on Sun Feb 27 10:01:49 2011.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('../src'))
-
-# -- General configuration -----------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.todo',
-]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'Landslide'
-copyright = u'2011, Adam Zapletal, Nicolas Perriault'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '0.8'
-# The full version, including alpha/beta/rc tags.
-release = '0.8.2'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-html_show_sourcelink = False
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'Landslidedoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
- ('index', 'Landslide.tex', u'Landslide Documentation',
- u'Adam Zapletal, Nicolas Perriault', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'landslide', u'Landslide Documentation',
- [u'Adam Zapletal, Nicolas Perriault'], 1)
-]
diff --git a/docs/index.rst b/docs/index.rst
deleted file mode 100644
index e4a4e20..0000000
--- a/docs/index.rst
+++ /dev/null
@@ -1,106 +0,0 @@
-Landslide's documentation
-=========================
-
-Landslide_ is a command-line based presentation generator relying on Web standards (html, javascript, css) and some Python_ libraries such as Jinja2_, Pygments_, docutils_ and Markdown_.
-
-Installation
-------------
-
-Landslide requires Python_ v2.5 minimum and these dependencies installed:
-
-* The Jinja2_ template engine
-* Pygments_ for code syntax highlighting
-
-One of the syntax handlers above:
-
-* The Markdown_ python library if you intend to write your slides contents using the Markdown_ syntax
-* or the docutils_ package if you rather prefer using reStructuredText_.
-
-The easiest way to install Landslide_ is using Pip_::
-
- $ pip install landslide
-
-Alternatively, you can use easy_install_::
-
- $ easy_install landslide
-
-If you rather want to stay `on the edge`_::
-
- $ git clone https://github.com/n1k0/landslide.git
- $ cd landslide
- $ python setup.py build
- $ sudo python setup.py install
-
-Basic Usage
------------
-
-Using the Markdown_ syntax
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-* Your Markdown source files must be suffixed by ``.md``, ``.markdn``, ``.mdown`` or ``.markdown``
-* To create a title slide, render a single h1 element (eg. ``# My Title``)
-* Separate your slides with a horizontal rule (``---`` in markdown) except at the end of markdown files
-* Your other slides should have a heading that renders to an ``<h1>`` or ``<h2>`` element
-* To highlight blocks of code, put ``!{lang}`` where ``{lang}`` is the pygment supported language identifier as the first indented line
-
-Here's a sample presentation based on Markdown::
-
- # My Presentation Heading
- ---
- ## My First Slide Title
- With some contents
- ---
- ## My Second Slide Title
- With some contents
-
-Using the reStructuredText_ syntax
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Bar
-
-API Documentation
------------------
-
-Generator
-~~~~~~~~~
-
-.. automodule:: landslide.generator
- :members:
-
-Macros
-~~~~~~
-
-.. automodule:: landslide.macro
- :members:
-
-Parser
-~~~~~~
-
-.. automodule:: landslide.parser
- :members:
-
-Utils
-~~~~~
-
-.. automodule:: landslide.utils
- :members:
-
-Indices and tables
-------------------
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
-.. links
-
-.. _docutils: http://docutils.sourceforge.net/
-.. _easy_install: http://packages.python.org/distribute/easy_install.html
-.. _Jinja2: http://jinja.pocoo.org/
-.. _Landslide: https://github.com/n1k0/landslide
-.. _Markdown: http://daringfireball.net/projects/markdown/
-.. _on the edge: https://github.com/n1k0/landslide/commits/master/
-.. _Pip: http://pip.openplans.org/
-.. _Pygments: http://pygments.org/
-.. _Python: http://python.org/
-.. _reStructuredText: http://docutils.sourceforge.net/rst.html \ No newline at end of file
diff --git a/examples/_assets/landscape.jpg b/examples/_assets/landscape.jpg
deleted file mode 100644
index 5e90cbe..0000000
--- a/examples/_assets/landscape.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/config-file/presentation.cfg b/examples/config-file/presentation.cfg
deleted file mode 100644
index df980ed..0000000
--- a/examples/config-file/presentation.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-[landslide]
-theme = default
-source = ../markdown
- ../restructuredtext
- ../textile
- ../multiple-files
diff --git a/examples/markdown/slides.md b/examples/markdown/slides.md
deleted file mode 100644
index 1c7807e..0000000
--- a/examples/markdown/slides.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# Title Slide
-
----
-
-# Paragraphs
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-elit, vel iaculis lorem facilisis non.
-
-Vivamus ante mauris, pellentesque et rhoncus ut, condimentum sed ipsum.
-Nullam eu molestie sapien. Curabitur imperdiet, ligula id blandit sagittis,
-libero quam consectetur felis, ac pharetra metus lectus vitae leo. Mauris
-lacinia fermentum augue.
-
----
-
-# Blockquotes
-
-> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-> tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-> scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-> elit, vel iaculis lorem facilisis non.
-
----
-
-# Subheadings and Emphasis
-
-## Italic
-
-*Lorem ipsum dolor sit amet*
-
-## Bold
-
-**Lorem ipsum dolor sit amet**
-
----
-
-# Lists
-
-## Unordered List
-
-- Markdown
-- ReStructured Text
-- Textile
-
-## Ordered List
-
-1. Python
-2. JavaScript
-3. HTML5
-
----
-
-# Second Title Slide
-
----
-
-# Code
-
-## Single Word
-
-Hello `World`
-
-## Python
-
- !python
- def multiply (x, y):
- return x * y
-
-## JavaScript
-
- !javascript
- multiply: function (x, y) {
- return x * y;
- }
-
-## HTML
-
- !html
- <!doctype html>
- <html>
- <head></head>
- <body></body>
- </html>
-
----
-
-# Images
-
-![Landscape](../_assets/landscape.jpg)
-
----
-
-# View Presenter Notes
-
-This slide has presenter notes. Press `p` to view them.
-
-# Presenter Notes
-
-Hello from presenter notes
-
----
-
-# Other features
-
-View other features in the help sidebar by pressing `h`
diff --git a/examples/multiple-files/1.md b/examples/multiple-files/1.md
deleted file mode 100644
index 9c4ed80..0000000
--- a/examples/multiple-files/1.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Title Slide
-
----
-
-# Paragraphs
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-elit, vel iaculis lorem facilisis non.
-
-Vivamus ante mauris, pellentesque et rhoncus ut, condimentum sed ipsum.
-Nullam eu molestie sapien. Curabitur imperdiet, ligula id blandit sagittis,
-libero quam consectetur felis, ac pharetra metus lectus vitae leo. Mauris
-lacinia fermentum augue.
-
----
-
-# Blockquotes
-
-> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-> tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-> scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-> elit, vel iaculis lorem facilisis non.
-
----
-
-# Subheadings and Emphasis
-
-## Italic
-
-*Lorem ipsum dolor sit amet*
-
-## Bold
-
-**Lorem ipsum dolor sit amet**
-
diff --git a/examples/multiple-files/2.rst b/examples/multiple-files/2.rst
deleted file mode 100644
index 306b6c4..0000000
--- a/examples/multiple-files/2.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-Lists
-=====
-
-Unordered List
---------------
-
-- Markdown
-- ReStructured Text
-- Textile
-
-Ordered List
-------------
-
-1. Python
-2. JavaScript
-3. HTML5
-
-----
-
-Second Title Slide
-==================
-
-----
-
-Code
-====
-
-Single Word
------------
-
-Hello ``World``
-
-Python
-------
-
-.. code-block:: python
-
- def multiply (x, y):
- return x * y
-
-JavaScript
-----------
-
-.. code-block:: javascript
-
- multiply: function (x, y) {
- return x * y;
- }
-
-HTML
-----
-
-.. code-block:: html
-
- <!doctype html>
- <html>
- <head></head>
- <body></body>
- </html>
-
diff --git a/examples/multiple-files/3.textile b/examples/multiple-files/3.textile
deleted file mode 100644
index 45a877d..0000000
--- a/examples/multiple-files/3.textile
+++ /dev/null
@@ -1,19 +0,0 @@
-h1. Images
-
-!.../_assets/landscape.jpg(Landscape)!
-
-<hr />
-
-h1. View Presenter Notes
-
-This slide has presenter notes. Press `p` to view them.
-
-h1. Presenter Notes
-
-Hello from presenter notes
-
-<hr />
-
-h1. Other features
-
-View other features in the help sidebar by pressing `h`
diff --git a/examples/other-features/slides.md b/examples/other-features/slides.md
deleted file mode 100644
index 7854b90..0000000
--- a/examples/other-features/slides.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Other Features
-
----
-
-# Math
-
-MathJax rendering is available for presentations compiled with the `-m` flag
-
-\\[ \\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\]
-
----
-
-# QR Codes
-
-.qr: 450|http://github.com/adamzap/landslide
diff --git a/examples/restructuredtext/slides.rst b/examples/restructuredtext/slides.rst
deleted file mode 100644
index d6f2207..0000000
--- a/examples/restructuredtext/slides.rst
+++ /dev/null
@@ -1,130 +0,0 @@
-Title Slide
-===========
-
-----
-
-Paragraphs
-==========
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-elit, vel iaculis lorem facilisis non.
-
-Vivamus ante mauris, pellentesque et rhoncus ut, condimentum sed ipsum.
-Nullam eu molestie sapien. Curabitur imperdiet, ligula id blandit sagittis,
-libero quam consectetur felis, ac pharetra metus lectus vitae leo. Mauris
-lacinia fermentum augue.
-
-----
-
-Blockquotes
-===========
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
- tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
- scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula
- nunc elit, vel iaculis lorem facilisis non.
-
-----
-
-Subheadings and Emphasis
-========================
-
-Italic
-------
-
-*Lorem ipsum dolor sit amet*
-
-Bold
-----
-
-**Lorem ipsum dolor sit amet**
-
-----
-
-Lists
-=====
-
-Unordered List
---------------
-
-- Markdown
-- ReStructured Text
-- Textile
-
-Ordered List
-------------
-
-1. Python
-2. JavaScript
-3. HTML5
-
-----
-
-Second Title Slide
-==================
-
-----
-
-Code
-====
-
-Single Word
------------
-
-Hello ``World``
-
-Python
-------
-
-.. code-block:: python
-
- def multiply (x, y):
- return x * y
-
-JavaScript
-----------
-
-.. code-block:: javascript
-
- multiply: function (x, y) {
- return x * y;
- }
-
-HTML
-----
-
-.. code-block:: html
-
- <!doctype html>
- <html>
- <head></head>
- <body></body>
- </html>
-
-----
-
-Images
-======
-
-.. image:: ../_assets/landscape.jpg
-
-----
-
-View Presenter Notes
-====================
-
-This slide has presenter notes. Press ``p`` to view them.
-
-Presenter Notes
-===============
-
-Hello from presenter notes
-
-----
-
-Other features
-==============
-
-View other features in the help sidebar by pressing ``h``
diff --git a/examples/textile/slides.textile b/examples/textile/slides.textile
deleted file mode 100644
index 2c3ce58..0000000
--- a/examples/textile/slides.textile
+++ /dev/null
@@ -1,105 +0,0 @@
-h1. Title Slide
-
----
-
-h1. Paragraphs
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-elit, vel iaculis lorem facilisis non.
-
-Vivamus ante mauris, pellentesque et rhoncus ut, condimentum sed ipsum.
-Nullam eu molestie sapien. Curabitur imperdiet, ligula id blandit sagittis,
-libero quam consectetur felis, ac pharetra metus lectus vitae leo. Mauris
-lacinia fermentum augue.
-
----
-
-h1. Blockquotes
-
-bq. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-elit, vel iaculis lorem facilisis non.
-
----
-
-h1. Subheadings and Emphasis
-
-h2. Italic
-
-_Lorem ipsum dolor sit amet_
-
-h2. Bold
-
-*Lorem ipsum dolor sit amet*
-
----
-
-h1. Lists
-
-h2. Unordered List
-
-* Markdown
-* ReStructured Text
-* Textile
-
-h2. Ordered List
-
-# Python
-# JavaScript
-# HTML5
-
----
-
-h1. Second Title Slide
-
----
-
-h1. Code
-
-h2. Single Word
-
-Hello @World@
-
-h2. Python
-
-bc. def multiply (x, y):
- return x * y
-
-h2. JavaScript
-
-bc. multiply: function (x, y) {
- return x * y;
- }
-
-h2. HTML
-
-bc. <!doctype html>
- <html>
- <head></head>
- <body></body>
- </html>
-
----
-
-h1. Images
-
-!.../_assets/landscape.jpg(Landscape)!
-
----
-
-h1. View Presenter Notes
-
-This slide has presenter notes. Press `p` to view them.
-
-h1. Presenter Notes
-
-Hello from presenter notes
-
----
-
-h1. Other features
-
-View other features in the help sidebar by pressing `h`
diff --git a/setup.py b/setup.py
deleted file mode 100644
index b3010cd..0000000
--- a/setup.py
+++ /dev/null
@@ -1,49 +0,0 @@
-from setuptools import setup, find_packages
-
-setup(
- name='landslide',
- version='1.1.3',
- description='Lightweight markup language-based html5 slideshow generator',
- packages=find_packages('src'),
- package_dir = {'': 'src'},
- include_package_data=True,
- zip_safe=False,
- author='Adam Zapletal',
- author_email='adamzap@gmail.com',
- url='http://github.com/adamzap/landslide',
- license='Apache 2.0',
- platforms=['any'],
- keywords=[
- 'markdown',
- 'slideshow',
- 'presentation',
- 'rst',
- 'restructuredtext',
- 'textile'
- ],
- install_requires=['Jinja2', 'Markdown', 'Pygments', 'docutils', 'six'],
- classifiers=[
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2.5',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.3',
- 'Development Status :: 4 - Beta',
- 'Operating System :: OS Independent',
- 'License :: OSI Approved :: Apache Software License',
- 'Topic :: Multimedia :: Graphics :: Presentation',
- 'Topic :: Text Processing :: Markup'
- ],
- long_description="""\
-Landslide takes your Markdown, ReST, or Textile file(s) and generates fancy
-HTML5 slideshow like `this <http://adamzap.com/random/landslide.html>`_.
-
-Read the `README <http://github.com/adamzap/landslide/blob/master/README.md>`_
-for formatting instructions and more information.
-""",
- entry_points={
- "console_scripts": [
- "landslide = landslide.main:main",
- ]
- },
-)
diff --git a/src/landslide/__init__.py b/src/landslide/__init__.py
deleted file mode 100644
index f91ac52..0000000
--- a/src/landslide/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-__title__ = 'landslide'
-__version__ = '1.1.3'
-__author__ = 'Adam Zapletal'
-__license__ = 'Apache 2.0'
-__copyright__ = 'Copyright 2015 Adam Zapletal'
diff --git a/src/landslide/__main__.py b/src/landslide/__main__.py
deleted file mode 100644
index 734b211..0000000
--- a/src/landslide/__main__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from landslide.main import main
-main()
diff --git a/src/landslide/generator.py b/src/landslide/generator.py
deleted file mode 100644
index 8e969d4..0000000
--- a/src/landslide/generator.py
+++ /dev/null
@@ -1,575 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import os
-import re
-import codecs
-import inspect
-import jinja2
-import shutil
-import tempfile
-
-from subprocess import Popen
-from six import string_types
-from six.moves import configparser
-
-from landslide import utils
-from landslide import macro as macro_module
-from landslide.parser import Parser
-
-
-BASE_DIR = os.path.dirname(__file__)
-THEMES_DIR = os.path.join(BASE_DIR, 'themes')
-TOC_MAX_LEVEL = 2
-VALID_LINENOS = ('no', 'inline', 'table')
-
-
-class Generator(object):
- """The Generator class takes and processes presentation source as a file, a
- folder or a configuration file and provides methods to render them as a
- presentation.
- """
- DEFAULT_DESTINATION = 'presentation.html'
- default_macros = [
- macro_module.CodeHighlightingMacro,
- macro_module.EmbedImagesMacro,
- macro_module.FixImagePathsMacro,
- macro_module.FxMacro,
- macro_module.NotesMacro,
- macro_module.QRMacro,
- ]
- user_css = []
- user_js = []
-
- def __init__(self, source, **kwargs):
- """ Configures this generator. Available ``args`` are:
- - ``source``: source file or directory path
- Available ``kwargs`` are:
- - ``copy_theme``: copy theme directory and files into presentation
- one
- - ``destination_file``: path to html or PDF destination file
- - ``direct``: enables direct rendering presentation to stdout
- - ``debug``: enables debug mode
- - ``embed``: generates a standalone document, with embedded assets
- - ``encoding``: the encoding to use for this presentation
- - ``extensions``: Comma separated list of markdown extensions
- - ``logger``: a logger lambda to use for logging
- - ``presenter_notes``: enable presenter notes
- - ``relative``: enable relative asset urls
- - ``theme``: path to the theme to use for this presentation
- - ``verbose``: enables verbose output
- """
- self.copy_theme = kwargs.get('copy_theme', False)
- self.debug = kwargs.get('debug', False)
- self.destination_file = kwargs.get('destination_file',
- 'presentation.html')
- self.direct = kwargs.get('direct', False)
- self.embed = kwargs.get('embed', False)
- self.encoding = kwargs.get('encoding', 'utf8')
- self.extensions = kwargs.get('extensions', None)
- self.logger = kwargs.get('logger', None)
- self.presenter_notes = kwargs.get('presenter_notes', True)
- self.relative = kwargs.get('relative', False)
- self.theme = kwargs.get('theme', 'default')
- self.verbose = kwargs.get('verbose', False)
- self.linenos = self.linenos_check(kwargs.get('linenos'))
- self.watch = kwargs.get('watch', False)
- self.math_output = kwargs.get('math_output', False)
- self.num_slides = 0
- self.__toc = []
-
- # macros registering
- self.macros = []
- self.register_macro(*self.default_macros)
-
- if self.direct:
- # Only output html in direct output mode, not log messages
- self.verbose = False
-
- if not source or not os.path.exists(source):
- raise IOError(u"Source file/directory %s does not exist"
- % source)
-
- if source.endswith('.cfg'):
- config = self.parse_config(source)
- self.source = config.get('source')
- if not self.source:
- raise IOError('unable to fetch a valid source from config')
- source_abspath = os.path.abspath(self.source[0])
- self.destination_file = config.get('destination',
- self.DEFAULT_DESTINATION)
- self.embed = config.get('embed', False)
- self.relative = config.get('relative', False)
- self.copy_theme = config.get('copy_theme', False)
- self.extensions = config.get('extensions', '')
- self.theme = config.get('theme', 'default')
- self.add_user_css(config.get('css', []))
- self.add_user_js(config.get('js', []))
- self.linenos = self.linenos_check(config.get('linenos'))
- else:
- self.source = source
- source_abspath = os.path.abspath(source)
-
- if not os.path.isdir(source_abspath):
- source_abspath = os.path.dirname(source_abspath)
-
- self.watch_dir = source_abspath
-
- if (os.path.exists(self.destination_file)
- and not os.path.isfile(self.destination_file)):
- raise IOError(u"Destination %s exists and is not a file"
- % self.destination_file)
-
- if self.destination_file.endswith('.html'):
- self.file_type = 'html'
- elif self.destination_file.endswith('.pdf'):
- self.file_type = 'pdf'
- self.embed = True
- else:
- raise IOError(u"This program can only write html or pdf files. "
- "Please use one of these file extensions in the "
- "destination")
-
- self.theme_dir = self.find_theme_dir(self.theme, self.copy_theme)
- self.template_file = self.get_template_file()
-
- def add_user_css(self, css_list):
- """ Adds supplementary user css files to the presentation. The
- ``css_list`` arg can be either a ``list`` or a string.
- """
- if isinstance(css_list, string_types):
- css_list = [css_list]
-
- for css_path in css_list:
- if css_path and css_path not in self.user_css:
- if not os.path.exists(css_path):
- raise IOError('%s user css file not found' % (css_path,))
- with codecs.open(css_path, encoding=self.encoding) as css_file:
- self.user_css.append({
- 'path_url': utils.get_path_url(css_path,
- self.relative),
- 'contents': css_file.read(),
- })
-
- def add_user_js(self, js_list):
- """ Adds supplementary user javascript files to the presentation. The
- ``js_list`` arg can be either a ``list`` or a string.
- """
- if isinstance(js_list, string_types):
- js_list = [js_list]
- for js_path in js_list:
- if js_path and js_path not in self.user_js:
- if js_path.startswith("http:"):
- self.user_js.append({
- 'path_url': js_path,
- 'contents': '',
- })
- elif not os.path.exists(js_path):
- raise IOError('%s user js file not found' % (js_path,))
- else:
- with codecs.open(js_path,
- encoding=self.encoding) as js_file:
- self.user_js.append({
- 'path_url': utils.get_path_url(js_path,
- self.relative),
- 'contents': js_file.read(),
- })
-
- def add_toc_entry(self, title, level, slide_number):
- """ Adds a new entry to current presentation Table of Contents.
- """
- self.__toc.append({'title': title, 'number': slide_number,
- 'level': level})
-
- @property
- def toc(self):
- """ Smart getter for Table of Content list.
- """
- toc = []
- stack = [toc]
- for entry in self.__toc:
- entry['sub'] = []
- while entry['level'] < len(stack):
- stack.pop()
- while entry['level'] > len(stack):
- stack.append(stack[-1][-1]['sub'])
- stack[-1].append(entry)
- return toc
-
- def execute(self):
- """ Execute this generator regarding its current configuration.
- """
- if self.direct:
- if self.file_type == 'pdf':
- raise IOError(u"Direct output mode is not available for PDF "
- "export")
- else:
- print(self.render().encode(self.encoding))
- else:
- self.write_and_log()
-
- if self.watch:
- from landslide.watcher import watch
-
- self.log(u"Watching %s\n" % self.watch_dir)
-
- watch(self.watch_dir, self.write_and_log)
-
- def write_and_log(self):
- self.watch_files = []
- self.num_slides = 0
- self.__toc = []
- self.write()
- self.log(u"Generated file: %s" % self.destination_file)
-
- def get_template_file(self):
- """ Retrieves Jinja2 template file path.
- """
- if os.path.exists(os.path.join(self.theme_dir, 'base.html')):
- return os.path.join(self.theme_dir, 'base.html')
- default_dir = os.path.join(THEMES_DIR, 'default')
- if not os.path.exists(os.path.join(default_dir, 'base.html')):
- raise IOError(u"Cannot find base.html in default theme")
- return os.path.join(default_dir, 'base.html')
-
- def fetch_contents(self, source):
- """ Recursively fetches Markdown contents from a single file or
- directory containing itself Markdown files.
- """
- slides = []
-
- if type(source) is list:
- for entry in source:
- slides.extend(self.fetch_contents(entry))
- elif os.path.isdir(source):
- self.log(u"Entering %s" % source)
- entries = os.listdir(source)
- entries.sort()
- for entry in entries:
- slides.extend(self.fetch_contents(os.path.join(source, entry)))
- else:
- try:
- parser = Parser(os.path.splitext(source)[1], self.encoding,
- self.extensions)
- except NotImplementedError:
- return slides
-
- self.log(u"Adding %s (%s)" % (source, parser.format))
-
- try:
- with codecs.open(source, encoding=self.encoding) as file:
- file_contents = file.read()
- except UnicodeDecodeError:
- self.log(u"Unable to decode source %s: skipping" % source,
- 'warning')
- else:
- inner_slides = re.split(r'<hr.+>', parser.parse(file_contents))
- for inner_slide in inner_slides:
- slides.append(self.get_slide_vars(inner_slide, source))
-
- if not slides:
- self.log(u"Exiting %s: no contents found" % source, 'notice')
-
- return slides
-
- def find_theme_dir(self, theme, copy_theme=False):
- """ Finds them dir path from its name.
- """
- if os.path.exists(theme):
- self.theme_dir = theme
- elif os.path.exists(os.path.join(THEMES_DIR, theme)):
- self.theme_dir = os.path.join(THEMES_DIR, theme)
- else:
- raise IOError(u"Theme %s not found or invalid" % theme)
- target_theme_dir = os.path.join(os.getcwd(), 'theme')
- if copy_theme or os.path.exists(target_theme_dir):
- self.log(u'Copying %s theme directory to %s'
- % (theme, target_theme_dir))
- if not os.path.exists(target_theme_dir):
- try:
- shutil.copytree(self.theme_dir, target_theme_dir)
- except Exception as e:
- self.log(u"Skipped copy of theme folder: %s" % e)
- pass
- self.theme_dir = target_theme_dir
- return self.theme_dir
-
- def get_css(self):
- """ Fetches and returns stylesheet file path or contents, for both
- print and screen contexts, depending if we want a standalone
- presentation or not.
- """
- css = {}
-
- print_css = os.path.join(self.theme_dir, 'css', 'print.css')
-
- if not os.path.exists(print_css):
- # Fall back to default theme
- print_css = os.path.join(THEMES_DIR, 'default', 'css', 'print.css')
-
- if not os.path.exists(print_css):
- raise IOError(u"Cannot find css/print.css in default theme")
-
- with codecs.open(print_css, encoding=self.encoding) as css_file:
- css['print'] = {
- 'path_url': utils.get_path_url(print_css, self.relative),
- 'contents': css_file.read(),
- }
-
- screen_css = os.path.join(self.theme_dir, 'css', 'screen.css')
-
- if (os.path.exists(screen_css)):
- with codecs.open(screen_css, encoding=self.encoding) as css_file:
- css['screen'] = {
- 'path_url': utils.get_path_url(screen_css, self.relative),
- 'contents': css_file.read(),
- }
- else:
- self.log(u"No screen stylesheet provided in current theme",
- 'warning')
-
- return css
-
- def get_js(self):
- """ Fetches and returns javascript file path or contents, depending if
- we want a standalone presentation or not.
- """
- js_file = os.path.join(self.theme_dir, 'js', 'slides.js')
-
- if not os.path.exists(js_file):
- js_file = os.path.join(THEMES_DIR, 'default', 'js', 'slides.js')
-
- if not os.path.exists(js_file):
- raise IOError(u"Cannot find slides.js in default theme")
- with codecs.open(js_file, encoding=self.encoding) as js_file_obj:
- return {
- 'path_url': utils.get_path_url(js_file, self.relative),
- 'contents': js_file_obj.read(),
- }
-
- def get_slide_vars(self, slide_src, source=None):
- """ Computes a single slide template vars from its html source code.
- Also extracts slide informations for the table of contents.
- """
- presenter_notes = None
-
- find = re.search(r'<h\d[^>]*>presenter notes</h\d>', slide_src,
- re.DOTALL | re.UNICODE | re.IGNORECASE)
-
- if find:
- if self.presenter_notes:
- presenter_notes = slide_src[find.end():].strip()
-
- slide_src = slide_src[:find.start()]
-
- find = re.search(r'(<h(\d+?).*?>(.+?)</h\d>)\s?(.+)?', slide_src,
- re.DOTALL | re.UNICODE)
-
- if not find:
- header = level = title = None
- content = slide_src.strip()
- else:
- header = find.group(1)
- level = int(find.group(2))
- title = find.group(3)
- content = find.group(4).strip() if find.group(4) else find.group(4)
-
- slide_classes = []
-
- if header:
- header, _ = self.process_macros(header, source)
-
- if content:
- content, slide_classes = self.process_macros(content, source)
-
- source_dict = {}
-
- if source:
- source_dict = {'rel_path': source,
- 'abs_path': os.path.abspath(source)}
-
- if header or content:
- return {'header': header, 'title': title, 'level': level,
- 'content': content, 'classes': slide_classes,
- 'source': source_dict, 'presenter_notes': presenter_notes,
- 'math_output': self.math_output}
-
- def get_template_vars(self, slides):
- """ Computes template vars from slides html source code.
- """
- try:
- head_title = slides[0]['title']
- except (IndexError, TypeError):
- head_title = "Untitled Presentation"
-
- for slide_index, slide_vars in enumerate(slides):
- if not slide_vars:
- continue
- self.num_slides += 1
- slide_number = slide_vars['number'] = self.num_slides
- if slide_vars['level'] and slide_vars['level'] <= TOC_MAX_LEVEL:
- self.add_toc_entry(slide_vars['title'], slide_vars['level'],
- slide_number)
- else:
- # Put something in the TOC even if it doesn't have a title or level
- self.add_toc_entry(u"-", 1, slide_number)
-
- return {'head_title': head_title, 'num_slides': str(self.num_slides),
- 'slides': slides, 'toc': self.toc, 'embed': self.embed,
- 'css': self.get_css(), 'js': self.get_js(),
- 'user_css': self.user_css, 'user_js': self.user_js,
- 'math_output': self.math_output}
-
- def linenos_check(self, value):
- """ Checks and returns a valid value for the ``linenos`` option.
- """
- return value if value in VALID_LINENOS else 'inline'
-
- def log(self, message, type='notice'):
- """ Logs a message (eventually, override to do something more clever).
- """
- if self.logger and not callable(self.logger):
- raise ValueError(u"Invalid logger set, must be a callable")
- if self.verbose and self.logger:
- self.logger(message, type)
-
- def parse_config(self, config_source):
- """ Parses a landslide configuration file and returns a normalized
- python dict.
- """
- self.log(u"Config %s" % config_source)
- try:
- raw_config = configparser.RawConfigParser()
- raw_config.read(config_source)
- except Exception as e:
- raise RuntimeError(u"Invalid configuration file: %s" % e)
- config = {}
- config['source'] = raw_config.get('landslide', 'source')\
- .replace('\r', '').split('\n')
- if raw_config.has_option('landslide', 'theme'):
- config['theme'] = raw_config.get('landslide', 'theme')
- self.log(u"Using configured theme %s" % config['theme'])
- if raw_config.has_option('landslide', 'destination'):
- config['destination'] = raw_config.get('landslide', 'destination')
- if raw_config.has_option('landslide', 'linenos'):
- config['linenos'] = raw_config.get('landslide', 'linenos')
- for boolopt in ('embed', 'relative', 'copy_theme'):
- if raw_config.has_option('landslide', boolopt):
- config[boolopt] = raw_config.getboolean('landslide', boolopt)
- if raw_config.has_option('landslide', 'extensions'):
- config['extensions'] = ",".join(raw_config.get('landslide', 'extensions')\
- .replace('\r', '').split('\n'))
- if raw_config.has_option('landslide', 'css'):
- config['css'] = raw_config.get('landslide', 'css')\
- .replace('\r', '').split('\n')
- if raw_config.has_option('landslide', 'js'):
- config['js'] = raw_config.get('landslide', 'js')\
- .replace('\r', '').split('\n')
- return config
-
- def process_macros(self, content, source=None):
- """ Processed all macros.
- """
- macro_options = {'relative': self.relative, 'linenos': self.linenos}
- classes = []
- for macro_class in self.macros:
- try:
- macro = macro_class(logger=self.logger, embed=self.embed,
- options=macro_options)
- content, add_classes = macro.process(content, source)
- if add_classes:
- classes += add_classes
- except Exception as e:
- self.log(u"%s processing failed in %s: %s"
- % (macro, source, e))
- return content, classes
-
- def register_macro(self, *macros):
- """ Registers macro classes passed a method arguments.
- """
- for m in macros:
- if inspect.isclass(m) and issubclass(m, macro_module.Macro):
- self.macros.append(m)
- else:
- raise TypeError("Coundn't register macro; a macro must inherit"
- " from macro.Macro")
-
- def render(self):
- """ Returns generated html code.
- """
- with codecs.open(self.template_file, encoding=self.encoding) as template_src:
- template = jinja2.Template(template_src.read())
- slides = self.fetch_contents(self.source)
- context = self.get_template_vars(slides)
-
- html = template.render(context)
-
- if self.embed:
- images = re.findall(r'url\(["\']?(.*?\.(?:jpe?g|gif|png|svg)[\'"]?)\)',
- html, re.DOTALL | re.UNICODE)
-
- for img_url in images:
- img_url = img_url.replace('"', '').replace("'", '')
- if self.theme_dir:
- source = os.path.join(self.theme_dir, 'css')
- else:
- source = os.path.join(THEMES_DIR, self.theme, 'css')
-
- encoded_url = utils.encode_image_from_url(img_url, source)
- if encoded_url:
- html = html.replace(img_url, encoded_url, 1)
- self.log("Embedded theme image %s from theme directory %s" % (img_url, source))
- else:
- # Missing file in theme directory. Try user_css folders
- found = False
- for css_entry in context['user_css']:
- directory = os.path.dirname(css_entry['path_url'])
- if not directory:
- directory = "."
-
- encoded_url = utils.encode_image_from_url(img_url, directory)
-
- if encoded_url:
- found = True
- html = html.replace(img_url, encoded_url, 1)
- self.log("Embedded theme image %s from directory %s" % (img_url, directory))
-
- if not found:
- # Missing image file, etc...
- self.log(u"Failed to embed theme image %s" % img_url)
-
- return html
-
- def write(self):
- """ Writes generated presentation code into the destination file.
- """
- html = self.render()
-
- if self.file_type == 'pdf':
- self.write_pdf(html)
- else:
- with codecs.open(self.destination_file, 'w',
- encoding='utf_8') as outfile:
- outfile.write(html)
-
- def write_pdf(self, html):
- """ Tries to write a PDF export from the command line using PrinceXML
- if available.
- """
- try:
- f = tempfile.NamedTemporaryFile(delete=False, suffix='.html')
- f.write(html.encode('utf_8', 'xmlcharrefreplace'))
- f.close()
- except Exception:
- raise IOError(u"Unable to create temporary file, aborting")
-
- dummy_fh = open(os.path.devnull, 'w')
-
- try:
- command = ["prince", f.name, self.destination_file]
-
- Popen(command, stderr=dummy_fh).communicate()
- except Exception:
- raise EnvironmentError(u"Unable to generate PDF file using "
- "prince. Is it installed and available?")
- finally:
- dummy_fh.close()
diff --git a/src/landslide/macro.py b/src/landslide/macro.py
deleted file mode 100644
index 2d997fc..0000000
--- a/src/landslide/macro.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import os
-import re
-from six.moves import html_entities
-import pygments
-import sys
-from landslide import utils
-
-from pygments.lexers import get_lexer_by_name
-from pygments.formatters import HtmlFormatter
-
-
-class Macro(object):
- """Base class for Macros. A Macro aims to analyse, process and eventually
- alter some provided HTML contents and to provide supplementary
- informations to the slide context.
- """
- options = {}
-
- def __init__(self, logger=sys.stdout, embed=False, options=None):
- self.logger = logger
- self.embed = embed
- if options:
- if not isinstance(options, dict):
- raise ValueError(u'Macro options must be a dict instance')
- self.options = options
-
- def process(self, content, source=None):
- """Generic processor (does actually nothing)"""
- return content, []
-
-
-class CodeHighlightingMacro(Macro):
- """This Macro performs syntax coloration in slide code blocks using
- Pygments.
- """
- code_blocks_re = re.compile(
- r'(<pre.+?>(<code>)?\s?!(\S+?)\n(.*?)(</code>)?</pre>)',
- re.UNICODE | re.MULTILINE | re.DOTALL)
-
- html_entity_re = re.compile('&(\w+?);')
-
- def descape(self, string, defs=None):
- """Decodes html entities from a given string"""
- if defs is None:
- defs = html_entities.entitydefs
- f = lambda m: defs[m.group(1)] if len(m.groups()) > 0 else m.group(0)
- return self.html_entity_re.sub(f, string)
-
- def process(self, content, source=None):
- code_blocks = self.code_blocks_re.findall(content)
- if not code_blocks:
- return content, []
-
- classes = []
- for block, void1, lang, code, void2 in code_blocks:
- try:
- lexer = get_lexer_by_name(lang, startinline=True)
- except Exception:
- self.logger(u"Unknown pygment lexer \"%s\", skipping"
- % lang, 'warning')
- return content, classes
-
- if 'linenos' not in self.options or self.options['linenos'] =='no':
- self.options['linenos'] = False
-
- formatter = HtmlFormatter(linenos=self.options['linenos'],
- nobackground=True)
- pretty_code = pygments.highlight(self.descape(code), lexer,
- formatter)
- content = content.replace(block, pretty_code, 1)
-
- return content, [u'has_code']
-
-
-class EmbedImagesMacro(Macro):
- """This Macro extracts images url and embed them using the base64
- algorithm.
- """
- def process(self, content, source=None):
- classes = []
-
- if not self.embed:
- return content, classes
-
- images = re.findall(r'<img\s.*?src="(.+?)"\s?.*?/?>', content,
- re.DOTALL | re.UNICODE)
-
- source_dir = os.path.dirname(source)
-
- for image_url in images:
- encoded_url = utils.encode_image_from_url(image_url, source_dir)
-
- if not encoded_url:
- self.logger(u"Failed to embed image \"%s\"" % image_url, 'warning')
- return content, classes
-
- content = content.replace(u"src=\"" + image_url,
- u"src=\"" + encoded_url, 1)
-
- self.logger(u"Embedded image %s" % image_url, 'notice')
-
- return content, classes
-
-
-class FixImagePathsMacro(Macro):
- """This Macro replaces html image paths with fully qualified absolute
- urls.
- """
- relative = False
-
- def process(self, content, source=None):
- classes = []
-
- if self.embed:
- return content, classes
-
- base_path = utils.get_path_url(source, self.options.get('relative'))
- base_url = os.path.split(base_path)[0]
-
- regex = r'<img.*?src="(?!https?://|file://)(.*?)".*?/?>'
-
- images = re.findall(regex, content, re.DOTALL | re.UNICODE)
-
- for image in list(set(images)):
- full_path = '"' + os.path.join(base_url, image) + '"'
- image = '"' + image + '"'
-
- content = content.replace(image, full_path)
-
- return content, classes
-
-
-class FxMacro(Macro):
- """This Macro processes fx directives, ie adds specific css classes
- named after what the parser found in them.
- """
- def process(self, content, source=None):
- classes = []
-
- fx_match = re.search(r'(<p>\.fx:\s?(.*?)</p>\n?)', content,
- re.DOTALL | re.UNICODE)
- if fx_match:
- classes = fx_match.group(2).split(u' ')
- content = content.replace(fx_match.group(1), '', 1)
-
- return content, classes
-
-
-class NotesMacro(Macro):
- """This Macro processes Notes."""
- def process(self, content, source=None):
- classes = []
-
- new_content = re.sub(r'<p>\.notes:\s?(.*?)</p>',
- r'<p class="notes">\1</p>', content)
-
- if content != new_content:
- classes.append(u'has_notes')
-
- return new_content, classes
-
-
-class QRMacro(Macro):
- """This Macro generates a QR Code with Google Chart API."""
- def process(self, content, source=None):
- classes = []
-
- new_content = re.sub(r'<p>\.qr:\s?(\d*?)\|(.*?)</p>',
- r'<p class="qr"><img src="http://chart.apis.google.com/chart?chs=\1x\1&cht=qr&chl=\2&chf=bg,s,00000000&choe=UTF-8" alt="QR Code" /></p>',
- content)
-
- if content != new_content:
- classes.append(u'has_qr')
-
- return new_content, classes
diff --git a/src/landslide/main.py b/src/landslide/main.py
deleted file mode 100755
index f3c2505..0000000
--- a/src/landslide/main.py
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import sys
-
-from optparse import OptionParser
-
-from landslide import generator
-
-from . import __version__
-
-
-def _parse_options():
- """ Parses ``landslide`` args options.
- """
-
- parser = OptionParser(
- usage="%prog [options] input.md ...",
- description="Generates an HTML5 or PDF "
- "slideshow from Markdown or other formats",
- epilog="Note: PDF export requires the `prince` program: "
- "http://princexml.com/",
- version="%prog " + __version__)
-
- parser.add_option(
- "-c", "--copy-theme",
- action="store_true",
- dest="copy_theme",
- help="Copy theme directory into current presentation source directory",
- default=False)
-
- parser.add_option(
- "-b", "--debug",
- action="store_true",
- dest="debug",
- help="Will display any exception trace to stdout",
- default=False)
-
- parser.add_option(
- "-d", "--destination",
- dest="destination_file",
- help="The path to the to the destination file: .html or "
- ".pdf extensions allowed (default: presentation.html)",
- metavar="FILE",
- default="presentation.html")
-
- parser.add_option(
- "-e", "--encoding",
- dest="encoding",
- help="The encoding of your files (defaults to utf8)",
- metavar="ENCODING",
- default="utf8")
-
- parser.add_option(
- "-i", "--embed",
- action="store_true",
- dest="embed",
- help="Embed stylesheet and javascript contents, "
- "base64-encoded images in presentation to make a "
- "standalone document",
- default=False)
-
- parser.add_option(
- "-l", "--linenos",
- type="choice",
- choices=generator.VALID_LINENOS,
- dest="linenos",
- help="How to output linenos in source code. Three options availables: "
- "no (no line numbers); "
- "inline (inside <pre> tag); "
- "table (lines numbers in another cell, copy-paste friendly)",
- default="inline",
- )
-
- parser.add_option(
- "-o", "--direct-output",
- action="store_true",
- dest="direct",
- help="Prints the generated HTML code to stdout; won't work with PDF "
- "export",
- default=False)
-
- parser.add_option(
- "-P", "--no-presenter-notes",
- action="store_false",
- dest="presenter_notes",
- help="Don't include presenter notes in the output",
- default=True)
-
- parser.add_option(
- "-q", "--quiet",
- action="store_false",
- dest="verbose",
- help="Won't write anything to stdout (silent mode)",
- default=False)
-
- parser.add_option(
- "-r", "--relative",
- action="store_true",
- dest="relative",
- help="Make your presentation asset links relative to current pwd; "
- "This may be useful if you intend to publish your html "
- "presentation online.",
- default=False,
- )
-
- parser.add_option(
- "-t", "--theme",
- dest="theme",
- help="A theme name, or path to a landlside theme directory",
- default='default')
-
- parser.add_option(
- "-v", "--verbose",
- action="store_true",
- dest="verbose",
- help="Write informational messages to stdout (enabled by default)",
- default=True)
-
- parser.add_option(
- "-x", "--extensions",
- dest="extensions",
- help="Comma-separated list of extensions for Markdown",
- default='',
- )
-
- parser.add_option(
- "-w", "--watch",
- action="store_true",
- dest="watch",
- help="Watch source directory for changes and regenerate slides",
- default=False
- )
-
- parser.add_option(
- "-m", "--math-output",
- action="store_true",
- dest="math_output",
- help="Enable mathematical output using MathJax",
- default=False
- )
-
- (options, args) = parser.parse_args()
-
- if not args:
- parser.print_help()
- sys.exit(1)
-
- return options, args[0]
-
-
-def log(message, type):
- """Basic logger, print output directly to stdout and errors to stderr.
- """
- (sys.stdout if type == 'notice' else sys.stderr).write(message + "\n")
-
-
-def run(input_file, options):
- """ Runs the Generator using parsed options.
- """
- options.logger = log
- generator.Generator(input_file, **options.__dict__).execute()
-
-
-def main():
- """ Main program entry point.
- """
- options, input_file = _parse_options()
-
- if (options.debug):
- run(input_file, options)
- else:
- try:
- run(input_file, options)
- except Exception as e:
- sys.stderr.write("Error: %s\n" % e)
- sys.exit(1)
-
-
-if __name__ == '__main__':
- main()
diff --git a/src/landslide/parser.py b/src/landslide/parser.py
deleted file mode 100644
index 97bcd5c..0000000
--- a/src/landslide/parser.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-SUPPORTED_FORMATS = {
- 'markdown': ['.mdown', '.markdown', '.markdn', '.md', '.mdn', '.mdwn'],
- 'restructuredtext': ['.rst', '.rest'],
- 'textile': ['.textile'],
-}
-
-
-class Parser(object):
- """This class generates the HTML code depending on which syntax is used in
- the souce document.
-
- The Parser currently supports both Markdown and restructuredText
- syntaxes.
- """
- RST_REPLACEMENTS = [
- (r'<div.*?>', r'', re.UNICODE),
- (r'</div>', r'', re.UNICODE),
- (r'<p class="system-message-\w+">.*?</p>', r'', re.UNICODE),
- (r'Document or section may not begin with a transition\.',
- r'', re.UNICODE),
- (r'<h(\d+?).*?>', r'<h\1>', re.DOTALL | re.UNICODE),
- (r'<hr.*?>\n', r'<hr />\n', re.DOTALL | re.UNICODE),
- ]
-
- md_extensions = ''
-
- def __init__(self, extension, encoding='utf8', md_extensions=''):
- """Configures this parser.
- """
- self.encoding = encoding
- self.format = None
-
- for supp_format, supp_extensions in SUPPORTED_FORMATS.items():
- for supp_extension in supp_extensions:
- if supp_extension == extension:
- self.format = supp_format
-
- if not self.format:
- raise NotImplementedError(u"Unsupported format %s" % extension)
-
- if md_extensions:
- exts = (value.strip() for value in md_extensions.split(','))
- self.md_extensions = filter(None, exts)
-
- def parse(self, text):
- """Parses and renders a text as HTML regarding current format.
- """
- if self.format == 'markdown':
- try:
- import markdown
- except ImportError:
- raise RuntimeError(u"Looks like markdown is not installed")
-
- if text.startswith(u'\ufeff'): # check for unicode BOM
- text = text[1:]
-
- return markdown.markdown(text, self.md_extensions)
- elif self.format == 'restructuredtext':
- try:
- from landslide.rst import html_body
- except ImportError:
- raise RuntimeError(u"Looks like docutils are not installed")
-
- html = html_body(text, input_encoding=self.encoding)
-
- # RST generates pretty much markup to be removed in our case
- for (pattern, replacement, mode) in self.RST_REPLACEMENTS:
- html = re.sub(re.compile(pattern, mode), replacement, html, 0)
-
- return html.strip()
- elif self.format == 'textile':
- try:
- import textile
- except ImportError:
- raise RuntimeError(u"Looks like textile is not installed")
-
- text = text.replace('\n---\n', '\n<hr />\n')
-
- return textile.textile(text, encoding=self.encoding)
- else:
- raise NotImplementedError(u"Unsupported format %s, cannot parse"
- % self.format)
diff --git a/src/landslide/rst.py b/src/landslide/rst.py
deleted file mode 100644
index 1bcdcdf..0000000
--- a/src/landslide/rst.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from docutils import core, nodes
-from docutils.parsers.rst import directives, Directive
-
-from pygments import highlight
-from pygments.formatters import HtmlFormatter
-from pygments.lexers import get_lexer_by_name, TextLexer
-
-
-class Pygments(Directive):
- """ Source code syntax hightlighting for ReST syntax."""
- required_arguments = 1
- optional_arguments = 0
- final_argument_whitespace = True
- option_spec = {
- 'linenos': directives.flag,
- 'emphasize-lines': directives.unchanged_required,
- }
- has_content = True
-
- def run(self):
- self.assert_has_content()
- try:
- lexer = get_lexer_by_name(self.arguments[0])
- except ValueError:
- # no lexer found - use the text one instead of an exception
- lexer = TextLexer()
- args = {'noclasses': False}
- if 'linenos' in self.options:
- args['linenos'] = 'table'
- if 'emphasize-lines' in self.options:
- args['hl_lines'] = self.options['emphasize-lines'].split(',')
- formatter = HtmlFormatter(**args)
- parsed = highlight(u'\n'.join(self.content), lexer, formatter)
- return [nodes.raw('', parsed, format='html')]
-
-
-directives.register_directive('sourcecode', Pygments)
-directives.register_directive('code-block', Pygments)
-
-
-def html_parts(input_string, source_path=None, destination_path=None,
- input_encoding='unicode', doctitle=1, initial_header_level=1):
- """
- Given an input string, returns a dictionary of HTML document parts.
-
- Dictionary keys are the names of parts, and values are Unicode strings;
- encoding is up to the client.
-
- Parameters:
-
- - `input_string`: A multi-line text string; required.
- - `source_path`: Path to the source file or object. Optional, but useful
- for diagnostic output (system messages).
- - `destination_path`: Path to the file or object which will receive the
- output; optional. Used for determining relative paths (stylesheets,
- source links, etc.).
- - `input_encoding`: The encoding of `input_string`. If it is an encoded
- 8-bit string, provide the correct encoding. If it is a Unicode string,
- use "unicode", the default.
- - `doctitle`: Disable the promotion of a lone top-level section title to
- document title (and subsequent section title to document subtitle
- promotion); enabled by default.
- - `initial_header_level`: The initial level for header elements (e.g. 1
- for "<h1>").
- """
- overrides = {
- 'input_encoding': input_encoding,
- 'doctitle_xform': doctitle,
- 'initial_header_level': initial_header_level,
- 'report_level': 5
- }
-
- parts = core.publish_parts(
- source=input_string, source_path=source_path,
- destination_path=destination_path,
- writer_name='html', settings_overrides=overrides)
- return parts
-
-
-def html_body(input_string, source_path=None, destination_path=None,
- input_encoding='unicode', doctitle=1, initial_header_level=1):
- """
- Given an input string, returns an HTML fragment as a string.
-
- The return value is the contents of the <body> element.
-
- Parameters (see `html_parts()` for the remainder):
-
- - `output_encoding`: The desired encoding of the output. If a Unicode
- string is desired, use the default value of "unicode" .
- """
- parts = html_parts(
- input_string=input_string, source_path=source_path,
- destination_path=destination_path,
- input_encoding=input_encoding, doctitle=doctitle,
- initial_header_level=initial_header_level)
- fragment = parts['html_body']
- return fragment
diff --git a/src/landslide/test-data/encoding.rst b/src/landslide/test-data/encoding.rst
deleted file mode 100644
index 1e1fc40..0000000
--- a/src/landslide/test-data/encoding.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-Encoding Test
-=============
-
-----
-
-koi8_r
-======
-
- .
diff --git a/src/landslide/test-data/img.png b/src/landslide/test-data/img.png
deleted file mode 100644
index a0cb46b..0000000
--- a/src/landslide/test-data/img.png
+++ /dev/null
Binary files differ
diff --git a/src/landslide/test-data/test.css b/src/landslide/test-data/test.css
deleted file mode 100644
index 9cf6e36..0000000
--- a/src/landslide/test-data/test.css
+++ /dev/null
@@ -1 +0,0 @@
-* {color: red;} \ No newline at end of file
diff --git a/src/landslide/test-data/test.js b/src/landslide/test-data/test.js
deleted file mode 100644
index 0c0ac5f..0000000
--- a/src/landslide/test-data/test.js
+++ /dev/null
@@ -1 +0,0 @@
-alert('foo'); \ No newline at end of file
diff --git a/src/landslide/test-data/test.md b/src/landslide/test-data/test.md
deleted file mode 100644
index e9f9edc..0000000
--- a/src/landslide/test-data/test.md
+++ /dev/null
@@ -1,114 +0,0 @@
-# Title Slide
-
----
-
-# Paragraphs
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-elit, vel iaculis lorem facilisis non.
-
-Vivamus ante mauris, pellentesque et rhoncus ut, condimentum sed ipsum.
-Nullam eu molestie sapien. Curabitur imperdiet, ligula id blandit sagittis,
-libero quam consectetur felis, ac pharetra metus lectus vitae leo. Mauris
-lacinia fermentum augue.
-
----
-
-# Blockquotes
-
-> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ultricies
-> tempus ultricies. Ut porta scelerisque viverra. Pellentesque aliquam metus
-> scelerisque dui ultricies, auctor dictum erat aliquet. Integer vehicula nunc
-> elit, vel iaculis lorem facilisis non.
-
----
-
-# Subheadings and Emphasis
-
-## Italic
-
-*Lorem ipsum dolor sit amet*
-
-## Bold
-
-**Lorem ipsum dolor sit amet**
-
----
-
-# Lists
-
-## Unordered List
-
-- Markdown
-- ReStructured Text
-- Textile
-
-## Ordered List
-
-1. Python
-2. JavaScript
-3. HTML5
-
----
-
-# Second Title Slide
-
----
-
-# Code
-
-## Single Word
-
-Hello `World`
-
-## Python
-
- !python
- def multiply (x, y):
- return x * y
-
-## JavaScript
-
- !javascript
- multiply: function (x, y) {
- return x * y;
- }
-
-## HTML
-
- !html
- <!doctype html>
- <html>
- <head></head>
- <body></body>
- </html>
-
----
-
-# Images
-
-![img](img.png)
-
----
-
-# View Presenter Notes
-
-This slide has presenter notes. Press `p` to view them.
-
-# Presenter Notes
-
-Hello from presenter notes
-
----
-
-# Other features
-
-View other features in the help sidebar by pressing `h`
-
----
-
-# Unicode
-
-This is ünicô∂e
diff --git a/src/landslide/tests.py b/src/landslide/tests.py
deleted file mode 100644
index 77d9823..0000000
--- a/src/landslide/tests.py
+++ /dev/null
@@ -1,266 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from landslide import macro
-import os
-import re
-import unittest
-import codecs
-import base64
-
-from landslide.generator import Generator
-from landslide.parser import Parser
-
-
-DATA_DIR = os.path.join(os.path.dirname(__file__), 'test-data')
-
-if (not os.path.exists(DATA_DIR)):
- raise IOError('Test data not found, cannot run tests')
-
-
-class BaseTestCase(unittest.TestCase):
- def logtest(self, message, type='notice'):
- if type == 'warning':
- raise WarningMessage(message)
- elif type == 'error':
- raise ErrorMessage(message)
-
-
-class GeneratorTest(BaseTestCase):
- def test___init__(self):
- self.assertRaises(IOError, Generator, None)
- self.assertRaises(IOError, Generator, 'foo.md')
-
- def test_add_user_assets(self):
- base_dir = os.path.join(DATA_DIR, 'test.md')
- g = Generator(base_dir, logger=self.logtest)
- g.add_user_css(os.path.join(DATA_DIR, 'test.css'))
- g.add_user_js(os.path.join(DATA_DIR, 'test.js'))
- self.assertEqual(g.user_css[0]['contents'], '* {color: red;}')
- self.assertEqual(g.user_js[0]['contents'], "alert('foo');")
-
- def test_get_toc(self):
- base_dir = os.path.join(DATA_DIR, 'test.md')
- g = Generator(base_dir, logger=self.logtest)
- g.add_toc_entry('Section 1', 1, 1)
- g.add_toc_entry('Section 1.1', 2, 2)
- g.add_toc_entry('Section 1.2', 2, 3)
- g.add_toc_entry('Section 2', 1, 4)
- g.add_toc_entry('Section 2.1', 2, 5)
- g.add_toc_entry('Section 3', 1, 6)
- toc = g.toc
- self.assertEqual(len(toc), 3)
- self.assertEqual(toc[0]['title'], 'Section 1')
- self.assertEqual(len(toc[0]['sub']), 2)
- self.assertEqual(toc[0]['sub'][1]['title'], 'Section 1.2')
- self.assertEqual(toc[1]['title'], 'Section 2')
- self.assertEqual(len(toc[1]['sub']), 1)
- self.assertEqual(toc[2]['title'], 'Section 3')
- self.assertEqual(len(toc[2]['sub']), 0)
-
- def test_get_slide_vars(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
- svars = g.get_slide_vars("<h1>heading</h1>\n<p>foo</p>\n<p>bar</p>\n")
- self.assertEqual(svars['title'], 'heading')
- self.assertEqual(svars['level'], 1)
- self.assertEqual(svars['header'], '<h1>heading</h1>')
- self.assertEqual(svars['content'], '<p>foo</p>\n<p>bar</p>')
- self.assertEqual(svars['source'], {})
- self.assertEqual(svars['classes'], [])
-
- def test_unicode(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
- g.execute()
- s = g.render()
- self.assertTrue(s.find('<pre>') != -1)
- self.assertEqual(len(re.findall('<pre><span', s)), 3)
-
- def test_inputencoding(self):
- path = os.path.join(DATA_DIR, 'encoding.rst')
- g = Generator(path, encoding='koi8_r')
- content = g.render()
-
- # check that the string is utf_8
- self.assertTrue(re.findall(u'русский', content, flags=re.UNICODE))
- g.execute()
- with codecs.open(g.destination_file, encoding='utf_8') as file_object:
- file_contents = file_object.read()
- # check that the file was properly encoded in utf_8
- self.assertTrue(re.findall(u'русский', file_contents,
- flags=re.UNICODE))
-
- def test_get_template_vars(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
- svars = g.get_template_vars([{'title': "slide1", 'level': 1},
- {'title': "slide2", 'level': 1},
- {'title': None, 'level': 1},
- ])
- self.assertEqual(svars['head_title'], 'slide1')
-
- def test_process_macros(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
- # Notes
- r = g.process_macros('<p>foo</p>\n<p>.notes: bar</p>\n<p>baz</p>')
- self.assertEqual(r[0].find('<p class="notes">bar</p>'), 11)
- self.assertEqual(r[1], [u'has_notes'])
- # FXs
- content = '<p>foo</p>\n<p>.fx: blah blob</p>\n<p>baz</p>'
- r = g.process_macros(content)
- self.assertEqual(r[0], '<p>foo</p>\n<p>baz</p>')
- self.assertEqual(r[1][0], 'blah')
- self.assertEqual(r[1][1], 'blob')
-
- def test_register_macro(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
-
- class SampleMacro(macro.Macro):
- pass
-
- g.register_macro(SampleMacro)
- self.assertTrue(SampleMacro in g.macros)
-
- def plop(foo):
- pass
-
- self.assertRaises(TypeError, g.register_macro, plop)
-
- def test_presenter_notes(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
- svars = g.get_slide_vars("<h1>heading</h1>\n<p>foo</p>\n"
- "<h1>Presenter Notes</h1>\n<p>bar</p>\n")
- self.assertEqual(svars['presenter_notes'], "<p>bar</p>")
-
- # Check that presenter notes work even if the slide has no heading.
- # For example, if it is only an image:
-
- g = Generator(os.path.join(DATA_DIR, 'test.md'))
- svars = g.get_slide_vars("<p>foo</p>\n"
- "<h1>Presenter Notes</h1>\n<p>bar</p>\n")
-
- def test_skip_presenter_notes(self):
- g = Generator(os.path.join(DATA_DIR, 'test.md'),
- presenter_notes=False)
- svars = g.get_slide_vars("<h1>heading</h1>\n<p>foo</p>\n"
- "<h1>Presenter Notes</h1>\n<p>bar</p>\n")
- self.assertEqual(svars['presenter_notes'], None)
-
-
-class CodeHighlightingMacroTest(BaseTestCase):
- def setUp(self):
- self.sample_html = '''<p>Let me give you this snippet:</p>
-<pre class="literal-block">
-!python
-def foo():
- &quot;just a test&quot;
- print bar
-</pre>
-<p>Then this one:</p>
-<pre class="literal-block">
-!php
-<?php
-echo $bar;
-?>
-</pre>
-<p>Then this other one:</p>
-<pre class="literal-block">
-!xml
-<foo>
- <bar glop="yataa">baz</bar>
-</foo>
-</pre>
-<p>End here.</p>'''
-
- def test_parsing_code_blocks(self):
- m = macro.CodeHighlightingMacro(self.logtest)
- blocks = m.code_blocks_re.findall(self.sample_html)
- self.assertEqual(len(blocks), 3)
- self.assertEqual(blocks[0][2], 'python')
- self.assertTrue(blocks[0][3].startswith('def foo():'))
- self.assertEqual(blocks[1][2], 'php')
- self.assertTrue(blocks[1][3].startswith('<?php'))
- self.assertEqual(blocks[2][2], 'xml')
- self.assertTrue(blocks[2][3].startswith('<foo>'))
-
- def test_descape(self):
- m = macro.CodeHighlightingMacro(self.logtest)
- self.assertEqual(m.descape('foo'), 'foo')
- self.assertEqual(m.descape('&gt;'), '>')
- self.assertEqual(m.descape('&lt;'), '<')
- self.assertEqual(m.descape('&amp;lt;'), '&lt;')
- self.assertEqual(m.descape('&lt;span&gt;'), '<span>')
- self.assertEqual(m.descape('&lt;spam&amp;eggs&gt;'), '<spam&eggs>')
-
- def test_process(self):
- m = macro.CodeHighlightingMacro(self.logtest)
- hl = m.process("<pre><code>!php\n$foo;</code></pre>")
- self.assertTrue(hl[0].startswith('<div class="highlight"><pre'))
- self.assertEqual(hl[1][0], u'has_code')
- input = "<p>Nothing to declare</p>"
- self.assertEqual(m.process(input)[0], input)
- self.assertEqual(m.process(input)[1], [])
-
- def test_process_rst_code_blocks(self):
- m = macro.CodeHighlightingMacro(self.logtest)
- hl = m.process(self.sample_html)
- self.assertTrue(hl[0].startswith('<p>Let me give you this'))
- self.assertTrue(hl[0].find('<p>Then this one') > 0)
- self.assertTrue(hl[0].find('<p>Then this other one') > 0)
- self.assertTrue(hl[0].find('<div class="highlight"><pre') > 0)
- self.assertEqual(hl[1][0], u'has_code')
-
-
-class EmbedImagesMacroTest(BaseTestCase):
- def test_process(self):
- base_dir = os.path.join(DATA_DIR, 'test.md')
- m = macro.EmbedImagesMacro(self.logtest, True)
- self.assertRaises(WarningMessage, m.process,
- '<img src="img.png"/>', '.')
- content, classes = m.process('<img src="img.png"/>', base_dir)
- match = re.search(r'<img src="data:image/png;base64,(.+?)"/>',
- content)
- self.assertTrue(base64.b64decode(match.group(1)))
-
-
-class FixImagePathsMacroTest(BaseTestCase):
- def test_process(self):
- base_dir = os.path.join(DATA_DIR, 'test.md')
- m = macro.FixImagePathsMacro(self.logtest, False)
- content, classes = m.process('<img src="img.png"/>', base_dir)
- self.assertTrue(re.match(r'<img src="file://.*?/img.png" */>',
- content))
-
-
-class FxMacroTest(BaseTestCase):
- def test_process(self):
- m = macro.FxMacro(self.logtest)
- content = '<p>foo</p>\n<p>.fx: blah blob</p>\n<p>baz</p>'
- r = m.process(content)
- self.assertEqual(r[0], '<p>foo</p>\n<p>baz</p>')
- self.assertEqual(r[1][0], 'blah')
- self.assertEqual(r[1][1], 'blob')
-
-
-class NotesMacroTest(BaseTestCase):
- def test_process(self):
- m = macro.NotesMacro(self.logtest)
- r = m.process('<p>foo</p>\n<p>.notes: bar</p>\n<p>baz</p>')
- self.assertEqual(r[0].find('<p class="notes">bar</p>'), 11)
- self.assertEqual(r[1], [u'has_notes'])
-
-
-class ParserTest(BaseTestCase):
- def test___init__(self):
- self.assertEqual(Parser('.md').format, 'markdown')
- self.assertEqual(Parser('.markdown').format, 'markdown')
- self.assertEqual(Parser('.rst').format, 'restructuredtext')
- self.assertRaises(NotImplementedError, Parser, '.txt')
-
-
-class WarningMessage(Exception):
- pass
-
-
-class ErrorMessage(Exception):
- pass
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/src/landslide/themes/default/base.html b/src/landslide/themes/default/base.html
deleted file mode 100644
index 3c73a8d..0000000
--- a/src/landslide/themes/default/base.html
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE html>
-<!--
- Copyright 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- Original slides: Marcin Wichary (mwichary@google.com)
- Modifications: Ernest Delgado (ernestd@google.com)
- Alex Russell (slightlyoff@chromium.org)
-
- landslide modifications: Adam Zapletal (adamzap@gmail.com)
- Nicolas Perriault (nperriault@gmail.com)
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
- <title>{{ head_title }}</title>
- <!-- Styles -->
- {% if embed %}
- <style type="text/css" media="print">
- {{ css.print.contents }}
- </style>
- <style type="text/css" media="screen, projection">
- {{ css.screen.contents }}
- </style>
- {% else %}
- <link rel="stylesheet" media="print" href="{{ css.print.path_url }}">
- <link rel="stylesheet" media="screen, projection" href="{{ css.screen.path_url }}">
- {% endif %}
- {% for css in user_css %}
- {% if embed %}
- <style type="text/css" media="screen, projection">
- {{ css.contents }}
- </style>
- {% else %}
- <link rel="stylesheet" href="{{ css.path_url }}">
- {% endif %}
- {% endfor %}
- <!-- /Styles -->
- <!-- Javascripts -->
- {% if embed %}
- <script>
- {{ js.contents }}
- </script>
- {% else %}
- <script type="text/javascript" src="{{ js.path_url }}"></script>
- {% endif %}
- {% for js in user_js %}
- {% if embed %}
- <script>
- {{ js.contents }}
- </script>
- {% else %}
- <script type="text/javascript" src="{{ js.path_url }}"></script>
- {% endif %}
- {% endfor %}
- {% if math_output %}
- <script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }
- });
- </script>
- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
- {% endif %}
- <!-- /Javascripts -->
-</head>
-<body>
- <div id="blank"></div>
- <div class="presentation">
- <div id="current_presenter_notes">
- <div id="presenter_note"></div>
- </div>
- <div class="slides">
- {% for slide in slides %}
- <!-- slide source: {% if slide.source %}{{ slide.source.rel_path }}{% endif %} -->
- <div class="slide-wrapper">
- <div class="slide{% if slide.classes %}{% for class in slide.classes %} {{ class }}{% endfor %}{% endif %} slide-{{slide.number}}">
- <div class="inner">
- {% if slide.header %}
- <header>{{ slide.header }}</header>
- {% endif %}
- {% if slide.content %}
- <section>{{ slide.content }}</section>
- {% endif %}
- </div>
- <div class="presenter_notes">
- <header><h1>Presenter Notes</h1></header>
- <section>
- {% if slide.presenter_notes %}
- {{ slide.presenter_notes }}
- {% endif %}
- </section>
- </div>
- <footer>
- {% if slide.source %}
- <aside class="source">
- Source: <a href="{{ slide.source.rel_path }}">{{ slide.source.rel_path }}</a>
- </aside>
- {% endif %}
- <aside class="page_number">
- {{ slide.number }}/{{ num_slides }}
- </aside>
- </footer>
- </div>
- </div>
- {% endfor %}
- </div>
- </div>
- {% if toc %}
- <div id="toc" class="sidebar hidden">
- <h2>Table of Contents</h2>
- <table>
- <caption>Table of Contents</caption>
- {% for section in toc %}
- <tr id="toc-row-{{ section.number }}">
- <th><a href="#slide{{ section.number }}">{{ section.title }}</a></th>
- <td><a href="#slide{{ section.number }}">{{ section.number }}</a></td>
- </tr>
- {% if section.sub %}
- {% for subsection in section.sub %}
- <tr id="toc-row-{{ subsection.number }}" class="sub">
- <th><a href="#slide{{ subsection.number }}">{{ subsection.title }}</a></th>
- <td><a href="#slide{{ subsection.number }}">{{ subsection.number }}</a></td>
- </tr>
- {% endfor %}
- {% endif %}
- {% endfor %}
- </table>
- </div>
- {% endif %}
- <div id="help" class="sidebar hidden">
- <h2>Help</h2>
- <table>
- <caption>Help</caption>
- <tr>
- <th>Table of Contents</th>
- <td>t</td>
- </tr>
- <tr>
- <th>Exposé</th>
- <td>ESC</td>
- </tr>
- <tr>
- <th>Full screen slides</th>
- <td>e</td>
- </tr>
- <tr>
- <th>Presenter View</th>
- <td>p</td>
- </tr>
- <tr>
- <th>Source Files</th>
- <td>s</td>
- </tr>
- <tr>
- <th>Slide Numbers</th>
- <td>n</td>
- </tr>
- <tr>
- <th>Toggle screen blanking</th>
- <td>b</td>
- </tr>
- <tr>
- <th>Show/hide slide context</th>
- <td>c</td>
- </tr>
- <tr>
- <th>Notes</th>
- <td>2</td>
- </tr>
- <tr>
- <th>Help</th>
- <td>h</td>
- </tr>
- </table>
- </div>
- <script>main()</script>
-</body>
-</html>
diff --git a/src/landslide/themes/default/css/print.css b/src/landslide/themes/default/css/print.css
deleted file mode 100644
index 4c34dc3..0000000
--- a/src/landslide/themes/default/css/print.css
+++ /dev/null
@@ -1,93 +0,0 @@
-* {
- margin: 0;
- padding: 0;
-}
-
-@page {
- size: landscape;
-}
-
-body {
- font: 100% "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- padding: 0;
- margin: 0;
-}
-
-div.slide {
- min-width: 800px;
- min-height: 600px;
- padding: 1em;
- overflow: hidden;
- page-break-after: always;
- border: 1px solid black;
- border-radius: 20px;
-}
-
-div.slide div.inner {
- width: 800px;
- height: 600px;
- margin: auto;
-}
-
-h1 {
- font-size: 2.4em;
-}
-
-h2 {
- font-size: 1.4em;
-}
-
-h3 {
- margin: 1em 0;
-}
-
-ul {
- margin: 0;
- padding: 0;
-}
-
-p, li, pre {
- margin: 1em 0;
-}
-
-li {
- margin-left: 2em;
-}
-
-a {
- color: #000000;
-}
-
-pre, code {
- max-width: 800px;
- background: #eee;
- font-family: Monaco, monospace;
- font-size: 90%;
-}
-
-pre {
- padding: .2em .5em;
- overflow: hidden;
- border-radius: .8em;
-}
-
-code {
- padding: 0 .2em;
-}
-
-.slide header:only-child h1 {
- line-height: 180%;
- text-align: center;
- display: table-cell;
- vertical-align: middle;
- height: 600px;
- width: 800px;
- font-size: 48px;
- margin-top:100px;
- margin-bottom:100px;
-}
-
-#toc, #help, .slide aside, .slide footer, .slide .notes,
-.presenter_notes, #current_presenter_notes, #presenter_note {
- display: none;
-}
diff --git a/src/landslide/themes/default/css/screen.css b/src/landslide/themes/default/css/screen.css
deleted file mode 100644
index d3fd711..0000000
--- a/src/landslide/themes/default/css/screen.css
+++ /dev/null
@@ -1,568 +0,0 @@
-body {
- font: 14px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- background: #778;
- padding: 0;
- margin: 0;
- overflow: hidden;
-}
-
-div.presentation {
- position: absolute;
- width: 100%;
- display: table-cell;
- vertical-align: middle;
- height: 100%;
- background: inherit;
-}
-
-div.presentation > h1 {
- display: none;
-}
-
-div.slides, body.expose div.slides.nocontext {
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- position: absolute;
- display: block;
-}
-
-div.slides.nocontext {
- width: 900px;
- margin: 0 auto;
- overflow: hidden;
- position: relative;
- left: auto;
- top: auto;
-}
-
-div.slide {
- display: inline;
- position: absolute;
- overflow: hidden;
- width: 900px;
- height: 700px;
- margin-top: -350px;
- margin-left: -400px;
- left: 50%;
- top: 50%;
- background: -webkit-gradient(linear, left bottom, left top, from(#bbd), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #bbd, #fff);
- -webkit-transition: margin 0.25s ease-in-out;
- -moz-transition: margin 0.25s ease-in-out;
- -o-transition: margin 0.25s ease-in-out;
- border-top-left-radius: 20px;
- -moz-border-radius-topleft: 20px;
- -webkit-border-top-left-radius: 20px;
- border-top-right-radius: 20px;
- -moz-border-radius-topright: 20px;
- -webkit-border-top-right-radius: 20px;
- border-bottom-right-radius: 20px;
- -moz-border-radius-bottomright: 20px;
- -webkit-border-bottom-right-radius: 20px;
- border-bottom-left-radius: 20px;
- -moz-border-radius-bottomleft: 20px;
- -webkit-border-bottom-left-radius: 20px;
-}
-
-/* Expose */
-
-body.expose div.slides {
- float: left;
- position: relative;
- overflow: auto;
- margin-bottom: 10px;
-}
-
-body.expose div.slide {
- display: block;
- float: left;
- position: relative;
- left: auto !important;
- top: auto !important;
- margin: 10px !important;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- -moz-transform: scale(.33, .33);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.33, .33);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.33, .33);
- -o-transform-origin: 0 0;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- cursor: pointer;
-}
-
-body.expose div.slide:hover {
- background: -webkit-gradient(linear, left bottom, left top, from(#bdd), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #bdd, #fff);
-}
-
-body.expose .slide-wrapper {
- float: left;
- position: relative;
- margin: .5%;
- width: 300px;
- height: 233px;
-}
-
-body.expose .slide footer {
-}
-
-body.expose .slide .inner {
-}
-
-body.expose .slide.far-past,
-body.expose .slide.past,
-body.expose .slide.future,
-body.expose .slide.far-future {
- margin-left: 0;
-}
-
-body.expose .slide.current {
- background: -webkit-gradient(linear, left bottom, left top, from(#ddb), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #ddb, #fff);
- border: 16px solid #fff;
- -moz-transform: scale(.315, .315);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.315, .315);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.315, .315);
- -o-transform-origin: 0 0;
-}
-
-/* Presenter Mode */
-
-body.presenter_view div.slide {
- display: inline;
- position: absolute;
- overflow: hidden;
- -moz-transform: scale(.5, .5);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.5, .5);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.5, .5);
- -o-transform-origin: 0 0;
- margin-top: -300px;
-}
-
-body.presenter_view .slide.far-past {
- display: block;
- margin-left: -1500px;
-}
-
-body.presenter_view .slide.past {
- display: block;
- margin-left: -975px;
-}
-
-body.presenter_view .slide.current {
- display: block;
- margin-left: -475px;
- border: 8px solid maroon;
- z-index: 2;
-}
-
-body.presenter_view .slide.future {
- display: block;
- margin-left: 25px;
- z-index: 1;
-}
-
-body.presenter_view .slide.far-future {
- display: block;
- margin-left: 525px;
-}
-
-body.presenter_view div#current_presenter_notes {
- visibility: visible;
- display: block;
- position: absolute;
- overflow: auto;
- vertical-align: middle;
- left: 50%;
- top: 50%;
- margin-left: -475px;
- margin-top: 100px;
- z-index: 2;
- width: 950px;
- border-style: solid;
- height: 30%;
- background-color: silver;
-}
-
-body.presenter_view div#current_presenter_notes section {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- display: block;
- overflow: visible;
- position: relative;
- background-color: #fffeff;
- height: 120px;
- margin-right: 30px;
- margin-top: 60px;
- margin-left: 30px;
- padding-right: 10px;
- padding-left: 10px;
- padding-top: 10px;
-}
-
-body.presenter_view div#current_presenter_notes section p {
- margin: 0;
-}
-
-body.presenter_view div#current_presenter_notes h1 {
- font-size: 50%;
- display: block;
-}
-
-div#current_presenter_notes {
- display: none;
-}
-
-div.slide div.presenter_notes, div.slides div.presenter_notes {
- display: none;
-}
-
-/* Slide styles */
-
-div.slide p {
- font-size: 20px;
-}
-
-.slide.far-past {
- display: block;
- margin-left: -2400px;
-}
-
-.slide.past {
- display: block;
- margin-left: -1400px;
-}
-
-.slide.current {
- display: block;
- margin-left: -450px;
-}
-
-.slide.future {
- display: block;
- margin-left: 500px;
-}
-
-.slide.far-future {
- display: block;
- margin-left: 1500px;
-}
-
-body.three-d div.slides {
- -webkit-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -moz-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -o-transform: translateX(50px) scale(0.8) rotateY(10deg);
-}
-
-
-/* Content */
-
-header:not(:only-child) {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- font-weight: normal;
- font-size: 50px;
- letter-spacing: -.05em;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- position: absolute;
- left: 30px;
- top: 25px;
- margin: 0;
- padding: 0;
-}
-
-header h1, header h2, header h3, header h4, header h5, header h6 {
- display: inline;
- font-size: 100%;
- font-weight: normal;
- padding: 0;
- margin: 0;
-}
-
-header h2:first-child {
- margin-top: 0;
-}
-
-section, .slide header:only-child h1 {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: #3f3f3f;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin-left: 30px;
- margin-right: 30px;
- margin-top: 100px;
- display: block;
- overflow: hidden;
-}
-
-img { display: block; margin: auto; }
-
-section img.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-section img.align-right {
- display: block;
- margin-left: auto;
- margin-right: 0;
-}
-
-section img.align-left {
- display: block;
- margin-right: auto;
- margin-left: 0;
-}
-
-a {
- color: inherit;
- display: inline-block;
- text-decoration: none;
- line-height: 110%;
- border-bottom: 2px solid #3f3f3f;
-}
-
-pre, code, tt {
- font-family: Monaco, Consolas, 'Bitstream Vera Sans Mono', 'Lucida Console', FreeMono, Courier, monospace;
-}
-
-pre, .gist .gist-file .gist-data {
- font-size: 18px;
- max-height: 485px;
- padding-top: 0.25em !important;
- padding-right: 0.5em !important;
- padding-left: 0.5em !important;
- overflow: auto;
-}
-
-/* render a nice scrollbar in overflowed pre area's */
-::-webkit-scrollbar {
- height: 8px;
- width: 8px;
-}
-::-webkit-scrollbar-thumb {
- background: -webkit-gradient(linear, left bottom, left top, from(#777), to(#bbd));
- -webkit-border-radius: 1ex;
-}
-::-webkit-scrollbar-corner {
- background: #dedede;
-}
-
-blockquote {
- border-left: solid 8px #778;
- padding: .1ex 1ex;
- font-style: italic;
- font-size: 20px;
-}
-
-li {
- padding: 10px 0;
- font-size: 20px;
-}
-
-li pre { margin-left: 0em; }
-
-.slide header:only-child h1 {
- line-height: 180%;
- text-align: center;
- display: table-cell;
- vertical-align: middle;
- height: 700px;
- width: 900px;
- font-size: 50px;
- margin-top:100px;
- margin-bottom:100px;
-}
-
-.sidebar {
- clear: both;
- background: -webkit-gradient(linear, top right, bottom right, from(#dde), to(#fff));
- -webkit-transition: margin 0.25s ease-in-out;
- background-color: #eee;
- background: -moz-linear-gradient(right, #dde, #fff);
- border-right: 5px solid #ccd;
- z-index: 9999999;
- height: 100%;
- overflow: hidden;
- top: 0;
- position: absolute;
- display: block;
- margin: 0;
- margin-left: -400px;
- padding: 10px 16px;
- overflow: auto;
- -webkit-transition: margin 0.2s ease-in-out;
- -moz-transition: margin 0.2s ease-in-out;
- -o-transition: margin 0.2s ease-in-out;
-}
-
-.sidebar h2 {
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin: 0 0 16px;
- padding: 0;
-}
-
-.sidebar table {
- width: 100%;
- margin: 0;
- padding: 0;
- border-collapse: collapse;
-}
-
-.sidebar table caption {
- display: none;
-}
-
-.sidebar tr {
- margin: 2px 0;
- border-bottom: 1px solid #ccc;
-}
-
-.sidebar th {
- text-align: left;
- font-weight: normal;
- max-width: 300px;
- overflow: hidden;
-}
-
-.sidebar tr.sub th {
- text-indent: 20px;
-}
-
-.sidebar td {
- text-align: right;
- min-width: 20px;
-}
-
-.sidebar a {
- display: block;
- text-decoration: none;
- border-bottom: none;
- padding: 4px 0;
-}
-
-.sidebar tr.active {
- background: #ff0;
-}
-
-aside {
- display: none;
-}
- aside.source {
- position: absolute;
- bottom: 6px;
- left: 10px;
- text-indent: 10px;
- }
- aside.page_number {
- position: absolute;
- bottom: 6px;
- right: 10px;
- text-indent: 10px;
- }
-
-.notes {
- display: none;
- padding: 10px;
- background: #ccc;
- border-radius: 10px;
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
-}
- div.slide p.notes {
- font-size: 90%;
-}
-
-/* Pygments default theme */
-.hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
-.err { border: 1px solid #FF0000 } /* Error */
-.k { color: #008000; font-weight: bold } /* Keyword */
-.o { color: #666666 } /* Operator */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
-.gd { color: #A00000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #808080 } /* Generic.Output */
-.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.gt { color: #0040D0 } /* Generic.Traceback */
-.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #008000 } /* Keyword.Pseudo */
-.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #B00040 } /* Keyword.Type */
-.m { color: #666666 } /* Literal.Number */
-.s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
-.nb { color: #008000 } /* Name.Builtin */
-.nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.no { color: #880000 } /* Name.Constant */
-.nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
-.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.nt { color: #008000; font-weight: bold } /* Name.Tag */
-.nv { color: #19177C } /* Name.Variable */
-.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #666666 } /* Literal.Number.Float */
-.mh { color: #666666 } /* Literal.Number.Hex */
-.mi { color: #666666 } /* Literal.Number.Integer */
-.mo { color: #666666 } /* Literal.Number.Oct */
-.sb { color: #BA2121 } /* Literal.String.Backtick */
-.sc { color: #BA2121 } /* Literal.String.Char */
-.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
-.s1 { color: #BA2121 } /* Literal.String.Single */
-.ss { color: #19177C } /* Literal.String.Symbol */
-.bp { color: #008000 } /* Name.Builtin.Pseudo */
-.vc { color: #19177C } /* Name.Variable.Class */
-.vg { color: #19177C } /* Name.Variable.Global */
-.vi { color: #19177C } /* Name.Variable.Instance */
-.il { color: #666666 } /* Literal.Number.Integer.Long */
-.lineno { padding-right: 10px } /* A few space after linenos */
-
-#blank {
- position: absolute;
- top: 0;
- left: 0;
- background-color: black;
- width: 100%;
- height: 100%;
- z-index: 64;
- display: none;
-}
-
-.image-reference {
- display: inline;
-}
diff --git a/src/landslide/themes/default/js/slides.js b/src/landslide/themes/default/js/slides.js
deleted file mode 100644
index e7ae40c..0000000
--- a/src/landslide/themes/default/js/slides.js
+++ /dev/null
@@ -1,580 +0,0 @@
-function main() {
- // Since we don't have the fallback of attachEvent and
- // other IE only stuff we won't try to run JS for IE.
- // It will run though when using Google Chrome Frame
- if (document.all) { return; }
-
- var currentSlideNo;
- var notesOn = false;
- var expanded = false;
- var hiddenContext = false;
- var blanked = false;
- var slides = document.getElementsByClassName('slide');
- var touchStartX = 0;
- var spaces = /\s+/, a1 = [''];
- var tocOpened = false;
- var helpOpened = false;
- var overviewActive = false;
- var modifierKeyDown = false;
- var scale = 1;
- var showingPresenterView = false;
- var presenterViewWin = null;
- var isPresenterView = false;
-
- var str2array = function(s) {
- if (typeof s == 'string' || s instanceof String) {
- if (s.indexOf(' ') < 0) {
- a1[0] = s;
- return a1;
- } else {
- return s.split(spaces);
- }
- }
- return s;
- };
-
- var trim = function(str) {
- return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
- };
-
- var addClass = function(node, classStr) {
- classStr = str2array(classStr);
- var cls = ' ' + node.className + ' ';
- for (var i = 0, len = classStr.length, c; i < len; ++i) {
- c = classStr[i];
- if (c && cls.indexOf(' ' + c + ' ') < 0) {
- cls += c + ' ';
- }
- }
- node.className = trim(cls);
- };
-
- var removeClass = function(node, classStr) {
- var cls;
- if (!node) {
- throw 'no node provided';
- }
- if (classStr !== undefined) {
- classStr = str2array(classStr);
- cls = ' ' + node.className + ' ';
- for (var i = 0, len = classStr.length; i < len; ++i) {
- cls = cls.replace(' ' + classStr[i] + ' ', ' ');
- }
- cls = trim(cls);
- } else {
- cls = '';
- }
- if (node.className != cls) {
- node.className = cls;
- }
- };
-
- var getSlideEl = function(slideNo) {
- if (slideNo > 0) {
- return slides[slideNo - 1];
- } else {
- return null;
- }
- };
-
- var getSlideTitle = function(slideNo) {
- var el = getSlideEl(slideNo);
- if (el) {
- var headers = el.getElementsByTagName('header');
- if (headers.length > 0) {
- return el.getElementsByTagName('header')[0].innerText;
- }
- }
- return null;
- };
-
- var getSlidePresenterNote = function(slideNo) {
- var el = getSlideEl(slideNo);
- if (el) {
- var n = el.getElementsByClassName('presenter_notes');
- if (n.length > 0) {
- return n[0];
- }
- }
- return null;
- };
-
- var changeSlideElClass = function(slideNo, className) {
- var el = getSlideEl(slideNo);
- if (el) {
- removeClass(el, 'far-past past current future far-future');
- addClass(el, className);
- }
- };
-
- var updateSlideClasses = function(updateOther) {
- window.location.hash = (isPresenterView ? "presenter" : "slide") + currentSlideNo;
-
- for (var i=1; i<currentSlideNo-1; i++) {
- changeSlideElClass(i, 'far-past');
- }
-
- changeSlideElClass(currentSlideNo - 1, 'past');
- changeSlideElClass(currentSlideNo, 'current');
- changeSlideElClass(currentSlideNo + 1, 'future');
-
- for (i=currentSlideNo+2; i<slides.length+1; i++) {
- changeSlideElClass(i, 'far-future');
- }
-
- highlightCurrentTocLink();
-
- processContext();
-
- document.getElementsByTagName('title')[0].innerText = getSlideTitle(currentSlideNo);
-
- updatePresenterNotes();
-
- if (updateOther) { updateOtherPage(); }
- };
-
- var updatePresenterNotes = function() {
- if (!isPresenterView) { return; }
-
- var existingNote = document.getElementById('current_presenter_notes');
- var currentNote = getSlidePresenterNote(currentSlideNo).cloneNode(true);
- currentNote.setAttribute('id', 'presenter_note');
-
- existingNote.replaceChild(currentNote, document.getElementById('presenter_note'));
- };
-
- var highlightCurrentTocLink = function() {
- var toc = document.getElementById('toc');
-
- if (toc) {
- var tocRows = toc.getElementsByTagName('tr');
- for (var i=0; i<tocRows.length; i++) {
- removeClass(tocRows.item(i), 'active');
- }
-
- var currentTocRow = document.getElementById('toc-row-' + currentSlideNo);
- if (currentTocRow) {
- addClass(currentTocRow, 'active');
- }
- }
- };
-
- var updateOtherPage = function() {
- if (!showingPresenterView) { return; }
-
- var w = isPresenterView ? window.opener : presenterViewWin;
- w.postMessage('slide#' + currentSlideNo, '*');
- };
-
- var nextSlide = function() {
- if (currentSlideNo < slides.length) {
- currentSlideNo++;
- }
- updateSlideClasses(true);
- };
-
- var prevSlide = function() {
- if (currentSlideNo > 1) {
- currentSlideNo--;
- }
- updateSlideClasses(true);
- };
-
- var showNotes = function() {
- var notes = getSlideEl(currentSlideNo).getElementsByClassName('notes');
- for (var i = 0, len = notes.length; i < len; i++) {
- notes.item(i).style.display = (notesOn) ? 'none':'block';
- }
- notesOn = !notesOn;
- };
-
- var showSlideNumbers = function() {
- var asides = document.getElementsByClassName('page_number');
- var hidden = asides[0].style.display != 'block';
- for (var i = 0; i < asides.length; i++) {
- asides.item(i).style.display = hidden ? 'block' : 'none';
- }
- };
-
- var showSlideSources = function() {
- var asides = document.getElementsByClassName('source');
- var hidden = asides[0].style.display != 'block';
- for (var i = 0; i < asides.length; i++) {
- asides.item(i).style.display = hidden ? 'block' : 'none';
- }
- };
-
- var showToc = function() {
- if (helpOpened) {
- showHelp();
- }
- var toc = document.getElementById('toc');
- if (toc) {
- toc.style.marginLeft = tocOpened ? '-' + (toc.clientWidth + 20) + 'px' : '0px';
- tocOpened = !tocOpened;
- }
- updateOverview();
- };
-
- var showHelp = function() {
- if (tocOpened) {
- showToc();
- }
-
- var help = document.getElementById('help');
-
- if (help) {
- help.style.marginLeft = helpOpened ? '-' + (help.clientWidth + 20) + 'px' : '0px';
- helpOpened = !helpOpened;
- }
- };
-
- var showPresenterView = function() {
- if (isPresenterView) { return; }
-
- if (showingPresenterView) {
- presenterViewWin.close();
- presenterViewWin = null;
- showingPresenterView = false;
- } else {
- presenterViewWin = open(window.location.pathname + "#presenter" + currentSlideNo, 'presenter_notes',
- 'directories=no,location=no,toolbar=no,menubar=no,copyhistory=no');
- showingPresenterView = true;
- }
- };
-
- var switch3D = function() {
- if (document.body.className.indexOf('three-d') == -1) {
- document.getElementsByClassName('presentation')[0].style.webkitPerspective = '1000px';
- document.body.className += ' three-d';
- } else {
- window.setTimeout('document.getElementsByClassName(\'presentation\')[0].style.webkitPerspective = \'0\';', 2000);
- document.body.className = document.body.className.replace(/three-d/, '');
- }
- };
-
- var toggleOverview = function() {
- if (!overviewActive) {
- addClass(document.body, 'expose');
- overviewActive = true;
- setScale(1);
- } else {
- removeClass(document.body, 'expose');
- overviewActive = false;
- if (expanded) {
- setScale(scale); // restore scale
- }
- }
- processContext();
- updateOverview();
- };
-
- var updateOverview = function() {
- try {
- var presentation = document.getElementsByClassName('presentation')[0];
- } catch (e) {
- return;
- }
-
- if (isPresenterView) {
- var action = overviewActive ? removeClass : addClass;
- action(document.body, 'presenter_view');
- }
-
- var toc = document.getElementById('toc');
-
- if (!toc) {
- return;
- }
-
- if (!tocOpened || !overviewActive) {
- presentation.style.marginLeft = '0px';
- presentation.style.width = '100%';
- } else {
- presentation.style.marginLeft = toc.clientWidth + 'px';
- presentation.style.width = (presentation.clientWidth - toc.clientWidth) + 'px';
- }
- };
-
- var computeScale = function() {
- var cSlide = document.getElementsByClassName('current')[0];
- var sx = cSlide.clientWidth / window.innerWidth;
- var sy = cSlide.clientHeight / window.innerHeight;
- return 1 / Math.max(sx, sy);
- };
-
- var setScale = function(scale) {
- var presentation = document.getElementsByClassName('slides')[0];
- var transform = 'scale(' + scale + ')';
- presentation.style.MozTransform = transform;
- presentation.style.WebkitTransform = transform;
- presentation.style.OTransform = transform;
- presentation.style.msTransform = transform;
- presentation.style.transform = transform;
- };
-
- var expandSlides = function() {
- if (overviewActive) {
- return;
- }
- if (expanded) {
- setScale(1);
- expanded = false;
- } else {
- scale = computeScale();
- setScale(scale);
- expanded = true;
- }
- };
-
- var showContext = function() {
- try {
- var presentation = document.getElementsByClassName('slides')[0];
- removeClass(presentation, 'nocontext');
- } catch (e) {}
- };
-
- var hideContext = function() {
- try {
- var presentation = document.getElementsByClassName('slides')[0];
- addClass(presentation, 'nocontext');
- } catch (e) {}
- };
-
- var processContext = function() {
- if (hiddenContext) {
- hideContext();
- } else {
- showContext();
- }
- };
-
- var toggleContext = function() {
- hiddenContext = !hiddenContext;
- processContext();
- };
-
- var toggleBlank = function() {
- blank_elem = document.getElementById('blank');
-
- blank_elem.style.display = blanked ? 'none' : 'block';
-
- blanked = !blanked;
- };
-
- var isModifierKey = function(keyCode) {
- switch (keyCode) {
- case 16: // shift
- case 17: // ctrl
- case 18: // alt
- case 91: // command
- return true;
- break;
- default:
- return false;
- break;
- }
- };
-
- var checkModifierKeyUp = function(event) {
- if (isModifierKey(event.keyCode)) {
- modifierKeyDown = false;
- }
- };
-
- var checkModifierKeyDown = function(event) {
- if (isModifierKey(event.keyCode)) {
- modifierKeyDown = true;
- }
- };
-
- var handleBodyKeyDown = function(event) {
- switch (event.keyCode) {
- case 13: // Enter
- if (overviewActive) {
- toggleOverview();
- }
- break;
- case 27: // ESC
- toggleOverview();
- break;
- case 37: // left arrow
- case 33: // page up
- event.preventDefault();
- prevSlide();
- break;
- case 39: // right arrow
- case 32: // space
- case 34: // page down
- event.preventDefault();
- nextSlide();
- break;
- case 50: // 2
- if (!modifierKeyDown) {
- showNotes();
- }
- break;
- case 51: // 3
- if (!modifierKeyDown && !overviewActive) {
- switch3D();
- }
- break;
- case 190: // .
- case 48: // 0
- case 66: // b
- if (!modifierKeyDown && !overviewActive) {
- toggleBlank();
- }
- break;
- case 67: // c
- if (!modifierKeyDown && !overviewActive) {
- toggleContext();
- }
- break;
- case 69: // e
- if (!modifierKeyDown && !overviewActive) {
- expandSlides();
- }
- break;
- case 72: // h
- showHelp();
- break;
- case 78: // n
- if (!modifierKeyDown && !overviewActive) {
- showSlideNumbers();
- }
- break;
- case 80: // p
- if (!modifierKeyDown && !overviewActive) {
- showPresenterView();
- }
- break;
- case 83: // s
- if (!modifierKeyDown && !overviewActive) {
- showSlideSources();
- }
- break;
- case 84: // t
- showToc();
- break;
- }
- };
-
- var handleWheel = function(event) {
- if (tocOpened || helpOpened || overviewActive) {
- return;
- }
-
- var delta = 0;
-
- if (!event) {
- event = window.event;
- }
-
- if (event.wheelDelta) {
- delta = event.wheelDelta/120;
- if (window.opera) delta = -delta;
- } else if (event.detail) {
- delta = -event.detail/3;
- }
-
- if (delta && delta <0) {
- nextSlide();
- } else if (delta) {
- prevSlide();
- }
- };
-
- var addSlideClickListeners = function() {
- for (var i=0; i < slides.length; i++) {
- var slide = slides.item(i);
- slide.num = i + 1;
- slide.addEventListener('click', function(e) {
- if (overviewActive) {
- currentSlideNo = this.num;
- toggleOverview();
- updateSlideClasses(true);
- e.preventDefault();
- }
- return false;
- }, true);
- }
- };
-
- var addRemoteWindowControls = function() {
- window.addEventListener("message", function(e) {
- if (e.data.indexOf("slide#") != -1) {
- currentSlideNo = Number(e.data.replace('slide#', ''));
- updateSlideClasses(false);
- }
- }, false);
- };
-
- var addTouchListeners = function() {
- document.addEventListener('touchstart', function(e) {
- touchStartX = e.touches[0].pageX;
- }, false);
- document.addEventListener('touchend', function(e) {
- var pixelsMoved = touchStartX - e.changedTouches[0].pageX;
- var SWIPE_SIZE = 150;
- if (pixelsMoved > SWIPE_SIZE) {
- nextSlide();
- }
- else if (pixelsMoved < -SWIPE_SIZE) {
- prevSlide();
- }
- }, false);
- };
-
- var addTocLinksListeners = function() {
- var toc = document.getElementById('toc');
- if (toc) {
- var tocLinks = toc.getElementsByTagName('a');
- for (var i=0; i < tocLinks.length; i++) {
- tocLinks.item(i).addEventListener('click', function(e) {
- currentSlideNo = Number(this.attributes['href'].value.replace('#slide', ''));
- updateSlideClasses(true);
- e.preventDefault();
- }, true);
- }
- }
- };
-
- // initialize
-
- (function() {
- if (window.location.hash == "") {
- currentSlideNo = 1;
- } else if (window.location.hash.indexOf("#presenter") != -1) {
- currentSlideNo = Number(window.location.hash.replace('#presenter', ''));
- isPresenterView = true;
- showingPresenterView = true;
- presenterViewWin = window;
- addClass(document.body, 'presenter_view');
- } else {
- currentSlideNo = Number(window.location.hash.replace('#slide', ''));
- }
-
- document.addEventListener('keyup', checkModifierKeyUp, false);
- document.addEventListener('keydown', handleBodyKeyDown, false);
- document.addEventListener('keydown', checkModifierKeyDown, false);
- document.addEventListener('DOMMouseScroll', handleWheel, false);
-
- window.onmousewheel = document.onmousewheel = handleWheel;
- window.onresize = expandSlides;
-
- for (var i = 0, el; el = slides[i]; i++) {
- addClass(el, 'slide far-future');
- }
- updateSlideClasses(false);
-
- // add support for finger events (filter it by property detection?)
- addTouchListeners();
-
- addTocLinksListeners();
-
- addSlideClickListeners();
-
- addRemoteWindowControls();
- })();
-}
diff --git a/src/landslide/themes/leapmotion/base.html b/src/landslide/themes/leapmotion/base.html
deleted file mode 100644
index fb2f709..0000000
--- a/src/landslide/themes/leapmotion/base.html
+++ /dev/null
@@ -1,183 +0,0 @@
-<!DOCTYPE html>
-<!--
- Copyright 2010 Google Inc.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- Original slides: Marcin Wichary (mwichary@google.com)
- Modifications: Ernest Delgado (ernestd@google.com)
- Alex Russell (slightlyoff@chromium.org)
-
- landslide modifications: Adam Zapletal (adamzap@gmail.com)
- Nicolas Perriault (nperriault@gmail.com)
--->
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
- <title>{{ head_title }}</title>
- <!-- Styles -->
- {% if embed %}
- <style type="text/css" media="print">
- {{ css.print.contents }}
- </style>
- <style type="text/css" media="screen, projection">
- {{ css.screen.contents }}
- </style>
- {% else %}
- <link rel="stylesheet" media="print" href="{{ css.print.path_url }}">
- <link rel="stylesheet" media="screen, projection" href="{{ css.screen.path_url }}">
- {% endif %}
- {% for css in user_css %}
- {% if embed %}
- <style type="text/css" media="screen, projection">
- {{ css.contents }}
- </style>
- {% else %}
- <link rel="stylesheet" href="{{ css.path_url }}">
- {% endif %}
- {% endfor %}
- <!-- /Styles -->
- <!-- Javascripts -->
- <script type="text/javascript" src="http://js.leapmotion.com/0.2.0-beta6/leap.min.js"></script>
- {% if embed %}
- <script>
- {{ js.contents }}
- </script>
- {% else %}
- <script type="text/javascript" src="{{ js.path_url }}"></script>
- {% endif %}
- {% for js in user_js %}
- {% if embed %}
- <script>
- {{ js.contents }}
- </script>
- {% else %}
- <script type="text/javascript" src="{{ js.path_url }}"></script>
- {% endif %}
- {% endfor %}
- <!-- /Javascripts -->
-</head>
-<body>
- <div id="blank"></div>
- <div class="presentation">
- <div id="current_presenter_notes">
- <div id="presenter_note"></div>
- </div>
- <div class="slides">
- {% for slide in slides %}
- <!-- slide source: {% if slide.source %}{{ slide.source.rel_path }}{% endif %} -->
- <div class="slide-wrapper">
- <div class="slide{% if slide.classes %}{% for class in slide.classes %} {{ class }}{% endfor %}{% endif %}">
- <div class="inner">
- {% if slide.header %}
- <header>{{ slide.header }}</header>
- {% endif %}
- {% if slide.content %}
- <section>{{ slide.content }}</section>
- {% endif %}
- </div>
- <div class="presenter_notes">
- <header><h1>Presenter Notes</h1></header>
- <section>
- {% if slide.presenter_notes %}
- {{ slide.presenter_notes }}
- {% endif %}
- </section>
- </div>
- <footer>
- {% if slide.source %}
- <aside class="source">
- Source: <a href="{{ slide.source.rel_path }}">{{ slide.source.rel_path }}</a>
- </aside>
- {% endif %}
- <aside class="page_number">
- {{ slide.number }}/{{ num_slides }}
- </aside>
- </footer>
- </div>
- </div>
- {% endfor %}
- </div>
- </div>
- {% if toc %}
- <div id="toc" class="sidebar hidden">
- <h2>Table of Contents</h2>
- <table>
- <caption>Table of Contents</caption>
- {% for section in toc %}
- <tr id="toc-row-{{ section.number }}">
- <th><a href="#slide{{ section.number }}">{{ section.title }}</a></th>
- <td><a href="#slide{{ section.number }}">{{ section.number }}</a></td>
- </tr>
- {% if section.sub %}
- {% for subsection in section.sub %}
- <tr id="toc-row-{{ subsection.number }}" class="sub">
- <th><a href="#slide{{ subsection.number }}">{{ subsection.title }}</a></th>
- <td><a href="#slide{{ subsection.number }}">{{ subsection.number }}</a></td>
- </tr>
- {% endfor %}
- {% endif %}
- {% endfor %}
- </table>
- </div>
- {% endif %}
- <div id="help" class="sidebar hidden">
- <h2>Help</h2>
- <table>
- <caption>Help</caption>
- <tr>
- <th>Table of Contents</th>
- <td>t</td>
- </tr>
- <tr>
- <th>Exposé</th>
- <td>ESC</td>
- </tr>
- <tr>
- <th>Full screen slides</th>
- <td>e</td>
- </tr>
- <tr>
- <th>Presenter View</th>
- <td>p</td>
- </tr>
- <tr>
- <th>Source Files</th>
- <td>s</td>
- </tr>
- <tr>
- <th>Slide Numbers</th>
- <td>n</td>
- </tr>
- <tr>
- <th>Toggle screen blanking</th>
- <td>b</td>
- </tr>
- <tr>
- <th>Show/hide slide context</th>
- <td>c</td>
- </tr>
- <tr>
- <th>Notes</th>
- <td>2</td>
- </tr>
- <tr>
- <th>Help</th>
- <td>h</td>
- </tr>
- </table>
- </div>
- <script>main()</script>
-</body>
-</html>
diff --git a/src/landslide/themes/leapmotion/css/print.css b/src/landslide/themes/leapmotion/css/print.css
deleted file mode 100644
index 4c34dc3..0000000
--- a/src/landslide/themes/leapmotion/css/print.css
+++ /dev/null
@@ -1,93 +0,0 @@
-* {
- margin: 0;
- padding: 0;
-}
-
-@page {
- size: landscape;
-}
-
-body {
- font: 100% "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- padding: 0;
- margin: 0;
-}
-
-div.slide {
- min-width: 800px;
- min-height: 600px;
- padding: 1em;
- overflow: hidden;
- page-break-after: always;
- border: 1px solid black;
- border-radius: 20px;
-}
-
-div.slide div.inner {
- width: 800px;
- height: 600px;
- margin: auto;
-}
-
-h1 {
- font-size: 2.4em;
-}
-
-h2 {
- font-size: 1.4em;
-}
-
-h3 {
- margin: 1em 0;
-}
-
-ul {
- margin: 0;
- padding: 0;
-}
-
-p, li, pre {
- margin: 1em 0;
-}
-
-li {
- margin-left: 2em;
-}
-
-a {
- color: #000000;
-}
-
-pre, code {
- max-width: 800px;
- background: #eee;
- font-family: Monaco, monospace;
- font-size: 90%;
-}
-
-pre {
- padding: .2em .5em;
- overflow: hidden;
- border-radius: .8em;
-}
-
-code {
- padding: 0 .2em;
-}
-
-.slide header:only-child h1 {
- line-height: 180%;
- text-align: center;
- display: table-cell;
- vertical-align: middle;
- height: 600px;
- width: 800px;
- font-size: 48px;
- margin-top:100px;
- margin-bottom:100px;
-}
-
-#toc, #help, .slide aside, .slide footer, .slide .notes,
-.presenter_notes, #current_presenter_notes, #presenter_note {
- display: none;
-}
diff --git a/src/landslide/themes/leapmotion/css/screen.css b/src/landslide/themes/leapmotion/css/screen.css
deleted file mode 100644
index 8b4024e..0000000
--- a/src/landslide/themes/leapmotion/css/screen.css
+++ /dev/null
@@ -1,563 +0,0 @@
-body {
- font: 14px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- background: #778;
- padding: 0;
- margin: 0;
- overflow: hidden;
-}
-
-div.presentation {
- position: absolute;
- width: 100%;
- display: table-cell;
- vertical-align: middle;
- height: 100%;
- background: inherit;
-}
-
-div.presentation > h1 {
- display: none;
-}
-
-div.slides, body.expose div.slides.nocontext {
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- position: absolute;
- display: block;
-}
-
-div.slides.nocontext {
- width: 900px;
- margin: 0 auto;
- overflow: hidden;
- position: relative;
- left: auto;
- top: auto;
-}
-
-div.slide {
- display: inline;
- position: absolute;
- overflow: hidden;
- width: 900px;
- height: 700px;
- margin-top: -350px;
- margin-left: -400px;
- left: 50%;
- top: 50%;
- background: -webkit-gradient(linear, left bottom, left top, from(#bbd), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #bbd, #fff);
- -webkit-transition: margin 0.25s ease-in-out;
- -moz-transition: margin 0.25s ease-in-out;
- -o-transition: margin 0.25s ease-in-out;
- border-top-left-radius: 20px;
- -moz-border-radius-topleft: 20px;
- -webkit-border-top-left-radius: 20px;
- border-top-right-radius: 20px;
- -moz-border-radius-topright: 20px;
- -webkit-border-top-right-radius: 20px;
- border-bottom-right-radius: 20px;
- -moz-border-radius-bottomright: 20px;
- -webkit-border-bottom-right-radius: 20px;
- border-bottom-left-radius: 20px;
- -moz-border-radius-bottomleft: 20px;
- -webkit-border-bottom-left-radius: 20px;
-}
-
-/* Expose */
-
-body.expose div.slides {
- float: left;
- position: relative;
- overflow: auto;
- margin-bottom: 10px;
-}
-
-body.expose div.slide {
- display: block;
- float: left;
- position: relative;
- left: auto !important;
- top: auto !important;
- margin: 10px !important;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- -moz-transform: scale(.33, .33);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.33, .33);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.33, .33);
- -o-transform-origin: 0 0;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- cursor: pointer;
-}
-
-body.expose div.slide:hover {
- background: -webkit-gradient(linear, left bottom, left top, from(#bdd), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #bdd, #fff);
-}
-
-body.expose .slide-wrapper {
- float: left;
- position: relative;
- margin: .5%;
- width: 300px;
- height: 233px;
-}
-
-body.expose .slide footer {
-}
-
-body.expose .slide .inner {
-}
-
-body.expose .slide.far-past,
-body.expose .slide.past,
-body.expose .slide.future,
-body.expose .slide.far-future {
- margin-left: 0;
-}
-
-body.expose .slide.current {
- background: -webkit-gradient(linear, left bottom, left top, from(#ddb), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #ddb, #fff);
- border: 16px solid #fff;
- -moz-transform: scale(.315, .315);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.315, .315);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.315, .315);
- -o-transform-origin: 0 0;
-}
-
-/* Presenter Mode */
-
-body.presenter_view div.slide {
- display: inline;
- position: absolute;
- overflow: hidden;
- -moz-transform: scale(.5, .5);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.5, .5);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.5, .5);
- -o-transform-origin: 0 0;
- margin-top: -300px;
-}
-
-body.presenter_view .slide.far-past {
- display: block;
- margin-left: -1500px;
-}
-
-body.presenter_view .slide.past {
- display: block;
- margin-left: -975px;
-}
-
-body.presenter_view .slide.current {
- display: block;
- margin-left: -475px;
- border: 8px solid maroon;
- z-index: 2;
-}
-
-body.presenter_view .slide.future {
- display: block;
- margin-left: 25px;
- z-index: 1;
-}
-
-body.presenter_view .slide.far-future {
- display: block;
- margin-left: 525px;
-}
-
-body.presenter_view div#current_presenter_notes {
- visibility: visible;
- display: block;
- position: absolute;
- overflow: auto;
- vertical-align: middle;
- left: 50%;
- top: 50%;
- margin-left: -475px;
- margin-top: 100px;
- z-index: 2;
- width: 950px;
- border-style: solid;
- height: 30%;
- background-color: silver;
-}
-
-body.presenter_view div#current_presenter_notes section {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- display: block;
- overflow: visible;
- position: relative;
- background-color: #fffeff;
- height: 120px;
- margin-right: 30px;
- margin-top: 60px;
- margin-left: 30px;
- padding-right: 10px;
- padding-left: 10px;
- padding-top: 10px;
-}
-
-body.presenter_view div#current_presenter_notes section p {
- margin: 0;
-}
-
-body.presenter_view div#current_presenter_notes h1 {
- font-size: 50%;
- display: block;
-}
-
-div#current_presenter_notes {
- display: none;
-}
-
-div.slide div.presenter_notes, div.slides div.presenter_notes {
- display: none;
-}
-
-/* Slide styles */
-
-div.slide p {
- font-size: 20px;
-}
-
-.slide.far-past {
- display: block;
- margin-left: -2400px;
-}
-
-.slide.past {
- display: block;
- margin-left: -1400px;
-}
-
-.slide.current {
- display: block;
- margin-left: -450px;
-}
-
-.slide.future {
- display: block;
- margin-left: 500px;
-}
-
-.slide.far-future {
- display: block;
- margin-left: 1500px;
-}
-
-body.three-d div.slides {
- -webkit-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -moz-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -o-transform: translateX(50px) scale(0.8) rotateY(10deg);
-}
-
-
-/* Content */
-
-header:not(:only-child) {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- font-weight: normal;
- font-size: 50px;
- letter-spacing: -.05em;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- position: absolute;
- left: 30px;
- top: 25px;
- margin: 0;
- padding: 0;
-}
-
-header h1, header h2, header h3, header h4, header h5, header h6 {
- display: inline;
- font-size: 100%;
- font-weight: normal;
- padding: 0;
- margin: 0;
-}
-
-header h2:first-child {
- margin-top: 0;
-}
-
-section, .slide header:only-child h1 {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: #3f3f3f;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin-left: 30px;
- margin-right: 30px;
- margin-top: 100px;
- display: block;
- overflow: hidden;
-}
-
-img { display: block; margin: auto; }
-
-section img.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-section img.align-right {
- display: block;
- margin-left: auto;
- margin-right: 0;
-}
-
-section img.align-left {
- display: block;
- margin-right: auto;
- margin-left: 0;
-}
-
-a {
- color: inherit;
- display: inline-block;
- text-decoration: none;
- line-height: 110%;
- border-bottom: 2px solid #3f3f3f;
-}
-
-pre, code, tt {
- font-family: Monaco, Consolas, 'Bitstream Vera Sans Mono', 'Lucida Console', FreeMono, Courier, monospace;
-}
-
-pre, .gist .gist-file .gist-data {
- font-size: 18px;
- max-height: 485px;
- padding-top: 0.25em !important;
- padding-right: 0.5em !important;
- padding-left: 0.5em !important;
- overflow: auto;
-}
-
-/* render a nice scrollbar in overflowed pre area's */
-::-webkit-scrollbar {
- height: 8px;
- width: 8px;
-}
-::-webkit-scrollbar-thumb {
- background: -webkit-gradient(linear, left bottom, left top, from(#777), to(#bbd));
- -webkit-border-radius: 1ex;
-}
-::-webkit-scrollbar-corner {
- background: #dedede;
-}
-
-blockquote {
- border-left: solid 8px #778;
- padding: .1ex 1ex;
- font-style: italic;
-}
-
-li {
- padding: 10px 0;
- font-size: 20px;
-}
-
-li pre { margin-left: 0em; }
-
-.slide header:only-child h1 {
- line-height: 180%;
- text-align: center;
- display: table-cell;
- vertical-align: middle;
- height: 700px;
- width: 900px;
- font-size: 50px;
- margin-top:100px;
- margin-bottom:100px;
-}
-
-.sidebar {
- clear: both;
- background: -webkit-gradient(linear, top right, bottom right, from(#dde), to(#fff));
- -webkit-transition: margin 0.25s ease-in-out;
- background-color: #eee;
- background: -moz-linear-gradient(right, #dde, #fff);
- border-right: 5px solid #ccd;
- z-index: 9999999;
- height: 100%;
- overflow: hidden;
- top: 0;
- position: absolute;
- display: block;
- margin: 0;
- margin-left: -400px;
- padding: 10px 16px;
- overflow: auto;
- -webkit-transition: margin 0.2s ease-in-out;
- -moz-transition: margin 0.2s ease-in-out;
- -o-transition: margin 0.2s ease-in-out;
-}
-
-.sidebar h2 {
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin: 0 0 16px;
- padding: 0;
-}
-
-.sidebar table {
- width: 100%;
- margin: 0;
- padding: 0;
- border-collapse: collapse;
-}
-
-.sidebar table caption {
- display: none;
-}
-
-.sidebar tr {
- margin: 2px 0;
- border-bottom: 1px solid #ccc;
-}
-
-.sidebar th {
- text-align: left;
- font-weight: normal;
- max-width: 300px;
- overflow: hidden;
-}
-
-.sidebar tr.sub th {
- text-indent: 20px;
-}
-
-.sidebar td {
- text-align: right;
- min-width: 20px;
-}
-
-.sidebar a {
- display: block;
- text-decoration: none;
- border-bottom: none;
- padding: 4px 0;
-}
-
-.sidebar tr.active {
- background: #ff0;
-}
-
-aside {
- display: none;
-}
- aside.source {
- position: absolute;
- bottom: 6px;
- left: 10px;
- text-indent: 10px;
- }
- aside.page_number {
- position: absolute;
- bottom: 6px;
- right: 10px;
- text-indent: 10px;
- }
-
-.notes {
- display: none;
- padding: 10px;
- background: #ccc;
- border-radius: 10px;
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
-}
- div.slide p.notes {
- font-size: 90%;
-}
-
-/* Pygments default theme */
-.hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
-.err { border: 1px solid #FF0000 } /* Error */
-.k { color: #008000; font-weight: bold } /* Keyword */
-.o { color: #666666 } /* Operator */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
-.gd { color: #A00000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #808080 } /* Generic.Output */
-.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.gt { color: #0040D0 } /* Generic.Traceback */
-.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #008000 } /* Keyword.Pseudo */
-.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #B00040 } /* Keyword.Type */
-.m { color: #666666 } /* Literal.Number */
-.s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
-.nb { color: #008000 } /* Name.Builtin */
-.nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.no { color: #880000 } /* Name.Constant */
-.nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
-.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.nt { color: #008000; font-weight: bold } /* Name.Tag */
-.nv { color: #19177C } /* Name.Variable */
-.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #666666 } /* Literal.Number.Float */
-.mh { color: #666666 } /* Literal.Number.Hex */
-.mi { color: #666666 } /* Literal.Number.Integer */
-.mo { color: #666666 } /* Literal.Number.Oct */
-.sb { color: #BA2121 } /* Literal.String.Backtick */
-.sc { color: #BA2121 } /* Literal.String.Char */
-.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
-.s1 { color: #BA2121 } /* Literal.String.Single */
-.ss { color: #19177C } /* Literal.String.Symbol */
-.bp { color: #008000 } /* Name.Builtin.Pseudo */
-.vc { color: #19177C } /* Name.Variable.Class */
-.vg { color: #19177C } /* Name.Variable.Global */
-.vi { color: #19177C } /* Name.Variable.Instance */
-.il { color: #666666 } /* Literal.Number.Integer.Long */
-.lineno { padding-right: 10px } /* A few space after linenos */
-
-#blank {
- position: absolute;
- top: 0;
- left: 0;
- background-color: black;
- width: 100%;
- height: 100%;
- z-index: 64;
- display: none;
-}
diff --git a/src/landslide/themes/leapmotion/js/slides.js b/src/landslide/themes/leapmotion/js/slides.js
deleted file mode 100644
index eff5103..0000000
--- a/src/landslide/themes/leapmotion/js/slides.js
+++ /dev/null
@@ -1,634 +0,0 @@
-
-
-
-function main() {
- // Since we don't have the fallback of attachEvent and
- // other IE only stuff we won't try to run JS for IE.
- // It will run though when using Google Chrome Frame
- if (document.all) { return; }
-
- var currentSlideNo;
- var notesOn = false;
- var expanded = false;
- var hiddenContext = false;
- var blanked = false;
- var slides = document.getElementsByClassName('slide');
- var touchStartX = 0;
- var spaces = /\s+/, a1 = [''];
- var tocOpened = false;
- var helpOpened = false;
- var overviewActive = false;
- var modifierKeyDown = false;
- var scale = 1;
- var showingPresenterView = false;
- var presenterViewWin = null;
- var isPresenterView = false;
-
- var leapEnable = function() {
- if(typeof Leap == 'undefined') {
- alert("ERROR: Leapmotion functionality will not be available. There is probably a new version of leap.js available - check http://js.leapmotion.com");
- };
- Leap.loop({enableGestures: true}, function(obj) {
- leapNavigate(obj)
- });
-
- var leapNavigate = function(frame) {
- if(!frame.valid) { return; }
- if(frame.gestures.length > 0) {
- gesture = frame.gestures[0];
- switch(gesture.state) {
- case "start":
- // right now we are only interested in horizontal swipes
- gstart = gesture.position[0];
- // i only want one gesture
- gid = gesture.id
- break;
- case "update":
- break;
- case "stop":
- gstop = gesture.position[0];
- switch(gesture.type) {
- case "swipe":
- if(gid != gesture.id) {
- // not the same swipe that we are tracking
- break;
- }
- if(gstart < gstop) {
- // we are going from left to right, advance
- nextSlide();
- } else if(gstart > gstop) {
- prevSlide();
- }
- break;
- case "circle":
- console.log("CIRCLE");
- break;
- case "screenTap":
- case "fingerTap":
- console.log("TAP");
- break;
- };
- };
- };
- }
-}
-
- var str2array = function(s) {
- if (typeof s == 'string' || s instanceof String) {
- if (s.indexOf(' ') < 0) {
- a1[0] = s;
- return a1;
- } else {
- return s.split(spaces);
- }
- }
- return s;
- };
-
- var trim = function(str) {
- return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
- };
-
- var addClass = function(node, classStr) {
- classStr = str2array(classStr);
- var cls = ' ' + node.className + ' ';
- for (var i = 0, len = classStr.length, c; i < len; ++i) {
- c = classStr[i];
- if (c && cls.indexOf(' ' + c + ' ') < 0) {
- cls += c + ' ';
- }
- }
- node.className = trim(cls);
- };
-
- var removeClass = function(node, classStr) {
- var cls;
- if (!node) {
- throw 'no node provided';
- }
- if (classStr !== undefined) {
- classStr = str2array(classStr);
- cls = ' ' + node.className + ' ';
- for (var i = 0, len = classStr.length; i < len; ++i) {
- cls = cls.replace(' ' + classStr[i] + ' ', ' ');
- }
- cls = trim(cls);
- } else {
- cls = '';
- }
- if (node.className != cls) {
- node.className = cls;
- }
- };
-
- var getSlideEl = function(slideNo) {
- if (slideNo > 0) {
- return slides[slideNo - 1];
- } else {
- return null;
- }
- };
-
- var getSlideTitle = function(slideNo) {
- var el = getSlideEl(slideNo);
- if (el) {
- var headers = el.getElementsByTagName('header');
- if (headers.length > 0) {
- return el.getElementsByTagName('header')[0].innerText;
- }
- }
- return null;
- };
-
- var getSlidePresenterNote = function(slideNo) {
- var el = getSlideEl(slideNo);
- if (el) {
- var n = el.getElementsByClassName('presenter_notes');
- if (n.length > 0) {
- return n[0];
- }
- }
- return null;
- };
-
- var changeSlideElClass = function(slideNo, className) {
- var el = getSlideEl(slideNo);
- if (el) {
- removeClass(el, 'far-past past current future far-future');
- addClass(el, className);
- }
- };
-
- var updateSlideClasses = function(updateOther) {
- window.location.hash = (isPresenterView ? "presenter" : "slide") + currentSlideNo;
-
- for (var i=1; i<currentSlideNo-1; i++) {
- changeSlideElClass(i, 'far-past');
- }
-
- changeSlideElClass(currentSlideNo - 1, 'past');
- changeSlideElClass(currentSlideNo, 'current');
- changeSlideElClass(currentSlideNo + 1, 'future');
-
- for (i=currentSlideNo+2; i<slides.length+1; i++) {
- changeSlideElClass(i, 'far-future');
- }
-
- highlightCurrentTocLink();
-
- processContext();
-
- document.getElementsByTagName('title')[0].innerText = getSlideTitle(currentSlideNo);
-
- updatePresenterNotes();
-
- if (updateOther) { updateOtherPage(); }
- };
-
- var updatePresenterNotes = function() {
- if (!isPresenterView) { return; }
-
- var existingNote = document.getElementById('current_presenter_notes');
- var currentNote = getSlidePresenterNote(currentSlideNo).cloneNode(true);
- currentNote.setAttribute('id', 'presenter_note');
-
- existingNote.replaceChild(currentNote, document.getElementById('presenter_note'));
- };
-
- var highlightCurrentTocLink = function() {
- var toc = document.getElementById('toc');
-
- if (toc) {
- var tocRows = toc.getElementsByTagName('tr');
- for (var i=0; i<tocRows.length; i++) {
- removeClass(tocRows.item(i), 'active');
- }
-
- var currentTocRow = document.getElementById('toc-row-' + currentSlideNo);
- if (currentTocRow) {
- addClass(currentTocRow, 'active');
- }
- }
- };
-
- var updateOtherPage = function() {
- if (!showingPresenterView) { return; }
-
- var w = isPresenterView ? window.opener : presenterViewWin;
- w.postMessage('slide#' + currentSlideNo, '*');
- };
-
- var nextSlide = function() {
- if (currentSlideNo < slides.length) {
- currentSlideNo++;
- }
- updateSlideClasses(true);
- };
-
- var prevSlide = function() {
- if (currentSlideNo > 1) {
- currentSlideNo--;
- }
- updateSlideClasses(true);
- };
-
- var showNotes = function() {
- var notes = getSlideEl(currentSlideNo).getElementsByClassName('notes');
- for (var i = 0, len = notes.length; i < len; i++) {
- notes.item(i).style.display = (notesOn) ? 'none':'block';
- }
- notesOn = !notesOn;
- };
-
- var showSlideNumbers = function() {
- var asides = document.getElementsByClassName('page_number');
- var hidden = asides[0].style.display != 'block';
- for (var i = 0; i < asides.length; i++) {
- asides.item(i).style.display = hidden ? 'block' : 'none';
- }
- };
-
- var showSlideSources = function() {
- var asides = document.getElementsByClassName('source');
- var hidden = asides[0].style.display != 'block';
- for (var i = 0; i < asides.length; i++) {
- asides.item(i).style.display = hidden ? 'block' : 'none';
- }
- };
-
- var showToc = function() {
- if (helpOpened) {
- showHelp();
- }
- var toc = document.getElementById('toc');
- if (toc) {
- toc.style.marginLeft = tocOpened ? '-' + (toc.clientWidth + 20) + 'px' : '0px';
- tocOpened = !tocOpened;
- }
- updateOverview();
- };
-
- var showHelp = function() {
- if (tocOpened) {
- showToc();
- }
-
- var help = document.getElementById('help');
-
- if (help) {
- help.style.marginLeft = helpOpened ? '-' + (help.clientWidth + 20) + 'px' : '0px';
- helpOpened = !helpOpened;
- }
- };
-
- var showPresenterView = function() {
- if (isPresenterView) { return; }
-
- if (showingPresenterView) {
- presenterViewWin.close();
- presenterViewWin = null;
- showingPresenterView = false;
- } else {
- presenterViewWin = open(window.location.pathname + "#presenter" + currentSlideNo, 'presenter_notes',
- 'directories=no,location=no,toolbar=no,menubar=no,copyhistory=no');
- showingPresenterView = true;
- }
- };
-
- var switch3D = function() {
- if (document.body.className.indexOf('three-d') == -1) {
- document.getElementsByClassName('presentation')[0].style.webkitPerspective = '1000px';
- document.body.className += ' three-d';
- } else {
- window.setTimeout('document.getElementsByClassName(\'presentation\')[0].style.webkitPerspective = \'0\';', 2000);
- document.body.className = document.body.className.replace(/three-d/, '');
- }
- };
-
- var toggleOverview = function() {
- if (!overviewActive) {
- addClass(document.body, 'expose');
- overviewActive = true;
- setScale(1);
- } else {
- removeClass(document.body, 'expose');
- overviewActive = false;
- if (expanded) {
- setScale(scale); // restore scale
- }
- }
- processContext();
- updateOverview();
- };
-
- var updateOverview = function() {
- try {
- var presentation = document.getElementsByClassName('presentation')[0];
- } catch (e) {
- return;
- }
-
- if (isPresenterView) {
- var action = overviewActive ? removeClass : addClass;
- action(document.body, 'presenter_view');
- }
-
- var toc = document.getElementById('toc');
-
- if (!toc) {
- return;
- }
-
- if (!tocOpened || !overviewActive) {
- presentation.style.marginLeft = '0px';
- presentation.style.width = '100%';
- } else {
- presentation.style.marginLeft = toc.clientWidth + 'px';
- presentation.style.width = (presentation.clientWidth - toc.clientWidth) + 'px';
- }
- };
-
- var computeScale = function() {
- var cSlide = document.getElementsByClassName('current')[0];
- var sx = cSlide.clientWidth / window.innerWidth;
- var sy = cSlide.clientHeight / window.innerHeight;
- return 1 / Math.max(sx, sy);
- };
-
- var setScale = function(scale) {
- var presentation = document.getElementsByClassName('slides')[0];
- var transform = 'scale(' + scale + ')';
- presentation.style.MozTransform = transform;
- presentation.style.WebkitTransform = transform;
- presentation.style.OTransform = transform;
- presentation.style.msTransform = transform;
- presentation.style.transform = transform;
- };
-
- var expandSlides = function() {
- if (overviewActive) {
- return;
- }
- if (expanded) {
- setScale(1);
- expanded = false;
- } else {
- scale = computeScale();
- setScale(scale);
- expanded = true;
- }
- };
-
- var showContext = function() {
- try {
- var presentation = document.getElementsByClassName('slides')[0];
- removeClass(presentation, 'nocontext');
- } catch (e) {}
- };
-
- var hideContext = function() {
- try {
- var presentation = document.getElementsByClassName('slides')[0];
- addClass(presentation, 'nocontext');
- } catch (e) {}
- };
-
- var processContext = function() {
- if (hiddenContext) {
- hideContext();
- } else {
- showContext();
- }
- };
-
- var toggleContext = function() {
- hiddenContext = !hiddenContext;
- processContext();
- };
-
- var toggleBlank = function() {
- blank_elem = document.getElementById('blank');
-
- blank_elem.style.display = blanked ? 'none' : 'block';
-
- blanked = !blanked;
- };
-
- var isModifierKey = function(keyCode) {
- switch (keyCode) {
- case 16: // shift
- case 17: // ctrl
- case 18: // alt
- case 91: // command
- return true;
- break;
- default:
- return false;
- break;
- }
- };
-
- var checkModifierKeyUp = function(event) {
- if (isModifierKey(event.keyCode)) {
- modifierKeyDown = false;
- }
- };
-
- var checkModifierKeyDown = function(event) {
- if (isModifierKey(event.keyCode)) {
- modifierKeyDown = true;
- }
- };
-
- var handleBodyKeyDown = function(event) {
- switch (event.keyCode) {
- case 13: // Enter
- if (overviewActive) {
- toggleOverview();
- }
- break;
- case 27: // ESC
- toggleOverview();
- break;
- case 37: // left arrow
- case 33: // page up
- event.preventDefault();
- prevSlide();
- break;
- case 39: // right arrow
- case 32: // space
- case 34: // page down
- event.preventDefault();
- nextSlide();
- break;
- case 50: // 2
- if (!modifierKeyDown) {
- showNotes();
- }
- break;
- case 51: // 3
- if (!modifierKeyDown && !overviewActive) {
- switch3D();
- }
- break;
- case 190: // .
- case 48: // 0
- case 66: // b
- if (!modifierKeyDown && !overviewActive) {
- toggleBlank();
- }
- break;
- case 67: // c
- if (!modifierKeyDown && !overviewActive) {
- toggleContext();
- }
- break;
- case 69: // e
- if (!modifierKeyDown && !overviewActive) {
- expandSlides();
- }
- break;
- case 72: // h
- showHelp();
- break;
- case 78: // n
- if (!modifierKeyDown && !overviewActive) {
- showSlideNumbers();
- }
- break;
- case 80: // p
- if (!modifierKeyDown && !overviewActive) {
- showPresenterView();
- }
- break;
- case 83: // s
- if (!modifierKeyDown && !overviewActive) {
- showSlideSources();
- }
- break;
- case 84: // t
- showToc();
- break;
- }
- };
-
- var handleWheel = function(event) {
- if (tocOpened || helpOpened || overviewActive) {
- return;
- }
-
- var delta = 0;
-
- if (!event) {
- event = window.event;
- }
-
- if (event.wheelDelta) {
- delta = event.wheelDelta/120;
- if (window.opera) delta = -delta;
- } else if (event.detail) {
- delta = -event.detail/3;
- }
-
- if (delta && delta <0) {
- nextSlide();
- } else if (delta) {
- prevSlide();
- }
- };
-
- var addSlideClickListeners = function() {
- for (var i=0; i < slides.length; i++) {
- var slide = slides.item(i);
- slide.num = i + 1;
- slide.addEventListener('click', function(e) {
- if (overviewActive) {
- currentSlideNo = this.num;
- toggleOverview();
- updateSlideClasses(true);
- e.preventDefault();
- }
- return false;
- }, true);
- }
- };
-
- var addRemoteWindowControls = function() {
- window.addEventListener("message", function(e) {
- if (e.data.indexOf("slide#") != -1) {
- currentSlideNo = Number(e.data.replace('slide#', ''));
- updateSlideClasses(false);
- }
- }, false);
- };
-
- var addTouchListeners = function() {
- document.addEventListener('touchstart', function(e) {
- touchStartX = e.touches[0].pageX;
- }, false);
- document.addEventListener('touchend', function(e) {
- var pixelsMoved = touchStartX - e.changedTouches[0].pageX;
- var SWIPE_SIZE = 150;
- if (pixelsMoved > SWIPE_SIZE) {
- nextSlide();
- }
- else if (pixelsMoved < -SWIPE_SIZE) {
- prevSlide();
- }
- }, false);
- };
-
- var addTocLinksListeners = function() {
- var toc = document.getElementById('toc');
- if (toc) {
- var tocLinks = toc.getElementsByTagName('a');
- for (var i=0; i < tocLinks.length; i++) {
- tocLinks.item(i).addEventListener('click', function(e) {
- currentSlideNo = Number(this.attributes['href'].value.replace('#slide', ''));
- updateSlideClasses(true);
- e.preventDefault();
- }, true);
- }
- }
- };
-
- // initialize
-
- (function() {
- if (window.location.hash == "") {
- currentSlideNo = 1;
- } else if (window.location.hash.indexOf("#presenter") != -1) {
- currentSlideNo = Number(window.location.hash.replace('#presenter', ''));
- isPresenterView = true;
- showingPresenterView = true;
- presenterViewWin = window;
- addClass(document.body, 'presenter_view');
- } else {
- currentSlideNo = Number(window.location.hash.replace('#slide', ''));
- }
-
- document.addEventListener('keyup', checkModifierKeyUp, false);
- document.addEventListener('keydown', handleBodyKeyDown, false);
- document.addEventListener('keydown', checkModifierKeyDown, false);
- document.addEventListener('DOMMouseScroll', handleWheel, false);
-
- window.onmousewheel = document.onmousewheel = handleWheel;
- window.onresize = expandSlides;
-
- for (var i = 0, el; el = slides[i]; i++) {
- addClass(el, 'slide far-future');
- }
- updateSlideClasses(false);
-
- // add support for finger events (filter it by property detection?)
- addTouchListeners();
-
- addTocLinksListeners();
-
- addSlideClickListeners();
-
- addRemoteWindowControls();
-
- })();
- leapEnable();
-}
diff --git a/src/landslide/themes/light/css/screen.css b/src/landslide/themes/light/css/screen.css
deleted file mode 100644
index adbd5f6..0000000
--- a/src/landslide/themes/light/css/screen.css
+++ /dev/null
@@ -1,564 +0,0 @@
-body {
- font: 14px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- background: #fff;
- padding: 0;
- margin: 0;
- overflow: hidden;
-}
-
-div.presentation {
- position: absolute;
- width: 100%;
- display: table-cell;
- vertical-align: middle;
- height: 100%;
- background: inherit;
-}
-
-div.slides, body.expose div.slides.nocontext {
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- position: absolute;
- display: block;
- background-color: #fff;
-}
-
-
-div.slides.nocontext {
- width: 900px;
- margin: 0 auto;
- overflow: hidden;
- position: relative;
- left: auto;
- top: auto;
-}
-
-div.slide {
- display: none;
- position: absolute;
- overflow: hidden;
- width: 900px;
- height: 700px;
- left: 50%;
- top: 50%;
- margin-top: -350px;
- background: -webkit-gradient(linear, left bottom, left top, from(#fff), to(#eeeeec));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #fff, #eeeeec);
- -webkit-transition: margin 0.25s ease-in-out;
- -moz-transition: margin 0.25s ease-in-out;
- -o-transition: margin 0.25s ease-in-out;
- border-top-right-radius: 20px;
- -moz-border-radius-topright: 20px;
- -webkit-border-top-right-radius: 20px;
- border-bottom-left-radius: 0px;
- -moz-border-radius-bottomleft: 0px;
- -webkit-border-bottom-left-radius: 0px;
- border-top-left-radius: 20px;
- -moz-border-radius-topleft: 20px;
- -webkit-border-top-left-radius: 20px;
- border-bottom-right-radius: 0px;
- -moz-border-radius-bottomright: 0px;
- -webkit-border-bottom-right-radius: 0px;
-
-}
-
-div.slide p {
- font-size: 20px;
-}
-
-.slide.far-past {
- display: block;
- margin-left: -2400px;
-}
-
-.slide.past {
- display: block;
- margin-left: -1400px;
-}
-
-.slide.current {
- display: block;
- margin-left: -450px;
-}
-
-.slide.future {
- display: block;
- margin-left: 500px;
-}
-
-.slide.far-future {
- display: block;
- margin-left: 1500px;
-}
-
-body.three-d div.slides {
- -webkit-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -moz-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -o-transform: translateX(50px) scale(0.8) rotateY(10deg);
-}
-
-
-/* Content */
-
-header:not(:only-child) {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- font-weight: normal;
- font-size: 50px;
- letter-spacing: -.05em;
- color: white;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- position: absolute;
- left: 30px;
- top: 25px;
- margin: 0;
- padding: 0;
-}
-
-header h1, header h2, header h3, header h4, header h5, header h6 {
- display: inline;
- font-size: 100%;
- font-weight: normal;
- padding: 0;
- margin: 0;
-}
-
-header h2:first-child {
- margin-top: 0;
-}
-
-section, .slide header:only-child h1 {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: #3f3f3f;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin-left: 30px;
- margin-right: 30px;
- margin-top: 100px;
- display: block;
- overflow: hidden;
-}
-
-section img.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-section img.align-right {
- display: block;
- margin-left: auto;
- margin-right: 0;
-}
-
-section img.align-left {
- display: block;
- margin-right: auto;
- margin-left: 0;
-}
-
-a {
- color: inherit;
- display: inline-block;
- text-decoration: none;
- line-height: 110%;
- border-bottom: 2px solid #3f3f3f;
-}
-
-pre, code, tt {
- font-family: Monaco, Consolas, 'Bitstream Vera Sans Mono', 'Lucida Console', FreeMono, Courier, monospace;
-}
-
-pre, .gist .gist-file .gist-data {
- font-size: 18px;
- max-height: 485px;
- padding-top: 0.25em !important;
- padding-right: 0.5em !important;
- padding-left: 0.5em !important;
- overflow: auto;
-}
-
-/* render a nice scrollbar in overflowed pre area's */
-::-webkit-scrollbar {
- height: 8px;
- width: 8px;
-}
-::-webkit-scrollbar-thumb {
- background: -webkit-gradient(linear, left bottom, left top, from(#777), to(#bbd));
- -webkit-border-radius: 1ex;
-}
-::-webkit-scrollbar-corner {
- background: #dedede;
-}
-
-blockquote {
- border-left: solid 8px #FFF;
- padding: .1ex 1ex;
- font-style: italic;
- font-size: 20px;
-}
-
-li {
- padding: 10px 0;
- font-size: 20px;
-}
-
-li pre { margin-left: 0em; }
-
-.slide header:only-child h1 {
- line-height: 180%;
- text-align: center;
- display: table-cell;
- vertical-align: middle;
- height: 700px;
- width: 900px;
- font-size: 50px;
- margin-top:100px;
- margin-bottom:100px;
-}
-
-.sidebar {
- background: -webkit-gradient(linear, top right, bottom right, from(#dde), to(#fff));
- -webkit-transition: margin 0.25s ease-in-out;
- background-color: #eee;
- background: -moz-linear-gradient(right, #dde, #fff);
- border-right: 5px solid #ccd;
- z-index: 9999999;
- height: 100%;
- overflow: hidden;
- top: 0;
- position: absolute;
- display: block;
- margin: 0;
- margin-left: -400px;
- padding: 10px 16px;
- overflow: auto;
- -webkit-transition: margin 0.2s ease-in-out;
- -moz-transition: margin 0.2s ease-in-out;
- -o-transition: margin 0.2s ease-in-out;
-}
-
-.sidebar h2 {
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin: 0 0 16px;
- padding: 0;
-}
-
-.sidebar table {
- width: 100%;
- margin: 0;
- padding: 0;
- border-collapse: collapse;
-}
-
-.sidebar table caption {
- display: none;
-}
-
-.sidebar tr {
- margin: 2px 0;
- border-bottom: 1px solid #ccc;
-}
-
-.sidebar th {
- text-align: left;
- font-weight: normal;
- max-width: 300px;
- overflow: hidden;
-}
-
-.sidebar tr.sub th {
- text-indent: 20px;
-}
-
-.sidebar td {
- text-align: right;
- min-width: 20px;
-}
-
-.sidebar a {
- display: block;
- text-decoration: none;
- border-bottom: none;
- padding: 4px 0;
-}
-
-.sidebar tr.active {
- background: #ff0;
-}
-
-aside {
- display: none;
-}
- aside.source {
- position: absolute;
- bottom: 6px;
- left: 10px;
- text-indent: 10px;
- }
- aside.page_number {
- position: absolute;
- bottom: 6px;
- right: 10px;
- text-indent: 10px;
- }
-
-.notes {
- display: none;
- padding: 10px;
- background: #ccc;
- border-radius: 10px;
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
-}
- div.slide p.notes {
- font-size: 90%;
-}
-
-img { display: block; margin: auto; }
-
-/* Expose */
-
-body.expose div.slides {
- float: left;
- position: relative;
- overflow: auto;
- margin-bottom: 10px;
-}
-
-body.expose div.slide {
- display: block;
- float: left;
- position: relative;
- left: auto !important;
- top: auto !important;
- margin: 10px !important;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- -moz-transform: scale(.33, .33);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.33, .33);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.33, .33);
- -o-transform-origin: 0 0;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- cursor: pointer;
-}
-
-body.expose div.slide:hover {
- background: -webkit-gradient(linear, left bottom, left top, from(#bdd), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #bdd, #fff);
-}
-
-body.expose .slide-wrapper {
- float: left;
- position: relative;
- margin: .5%;
- width: 300px;
- height: 233px;
-}
-
-body.expose .slide footer {
-}
-
-body.expose .slide .inner {
-}
-
-body.expose .slide.far-past,
-body.expose .slide.past,
-body.expose .slide.future,
-body.expose .slide.far-future {
- margin-left: 0;
-}
-
-body.expose .slide.current {
- background: -webkit-gradient(linear, left bottom, left top, from(#ddb), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #ddb, #fff);
- border: 16px solid #fff;
- -moz-transform: scale(.315, .315);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.315, .315);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.315, .315);
- -o-transform-origin: 0 0;
-}
-
-/* Pygments default theme */
-.hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
-.err { border: 1px solid #FF0000 } /* Error */
-.k { color: #008000; font-weight: bold } /* Keyword */
-.o { color: #666666 } /* Operator */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
-.gd { color: #A00000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #808080 } /* Generic.Output */
-.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.gt { color: #0040D0 } /* Generic.Traceback */
-.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #008000 } /* Keyword.Pseudo */
-.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #B00040 } /* Keyword.Type */
-.m { color: #666666 } /* Literal.Number */
-.s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
-.nb { color: #008000 } /* Name.Builtin */
-.nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.no { color: #880000 } /* Name.Constant */
-.nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
-.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.nt { color: #008000; font-weight: bold } /* Name.Tag */
-.nv { color: #19177C } /* Name.Variable */
-.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #666666 } /* Literal.Number.Float */
-.mh { color: #666666 } /* Literal.Number.Hex */
-.mi { color: #666666 } /* Literal.Number.Integer */
-.mo { color: #666666 } /* Literal.Number.Oct */
-.sb { color: #BA2121 } /* Literal.String.Backtick */
-.sc { color: #BA2121 } /* Literal.String.Char */
-.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
-.s1 { color: #BA2121 } /* Literal.String.Single */
-.ss { color: #19177C } /* Literal.String.Symbol */
-.bp { color: #008000 } /* Name.Builtin.Pseudo */
-.vc { color: #19177C } /* Name.Variable.Class */
-.vg { color: #19177C } /* Name.Variable.Global */
-.vi { color: #19177C } /* Name.Variable.Instance */
-.il { color: #666666 } /* Literal.Number.Integer.Long */
-.lineno { padding-right: 10px } /* A few space after linenos */
-
-/* Presenter Mode */
-
-body.presenter_view div.slide {
- display: inline;
- position: absolute;
- overflow: hidden;
- -moz-transform: scale(.5, .5);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.5, .5);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.5, .5);
- -o-transform-origin: 0 0;
- margin-top: -300px;
-}
-
-body.presenter_view .slide.far-past {
- display: block;
- margin-left: -1500px;
-}
-
-body.presenter_view .slide.past {
- display: block;
- margin-left: -975px;
-}
-
-body.presenter_view .slide.current {
- display: block;
- margin-left: -475px;
- border: 8px solid maroon;
- z-index: 2;
-}
-
-body.presenter_view .slide.future {
- display: block;
- margin-left: 25px;
- z-index: 1;
-}
-
-body.presenter_view .slide.far-future {
- display: block;
- margin-left: 525px;
-}
-
-body.presenter_view div#current_presenter_notes {
- visibility: visible;
- display: block;
- position: absolute;
- overflow: auto;
- vertical-align: middle;
- left: 50%;
- top: 50%;
- margin-left: -475px;
- margin-top: 100px;
- z-index: 2;
- width: 950px;
- border-style: solid;
- height: 30%;
- background-color: silver;
-}
-
-body.presenter_view div#current_presenter_notes section {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- display: block;
- overflow: visible;
- position: relative;
- background-color: #fffeff;
- height: 120px;
- margin-right: 30px;
- margin-top: 60px;
- margin-left: 30px;
- padding-right: 10px;
- padding-left: 10px;
- padding-top: 10px;
-}
-
-body.presenter_view div#current_presenter_notes section p {
- margin: 0;
-}
-
-body.presenter_view div#current_presenter_notes h1 {
- font-size: 50%;
- display: block;
-}
-
-div#current_presenter_notes {
- display: none;
-}
-
-div.slide div.presenter_notes {
- display: none;
-}
-
-#blank {
- position: absolute;
- top: 0;
- left: 0;
- background-color: black;
- width: 100%;
- height: 100%;
- z-index: 64;
- display: none;
-}
-
-.image-reference {
- display: inline;
-}
diff --git a/src/landslide/themes/ribbon/base.html b/src/landslide/themes/ribbon/base.html
deleted file mode 100644
index 9e965dc..0000000
--- a/src/landslide/themes/ribbon/base.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
- <title>{{ head_title }}</title>
- <link href='http://fonts.googleapis.com/css?family=PT+Sans|PT+Sans+Narrow|PT+Mono' rel='stylesheet' type='text/css'>
- <!-- Styles -->
- {% if embed %}
- <style type="text/css" media="print">
- {{ css.print.contents }}
- </style>
- <style type="text/css" media="screen, projection">
- {{ css.screen.contents }}
- </style>
- {% else %}
- <link rel="stylesheet" media="print" href="{{ css.print.path_url }}">
- <link rel="stylesheet" media="screen, projection" href="{{ css.screen.path_url }}">
- {% endif %}
- {% for css in user_css %}
- {% if embed %}
- <style type="text/css" media="screen, projection">
- {{ css.contents }}
- </style>
- {% else %}
- <link rel="stylesheet" href="{{ css.path_url }}">
- {% endif %}
- {% endfor %}
- <!-- /Styles -->
-</head>
-<body class="list">
- {% for slide in slides %}
- <!-- slide source: {% if slide.source %}{{ slide.source.rel_path }}{% endif %} -->
- <section class="slide{% if slide.classes %}{% for class in slide.classes %} {{ class }}{% endfor %}{% endif %}">
- <div>
- {% if slide.header %}
- <header>{{ slide.header }}</header>
- {% endif %}
- {% if slide.content %}
- <section class="slide-content">{{ slide.content }}</section>
- {% endif %}
- <div class="presenter_notes">
- <section>
- {% if slide.presenter_notes %}
- {{ slide.presenter_notes }}
- {% endif %}
- </section>
- </div>
- </div>
- </section>
- {% endfor %}
- <!--
- To hide progress bar from entire presentation
- just remove “progress” element.
- -->
- <div class="progress"><div></div></div>
- <!-- Javascripts -->
- {% if embed %}
- <script>
- {{ js.contents }}
- </script>
- {% else %}
- <script type="text/javascript" src="{{ js.path_url }}"></script>
- {% endif %}
- {% for js in user_js %}
- {% if embed %}
- <script>
- {{ js.contents }}
- </script>
- {% else %}
- <script type="text/javascript" src="{{ js.path_url }}"></script>
- {% endif %}
- {% endfor %}
- <!-- /Javascripts -->
-
- <!-- Copyright © 2010–2012 Vadim Makeev — pepelsbey.net -->
-</body>
-</html>
diff --git a/src/landslide/themes/ribbon/css/defaults.scss b/src/landslide/themes/ribbon/css/defaults.scss
deleted file mode 100644
index eb6d47d..0000000
--- a/src/landslide/themes/ribbon/css/defaults.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-// Ribbon theme for Shower HTML presentation template: github.com/pepelsbey/shower
-// Copyright © 2010–2012 Vadim Makeev, pepelsbey.net
-// Licensed under MIT license: github.com/pepelsbey/shower/wiki/License-En
-
-// Layout
-$width:1024px; // Slide width, permanent in most cases
-$height:768px; // Slide height, 640px for 16/10, 768px for 4/3
-$top:10px; // Top padding above slide content
-$sides:120px; // Left and right paddings around slide content
-$break:1324px; // Window width for small thumbnails to appear
-$grid:'';
-
-// Mixins
-@mixin tab-size($n) {
- -moz-tab-size:$n;
- -o-tab-size:$n;
- tab-size:$n;
- }
-@mixin transform($n) {
- -webkit-transform:$n;
- -moz-transform:$n;
- -ms-transform:$n;
- -o-transform:$n;
- transform:$n;
- }
-@mixin transform-origin($n) {
- -webkit-transform-origin:$n;
- -moz-transform-origin:$n;
- -ms-transform-origin:$n;
- -o-transform-origin:$n;
- transform-origin:$n;
- }
-@mixin transition($n) {
- -webkit-transition:$n;
- -moz-transition:$n;
- -o-transition:$n;
- transition:$n;
- }
diff --git a/src/landslide/themes/ribbon/css/print.css b/src/landslide/themes/ribbon/css/print.css
deleted file mode 100644
index f6f4dba..0000000
--- a/src/landslide/themes/ribbon/css/print.css
+++ /dev/null
@@ -1 +0,0 @@
-@page{margin:0;size:1024px 640px}.list{padding:0;background:none}.list *{-webkit-print-color-adjust:exact}.list .caption{display:none}.list .slide{float:none;margin:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}.list .slide:before{display:none}.list .slide:after{position:absolute;left:120px;bottom:80px;color:#CCC;text-shadow:none;line-height:18px;font-weight:normal;font-size:25px}.list .slide.cover,.list .slide.shout{z-index:1}.list .slide.cover:after,.list .slide.shout:after{content:''}.list .slide.cover{background:#000}
diff --git a/src/landslide/themes/ribbon/css/print.scss b/src/landslide/themes/ribbon/css/print.scss
deleted file mode 100644
index 1f1a4a9..0000000
--- a/src/landslide/themes/ribbon/css/print.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-// Ribbon theme for Shower HTML presentation template: github.com/pepelsbey/shower
-// Copyright © 2010–2012 Vadim Makeev, pepelsbey.net
-// Licensed under MIT license: github.com/pepelsbey/shower/wiki/License-En
-
-@import 'defaults.scss';
-
-@page {
- margin:0;
- size:$width $height;
- }
-
-// List
-// -------------------------------
-.list {
- padding:0;
- background:none;
- // Magic
- * {
- -webkit-print-color-adjust:exact;
- }
- // Caption
- .caption {
- display:none;
- }
- // Slide
- .slide {
- float:none;
- margin:0;
- -webkit-transform:none;
- -moz-transform:none;
- -ms-transform:none;
- -o-transform:none;
- transform:none;
- &:before {
- display:none;
- }
- &:after {
- position:absolute;
- left:120px;
- bottom:80px;
- color:#CCC;
- text-shadow:none;
- line-height:18px;
- font-weight:normal;
- font-size:25px;
- }
- // Cover Shout
- &.cover,
- &.shout {
- z-index:1;
- &:after {
- content:'';
- }
- }
- &.cover {
- background:#000;
- }
- }
- } \ No newline at end of file
diff --git a/src/landslide/themes/ribbon/css/reset.scss b/src/landslide/themes/ribbon/css/reset.scss
deleted file mode 100644
index c4829e6..0000000
--- a/src/landslide/themes/ribbon/css/reset.scss
+++ /dev/null
@@ -1,42 +0,0 @@
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
- margin:0;
- padding:0;
- border:0;
- font-size:100%;
- font:inherit;
- vertical-align:baseline;
- }
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
- display:block;
- }
-body {
- line-height:1;
- }
-ol, ul {
- list-style:none;
- }
-blockquote, q {
- quotes:none;
- }
-blockquote:before, blockquote:after,
-q:before, q:after {
- content:'';
- content:none;
- }
-table {
- border-collapse:collapse;
- border-spacing:0;
- } \ No newline at end of file
diff --git a/src/landslide/themes/ribbon/css/screen.css b/src/landslide/themes/ribbon/css/screen.css
deleted file mode 100644
index f37981c..0000000
--- a/src/landslide/themes/ribbon/css/screen.css
+++ /dev/null
@@ -1,672 +0,0 @@
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline; }
-
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
- display: block; }
-
-body {
- line-height: 1; }
-
-ol, ul {
- list-style: none; }
-
-blockquote, q {
- quotes: none; }
-
-blockquote:before, blockquote:after,
-q:before, q:after {
- content: '';
- content: none; }
-
-table {
- border-collapse: collapse;
- border-spacing: 0; }
-
-body {
- counter-reset: paging;
- font: 25px/2 "PT Sans", sans-serif; }
-
-.slide {
- width: 1024px;
- height: 768px;
- background: white url(../images/ribbon.svg) 865px 0 no-repeat;
- color: #000; }
- .slide:after {
- position: absolute;
- counter-increment: paging;
- content: counter(paging, decimal-leading-zero);
- line-height: 1; }
- .debug .slide {
- background: url(../images/ribbon.svg) 865px 0 no-repeat, url(../images/grid-4x3.png) no-repeat, white; }
- .slide > div {
- position: absolute;
- top: 0;
- left: 0;
- overflow: hidden;
- padding: 10px 120px 0;
- width: 784px;
- height: 758px; }
-
-.slide h1 {
- margin: 0 0 27px;
- color: #666;
- font: bold 60px/60px "PT Sans Narrow", sans-serif; }
-.slide h2 {
- margin: 0 0 17px;
- color: #666;
- font: bold 50px/50px "PT Sans Narrow", sans-serif; }
-.slide p {
- margin: 0 0 50px; }
-.slide p.note {
- color: #999; }
-.slide a {
- border-bottom: 0.1em solid;
- color: #0174A7;
- text-decoration: none; }
-.slide b, .slide strong {
- font-weight: bold; }
-.slide i, .slide em {
- font-style: italic; }
-.slide kbd, .slide code, .slide samp {
- padding: 3px 8px;
- border-radius: 8px;
- background: #FAFAA2;
- color: #000;
- -moz-tab-size: 4;
- -o-tab-size: 4;
- tab-size: 4;
- line-height: 1;
- font-family: 'PT Mono', monospace; }
-.slide blockquote {
- font-style: italic; }
- .slide blockquote:before {
- position: absolute;
- margin: -16px 0 0 -80px;
- color: #CCC;
- font: 200px/1 "PT Sans", sans-serif;
- content: '\201C'; }
- .slide blockquote + figcaption {
- margin: -50px 0 40px;
- font-style: italic;
- font-weight: bold; }
-.slide ol, .slide ul {
- margin: 0 0 50px;
- counter-reset: list; }
- .slide ol li, .slide ul li {
- text-indent: -2em; }
- .slide ol li:before, .slide ul li:before {
- display: inline-block;
- width: 2em;
- color: #BBB;
- text-align: right; }
- .slide ol ol,
- .slide ol ul, .slide ul ol,
- .slide ul ul {
- margin: 0 0 0 39px; }
-.slide ul > li:before {
- content: '\2022\00A0\00A0'; }
-.slide ul > li:lang(ru):before {
- content: '\2014\00A0\00A0'; }
-.slide ol > li:before {
- counter-increment: list;
- content: counter(list) ".\00A0"; }
-.slide pre {
- white-space: normal;
- display: block;
- padding: 0;
- background: none;
- white-space: pre;
- line-height: 22px;
- font-size: 16px;
- font-family: 'PT Mono', monospace; }
- .slide pre:before {
- position: absolute;
- margin: 0 0 0 -110px;
- width: 100px;
- color: #BBB;
- text-align: right; }
- .slide pre mark {
- margin: 0 -8px;
- padding: 3px 8px;
- border-radius: 8px;
- background: rgba(236, 249, 0, 0.37);
- color: #000;
- font-style: normal; }
- .slide pre mark.important {
- margin: 0;
- background: #C00;
- color: #FFF;
- font-weight: normal; }
- .slide pre mark.comment {
- margin: 0;
- padding: 0;
- background: none;
- color: #999; }
-.slide.cover {
- background: #000; }
- .slide.cover img, .slide.cover svg, .slide.cover video,
- .slide.cover object, .slide.cover canvas {
- position: absolute;
- top: 0;
- left: 0;
- z-index: -1; }
- .slide.cover.w img, .slide.cover.w svg, .slide.cover.w video,
- .slide.cover.w object, .slide.cover.w canvas {
- top: 50%;
- width: 100%;
- -webkit-transform: translateY(-50%);
- -moz-transform: translateY(-50%);
- -ms-transform: translateY(-50%);
- -o-transform: translateY(-50%);
- transform: translateY(-50%); }
- .slide.cover.h img, .slide.cover.h svg, .slide.cover.h video,
- .slide.cover.h object, .slide.cover.h canvas {
- left: 50%;
- height: 100%;
- -webkit-transform: translateX(-50%);
- -moz-transform: translateX(-50%);
- -ms-transform: translateX(-50%);
- -o-transform: translateX(-50%);
- transform: translateX(-50%); }
- .slide.cover.w.h img, .slide.cover.w.h svg, .slide.cover.w.h video,
- .slide.cover.w.h object, .slide.cover.w.h canvas {
- top: 0;
- left: 0;
- -webkit-transform: none;
- -moz-transform: none;
- -ms-transform: none;
- -o-transform: none;
- transform: none; }
-.slide.shout {
- background-image: none; }
- .slide.shout h2 {
- position: absolute;
- top: 50%;
- left: 0;
- width: 100%;
- text-align: center;
- line-height: 1;
- font-size: 150px;
- -webkit-transform: translateY(-50%);
- -moz-transform: translateY(-50%);
- -ms-transform: translateY(-50%);
- -o-transform: translateY(-50%);
- transform: translateY(-50%); }
-.slide .place {
- position: absolute; }
- .slide .place.t, .slide .place.m, .slide .place.b {
- left: 50%;
- -webkit-transform: translateX(-50%);
- -moz-transform: translateX(-50%);
- -ms-transform: translateX(-50%);
- -o-transform: translateX(-50%);
- transform: translateX(-50%); }
- .slide .place.t {
- top: 0; }
- .slide .place.b {
- bottom: 0; }
- .slide .place.l, .slide .place.m, .slide .place.r {
- top: 50%;
- -webkit-transform: translateY(-50%);
- -moz-transform: translateY(-50%);
- -ms-transform: translateY(-50%);
- -o-transform: translateY(-50%);
- transform: translateY(-50%); }
- .slide .place.l {
- left: 0; }
- .slide .place.m {
- -webkit-transform: translate(-50%, -50%);
- -moz-transform: translate(-50%, -50%);
- -ms-transform: translate(-50%, -50%);
- -o-transform: translate(-50%, -50%);
- transform: translate(-50%, -50%); }
- .slide .place.r {
- right: 0;
- left: auto; }
- .slide .place.t.l, .slide .place.t.r, .slide .place.b.r, .slide .place.b.l {
- -webkit-transform: none;
- -moz-transform: none;
- -ms-transform: none;
- -o-transform: none;
- transform: none; }
- .slide .place.t.l, .slide .place.t.r {
- top: 0; }
- .slide .place.b.r, .slide .place.b.l {
- top: auto; }
-
-.list {
- padding: 80px 0 40px 100px;
- background: #585a5e url(../images/linen.png); }
- .list:after {
- clear: both;
- display: block;
- content: ''; }
- .list .caption {
- margin: 0 0 50px;
- color: #3C3D40;
- text-shadow: 0 1px 1px #8D8E90; }
- .list .caption h1 {
- font: bold 50px/1 "PT Sans Narrow", sans-serif; }
- .list .caption a {
- color: #4B86C2;
- text-shadow: 0 -1px 1px #1f3f60;
- text-decoration: none; }
- .list .caption a:hover {
- color: #5ca4ed; }
- .list .slide {
- position: relative;
- float: left;
- margin: 0 -412px -284px 0;
- -webkit-transform-origin: 0 0;
- -moz-transform-origin: 0 0;
- -ms-transform-origin: 0 0;
- -o-transform-origin: 0 0;
- transform-origin: 0 0;
- -webkit-transform: scale(0.5);
- -moz-transform: scale(0.5);
- -ms-transform: scale(0.5);
- -o-transform: scale(0.5);
- transform: scale(0.5); }
- @media (max-width: 1324px) {
- .list .slide {
- margin: 0 -688px -496px 0;
- -webkit-transform: scale(0.25);
- -moz-transform: scale(0.25);
- -ms-transform: scale(0.25);
- -o-transform: scale(0.25);
- transform: scale(0.25); } }
- .list .slide:before {
- position: absolute;
- top: 0;
- left: 0;
- z-index: -1;
- width: 512px;
- height: 384px;
- box-shadow: 0 0 30px rgba(0, 0, 0, 0.005), 0 20px 50px rgba(42, 43, 45, 0.6);
- border-radius: 2px;
- content: '';
- -webkit-transform-origin: 0 0;
- -moz-transform-origin: 0 0;
- -ms-transform-origin: 0 0;
- -o-transform-origin: 0 0;
- transform-origin: 0 0;
- -webkit-transform: scale(2);
- -moz-transform: scale(2);
- -ms-transform: scale(2);
- -o-transform: scale(2);
- transform: scale(2); }
- @media (max-width: 1324px) {
- .list .slide:before {
- width: 256px;
- height: 192px;
- -webkit-transform: scale(4);
- -moz-transform: scale(4);
- -ms-transform: scale(4);
- -o-transform: scale(4);
- transform: scale(4); } }
- .list .slide:after {
- bottom: -100px;
- left: 120px;
- color: #3C3D40;
- text-shadow: 0 2px 1px #8D8E90;
- font-weight: bold;
- font-size: 50px; }
- @media (max-width: 1324px) {
- .list .slide:after {
- bottom: -180px;
- text-shadow: 0 4px 2px #8D8E90;
- font-size: 100px; } }
- .list .slide:hover:before {
- box-shadow: 0 0 0 10px rgba(42, 43, 45, 0.3), 0 20px 50px rgba(42, 43, 45, 0.6); }
- .list .slide:target:before {
- box-shadow: 0 0 0 1px #305f8d, 0 0 0 10px #3c7cbd, 0 20px 50px rgba(42, 43, 45, 0.6); }
- @media (max-width: 1324px) {
- .list .slide:target:before {
- box-shadow: 0 0 0 1px #305f8d, 0 0 0 10px #3c7cbd, 0 20px 50px rgba(42, 43, 45, 0.6); } }
- .list .slide:target:after {
- text-shadow: 0 2px 1px rgba(42, 43, 45, 0.6);
- color: #4B86C2; }
- @media (max-width: 1324px) {
- .list .slide:target:after {
- text-shadow: 0 4px 2px rgba(42, 43, 45, 0.6); } }
-
-.full {
- position: absolute;
- top: 50%;
- left: 50%;
- overflow: hidden;
- margin: -384px 0 0 -512px;
- width: 1024px;
- height: 768px;
- background: #000; }
- .full .caption {
- display: none; }
- .full .slide {
- position: absolute;
- top: 0;
- left: 0;
- visibility: hidden; }
- .full .slide:after {
- position: absolute;
- right: 120px;
- bottom: 40px;
- color: #CCC;
- line-height: 18px;
- font-size: 20px; }
- .full .slide:target {
- visibility: visible; }
- .full .slide.cover, .full .slide.shout {
- z-index: 1; }
- .full .slide.cover:after, .full .slide.shout:after {
- content: ''; }
- .full li.next {
- display: none; }
- .full li.next.active {
- display: block; }
- .full .progress {
- position: absolute;
- right: 118px;
- left: 118px;
- bottom: 10px; }
- .full .progress div {
- width: 0;
- height: 10px;
- box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
- border-radius: 5px;
- background: rgba(177, 177, 177, 0.4);
- -webkit-transition: width 0.2s linear;
- -moz-transition: width 0.2s linear;
- -o-transition: width 0.2s linear;
- transition: width 0.2s linear; }
-
-.presenter_notes {
- display: none; }
-
-.presenter_view .presenter_notes {
- display: block; }
-.presenter_view .slide-content {
- display: none; }
-
-/* Pygments default theme */
-.hll {
- background-color: #ffffcc; }
-
-.c {
- color: #408080;
- font-style: italic; }
-
-/* Comment */
-.err {
- border: 1px solid #FF0000; }
-
-/* Error */
-.k {
- color: #008000;
- font-weight: bold; }
-
-/* Keyword */
-.o {
- color: #666666; }
-
-/* Operator */
-.cm {
- color: #408080;
- font-style: italic; }
-
-/* Comment.Multiline */
-.cp {
- color: #BC7A00; }
-
-/* Comment.Preproc */
-.c1 {
- color: #408080;
- font-style: italic; }
-
-/* Comment.Single */
-.cs {
- color: #408080;
- font-style: italic; }
-
-/* Comment.Special */
-.gd {
- color: #A00000; }
-
-/* Generic.Deleted */
-.ge {
- font-style: italic; }
-
-/* Generic.Emph */
-.gr {
- color: #FF0000; }
-
-/* Generic.Error */
-.gh {
- color: #000080;
- font-weight: bold; }
-
-/* Generic.Heading */
-.gi {
- color: #00A000; }
-
-/* Generic.Inserted */
-.go {
- color: #808080; }
-
-/* Generic.Output */
-.gp {
- color: #000080;
- font-weight: bold; }
-
-/* Generic.Prompt */
-.gs {
- font-weight: bold; }
-
-/* Generic.Strong */
-.gu {
- color: #800080;
- font-weight: bold; }
-
-/* Generic.Subheading */
-.gt {
- color: #0040D0; }
-
-/* Generic.Traceback */
-.kc {
- color: #008000;
- font-weight: bold; }
-
-/* Keyword.Constant */
-.kd {
- color: #008000;
- font-weight: bold; }
-
-/* Keyword.Declaration */
-.kn {
- color: #008000;
- font-weight: bold; }
-
-/* Keyword.Namespace */
-.kp {
- color: #008000; }
-
-/* Keyword.Pseudo */
-.kr {
- color: #008000;
- font-weight: bold; }
-
-/* Keyword.Reserved */
-.kt {
- color: #B00040; }
-
-/* Keyword.Type */
-.m {
- color: #666666; }
-
-/* Literal.Number */
-.s {
- color: #BA2121; }
-
-/* Literal.String */
-.na {
- color: #7D9029; }
-
-/* Name.Attribute */
-.nb {
- color: #008000; }
-
-/* Name.Builtin */
-.nc {
- color: #0000FF;
- font-weight: bold; }
-
-/* Name.Class */
-.no {
- color: #880000; }
-
-/* Name.Constant */
-.nd {
- color: #AA22FF; }
-
-/* Name.Decorator */
-.ni {
- color: #999999;
- font-weight: bold; }
-
-/* Name.Entity */
-.ne {
- color: #D2413A;
- font-weight: bold; }
-
-/* Name.Exception */
-.nf {
- color: #0000FF; }
-
-/* Name.Function */
-.nl {
- color: #A0A000; }
-
-/* Name.Label */
-.nn {
- color: #0000FF;
- font-weight: bold; }
-
-/* Name.Namespace */
-.nt {
- color: #008000;
- font-weight: bold; }
-
-/* Name.Tag */
-.nv {
- color: #19177C; }
-
-/* Name.Variable */
-.ow {
- color: #AA22FF;
- font-weight: bold; }
-
-/* Operator.Word */
-.w {
- color: #bbbbbb; }
-
-/* Text.Whitespace */
-.mf {
- color: #666666; }
-
-/* Literal.Number.Float */
-.mh {
- color: #666666; }
-
-/* Literal.Number.Hex */
-.mi {
- color: #666666; }
-
-/* Literal.Number.Integer */
-.mo {
- color: #666666; }
-
-/* Literal.Number.Oct */
-.sb {
- color: #BA2121; }
-
-/* Literal.String.Backtick */
-.sc {
- color: #BA2121; }
-
-/* Literal.String.Char */
-.sd {
- color: #BA2121;
- font-style: italic; }
-
-/* Literal.String.Doc */
-.s2 {
- color: #BA2121; }
-
-/* Literal.String.Double */
-.se {
- color: #BB6622;
- font-weight: bold; }
-
-/* Literal.String.Escape */
-.sh {
- color: #BA2121; }
-
-/* Literal.String.Heredoc */
-.si {
- color: #BB6688;
- font-weight: bold; }
-
-/* Literal.String.Interpol */
-.sx {
- color: #008000; }
-
-/* Literal.String.Other */
-.sr {
- color: #BB6688; }
-
-/* Literal.String.Regex */
-.s1 {
- color: #BA2121; }
-
-/* Literal.String.Single */
-.ss {
- color: #19177C; }
-
-/* Literal.String.Symbol */
-.bp {
- color: #008000; }
-
-/* Name.Builtin.Pseudo */
-.vc {
- color: #19177C; }
-
-/* Name.Variable.Class */
-.vg {
- color: #19177C; }
-
-/* Name.Variable.Global */
-.vi {
- color: #19177C; }
-
-/* Name.Variable.Instance */
-.il {
- color: #666666; }
-
-/* Literal.Number.Integer.Long */
diff --git a/src/landslide/themes/ribbon/css/screen.scss b/src/landslide/themes/ribbon/css/screen.scss
deleted file mode 100644
index 83c197e..0000000
--- a/src/landslide/themes/ribbon/css/screen.scss
+++ /dev/null
@@ -1,486 +0,0 @@
-// Ribbon theme for Shower HTML presentation template: github.com/pepelsbey/shower
-// Copyright © 2010–2012 Vadim Makeev, pepelsbey.net
-// Licensed under MIT license: github.com/pepelsbey/shower/wiki/License-En
-
-@import 'defaults';
-@import 'reset';
-
-body {
- counter-reset:paging;
- font:25px/2 'PT Sans', sans-serif;
- }
-
-// Slide
-// -------------------------------
-.slide {
- width:$width;
- height:$height;
- background:#FFF url(../images/ribbon.svg) 865px 0 no-repeat;
- color:#000;
- &:after {
- position:absolute;
- counter-increment:paging;
- content:counter(paging, decimal-leading-zero);
- line-height:1;
- }
- .debug & {
- @if $width == 1024px {
- @if $height == 640px {
- $grid:'url(../images/grid-16x10.png) no-repeat,'
- }
- @if $height == 768px {
- $grid:'url(../images/grid-4x3.png) no-repeat,'
- }
- }
- background:url(../images/ribbon.svg) 865px 0 no-repeat, #{$grid} #FFF;
- }
- > div {
- position:absolute;
- top:0;
- left:0;
- overflow:hidden;
- padding:$top $sides 0;
- width:$width - $sides * 2;
- height:$height - $top;
- }
- }
-
-// Header
-.slide {
- h1 {
- margin:0 0 27px;
- color:#666;
- font:bold 60px/60px 'PT Sans Narrow', sans-serif;
- }
-
- h2 {
- margin:0 0 17px;
- color:#666;
- font:bold 50px/50px 'PT Sans Narrow', sans-serif;
- }
- // Text
- p {
- margin:0 0 50px;
- }
- p.note {
- color:#999;
- }
- a {
- border-bottom:0.1em solid;
- color:#0174A7;
- text-decoration:none;
- }
- b, strong {
- font-weight:bold;
- }
- i, em {
- font-style:italic;
- }
- kbd, code, samp {
- padding:3px 8px;
- border-radius:8px;
- background:#FAFAA2;
- color:#000;
- @include tab-size(4);
- line-height:1;
- font-family:'PT Mono', monospace;
- }
- // Quote
- blockquote {
- font-style:italic;
- &:before {
- position:absolute;
- margin:-16px 0 0 -80px;
- color:#CCC;
- font:200px/1 'PT Sans', sans-serif;
- content:'\201C';
- }
- & + figcaption {
- margin:-50px 0 40px;
- font-style:italic;
- font-weight:bold;
- }
- }
- // Lists
- ol, ul {
- margin:0 0 50px;
- counter-reset:list;
- li {
- text-indent:-2em;
- &:before {
- display:inline-block;
- width:2em;
- color:#BBB;
- text-align:right;
- }
- }
- ol,
- ul {
- margin:0 0 0 39px;
- }
- }
- ul > li:before {
- content:'\2022\00A0\00A0';
- }
- ul > li:lang(ru):before {
- content:'\2014\00A0\00A0';
- }
- ol > li:before {
- counter-increment:list;
- content:counter(list)'.\00A0';
- }
- // Code
- pre {
- white-space:normal;
- display:block;
- padding:0;
- background:none;
- white-space:pre;
- line-height:22px;
- font-size: 16px;
- font-family:'PT Mono', monospace;
- &:before {
- position:absolute;
- margin:0 0 0 -110px;
- width:100px;
- color:#BBB;
- text-align:right;
- }
- mark {
- margin:0 -8px;
- padding:3px 8px;
- border-radius:8px;
- background:rgba(236,249,0,.37);
- color:#000;
- font-style:normal;
- &.important {
- margin:0;
- background:#C00;
- color:#FFF;
- font-weight:normal;
- }
- &.comment {
- margin:0;
- padding:0;
- background:none;
- color:#999;
- }
- }
- }
- // Cover
- &.cover {
- background:#000;
- img, svg, video,
- object, canvas {
- position:absolute;
- top:0;
- left:0;
- z-index:-1;
- }
- &.w {
- img, svg, video,
- object, canvas {
- top:50%;
- width:100%;
- @include transform(translateY(-50%));
- }
- }
- &.h {
- img, svg, video,
- object, canvas {
- left:50%;
- height:100%;
- @include transform(translateX(-50%));
- }
- }
- &.w.h {
- img, svg, video,
- object, canvas {
- top:0;
- left:0;
- @include transform(none);
- }
- }
- }
- // Shout
- &.shout {
- background-image:none;
- h2 {
- position:absolute;
- top:50%;
- left:0;
- width:100%;
- text-align:center;
- line-height:1;
- font-size:150px;
- @include transform(translateY(-50%));
- }
- }
- // Place
- .place {
- position:absolute;
- &.t, &.m, &.b {
- left:50%;
- @include transform(translateX(-50%));
- }
- &.t { top:0; }
- &.b { bottom:0; }
- &.l, &.m, &.r {
- top:50%;
- @include transform(translateY(-50%));
- }
- &.l { left:0; }
- &.m { @include transform(translate(-50%, -50%)); }
- &.r {
- right:0;
- left:auto;
- }
- &.t.l, &.t.r, &.b.r, &.b.l {
- @include transform(none);
- }
- &.t.l, &.t.r { top:0; }
- &.b.r, &.b.l { top:auto; }
- }
- }
-
-// List
-// -------------------------------
-.list {
- padding:80px 0 40px 100px;
- background:#585A5E url(../images/linen.png);
- &:after {
- clear:both;
- display:block;
- content:'';
- }
- // Caption
- .caption {
- margin:0 0 50px;
- color:#3C3D40;
- text-shadow:0 1px 1px #8D8E90;
- h1 {
- font:bold 50px/1 'PT Sans Narrow', sans-serif;
- }
- a {
- color:#4B86C2;
- text-shadow:0 -1px 1px #1F3F60;
- text-decoration:none;
- &:hover {
- color:#5ca4ed;
- }
- }
- }
- // Slide
- .slide {
- position:relative;
- float:left;
- margin:0 (100-$width/2) (100-$height/2) 0;
- @include transform-origin(0 0);
- @include transform(scale(0.5));
- @media (max-width:$break) {
- margin:0 (80-($width/2+$width/4)) (80-($height/2+$height/4)) 0;
- @include transform(scale(0.25));
- }
- &:before {
- position:absolute;
- top:0;
- left:0;
- z-index:-1;
- width:$width/2;
- height:$height/2;
- box-shadow:
- 0 0 30px rgba(0, 0, 0, 0.005),
- 0 20px 50px rgba(42, 43, 45, 0.6);
- border-radius:2px;
- content:'';
- @include transform-origin(0 0);
- @include transform(scale(2));
- @media (max-width:$break) {
- width:$width/4;
- height:$height/4;
- @include transform(scale(4));
- }
- }
- &:after {
- bottom:-100px;
- left:120px;
- color:#3C3D40;
- text-shadow:0 2px 1px #8D8E90;
- font-weight:bold;
- font-size:50px;
- @media (max-width:$break) {
- bottom:-180px;
- text-shadow:0 4px 2px #8D8E90;
- font-size:100px;
- }
- }
- &:hover:before {
- box-shadow:
- 0 0 0 10px rgba(42, 43, 45, 0.3),
- 0 20px 50px rgba(42, 43, 45, 0.6);
- }
- &:target {
- &:before {
- box-shadow:
- 0 0 0 1px #305F8D,
- 0 0 0 10px #3C7CBD,
- 0 20px 50px rgba(42, 43, 45, 0.6);
- @media (max-width:$break) {
- box-shadow:
- 0 0 0 1px #305F8D,
- 0 0 0 10px #3C7CBD,
- 0 20px 50px rgba(42, 43, 45, 0.6);
- }
- }
- &:after {
- text-shadow:0 2px 1px rgba(42, 43, 45, 0.6);
- color:#4B86C2;
- @media (max-width:$break) {
- text-shadow:0 4px 2px rgba(42, 43, 45, 0.6);
- }
- }
- }
- }
- }
-
-// Full
-// -------------------------------
-.full {
- position:absolute;
- top:50%;
- left:50%;
- overflow:hidden;
- margin:(-$height/2) 0 0 (-$width/2);
- width:$width;
- height:$height;
- background:#000;
- .caption {
- display:none;
- }
- .slide {
- position:absolute;
- top:0;
- left:0;
- visibility:hidden;
- &:after {
- position:absolute;
- right:120px;
- bottom:40px;
- color:#CCC;
- line-height:18px;
- font-size:20px;
- }
- &:target {
- visibility:visible;
- }
- // Cover Shout
- &.cover,
- &.shout {
- z-index:1;
- &:after {
- content:'';
- }
- }
- }
- // Next Lists
- li.next {
- display:none;
- &.active {
- display:block;
- }
- }
-
- // Progress
- .progress {
- position:absolute;
- right:118px;
- left:118px;
- bottom: 10px;
- div {
- width:0;
- height:10px;
- box-shadow:0 0 0 1px rgba(255, 255, 255, 0.4);
- border-radius:5px;
- background:rgba(177, 177, 177, 0.4);
- @include transition(width 0.2s linear);
- }
- }
- }
-
-.presenter_notes {
- display: none;
- }
-
-// Presenter View
-// -------------------------------
-.presenter_view {
- .presenter_notes {
- display: block;
- }
- .slide-content {
- display: none
- }
- }
-
-/* Pygments default theme */
-.hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
-.err { border: 1px solid #FF0000 } /* Error */
-.k { color: #008000; font-weight: bold } /* Keyword */
-.o { color: #666666 } /* Operator */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
-.gd { color: #A00000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #808080 } /* Generic.Output */
-.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.gt { color: #0040D0 } /* Generic.Traceback */
-.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #008000 } /* Keyword.Pseudo */
-.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #B00040 } /* Keyword.Type */
-.m { color: #666666 } /* Literal.Number */
-.s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
-.nb { color: #008000 } /* Name.Builtin */
-.nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.no { color: #880000 } /* Name.Constant */
-.nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
-.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.nt { color: #008000; font-weight: bold } /* Name.Tag */
-.nv { color: #19177C } /* Name.Variable */
-.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #666666 } /* Literal.Number.Float */
-.mh { color: #666666 } /* Literal.Number.Hex */
-.mi { color: #666666 } /* Literal.Number.Integer */
-.mo { color: #666666 } /* Literal.Number.Oct */
-.sb { color: #BA2121 } /* Literal.String.Backtick */
-.sc { color: #BA2121 } /* Literal.String.Char */
-.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
-.s1 { color: #BA2121 } /* Literal.String.Single */
-.ss { color: #19177C } /* Literal.String.Symbol */
-.bp { color: #008000 } /* Name.Builtin.Pseudo */
-.vc { color: #19177C } /* Name.Variable.Class */
-.vg { color: #19177C } /* Name.Variable.Global */
-.vi { color: #19177C } /* Name.Variable.Instance */
-.il { color: #666666 } /* Literal.Number.Integer.Long */
diff --git a/src/landslide/themes/ribbon/images/grid-16x10.png b/src/landslide/themes/ribbon/images/grid-16x10.png
deleted file mode 100644
index fee272b..0000000
--- a/src/landslide/themes/ribbon/images/grid-16x10.png
+++ /dev/null
Binary files differ
diff --git a/src/landslide/themes/ribbon/images/grid-4x3.png b/src/landslide/themes/ribbon/images/grid-4x3.png
deleted file mode 100644
index 978d731..0000000
--- a/src/landslide/themes/ribbon/images/grid-4x3.png
+++ /dev/null
Binary files differ
diff --git a/src/landslide/themes/ribbon/images/linen.png b/src/landslide/themes/ribbon/images/linen.png
deleted file mode 100644
index 72e7a0a..0000000
--- a/src/landslide/themes/ribbon/images/linen.png
+++ /dev/null
Binary files differ
diff --git a/src/landslide/themes/ribbon/images/ribbon.svg b/src/landslide/themes/ribbon/images/ribbon.svg
deleted file mode 100644
index 5a48cc3..0000000
--- a/src/landslide/themes/ribbon/images/ribbon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
- <polygon fill="#C00" points="0,0 40,0 40,120 20,100 0,120"/>
-</svg> \ No newline at end of file
diff --git a/src/landslide/themes/ribbon/js/slides.js b/src/landslide/themes/ribbon/js/slides.js
deleted file mode 100644
index b8ecefe..0000000
--- a/src/landslide/themes/ribbon/js/slides.js
+++ /dev/null
@@ -1,441 +0,0 @@
-(function () {
- var url = window.location,
- body = document.body,
- slides = document.querySelectorAll('.slide'),
- progress = document.querySelector('div.progress div'),
- presenterWin = null,
- slideList = [],
- timer,
- spaces = /\s+/, a1 = [''],
- l = slides.length, i;
-
- for (i = 0; i < l; i++) {
- // Slide ID's are optional. In case of missing ID we set it to the
- // slide number
- if (!slides[i].id) {
- slides[i].id = i + 1;
- }
-
- slideList.push({
- id: slides[i].id,
- hasInnerNavigation: null !== slides[i].querySelector('.next'),
- hasTiming: null != slides[i].dataset.timing
- });
- }
-
- var str2array = function(s) {
- if (typeof s == 'string' || s instanceof String) {
- if (s.indexOf(' ') < 0) {
- a1[0] = s;
- return a1;
- } else {
- return s.split(spaces);
- }
- }
- return s;
- };
-
- var trim = function(str) {
- return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
- };
-
- var addClass = function(node, classStr) {
- classStr = str2array(classStr);
- var cls = ' ' + node.className + ' ';
- for (var i = 0, len = classStr.length, c; i < len; ++i) {
- c = classStr[i];
- if (c && cls.indexOf(' ' + c + ' ') < 0) {
- cls += c + ' ';
- }
- }
- node.className = trim(cls);
- };
-
-
- function fullUrl(baseUrl, queryStr, slideId) {
- var url = '';
-
- var presenter = getParamByName('presenter');
- if (presenter != '') {
- url += baseUrl + "?presenter=" + presenter + "&" + queryStr;
- } else {
- url += baseUrl + "?" + queryStr;
- }
-
- url += '#' + slideId;
- return url;
- }
-
- function getParamByName(name) {
- name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
- var regexS = "[\\?&]" + name + "=([^&#]*)";
- var regex = new RegExp(regexS);
- var results = regex.exec(window.location.search);
-
- if(results == null)
- return "";
- else
- return decodeURIComponent(results[1].replace(/\+/g, " "));
- }
-
- function getTransform() {
- var denominator = Math.max(
- body.clientWidth / window.innerWidth,
- body.clientHeight / window.innerHeight
- );
-
- return 'scale(' + (1 / denominator) + ')';
- }
-
- function applyTransform(transform) {
- body.style.WebkitTransform = transform;
- body.style.MozTransform = transform;
- body.style.msTransform = transform;
- body.style.OTransform = transform;
- body.style.transform = transform;
- }
-
- function enterSlideMode() {
- body.classList.remove('list');
- body.classList.add('full');
- applyTransform(getTransform());
- }
-
- function enterListMode() {
- body.classList.remove('full');
- body.classList.add('list');
- applyTransform('none');
- }
-
- function getCurrentSlideNumber() {
- var i, l = slideList.length,
- currentSlideId = url.hash.substr(1);
-
- for (i = 0; i < l; ++i) {
- if (currentSlideId === slideList[i].id) {
- return i;
- }
- }
-
- return -1;
- }
-
- function scrollToSlide(slideNumber) {
- if (-1 === slideNumber ) { return; }
-
- var currentSlide = document.getElementById(slideList[slideNumber].id);
-
- if (null != currentSlide) {
- window.scrollTo(0, currentSlide.offsetTop);
- }
- }
-
- function isListMode() {
- return url.search.indexOf('full') == -1;
- }
-
- function normalizeSlideNumber(slideNumber) {
- if (0 > slideNumber) {
- return 0;
- } else if (slideList.length <= slideNumber) {
- return slideList.length - 1;
- } else {
- return slideNumber;
- }
- }
-
- function updateProgress(slideNumber) {
- if (null === progress) { return; }
- progress.style.width = (100 / (slideList.length - 1) * normalizeSlideNumber(slideNumber)).toFixed(2) + '%';
- }
-
- function updateCurrentAndPassedSlides(slideNumber) {
- var i, l = slideList.length, slide;
- slideNumber = normalizeSlideNumber(slideNumber);
-
- for ( i = 0; i < l; ++i ) {
- slide = document.getElementById(slideList[i].id);
-
- if ( i < slideNumber ) {
- slide.classList.remove('current');
- slide.classList.add('passed');
- } else if ( i > slideNumber ) {
- slide.classList.remove('passed');
- slide.classList.remove('current');
- } else {
- slide.classList.remove('passed');
- slide.classList.add('current');
- }
- }
- }
-
- function getSlideHash(slideNumber) {
- return '#' + slideList[normalizeSlideNumber(slideNumber)].id;
- }
-
- function goToSlide(slideNumber) {
- url.hash = getSlideHash(slideNumber);
-
- if (!isListMode()) {
- updateProgress(slideNumber);
- updateCurrentAndPassedSlides(slideNumber);
- if (presenterWin != null) {
- presenterWin.postMessage('slide#' + slideNumber, '*');
- }
- }
- }
-
- function getContainingSlideId(el) {
- var node = el;
- while ('BODY' !== node.nodeName && 'HTML' !== node.nodeName) {
- if (node.classList.contains('slide')) {
- return node.id;
- } else {
- node = node.parentNode;
- }
- }
-
- return '';
- }
-
- // FIXME: Renaming needed? Or just some handlers rewriting?
- function dispatchSingleSlideMode(e) {
- // Process links
- // TODO: presentation links support
- if ('A' === e.target.nodeName) {
- e.preventDefault();
-
- window.open(e.target.getAttribute('href'));
- return;
- }
-
- var slideId = getContainingSlideId(e.target);
-
- if ('' !== slideId && isListMode()) {
- e.preventDefault();
-
- // NOTE: we should update hash to get things work properly
- url.hash = '#' + slideId;
- history.replaceState(null, null,
- fullUrl(url.pathname, 'full', slideId));
- enterSlideMode();
-
- updateProgress(getCurrentSlideNumber());
- updateCurrentAndPassedSlides(getCurrentSlideNumber());
- runSlideshowIfPresented(getCurrentSlideNumber());
- }
- }
-
- function runSlideshowIfPresented(slideNumber) {
- slideNumber = normalizeSlideNumber(slideNumber);
-
- clearTimeout(timer);
-
- if (slideList[slideNumber].hasTiming) {
- // Compute number of milliseconds from format "X:Y", where X is
- // number of minutes, and Y is number of seconds
- var timing = document.getElementById(slideList[slideNumber].id).dataset.timing.split(':');
- timing = parseInt(timing[0]) * 60 * 1000 + parseInt(timing[1]) * 1000;
-
- timer = setTimeout( function () {
- goToSlide(slideNumber + 1);
- runSlideshowIfPresented(slideNumber + 1);
- }, timing );
- }
- }
-
- // Increases inner navigation by adding 'active' class to next inactive inner navigation item
- function increaseInnerNavigation(slideNumber) {
- // Shortcut for slides without inner navigation
- if (true !== slideList[slideNumber].hasInnerNavigation) { return -1; }
-
- var nextNodes = document.getElementById(slideList[slideNumber].id).querySelectorAll('.next:not(.active)'),
- node;
-
- if (0 !== nextNodes.length) {
- node = nextNodes[0];
- node.classList.add('active');
- return nextNodes.length - 1;
- } else {
- return -1;
- }
- }
-
- // Event handlers
-
- window.addEventListener('DOMContentLoaded', function () {
- if (!isListMode()) {
- // "?full" is present without slide hash, so we should display
- // first slide
- if (-1 === getCurrentSlideNumber()) {
- history.replaceState(null, null,
- fullUrl(url.pathname, 'full',
- getSlideHash(0)));
- }
-
- enterSlideMode();
- updateProgress(getCurrentSlideNumber());
- updateCurrentAndPassedSlides(getCurrentSlideNumber());
- runSlideshowIfPresented(getCurrentSlideNumber())
- }
- }, false);
-
- window.addEventListener('popstate', function (e) {
- if (isListMode()) {
- enterListMode();
- scrollToSlide(getCurrentSlideNumber());
- } else {
- enterSlideMode();
- }
- }, false);
-
- window.addEventListener('resize', function (e) {
- if (!isListMode()) {
- applyTransform(getTransform());
- }
- }, false);
-
- window.addEventListener("message", function(e) {
- if (e.data.indexOf("slide#") != -1) {
- currentSlideNo = Number(e.data.replace('slide#', ''));
- goToSlide(currentSlideNo);
- }
- }, false);
-
- document.addEventListener('keydown', function (e) {
- // Shortcut for alt, shift and meta keys
- if (e.altKey || e.ctrlKey || e.metaKey) { return; }
-
- var currentSlideNumber = getCurrentSlideNumber(),
- innerNavigationCompleted = true;
-
- switch (e.which) {
- case 116: // F5
- case 13: // Enter
- if (isListMode() && -1 !== currentSlideNumber) {
- e.preventDefault();
-
- history.pushState(null, null,
- fullUrl(url.pathname, 'full',
- getSlideHash(currentSlideNumber)));
- enterSlideMode();
-
- updateProgress(currentSlideNumber);
- updateCurrentAndPassedSlides(currentSlideNumber);
- runSlideshowIfPresented(currentSlideNumber);
- }
- break;
-
- case 27: // Esc
- if (!isListMode()) {
- e.preventDefault();
-
- history.pushState(null, null,
- url.pathname
- + getSlideHash(currentSlideNumber));
- enterListMode();
- scrollToSlide(currentSlideNumber);
- }
- break;
-
- case 33: // PgUp
- case 38: // Up
- case 37: // Left
- case 72: // h
- case 75: // k
- e.preventDefault();
-
- currentSlideNumber--;
- goToSlide(currentSlideNumber);
- break;
-
- case 34: // PgDown
- case 40: // Down
- case 39: // Right
- case 76: // l
- case 74: // j
- e.preventDefault();
-
- if (!isListMode() ) {
- // Inner navigation is "completed" if current slide have
- // no inner navigation or inner navigation is fully shown
- innerNavigationCompleted = !slideList[currentSlideNumber].hasInnerNavigation ||
- -1 === increaseInnerNavigation(currentSlideNumber);
- } else {
- // Also inner navigation is always "completed" if we are in
- // list mode
- innerNavigationCompleted = true;
- }
- // NOTE: First of all check if there is no current slide
- if (
- -1 === currentSlideNumber || innerNavigationCompleted
- ) {
- currentSlideNumber++;
- goToSlide(currentSlideNumber);
- // We must run slideshow only in full mode
- if (!isListMode()) {
- runSlideshowIfPresented(currentSlideNumber);
- }
- }
- break;
-
- case 36: // Home
- e.preventDefault();
-
- currentSlideNumber = 0;
- goToSlide(currentSlideNumber);
- break;
-
- case 35: // End
- e.preventDefault();
-
- currentSlideNumber = slideList.length - 1;
- goToSlide(currentSlideNumber);
- break;
-
- case 9: // Tab = +1; Shift + Tab = -1
- case 32: // Space = +1; Shift + Space = -1
- e.preventDefault();
-
- currentSlideNumber += e.shiftKey ? -1 : 1;
- goToSlide(currentSlideNumber);
- break;
- case 80: // p for presenter
- presenterWin = open(window.location.pathname + '?presenter=1'
- + "&full"
- + getSlideHash(currentSlideNumber));
- break;
-
- default:
- // Behave as usual
- }
- }, false);
-
- document.addEventListener('click', dispatchSingleSlideMode, false);
- document.addEventListener('touchend', dispatchSingleSlideMode, false);
-
- document.addEventListener('touchstart', function (e) {
- if (!isListMode()) {
- var currentSlideNumber = getCurrentSlideNumber(),
- x = e.touches[0].pageX;
- if (x > window.innerWidth / 2) {
- currentSlideNumber++;
- } else {
- currentSlideNumber--;
- }
-
- goToSlide(currentSlideNumber);
- }
- }, false);
-
- document.addEventListener('touchmove', function (e) {
- if (!isListMode()) {
- e.preventDefault();
- }
- }, false);
-
-
- if (getParamByName('presenter') != "") {
- addClass(document.body, 'presenter_view');
- }
-}());
diff --git a/src/landslide/themes/ribbon/license.txt b/src/landslide/themes/ribbon/license.txt
deleted file mode 100644
index 26557d5..0000000
--- a/src/landslide/themes/ribbon/license.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-The MIT License
-
-Copyright © 2010–2012 Vadim Makeev, http://pepelsbey.net/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-Лицензия MIT
-
-Copyright © 2010–2012 Вадим Макеев, http://pepelsbey.net/
-
-Данная лицензия разрешает лицам, получившим копию данного программного
-обеспечения
-и сопутствующей документации (в дальнейшем именуемыми «Программное
-Обеспечение»),
-безвозмездно использовать Программное Обеспечение без ограничений, включая
-неограниченное право на использование, копирование, изменение, добавление,
-публикацию, распространение, сублицензирование и/или продажу копий
-Программного Обеспечения, также как и лицам, которым предоставляется
-данное Программное Обеспечение, при соблюдении следующих условий:
-
-Указанное выше уведомление об авторском праве и данные условия должны быть
-включены во все копии или значимые части данного Программного Обеспечения.
-
-ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО
-ГАРАНТИЙ,
-ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ
-ТОВАРНОЙ
-ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ
-ПРАВ.
-НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ
-О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ,
-ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ
-ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫМИ ДЕЙСТВИЯМИ
-С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.
-
diff --git a/src/landslide/themes/tango/css/background.png b/src/landslide/themes/tango/css/background.png
deleted file mode 100644
index 31f00e1..0000000
--- a/src/landslide/themes/tango/css/background.png
+++ /dev/null
Binary files differ
diff --git a/src/landslide/themes/tango/css/screen.css b/src/landslide/themes/tango/css/screen.css
deleted file mode 100644
index bfa4d49..0000000
--- a/src/landslide/themes/tango/css/screen.css
+++ /dev/null
@@ -1,577 +0,0 @@
-h1, h2, h3, h4, h5, h6, p, ul, li {
- font-family: sans-serif !important;
-}
-
-p, ul, li {
- color: #555753 !important;
- font-size: 120% !important;
-}
-
-header h1, header h2, header h3, header h4, header h5, header h6 {
- color: #204a87 !important;
- font-weight: bold !important;
-}
-
-section h1, section h2, section h3, section h4, section h5, section h6 {
- color: #3465a4 !important;
-}
-
-img { display: block; margin: auto; }
-
-body {
- font: 14px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- background: #555753;
- padding: 0;
- margin: 0;
- overflow: hidden;
-}
-
-div.presentation {
- position: absolute;
- width: 100%;
- display: table-cell;
- vertical-align: middle;
- height: 100%;
- background: -webkit-gradient(linear, left bottom, left top, from(#2e3436), to(#555753));
- background-color: #555753;
- background: -moz-linear-gradient(bottom, #555753, #2e3436);
-}
-
-div.slides, body.expose div.slides.nocontext {
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- position: absolute;
- display: block;
-}
-
-div.slides.nocontext {
- width: 900px;
- margin: 0 auto;
- overflow: hidden;
- position: relative;
- left: auto;
- top: auto;
-}
-
-div.slide {
- background: url('background.png') bottom center no-repeat;
- display: none;
- position: absolute;
- overflow: hidden;
- width: 900px;
- height: 700px;
- left: 50%;
- top: 50%;
- margin-top: -350px;
- background-color: #fff;
- -webkit-transition: margin 0.25s ease-in-out;
- -moz-transition: margin 0.25s ease-in-out;
- -o-transition: margin 0.25s ease-in-out;
- border-top-left-radius: 20px;
- -moz-border-radius-topleft: 20px;
- -webkit-border-top-left-radius: 20px;
- border-top-right-radius: 20px;
- -moz-border-radius-topright: 20px;
- -webkit-border-top-right-radius: 20px;
- border-bottom-right-radius: 20px;
- -moz-border-radius-bottomright: 20px;
- -webkit-border-bottom-right-radius: 20px;
- border-bottom-left-radius: 20px;
- -moz-border-radius-bottomleft: 20px;
- -webkit-border-bottom-left-radius: 20px;
-}
-
-div.slide p {
- font-size: 20px;
-}
-
-.slide.far-past {
- display: block;
- margin-left: -2400px;
-}
-
-.slide.past {
- display: block;
- margin-left: -1400px;
-}
-
-.slide.current {
- display: block;
- margin-left: -450px;
-}
-
-.slide.future {
- display: block;
- margin-left: 500px;
-}
-
-.slide.far-future {
- display: block;
- margin-left: 1500px;
-}
-
-body.three-d div.slides {
- -webkit-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -moz-transform: translateX(50px) scale(0.8) rotateY(10deg);
- -o-transform: translateX(50px) scale(0.8) rotateY(10deg);
-}
-
-
-/* Content */
-
-header:not(:only-child) {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- font-weight: normal;
- font-size: 50px;
- letter-spacing: -.05em;
- color: white;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- position: absolute;
- left: 30px;
- top: 25px;
- margin: 0;
- padding: 0;
-}
-
-header h1, header h2, header h3, header h4, header h5, header h6 {
- display: inline;
- font-size: 100%;
- font-weight: normal;
- padding: 0;
- margin: 0;
-}
-
-header h2:first-child {
- margin-top: 0;
-}
-
-section, .slide header:only-child h1 {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: #3f3f3f;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin-left: 30px;
- margin-right: 30px;
- margin-top: 100px;
- display: block;
- overflow: hidden;
-}
-
-section img.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-section img.align-right {
- display: block;
- margin-left: auto;
- margin-right: 0;
-}
-
-section img.align-left {
- display: block;
- margin-right: auto;
- margin-left: 0;
-}
-
-a {
- color: inherit;
- display: inline-block;
- text-decoration: none;
- line-height: 110%;
- border-bottom: 2px solid #3f3f3f;
-}
-
-pre, code, tt {
- font-family: Monaco, Consolas, 'Bitstream Vera Sans Mono', 'Lucida Console', FreeMono, Courier, monospace;
-}
-
-pre, .gist .gist-file .gist-data {
- font-size: 18px;
- max-height: 485px;
- padding-top: 0.25em !important;
- padding-right: 0.5em !important;
- padding-left: 0.5em !important;
- overflow: auto;
-}
-
-/* render a nice scrollbar in overflowed pre area's */
-::-webkit-scrollbar {
- height: 8px;
- width: 8px;
-}
-::-webkit-scrollbar-thumb {
- background: -webkit-gradient(linear, left bottom, left top, from(#777), to(#bbd));
- -webkit-border-radius: 1ex;
-}
-::-webkit-scrollbar-corner {
- background: #dedede;
-}
-
-blockquote {
- border-left: solid 8px #555753;
- padding: .1ex 1ex;
- font-style: italic;
- font-size: 20px;
-}
-
-li {
- padding: 10px 0;
- font-size: 20px;
-}
-
-li pre { margin-left: 0em; }
-
-.slide header:only-child h1 {
- line-height: 180%;
- text-align: center;
- display: table-cell;
- vertical-align: middle;
- height: 700px;
- width: 900px;
- font-size: 50px;
- margin-top:100px;
- margin-bottom:100px;
-}
-
-.sidebar {
- background: -webkit-gradient(linear, top right, bottom right, from(#dde), to(#fff));
- -webkit-transition: margin 0.25s ease-in-out;
- background-color: #eee;
- background: -moz-linear-gradient(right, #dde, #fff);
- border-right: 5px solid #ccd;
- z-index: 9999999;
- height: 100%;
- overflow: hidden;
- top: 0;
- position: absolute;
- display: block;
- margin: 0;
- margin-left: -400px;
- padding: 10px 16px;
- overflow: auto;
- -webkit-transition: margin 0.2s ease-in-out;
- -moz-transition: margin 0.2s ease-in-out;
- -o-transition: margin 0.2s ease-in-out;
-}
-
-.sidebar h2 {
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- margin: 0 0 16px;
- padding: 0;
-}
-
-.sidebar table {
- width: 100%;
- margin: 0;
- padding: 0;
- border-collapse: collapse;
-}
-
-.sidebar table caption {
- display: none;
-}
-
-.sidebar tr {
- margin: 2px 0;
- border-bottom: 1px solid #ccc;
-}
-
-.sidebar th {
- text-align: left;
- font-weight: normal;
- max-width: 300px;
- overflow: hidden;
-}
-
-.sidebar tr.sub th {
- text-indent: 20px;
-}
-
-.sidebar td {
- text-align: right;
- min-width: 20px;
-}
-
-.sidebar a {
- display: block;
- text-decoration: none;
- border-bottom: none;
- padding: 4px 0;
-}
-
-.sidebar tr.active {
- background: #ff0;
-}
-
-aside {
- display: none;
-}
- aside.source {
- position: absolute;
- bottom: 6px;
- left: 10px;
- text-indent: 10px;
- }
- aside.page_number {
- position: absolute;
- bottom: 6px;
- right: 10px;
- text-indent: 10px;
- }
-
-.notes {
- display: none;
- padding: 10px;
- background: #ccc;
- border-radius: 10px;
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
-}
- div.slide p.notes {
- font-size: 90%;
-}
-
-/* Expose */
-
-body.expose div.slides {
- float: left;
- position: relative;
- overflow: auto;
- margin-bottom: 10px;
-}
-
-body.expose div.slide {
- display: block;
- float: left;
- position: relative;
- left: auto !important;
- top: auto !important;
- margin: 10px !important;
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- -moz-transform: scale(.33, .33);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.33, .33);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.33, .33);
- -o-transform-origin: 0 0;
- cursor: pointer;
-}
-
-body.expose div.slide:hover {
- background: -webkit-gradient(linear, left bottom, left top, from(#bdd), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #bdd, #fff);
-}
-
-body.expose .slide-wrapper {
- float: left;
- position: relative;
- margin: .5%;
- width: 300px;
- height: 233px;
-}
-
-body.expose .slide footer {
-}
-
-body.expose .slide .inner {
-}
-
-body.expose .slide.far-past,
-body.expose .slide.past,
-body.expose .slide.future,
-body.expose .slide.far-future {
- margin-left: 0;
-}
-
-body.expose .slide.current {
- background: -webkit-gradient(linear, left bottom, left top, from(#ddb), to(#fff));
- background-color: #eee;
- background: -moz-linear-gradient(bottom, #ddb, #fff);
- border: 16px solid #fff;
- -moz-transform: scale(.315, .315);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.315, .315);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.315, .315);
- -o-transform-origin: 0 0;
-}
-
-/* Pygments default theme */
-.hll { background-color: #ffffcc }
-.c { color: #408080; font-style: italic } /* Comment */
-.err { border: 1px solid #FF0000 } /* Error */
-.k { color: #008000; font-weight: bold } /* Keyword */
-.o { color: #666666 } /* Operator */
-.cm { color: #408080; font-style: italic } /* Comment.Multiline */
-.cp { color: #BC7A00 } /* Comment.Preproc */
-.c1 { color: #408080; font-style: italic } /* Comment.Single */
-.cs { color: #408080; font-style: italic } /* Comment.Special */
-.gd { color: #A00000 } /* Generic.Deleted */
-.ge { font-style: italic } /* Generic.Emph */
-.gr { color: #FF0000 } /* Generic.Error */
-.gh { color: #000080; font-weight: bold } /* Generic.Heading */
-.gi { color: #00A000 } /* Generic.Inserted */
-.go { color: #808080 } /* Generic.Output */
-.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
-.gs { font-weight: bold } /* Generic.Strong */
-.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
-.gt { color: #0040D0 } /* Generic.Traceback */
-.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
-.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
-.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
-.kp { color: #008000 } /* Keyword.Pseudo */
-.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
-.kt { color: #B00040 } /* Keyword.Type */
-.m { color: #666666 } /* Literal.Number */
-.s { color: #BA2121 } /* Literal.String */
-.na { color: #7D9029 } /* Name.Attribute */
-.nb { color: #008000 } /* Name.Builtin */
-.nc { color: #0000FF; font-weight: bold } /* Name.Class */
-.no { color: #880000 } /* Name.Constant */
-.nd { color: #AA22FF } /* Name.Decorator */
-.ni { color: #999999; font-weight: bold } /* Name.Entity */
-.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
-.nf { color: #0000FF } /* Name.Function */
-.nl { color: #A0A000 } /* Name.Label */
-.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
-.nt { color: #008000; font-weight: bold } /* Name.Tag */
-.nv { color: #19177C } /* Name.Variable */
-.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
-.w { color: #bbbbbb } /* Text.Whitespace */
-.mf { color: #666666 } /* Literal.Number.Float */
-.mh { color: #666666 } /* Literal.Number.Hex */
-.mi { color: #666666 } /* Literal.Number.Integer */
-.mo { color: #666666 } /* Literal.Number.Oct */
-.sb { color: #BA2121 } /* Literal.String.Backtick */
-.sc { color: #BA2121 } /* Literal.String.Char */
-.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
-.s2 { color: #BA2121 } /* Literal.String.Double */
-.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
-.sh { color: #BA2121 } /* Literal.String.Heredoc */
-.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
-.sx { color: #008000 } /* Literal.String.Other */
-.sr { color: #BB6688 } /* Literal.String.Regex */
-.s1 { color: #BA2121 } /* Literal.String.Single */
-.ss { color: #19177C } /* Literal.String.Symbol */
-.bp { color: #008000 } /* Name.Builtin.Pseudo */
-.vc { color: #19177C } /* Name.Variable.Class */
-.vg { color: #19177C } /* Name.Variable.Global */
-.vi { color: #19177C } /* Name.Variable.Instance */
-.il { color: #666666 } /* Literal.Number.Integer.Long */
-.lineno { padding-right: 10px } /* A few space after linenos */
-
-/* Presenter Mode */
-
-body.presenter_view div.slide {
- display: inline;
- position: absolute;
- overflow: hidden;
- -moz-transform: scale(.5, .5);
- -moz-transform-origin: 0 0;
- -webkit-transform: scale(.5, .5);
- -webkit-transform-origin: 0 0;
- -o-transform: scale(.5, .5);
- -o-transform-origin: 0 0;
- margin-top: -300px;
-}
-
-body.presenter_view .slide.far-past {
- display: block;
- margin-left: -1500px;
-}
-
-body.presenter_view .slide.past {
- display: block;
- margin-left: -975px;
-}
-
-body.presenter_view .slide.current {
- display: block;
- margin-left: -475px;
- border: 8px solid maroon;
- z-index: 2;
-}
-
-body.presenter_view .slide.future {
- display: block;
- margin-left: 25px;
- z-index: 1;
-}
-
-body.presenter_view .slide.far-future {
- display: block;
- margin-left: 525px;
-}
-
-body.presenter_view div#current_presenter_notes {
- visibility: visible;
- display: block;
- position: absolute;
- overflow: auto;
- vertical-align: middle;
- left: 50%;
- top: 50%;
- margin-left: -475px;
- margin-top: 100px;
- z-index: 2;
- width: 950px;
- border-style: solid;
- height: 30%;
- background-color: silver;
-}
-
-body.presenter_view div#current_presenter_notes section {
- font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
- color: black;
- text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
- display: block;
- overflow: visible;
- position: relative;
- background-color: #fffeff;
- height: 120px;
- margin-right: 30px;
- margin-top: 60px;
- margin-left: 30px;
- padding-right: 10px;
- padding-left: 10px;
- padding-top: 10px;
-}
-
-body.presenter_view div#current_presenter_notes section p {
- margin: 0;
-}
-
-body.presenter_view div#current_presenter_notes h1 {
- font-size: 50%;
- display: block;
-}
-
-div#current_presenter_notes {
- display: none;
-}
-
-div.slide div.presenter_notes {
- display: none;
-}
-
-#blank {
- position: absolute;
- top: 0;
- left: 0;
- background-color: black;
- width: 100%;
- height: 100%;
- z-index: 64;
- display: none;
-}
-
-.image-reference {
- display: inline;
-}
diff --git a/src/landslide/utils.py b/src/landslide/utils.py
deleted file mode 100644
index bb9bc19..0000000
--- a/src/landslide/utils.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import os
-import base64
-import mimetypes
-
-
-def get_path_url(path, relative=False):
- """ Returns an absolute or relative path url given a path
- """
- if relative:
- return os.path.relpath(path)
- else:
- return 'file://%s' % os.path.abspath(path)
-
-
-def encode_image_from_url(url, source_path):
- if not url or url.startswith('data:') or url.startswith('file://'):
- return False
-
- if (url.startswith('http://') or url.startswith('https://')):
- return False
-
- real_path = url if os.path.isabs(url) else os.path.join(source_path, url)
-
- if not os.path.exists(real_path):
- print('%s was not found, skipping' % url)
- return False
-
- mime_type, encoding = mimetypes.guess_type(real_path)
-
- if not mime_type:
- print('Unrecognized mime type for %s, skipping' % url)
- return False
-
- try:
- with open(real_path, 'rb') as image_file:
- image_contents = image_file.read()
- encoded_image = base64.b64encode(image_contents)
- except IOError:
- return False
- except Exception:
- return False
-
- return u"data:%s;base64,%s" % (mime_type, encoded_image.decode())
diff --git a/src/landslide/watcher.py b/src/landslide/watcher.py
deleted file mode 100644
index 638bd5a..0000000
--- a/src/landslide/watcher.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import sys
-import time
-
-try:
- from watchdog.observers import Observer
- from watchdog.events import FileSystemEventHandler, DirModifiedEvent
-except ImportError:
- print('Error: The watchdog module must be installed to use the -w option')
- print('Exiting...')
- sys.exit(1)
-
-
-def watch(watch_dir, generate_func):
- event_handler = LandslideEventHandler(generate_func)
- observer = Observer()
-
- observer.schedule(event_handler, path=watch_dir, recursive=True)
- observer.start()
-
- try:
- while True:
- time.sleep(1)
- except KeyboardInterrupt:
- observer.stop()
-
- observer.join()
-
-
-class LandslideEventHandler(FileSystemEventHandler):
- def __init__(self, generate_func):
- super(LandslideEventHandler, self).__init__()
-
- self.generate_func = generate_func
-
- def on_modified(self, event):
- if isinstance(event, DirModifiedEvent):
- self.generate_func()
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index aa28494..0000000
--- a/tox.ini
+++ /dev/null
@@ -1,10 +0,0 @@
-# Tox (http://tox.testrun.org/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
-[tox]
-envlist = py27, py34
-
-[testenv]
-commands = python src/landslide/tests.py