{"id":15932625,"url":"https://github.com/snugug/style-prototyping","last_synced_at":"2025-04-30T22:15:46.929Z","repository":{"id":9105118,"uuid":"10885654","full_name":"Snugug/Style-Prototyping","owner":"Snugug","description":null,"archived":false,"fork":false,"pushed_at":"2014-01-29T23:00:42.000Z","size":54613,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-04-30T22:15:43.808Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Snugug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-23T14:15:21.000Z","updated_at":"2014-07-11T05:11:43.000Z","dependencies_parsed_at":"2022-09-06T04:21:34.061Z","dependency_job_id":null,"html_url":"https://github.com/Snugug/Style-Prototyping","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2FStyle-Prototyping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2FStyle-Prototyping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2FStyle-Prototyping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snugug%2FStyle-Prototyping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snugug","download_url":"https://codeload.github.com/Snugug/Style-Prototyping/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789624,"owners_count":21644087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T02:02:58.581Z","updated_at":"2025-04-30T22:15:46.903Z","avatar_url":"https://github.com/Snugug.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.png?branch=master)](https://travis-ci.org/hakimel/reveal.js)\n\nA framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://lab.hakim.se/reveal-js/).\n\nreveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). It's best viewed in a browser with support for CSS 3D transforms but [fallbacks](https://github.com/hakimel/reveal.js/wiki/Browser-Support) are available to make sure your presentation can still be viewed elsewhere.\n\n\n#### More reading in the Wiki:\n- [Changelog](https://github.com/hakimel/reveal.js/wiki/Changelog): Up-to-date version history.\n- [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own!\n- [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks.\n\n## rvl.io\n\nSlides are written using HTML or markdown but there's also an online editor for those of you who prefer a more traditional user interface. Give it a try at [www.rvl.io](http://www.rvl.io).\n\n\n## Instructions\n\n### Markup\n\nMarkup heirarchy needs to be ``\u003cdiv class=\"reveal\"\u003e \u003cdiv class=\"slides\"\u003e \u003csection\u003e`` where the ``\u003csection\u003e`` represents one slide and can be repeated indefinitely. If you place multiple ``\u003csection\u003e``'s inside of another ``\u003csection\u003e`` they will be shown as vertical slides. The first of the vertical slides is the \"root\" of the others (at the top), and it will be included in the horizontal sequence. For example:\n\n```html\n\u003cdiv class=\"reveal\"\u003e\n\t\u003cdiv class=\"slides\"\u003e\n\t\t\u003csection\u003eSingle Horizontal Slide\u003c/section\u003e\n\t\t\u003csection\u003e\n\t\t\t\u003csection\u003eVertical Slide 1\u003c/section\u003e\n\t\t\t\u003csection\u003eVertical Slide 2\u003c/section\u003e\n\t\t\u003c/section\u003e\n\t\u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Markdown\n\nIt's possible to write your slides using Markdown. To enable Markdown, add the ```data-markdown``` attribute to your ```\u003csection\u003e``` elements and wrap the contents in a ```\u003cscript type=\"text/template\"\u003e``` like the example below.\n\nThis is based on [data-markdown](https://gist.github.com/1343518) from [Paul Irish](https://github.com/paulirish) which in turn uses [showdown](https://github.com/coreyti/showdown/). Sensitive to indentation (avoid mixing tabs and spaces) and line breaks (avoid consecutive breaks).\n\n```html\n\u003csection data-markdown\u003e\n\t\u003cscript type=\"text/template\"\u003e\n\t\t## Page title\n\n\t\tA paragraph with some text and a [link](http://hakim.se).\n\t\u003c/script\u003e\n\u003c/section\u003e\n```\n\n#### External Markdown\n\nYou can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file.\n\n```html\n\u003csection data-markdown=\"example.md\" data-separator=\"^\\n\\n\\n\" data-vertical=\"^\\n\\n\"\u003e\u003c/section\u003e\n```\n\n### Configuration\n\nAt the end of your page you need to initialize reveal by running the following code. Note that all config values are optional and will default as specified below.\n\n```javascript\nReveal.initialize({\n\n\t// Display controls in the bottom right corner\n\tcontrols: true,\n\n\t// Display a presentation progress bar\n\tprogress: true,\n\n\t// Push each slide change to the browser history\n\thistory: false,\n\n\t// Enable keyboard shortcuts for navigation\n\tkeyboard: true,\n\n\t// Enable the slide overview mode\n\toverview: true,\n\n\t// Vertical centering of slides\n\tcenter: true,\n\n\t// Loop the presentation\n\tloop: false,\n\n\t// Change the presentation direction to be RTL\n\trtl: false,\n\n\t// Number of milliseconds between automatically proceeding to the\n\t// next slide, disabled when set to 0, this value can be overwritten\n\t// by using a data-autoslide attribute on your slides\n\tautoSlide: 0,\n\n\t// Enable slide navigation via mouse wheel\n\tmouseWheel: false,\n\n\t// Apply a 3D roll to links on hover\n\trollingLinks: true,\n\n\t// Transition style\n\ttransition: 'default' // default/cube/page/concave/zoom/linear/fade/none\n\n});\n```\n\nNote that the new default vertical centering option will break compatibility with slides that were using transitions with backgrounds (`cube` and `page`). To restore the previous behavior, set `center` to `false`.\n\n\nThe configuration can be updated after initialization using the ```configure``` method:\n\n```javascript\n// Turn autoSlide off\nReveal.configure({ autoSlide: 0 });\n\n// Start auto-sliding every 5s\nReveal.configure({ autoSlide: 5000 });\n```\n\n\n### Presentation Size\n\nAll presentations have a normal size, that is the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport.\n\nSee below for a list of configuration options related to sizing, including default values:\n\n```javascript\nReveal.initialize({\n\n\t...\n\n\t// The \"normal\" size of the presentation, aspect ratio will be preserved\n\t// when the presentation is scaled to fit different resolutions. Can be\n\t// specified using percentage units.\n\twidth: 960,\n\theight: 700,\n\n\t// Factor of the display size that should remain empty around the content\n\tmargin: 0.1,\n\n\t// Bounds for smallest/largest possible scale to apply to content\n\tminScale: 0.2,\n\tmaxScale: 1.0\n\n});\n```\n\n\n### Dependencies\n\nReveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example:\n\n```javascript\nReveal.initialize({\n\tdependencies: [\n\t\t// Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/\n\t\t{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },\n\n\t\t// Interpret Markdown in \u003csection\u003e elements\n\t\t{ src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },\n\t\t{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },\n\n\t\t// Syntax highlight for \u003ccode\u003e elements\n\t\t{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },\n\n\t\t// Zoom in and out with Alt+click\n\t\t{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },\n\n\t\t// Speaker notes\n\t\t{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },\n\n\t\t// Remote control your reveal.js presentation using a touch device\n\t\t{ src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }\n\t]\n});\n```\n\nYou can add your own extensions using the same syntax. The following properties are available for each dependency object:\n- **src**: Path to the script to load\n- **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false\n- **callback**: [optional] Function to execute when the script has loaded\n- **condition**: [optional] Function which must return true for the script to be loaded\n\n\n### API\n\nThe ``Reveal`` class provides a minimal JavaScript API for controlling navigation and reading state:\n\n```javascript\n// Navigation\nReveal.slide( indexh, indexv, indexf );\nReveal.left();\nReveal.right();\nReveal.up();\nReveal.down();\nReveal.prev();\nReveal.next();\nReveal.prevFragment();\nReveal.nextFragment();\nReveal.toggleOverview();\n\n// Retrieves the previous and current slide elements\nReveal.getPreviousSlide();\nReveal.getCurrentSlide();\n\nReveal.getIndices(); // { h: 0, v: 0 } }\n```\n\n### States\n\nIf you set ``data-state=\"somestate\"`` on a slide ``\u003csection\u003e``, \"somestate\" will be applied as a class on the document element when that slide is opened. This allows you to apply broad style changes to the page based on the active slide.\n\nFurthermore you can also listen to these changes in state via JavaScript:\n\n```javascript\nReveal.addEventListener( 'somestate', function() {\n\t// TODO: Sprinkle magic\n}, false );\n```\n\n### Ready event\n\nThe 'ready' event is fired when reveal.js has loaded all (synchronous) dependencies and is ready to start navigating.\n\n```javascript\nReveal.addEventListener( 'ready', function( event ) {\n\t// event.currentSlide, event.indexh, event.indexv\n} );\n```\n\n### Slide change event\n\nAn 'slidechanged' event is fired each time the slide is changed (regardless of state). The event object holds the index values of the current slide as well as a reference to the previous and current slide HTML nodes.\n\nSome libraries, like MathJax (see [#226](https://github.com/hakimel/reveal.js/issues/226#issuecomment-10261609)), get confused by the transforms and display states of slides. Often times, this can be fixed by calling their update or render function from this callback.\n\n```javascript\nReveal.addEventListener( 'slidechanged', function( event ) {\n\t// event.previousSlide, event.currentSlide, event.indexh, event.indexv\n} );\n```\n\n### Internal links\n\nIt's easy to link between slides. The first example below targets the index of another slide whereas the second targets a slide with an ID attribute (```\u003csection id=\"some-slide\"\u003e```):\n\n```html\n\u003ca href=\"#/2/2\"\u003eLink\u003c/a\u003e\n\u003ca href=\"#/some-slide\"\u003eLink\u003c/a\u003e\n```\n\nYou can also add relative navigation links, similar to the built in reveal.js controls, by appending one of the following classes on any element. Note that each element is automatically given an ```enabled``` class when it's a valid navigation route based on the current slide.\n\n```html\n\u003ca href=\"#\" class=\"navigate-left\"\u003e\n\u003ca href=\"#\" class=\"navigate-right\"\u003e\n\u003ca href=\"#\" class=\"navigate-up\"\u003e\n\u003ca href=\"#\" class=\"navigate-down\"\u003e\n\u003ca href=\"#\" class=\"navigate-prev\"\u003e \u003c!-- Previous vertical or horizontal slide --\u003e\n\u003ca href=\"#\" class=\"navigate-next\"\u003e \u003c!-- Next vertical or horizontal slide --\u003e\n```\n\n### Alternating transitions\nThe global presentation transition is set using the ```transition``` config value. You can override the global transition for a specific slide by using the ```data-transition``` attribute:\n\n```html\n\u003csection data-transition=\"zoom\"\u003e\n\t\u003ch2\u003eThis slide will override the presentation transition and zoom!\u003c/h2\u003e\n\u003c/section\u003e\n```\n\nNote that this does not work with the page and cube transitions.\n\n\n### Fragments\nFragments are used to highlight individual elements on a slide. Every elmement with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/16\n\nThe default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment:\n\n```html\n\u003csection\u003e\n\t\u003cp class=\"fragment grow\"\u003egrow\u003c/p\u003e\n\t\u003cp class=\"fragment shrink\"\u003eshrink\u003c/p\u003e\n\t\u003cp class=\"fragment roll-in\"\u003eroll-in\u003c/p\u003e\n\t\u003cp class=\"fragment fade-out\"\u003efade-out\u003c/p\u003e\n\t\u003cp class=\"fragment highlight-red\"\u003ehighlight-red\u003c/p\u003e\n\t\u003cp class=\"fragment highlight-green\"\u003ehighlight-green\u003c/p\u003e\n\t\u003cp class=\"fragment highlight-blue\"\u003ehighlight-blue\u003c/p\u003e\n\u003c/section\u003e\n```\n\nMultiple fragments can be applied to the same element sequentially by wrapping it, this will fade in the text on the first step and fade it back out on the second.\n\n```html\n\u003csection\u003e\n\t\u003cspan class=\"fragment fade-in\"\u003e\n\t\t\u003cspan class=\"fragment fade-out\"\u003eI'll fade in, then out\u003c/span\u003e\n\t\u003c/span\u003e\n\u003c/section\u003e\n```\n\nThe display order of fragments can be controlled using the ```data-fragment-index``` attribute.\n\n```html\n\u003csection\u003e\n\t\u003cp class=\"fragment\" data-fragment-index=\"3\"\u003eAppears last\u003c/p\u003e\n\t\u003cp class=\"fragment\" data-fragment-index=\"1\"\u003eAppears first\u003c/p\u003e\n\t\u003cp class=\"fragment\" data-fragment-index=\"2\"\u003eAppears second\u003c/p\u003e\n\u003c/section\u003e\n```\n\n### Fragment events\n\nWhen a slide fragment is either shown or hidden reveal.js will dispatch an event.\n\n```javascript\nReveal.addEventListener( 'fragmentshown', function( event ) {\n\t// event.fragment = the fragment DOM element\n} );\nReveal.addEventListener( 'fragmenthidden', function( event ) {\n\t// event.fragment = the fragment DOM element\n} );\n```\n\n### Code syntax highlighting\n\nBy default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) for code syntax highlighting. Below is an example with clojure code that will be syntax highlighted:\n\n```html\n\u003csection\u003e\n\t\u003cpre\u003e\u003ccode\u003e\n(def lazy-fib\n  (concat\n   [0 1]\n   ((fn rfib [a b]\n        (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))\n\t\u003c/code\u003e\u003c/pre\u003e\n\u003c/section\u003e\n```\n\n\n### Overview mode\n\nPress \"Esc\" key to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides,\nas if you were at 1,000 feet above your presentation. The overview mode comes with a few API hooks:\n\n```javascript\nReveal.addEventListener( 'overviewshown', function( event ) { /* ... */ } );\nReveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } );\n\n// Toggle the overview mode programmatically\nReveal.toggleOverview();\n```\n\n### Fullscreen mode\nJust press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode.\n\n\n## PDF Export\n\nPresentations can be exported to PDF via a special print stylesheet. This feature requires that you use [Google Chrome](http://google.com/chrome).\nHere's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-13872948.\n\n1. Open your presentation with [css/print/pdf.css](https://github.com/hakimel/reveal.js/blob/master/css/print/pdf.css) included on the page. The default index HTML lets you add *print-pdf* anywhere in the query to include the stylesheet, for example: [lab.hakim.se/reveal-js?print-pdf](http://lab.hakim.se/reveal-js?print-pdf).\n2. Open the in-browser print dialog (CMD+P).\n3. Change the **Destination** setting to **Save as PDF**.\n4. Change the **Layout** to **Landscape**.\n5. Change the **Margins** to **None**.\n6. Click **Save**.\n\n![Chrome Print Settings](https://s3.amazonaws.com/hakim-static/reveal-js/pdf-print-settings.png)\n\n\n## Speaker Notes\n\nreveal.js comes with a speaker notes plugin which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Append ```?notes``` to the presentation URL or press the 's' key on your keyboard to open the notes window.\n\nBy default notes are written using standard HTML, see below, but you can add a ```data-markdown``` attribute to the ```\u003caside\u003e``` to write them using Markdown.\n\n```html\n\u003csection\u003e\n\t\u003ch2\u003eSome Slide\u003c/h2\u003e\n\n\t\u003caside class=\"notes\"\u003e\n\t\tOh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).\n\t\u003c/aside\u003e\n\u003c/section\u003e\n```\n\n## Server Side Speaker Notes\n\nIn some cases it can be desirable to run notes on a separate device from the one you're presenting on. The Node.js-based notes plugin lets you do this using the same note definitions as its client side counterpart. Include the required scripts by adding the following dependencies:\n\n```javascript\nReveal.initialize({\n\t...\n\n\tdependencies: [\n\t\t{ src: 'socket.io/socket.io.js', async: true },\n\t\t{ src: 'plugin/notes-server/client.js', async: true }\n\t]\n});\n```\n\nThen:\n\n1. Install [Node.js](http://nodejs.org/)\n2. Run ```npm install```\n3. Run ```node plugin/notes-server```\n\n\n## Multiplexing\n\nThe multiplex plugin allows your audience to view the slides on their own phone, tablet or laptop. As the master navigates the slides, all clients will update in real time. See a demo at [http://revealjs.jit.su/](http://revealjs.jit.su).\n\nConfiguration is via the multiplex object in ```Reveal.initialize```. To generate unique secret and token values, visit [revealjs.jit.su/token](http://revealjs.jit.su/token). Below is an example configuration with the multiplex plugin enabled:\n\n```javascript\nReveal.initialize({\n\t...\n\n\t// Generate a unique id and secret at revealjs.jit.su/token\n\tmultiplex: {\n\t\tid: '',\n\t\tsecret: '',\n\t\turl: 'revealjs.jit.su:80'\n\t},\n\n\tdependencies: [\n\t\t{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },\n\t\t{ src: 'plugin/multiplex/client.js', async: true },\n\t\t{ src: 'plugin/multiplex/master.js', async: true },\n\t]\n});\n```\n\n```multiplex.secret``` should only be configured on those pages you wish to be able to control slide navigation for all clients. Multi-master configurations work, but if you don't wish your audience to be able to control your slides, set the secret to ``null``. In this master/slave setup, you should create a publicly accessible page with secret set to ``null``, and a protected page containing your secret.\n\nYou are very welcome to use the socketio server running at reveal.jit.su, however availability and stability are not guaranteed. For anything mission critical I recommend you run your own server. It is simple to deploy to nodejitsu or run on your own environment.\n\n\n## Theming\n\nThe framework comes with a few different themes included:\n\n- default: Gray background, white text, blue links\n- beige: Beige background, dark text, brown links\n- sky: Blue background, thin white text, blue links\n- night: Black background, thick white text, orange links\n- serif: Cappuccino background, gray text, brown links\n- simple: White background, black text, blue links\n\nEach theme is available as a separate stylesheet. To change theme you will need to replace **default** below with your desired theme name in index.html:\n\n```html\n\u003clink rel=\"stylesheet\" href=\"css/theme/default.css\" id=\"theme\"\u003e\n```\n\nIf you want to add a theme of your own see the instructions here: [/css/theme/README.md](https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md).\n\n\n## Development Environment\n\nreveal.js is built using the task-based command line build tool [grunt.js](http://gruntjs.com) ([installation instructions](http://gruntjs.com/getting-started#installing-the-cli)). With Node.js and grunt.js installed, you need to start by running ```npm install``` in the reveal.js root. When the dependencies have been installed you should run ```grunt watch``` to start monitoring files for changes.\n\nIf you want to customise reveal.js without running grunt.js you can alter the HTML to point to the uncompressed source files (css/reveal.css \u0026 js/reveal.js).\n\n### Folder Structure\n- **css/** Core styles without which the project does not function\n- **js/** Like above but for JavaScript\n- **plugin/** Components that have been developed as extensions to reveal.js\n- **lib/** All other third party assets (JavaScript, CSS, fonts)\n\n\n## License\n\nMIT licensed\n\nCopyright (C) 2013 Hakim El Hattab, http://hakim.se\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnugug%2Fstyle-prototyping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnugug%2Fstyle-prototyping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnugug%2Fstyle-prototyping/lists"}