├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── encodings.xml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── LICENSE ├── README.asciidoc ├── java9-in-action.iml ├── playground-dependent ├── playground-dependent.iml └── src │ └── main │ └── java │ └── de │ └── exxcellent │ └── anothermodule │ ├── RetrieveModuleInfo.java │ ├── TestJigsawSPI.java │ ├── TestModuleEncapuslation.java │ ├── module-info.java │ └── spi │ ├── MastercardBillingService.java │ └── MastercardBillingServiceProvider.java ├── playground ├── playground.iml └── src │ └── main │ └── java │ └── de │ └── exxcellent │ └── java9 │ ├── collections │ └── ImmutableCollections.java │ ├── http │ └── HttpClientExample.java │ ├── jigsaw │ ├── BillingService.java │ └── spi │ │ └── BillingServiceProvider.java │ ├── module-info.java │ ├── process │ └── ControlProcess.java │ └── util │ ├── InputStreamExample.java │ └── StackWalkerExample.java ├── presentation ├── HOWTO-PDF-erzeugen.md ├── LICENSE ├── css │ ├── custom.css │ ├── print │ │ ├── paper.css │ │ └── pdf.css │ ├── reveal.css │ └── theme │ │ └── black.css ├── img │ ├── .gitignore │ ├── BenjaminSchmid.jpg │ ├── javadoc-html5-example.png │ └── puzzle.jpg ├── index.html ├── js │ ├── reveal.js │ └── zepto.min.js ├── lib │ ├── css │ │ └── zenburn.css │ ├── font │ │ └── source-sans-pro │ │ │ ├── LICENSE │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ └── source-sans-pro.css │ └── js │ │ ├── classList.js │ │ ├── head.min.js │ │ └── html5shiv.js └── plugin │ ├── highlight │ └── highlight.js │ ├── leap │ └── leap.js │ ├── markdown │ ├── example.html │ ├── example.md │ ├── markdown.js │ └── marked.js │ ├── math │ └── math.js │ ├── multiplex │ ├── client.js │ ├── index.js │ └── master.js │ ├── notes-server │ ├── client.js │ ├── index.js │ └── notes.html │ ├── notes │ ├── notes.html │ └── notes.js │ ├── print-pdf │ └── print-pdf.js │ ├── remotes │ └── remotes.js │ ├── search │ └── search.js │ └── zoom-js │ └── zoom.js └── run-with-modules /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### JetBrains template 3 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 4 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 5 | 6 | # User-specific stuff: 7 | .idea/workspace.xml 8 | .idea/tasks.xml 9 | .idea/dictionaries 10 | .idea/jsLibraryMappings.xml 11 | .idea/copyright/ 12 | 13 | # Sensitive or high-churn files: 14 | .idea/dataSources.ids 15 | .idea/dataSources.xml 16 | .idea/dataSources.local.xml 17 | .idea/sqlDataSources.xml 18 | .idea/dynamic.xml 19 | .idea/uiDesigner.xml 20 | 21 | # Gradle: 22 | .idea/gradle.xml 23 | .idea/libraries 24 | 25 | # Mongo Explorer plugin: 26 | .idea/mongoSettings.xml 27 | 28 | ## File-based project format: 29 | *.iws 30 | 31 | ## Plugin-specific files: 32 | 33 | # IntelliJ 34 | /out/ 35 | 36 | # mpeltonen/sbt-idea plugin 37 | .idea_modules/ 38 | 39 | # JIRA plugin 40 | atlassian-ide-plugin.xml 41 | 42 | target/ 43 | 44 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | java9-in-action -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.asciidoc: -------------------------------------------------------------------------------- 1 | = Java 9 - What's hot, whats not 2 | Benjamin Schmid 3 | 4 | == Introduction 5 | This repository & RevealJS HTML slide presentation tries to give an overview 6 | over the improvments coming with Java 9. 7 | 8 | It's based on the current state as of 2016-07-01. 9 | 10 | == Contents 11 | 12 | [cols="1,3"] 13 | |=== 14 | |`presentation` | A short RevealJS based presentation. Just open `index.html` 15 | |`playground` | Extensive collection of various one-class code examples illustrating the changes. Start here for your experiments! 16 | |`playground-dependent` | Another Jigsaw module depending on `playground` and 17 | demonstrating Service Provider with modules. 18 | |`run-with-modules` | Bash script demonstrating how to compile & run the example 19 | as modules using the new Java9 command line parameters 20 | |=== 21 | 22 | == Getting started 23 | 1. Install Java 9 EAP 24 | 2. Ensure `JAVA_HOME` and `PATH` points to Java 9 25 | 3. Open project with IntelliJ IDEA 2016.2+ or run `run-with-modules` 26 | 27 | ---- 28 | $ env | grep JAVA_HOME 29 | JAVA_HOME=/usr/lib/jvm/java-9-oracle 30 | $ javac -version 31 | javac 9-ea 32 | $ java -version 33 | java version "9-ea" 34 | Java(TM) SE Runtime Environment (build 9-ea+123) 35 | Java HotSpot(TM) 64-Bit Server VM (build 9-ea+123, mixed mode) 36 | ---- 37 | 38 | -------------------------------------------------------------------------------- /java9-in-action.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /playground-dependent/playground-dependent.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /playground-dependent/src/main/java/de/exxcellent/anothermodule/RetrieveModuleInfo.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.anothermodule; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.lang.module.ModuleDescriptor; 6 | import static java.lang.System.out; 7 | 8 | public class RetrieveModuleInfo { 9 | 10 | /** 11 | * Show module infos 12 | */ 13 | public static void main(String[] args) throws IOException { 14 | ModuleDescriptor descriptor = RetrieveModuleInfo.class.getModule().getDescriptor(); 15 | 16 | if (descriptor == null) { 17 | out.println("JVM started without '-mp' option. Trying to load module-info manually..."); 18 | descriptor = readModuleDescriptorFromBytecode(); 19 | } 20 | 21 | printModule(descriptor); 22 | } 23 | 24 | static void printModule(ModuleDescriptor descriptor) { 25 | out.println("Module " + descriptor.name()); 26 | descriptor.exports().forEach( 27 | export -> out.println("\texports " + export.source()) 28 | ); 29 | descriptor.requires().forEach( 30 | requires -> out.println("\trequires " + requires.name() + " " + requires.modifiers()) 31 | ); 32 | } 33 | 34 | static ModuleDescriptor readModuleDescriptorFromBytecode() throws IOException { 35 | InputStream moduleInfo = RetrieveModuleInfo.class.getClassLoader().getResourceAsStream("module-info.class"); 36 | return ModuleDescriptor.read(moduleInfo); 37 | } 38 | 39 | 40 | } -------------------------------------------------------------------------------- /playground-dependent/src/main/java/de/exxcellent/anothermodule/TestJigsawSPI.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.anothermodule; 2 | 3 | import de.exxcellent.java9.jigsaw.BillingService; 4 | import static java.lang.System.out; 5 | 6 | public class TestJigsawSPI { 7 | 8 | public static void main(String[] args) { 9 | BillingService s = BillingService.getInstance(); 10 | out.println(s.takeMoney()); 11 | } 12 | } -------------------------------------------------------------------------------- /playground-dependent/src/main/java/de/exxcellent/anothermodule/TestModuleEncapuslation.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.anothermodule; 2 | 3 | import de.exxcellent.java9.collections.ImmutableCollections; 4 | 5 | /** 6 | * Test module encapsulation 7 | */ 8 | public class TestModuleEncapuslation { 9 | 10 | public static void main(String[] args) { 11 | ImmutableCollections.main(args); 12 | 13 | // Would break, as it is not exported. Though it's public! 14 | // de.exxcellent.java9.util.InputStreamExample.main(args); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /playground-dependent/src/main/java/de/exxcellent/anothermodule/module-info.java: -------------------------------------------------------------------------------- 1 | module anothermodule { 2 | exports de.exxcellent.anothermodule; 3 | requires de.exxcellent.java9; 4 | 5 | // Provide Service instance (SPI with Jigsaw modules) 6 | provides de.exxcellent.java9.jigsaw.spi.BillingServiceProvider 7 | with de.exxcellent.anothermodule.spi.MastercardBillingServiceProvider; 8 | } -------------------------------------------------------------------------------- /playground-dependent/src/main/java/de/exxcellent/anothermodule/spi/MastercardBillingService.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.anothermodule.spi; 2 | 3 | import de.exxcellent.java9.jigsaw.BillingService; 4 | 5 | class MastercardBillingService extends BillingService { 6 | 7 | @Override 8 | public String takeMoney() { 9 | return "Mastercard billed the money!"; 10 | } 11 | } -------------------------------------------------------------------------------- /playground-dependent/src/main/java/de/exxcellent/anothermodule/spi/MastercardBillingServiceProvider.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.anothermodule.spi; 2 | 3 | import de.exxcellent.java9.jigsaw.BillingService; 4 | import de.exxcellent.java9.jigsaw.spi.BillingServiceProvider; 5 | 6 | public class MastercardBillingServiceProvider extends BillingServiceProvider { 7 | 8 | @Override 9 | public BillingService buildBillingService() { 10 | return new MastercardBillingService(); 11 | } 12 | } -------------------------------------------------------------------------------- /playground/playground.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/collections/ImmutableCollections.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.collections; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | import java.util.Set; 6 | import static java.lang.System.*; 7 | 8 | public class ImmutableCollections { 9 | 10 | /** 11 | * Create immutable collections on the fly. 12 | * Note: They do not accept {@code null} or duplicate entries (Set/Map) 13 | */ 14 | public static void main(String args[]) { 15 | List listOfNumbers = List.of(1, 2, 3, 4, 5/*, null*/); 16 | out.println(listOfNumbers); 17 | 18 | Set setOfNumbers = Set.of(1, 2, 3, 4, 5/*, 1*/); 19 | out.println(setOfNumbers); 20 | 21 | Map mapOfString = Map.of("key1", "value1", "key2", "value2"); 22 | out.println(mapOfString); 23 | 24 | Map moreMapOfString = Map.ofEntries( 25 | Map.entry("key1", "value1"), 26 | Map.entry("key2", "value2")/*, 27 | Map.entry("key1", "value3")*/ 28 | ); 29 | out.println(moreMapOfString); 30 | } 31 | } -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/http/HttpClientExample.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.http; 2 | 3 | import java.net.URI; 4 | import java.net.http.HttpClient; 5 | import java.net.http.HttpResponse; 6 | import static java.lang.System.out; 7 | 8 | public class HttpClientExample { 9 | 10 | /** 11 | * The HTTP API functions asynchronously & synchronously. In asynchronous mode, 12 | * work is done on the threads supplied by the client's ExecutorService. 13 | */ 14 | public static void main(String[] args) throws Exception { 15 | HttpClient.getDefault() 16 | .request(URI.create("https://www.exxcellent.de")) 17 | .GET() 18 | .responseAsync() // CompletableFuture :D 19 | .thenAccept(httpResponse -> 20 | out.println(httpResponse.body(HttpResponse.asString())) 21 | ); 22 | 23 | Thread.sleep(999); // Give worker thread some time. 24 | } 25 | } -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/jigsaw/BillingService.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.jigsaw; 2 | 3 | import java.util.Iterator; 4 | import java.util.ServiceLoader; 5 | import de.exxcellent.java9.jigsaw.spi.BillingServiceProvider; 6 | 7 | public abstract class BillingService { 8 | 9 | protected BillingService() { 10 | } 11 | 12 | public static BillingService getInstance() { 13 | // Java SPI to find the instance 14 | ServiceLoader sl = ServiceLoader.load(BillingServiceProvider.class); 15 | 16 | // Fetch first provider implementation 17 | Iterator providerIterator = sl.iterator(); 18 | if (!providerIterator.hasNext()) { 19 | throw new RuntimeException("No service providers found!"); 20 | } 21 | 22 | BillingServiceProvider provider = providerIterator.next(); 23 | 24 | return provider.buildBillingService(); 25 | } 26 | 27 | public abstract String takeMoney(); 28 | } 29 | -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/jigsaw/spi/BillingServiceProvider.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.jigsaw.spi; 2 | 3 | import de.exxcellent.java9.jigsaw.BillingService; 4 | 5 | public abstract class BillingServiceProvider { 6 | 7 | public abstract BillingService buildBillingService(); 8 | } -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/module-info.java: -------------------------------------------------------------------------------- 1 | module de.exxcellent.java9 { 2 | exports de.exxcellent.java9.collections; 3 | 4 | // Depend on an offficial JDK modules 5 | // full list see http://cr.openjdk.java.net/~mr/jigsaw/ea/module-summary.html 6 | requires java.httpclient; 7 | 8 | // Service example (SPI with Jigsaw modules) 9 | exports de.exxcellent.java9.jigsaw; 10 | exports de.exxcellent.java9.jigsaw.spi; 11 | uses de.exxcellent.java9.jigsaw.spi.BillingServiceProvider; 12 | } -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/process/ControlProcess.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.process; 2 | 3 | import java.io.IOException; 4 | import static java.lang.System.out; 5 | 6 | public class ControlProcess { 7 | 8 | /** 9 | * Start a process, listen to process termination, retrieve process details, kill processes. 10 | */ 11 | public static void main(String[] args) throws IOException, InterruptedException { 12 | Process sleeper = Runtime.getRuntime().exec("sleep 1h"); 13 | 14 | // Get PIDs of own or started processes 15 | out.println("Your pid is " + ProcessHandle.current().getPid()); 16 | out.println("Started process is " + sleeper.getPid()); 17 | 18 | ProcessHandle sleeperHandle = ProcessHandle.of(sleeper.getPid()) // Optional 19 | .orElseThrow(IllegalStateException::new); 20 | 21 | // Do things on exiting process 22 | sleeperHandle.onExit().thenRun( // CompletableFuture 23 | () -> out.println("Sleeper exited") 24 | ); 25 | 26 | // Get info on process 27 | out.printf("[%d] %s - %s\n", 28 | sleeperHandle.getPid(), 29 | sleeperHandle.info().user().orElse("unknown"), 30 | sleeperHandle.info().commandLine().orElse("none")); 31 | 32 | // Kill a process 33 | sleeperHandle.destroy(); 34 | 35 | // Give exit handler a chance to see the sleeper onExit() 36 | Thread.sleep(99); 37 | } 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/util/InputStreamExample.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.util; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.IOException; 5 | import java.util.Random; 6 | 7 | public class InputStreamExample { 8 | 9 | /** 10 | * Stream utilities. 11 | */ 12 | public static void main(String[] args) throws IOException { 13 | // 128 random bytes 14 | byte[] buf = new byte[128]; 15 | new Random().nextBytes(buf); 16 | 17 | // All bytes from an InputStream at once 18 | byte[] result = new ByteArrayInputStream(buf).readAllBytes(); 19 | 20 | // Directly redirect an InputStream to an OutputStream 21 | new ByteArrayInputStream(buf).transferTo(System.out); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /playground/src/main/java/de/exxcellent/java9/util/StackWalkerExample.java: -------------------------------------------------------------------------------- 1 | package de.exxcellent.java9.util; 2 | 3 | import java.util.List; 4 | import java.util.stream.Collectors; 5 | import static java.lang.System.out; 6 | 7 | public class StackWalkerExample { 8 | 9 | /** 10 | * Easily traverse stackframes. 11 | */ 12 | public static void main(String[] args) { 13 | walkAndFilterStackframe().forEach(out::println); 14 | } 15 | 16 | // return class/method only for our classes. 17 | private static List walkAndFilterStackframe() { 18 | return StackWalker.getInstance().walk(s -> 19 | s.map( frame -> frame.getClassName()+"/"+frame.getMethodName() ) 20 | .filter(name -> name.startsWith("de.exxcellent")) 21 | .limit(10) 22 | .collect(Collectors.toList()) 23 | ); 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /presentation/HOWTO-PDF-erzeugen.md: -------------------------------------------------------------------------------- 1 | Der in RevealJS eingebaute Weg ein PDF-File zu machen funktioniert nicht: Es verhaut das komplette Layout. 2 | 3 | Folgender Weg führte bei mir zum Ziel 4 | 5 | 1. Plugin "Screengrab!" für Firefox installieren 6 | 2. Konfigurieren, dass bei Druck auf das Plugin-icon _automatisch_ ein 7 | Screeshot des _aktuell sichtbaren Bereichs_ ohne Nachfrage als `.png` 8 | gespeichert wird 9 | 3. Presentation durchsteppen & shots machen 10 | 4. `convert *.png docker-file.pdf` 11 | -------------------------------------------------------------------------------- /presentation/LICENSE: -------------------------------------------------------------------------------- 1 | Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. 2 | 3 | Based in parts on the work of Reveal.JS 4 | 5 | 6 | -------------------------------------------------------------------------------------------------------- 7 | 8 | Copyright (C) 2014 Hakim El Hattab, http://hakim.se 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in 18 | all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | THE SOFTWARE. 27 | 28 | 29 | 30 | 31 | 32 | The MIT License (MIT) 33 | Copyright (c) 2013 Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft 34 | Permission is hereby granted, free of charge, to any person obtaining a copy 35 | of this software and associated documentation files (the "Software"), to deal 36 | in the Software without restriction, including without limitation the rights 37 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 38 | copies of the Software, and to permit persons to whom the Software is 39 | furnished to do so, subject to the following conditions: 40 | The above copyright notice and this permission notice shall be included in all 41 | copies or substantial portions of the Software. 42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 43 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 45 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 47 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 48 | SOFTWARE. 49 | -------------------------------------------------------------------------------- /presentation/css/custom.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Montserrat:400,700|Montserrat+Alternates); 2 | @import url(https://fonts.googleapis.com/css?family=Rajdhani:400,700,600,500,300); 3 | 4 | /* Decent regular text, emphasize strongs .*/ 5 | .reveal { 6 | color: #ccc; 7 | font-family: 'Rajdhani', sans-serif; 8 | font-size: 42px; 9 | } 10 | 11 | .reveal .decent { 12 | color: #666; 13 | } 14 | 15 | .reveal strong, .reveal h1, .reveal h2 { 16 | color: #ffffff; 17 | margin: 0 0 .6em 0; 18 | font-weight: 700; 19 | letter-spacing: -0.03em; 20 | } 21 | 22 | /* Prägnantere Überschriften-Font. */ 23 | .reveal h1, 24 | .reveal h2, 25 | .reveal h3, 26 | .reveal h4, 27 | .reveal h5, 28 | .reveal h6 { 29 | font-family: "Montserrat", Impact, sans-serif; 30 | line-height: 1em; } 31 | .reveal h3, 32 | .reveal h4 { 33 | color: #ccc; } 34 | .reveal h3, 35 | .reveal h4, 36 | .reveal h5, 37 | .reveal h6 { 38 | font-family: "Montserrat Alternates", Impact, sans-serif; 39 | text-transform: none; 40 | font-weight: 700; } 41 | .reveal h5, 42 | .reveal h6 { 43 | font-family: 'Rajdhani', sans-serif; 44 | margin: 1em 0 .3em 0; 45 | color: #fff; 46 | text-align: left; 47 | font-weight: 700; 48 | letter-spacing: -0.03em; 49 | font-size: 100%; 50 | } 51 | 52 | /* Aufzählung nicht zentrieren, wenn sie in einem Shrinking Container stecken.*/ 53 | .reveal .container ol, .reveal .container dl, .reveal .container ul { 54 | display:table; 55 | } 56 | 57 | 58 | #licence { left: 0; position: absolute; top: 560px; z-index: 1; font-size: 0.46em; 59 | color: #ccc; width: 100%; text-align: right } 60 | #licence a { color: #aaf; text-decoration: underline;} 61 | #licence img { border:0; margin:4px 0 0 0; opacity: 0.4; } 62 | #version, #helpfooter, #rightsection { 63 | position: absolute; text-align: center; top: 500px; z-index: 1; font-size: .7em; color: #ccc; width: 100%; 64 | } 65 | #version { text-align: center } 66 | #helpfooter { text-align: left } 67 | #rightsection { text-align: right } 68 | /* --- Layout Hilfen --------------------------------------------------- */ 69 | 70 | /* Shrinking DIV */ 71 | .reveal DIV.container { 72 | display: inline-block; 73 | } 74 | 75 | .reveal .pc90 { 76 | max-width: 90%; 77 | } 78 | 79 | /* poor-mans 3col layout */ 80 | .col3-l { float: left; width: 32% } 81 | .col3-c { width: 32%; display: inline-block; } 82 | .col3-r { float: right; width: 32% } 83 | 84 | .small p, .small li, p.small, div.small, span.small, .small code { 85 | font-size: 86% !important; 86 | } 87 | .x-small p, .x-small li, p.x-small, div.x-small, .x-small code { 88 | font-size: 64% !important; 89 | } 90 | 91 | /* --- Darstellung Tweaks ----------------------------------------------- */ 92 | 93 | /* Blaue Hervorhebung */ 94 | .reveal .emphasize { 95 | color: #fa4242; } 96 | 97 | /* Kein max height für Codeblöcke */ 98 | .reveal pre code { 99 | max-height: none; 100 | } 101 | 102 | /* Plain Images ohne Buzz */ 103 | .reveal img.plain { 104 | margin: 0; 105 | background: none; 106 | border: none; 107 | box-shadow: none; } 108 | 109 | /* Plain Images ohne Buzz */ 110 | .reveal img.flag { 111 | margin: 0; 112 | background: none; 113 | border: none; 114 | box-shadow: none; 115 | height: 0.8em;} 116 | 117 | /* Left-Floating Icon. */ 118 | .reveal img.floaticon { 119 | max-width: 120px; 120 | margin: .2em .7em .2em 0; 121 | float: left; 122 | clear: both; } 123 | /* Label für Floaticon */ 124 | .reveal p.floaticon { 125 | margin-left: 150px; } 126 | 127 | /* Hintergrund abschwächen */ 128 | body { 129 | background-color: #000; } 130 | .backgrounds { 131 | opacity: 0.3; } 132 | 133 | /* Top & bottom gaps */ 134 | .tgap { 135 | margin-top: .8em !important } 136 | .bgap { 137 | margin-bottom: .8em !important } 138 | .reveal .glow { 139 | text-shadow: 0 0 0.5em #ccc, 0 0 0.5em #ccc; 140 | -webkit-filter: drop-shadow(0px 0px 30px rgba(255,255,255,1)); 141 | filter: drop-shadow(0px 0px 30px rgba(255,255,255,1)); 142 | } 143 | 144 | /* Inline code */ 145 | .reveal code { 146 | border-radius: 5px; 147 | padding: 0 7px 2px; 148 | border: 1px solid rgba(255,255,255,.4); 149 | background: rgba(63,63,63,.8); 150 | font-size: .8em; 151 | white-space: nowrap; } 152 | .reveal pre code { 153 | padding: 20px; 154 | background: rgba(63,63,63,.8); 155 | border: none; 156 | font-size: 1.2em; 157 | line-height: 1.2em; 158 | white-space: pre-wrap; } 159 | 160 | /* Absatzabstand */ 161 | .reveal p { 162 | margin: .4em 0 .2em 0; } 163 | /* Text links*/ 164 | /*.reveal .slides p { 165 | text-align: left; }*/ 166 | /* Listen: Größerer linker Einzug. */ 167 | .reveal ol, .reveal dl, .reveal ul { 168 | margin: 0 0 0 1.6em; } 169 | 170 | /* TOC 2-spaltig*/ 171 | #table-of-contents ol { 172 | list-style-position: inside; 173 | -moz-column-count: 2; 174 | -moz-column-gap: 60px; 175 | -webkit-column-count: 2; 176 | -webkit-column-gap: 60px; 177 | column-count: 2; 178 | column-gap: 60px; 179 | } 180 | 181 | /* TOC kleiner & dezenter */ 182 | #table-of-contents li{ 183 | font-size: 0.9em; 184 | line-height: 1.8em; 185 | color: rgb(141, 207, 252); 186 | } 187 | 188 | /* ID cards auf Einstiegsfolie ------------------------------------------------------ */ 189 | .reveal DIV.profile { 190 | margin: 60px 30px; 191 | width: 400px; 192 | font-size: .9em; 193 | font-weight: 200; 194 | float: left; 195 | } 196 | .profile .profile-sidebar { 197 | padding: 10px 0 10px 0; 198 | border: 1px solid rgba(125,125,100,1); 199 | background: rgba(63,63,50,.7); 200 | } 201 | .profile .profile-userpic { 202 | padding: 0px 10px 203 | } 204 | .profile .profile-userpic img { 205 | float: left; 206 | margin: 0 auto ; 207 | width: 100px; 208 | height: 100px; 209 | -webkit-border-radius: 50% !important; 210 | -moz-border-radius: 50% !important; 211 | border-radius: 50% !important; 212 | } 213 | .profile .profile-usertitle { 214 | text-align: center; 215 | margin-top: .6em; 216 | font-weight: 700; 217 | } 218 | .profile .profile-usertitle-name { 219 | font-size: .8em; 220 | font-weight: 600; 221 | line-height: 1em; 222 | } 223 | .profile .profile-usertitle-job { 224 | color: #f99; 225 | font-size: 0.75em; 226 | font-weight: 300; 227 | } 228 | .profile .profile-content { 229 | padding: 5px; 230 | border: 1px solid rgba(255,255,255,.2); 231 | background: rgba(63,63,63,.8); 232 | font-size: 0.6em; 233 | font-weight: 600; 234 | 235 | } 236 | /* ------------------------------------------------------------*/ 237 | .twocol { 238 | width:48%; 239 | float:left; 240 | } 241 | 242 | /* Aufzählung nicht zentrieren im 2col layout.*/ 243 | .reveal .twocol ol, .reveal .twocol dl, .reveal .twocol ul { 244 | display:table; 245 | } 246 | 247 | /* Keine Einengung der width*/ 248 | .reveal blockquote { 249 | width: 80%; 250 | text-align: left; 251 | } 252 | 253 | 254 | /* --------------------------------------------------------- */ 255 | /* a specially decent code ref */ 256 | .c-ref { 257 | font-weight: lighter !important; 258 | font-size: 50% !important; 259 | vertical-align: super !important; 260 | margin: 0 8px !important; 261 | opacity: 0.6 !important; 262 | } 263 | .c-ref > code { 264 | border: 1px solid rgba(255,255,255,.6) !important; 265 | background: darkblue !important; 266 | } 267 | A.c-ref > code { 268 | color: whitesmoke !important; 269 | text-decoration: underline !important; 270 | } 271 | 272 | 273 | .jep { 274 | font-weight: bold !important; 275 | font-size: 45% !important; 276 | vertical-align: super !important; 277 | margin: 0 8px !important; 278 | color: cornsilk !important; 279 | border-radius: 5px !important; 280 | padding: 0 7px 2px !important; 281 | border: 1px solid rgba(255,255,255,.6) !important; 282 | background: olivedrab !important; 283 | } 284 | 285 | .left { 286 | text-align: left; 287 | } 288 | -------------------------------------------------------------------------------- /presentation/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .nestedarrow, 36 | .controls, 37 | .fork-reveal, 38 | .share-reveal, 39 | .state-background, 40 | .reveal .progress, 41 | .reveal .backgrounds { 42 | display: none !important; 43 | } 44 | 45 | /* SECTION 3: Set body font face, size, and color. 46 | Consider using a serif font for readability. */ 47 | body, p, td, li, div { 48 | font-size: 20pt!important; 49 | font-family: Georgia, "Times New Roman", Times, serif !important; 50 | color: #000; 51 | } 52 | 53 | /* SECTION 4: Set heading font face, sizes, and color. 54 | Differentiate your headings from your body text. 55 | Perhaps use a large sans-serif for distinction. */ 56 | h1,h2,h3,h4,h5,h6 { 57 | color: #000!important; 58 | height: auto; 59 | line-height: normal; 60 | font-family: Georgia, "Times New Roman", Times, serif !important; 61 | text-shadow: 0 0 0 #000 !important; 62 | text-align: left; 63 | letter-spacing: normal; 64 | } 65 | /* Need to reduce the size of the fonts for printing */ 66 | h1 { font-size: 28pt !important; } 67 | h2 { font-size: 24pt !important; } 68 | h3 { font-size: 22pt !important; } 69 | h4 { font-size: 22pt !important; font-variant: small-caps; } 70 | h5 { font-size: 21pt !important; } 71 | h6 { font-size: 20pt !important; font-style: italic; } 72 | 73 | /* SECTION 5: Make hyperlinks more usable. 74 | Ensure links are underlined, and consider appending 75 | the URL to the end of the link for usability. */ 76 | a:link, 77 | a:visited { 78 | color: #000 !important; 79 | font-weight: bold; 80 | text-decoration: underline; 81 | } 82 | /* 83 | .reveal a:link:after, 84 | .reveal a:visited:after { 85 | content: " (" attr(href) ") "; 86 | color: #222 !important; 87 | font-size: 90%; 88 | } 89 | */ 90 | 91 | 92 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 93 | ul, ol, div, p { 94 | visibility: visible; 95 | position: static; 96 | width: auto; 97 | height: auto; 98 | display: block; 99 | overflow: visible; 100 | margin: 0; 101 | text-align: left !important; 102 | } 103 | .reveal pre, 104 | .reveal table { 105 | margin-left: 0; 106 | margin-right: 0; 107 | } 108 | .reveal pre code { 109 | padding: 20px; 110 | border: 1px solid #ddd; 111 | } 112 | .reveal blockquote { 113 | margin: 20px 0; 114 | } 115 | .reveal .slides { 116 | position: static !important; 117 | width: auto !important; 118 | height: auto !important; 119 | 120 | left: 0 !important; 121 | top: 0 !important; 122 | margin-left: 0 !important; 123 | margin-top: 0 !important; 124 | padding: 0 !important; 125 | zoom: 1 !important; 126 | 127 | overflow: visible !important; 128 | display: block !important; 129 | 130 | text-align: left !important; 131 | -webkit-perspective: none; 132 | -moz-perspective: none; 133 | -ms-perspective: none; 134 | perspective: none; 135 | 136 | -webkit-perspective-origin: 50% 50%; 137 | -moz-perspective-origin: 50% 50%; 138 | -ms-perspective-origin: 50% 50%; 139 | perspective-origin: 50% 50%; 140 | } 141 | .reveal .slides section { 142 | visibility: visible !important; 143 | position: static !important; 144 | width: 100% !important; 145 | height: auto !important; 146 | display: block !important; 147 | overflow: visible !important; 148 | 149 | left: 0 !important; 150 | top: 0 !important; 151 | margin-left: 0 !important; 152 | margin-top: 0 !important; 153 | padding: 60px 20px !important; 154 | z-index: auto !important; 155 | 156 | opacity: 1 !important; 157 | 158 | page-break-after: always !important; 159 | 160 | -webkit-transform-style: flat !important; 161 | -moz-transform-style: flat !important; 162 | -ms-transform-style: flat !important; 163 | transform-style: flat !important; 164 | 165 | -webkit-transform: none !important; 166 | -moz-transform: none !important; 167 | -ms-transform: none !important; 168 | transform: none !important; 169 | 170 | -webkit-transition: none !important; 171 | -moz-transition: none !important; 172 | -ms-transition: none !important; 173 | transition: none !important; 174 | } 175 | .reveal .slides section.stack { 176 | padding: 0 !important; 177 | } 178 | .reveal section:last-of-type { 179 | page-break-after: avoid !important; 180 | } 181 | .reveal section .fragment { 182 | opacity: 1 !important; 183 | visibility: visible !important; 184 | 185 | -webkit-transform: none !important; 186 | -moz-transform: none !important; 187 | -ms-transform: none !important; 188 | transform: none !important; 189 | } 190 | .reveal section img { 191 | display: block; 192 | margin: 15px 0px; 193 | background: rgba(255,255,255,1); 194 | border: 1px solid #666; 195 | box-shadow: none; 196 | } 197 | 198 | .reveal section small { 199 | font-size: 0.8em; 200 | } 201 | 202 | } -------------------------------------------------------------------------------- /presentation/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | /* SECTION 1: Set default width, margin, float, and 10 | background. This prevents elements from extending 11 | beyond the edge of the printed page, and prevents 12 | unnecessary background images from printing */ 13 | 14 | * { 15 | -webkit-print-color-adjust: exact; 16 | } 17 | 18 | body { 19 | margin: 0 auto !important; 20 | border: 0; 21 | padding: 0; 22 | float: none !important; 23 | overflow: visible; 24 | } 25 | 26 | html { 27 | width: 100%; 28 | height: 100%; 29 | overflow: visible; 30 | } 31 | 32 | /* SECTION 2: Remove any elements not needed in print. 33 | This would include navigation, ads, sidebars, etc. */ 34 | .nestedarrow, 35 | .reveal .controls, 36 | .reveal .progress, 37 | .reveal .slide-number, 38 | .reveal .playback, 39 | .reveal.overview, 40 | .fork-reveal, 41 | .share-reveal, 42 | .state-background { 43 | display: none !important; 44 | } 45 | 46 | /* SECTION 3: Set body font face, size, and color. 47 | Consider using a serif font for readability. */ 48 | body, p, td, li, div { 49 | 50 | } 51 | 52 | /* SECTION 4: Set heading font face, sizes, and color. 53 | Differentiate your headings from your body text. 54 | Perhaps use a large sans-serif for distinction. */ 55 | h1,h2,h3,h4,h5,h6 { 56 | text-shadow: 0 0 0 #000 !important; 57 | } 58 | 59 | .reveal pre code { 60 | overflow: hidden !important; 61 | font-family: Courier, 'Courier New', monospace !important; 62 | } 63 | 64 | 65 | /* SECTION 5: more reveal.js specific additions by @skypanther */ 66 | ul, ol, div, p { 67 | visibility: visible; 68 | position: static; 69 | width: auto; 70 | height: auto; 71 | display: block; 72 | overflow: visible; 73 | margin: auto; 74 | } 75 | .reveal { 76 | width: auto !important; 77 | height: auto !important; 78 | overflow: hidden !important; 79 | } 80 | .reveal .slides { 81 | position: static; 82 | width: 100%; 83 | height: auto; 84 | 85 | left: auto; 86 | top: auto; 87 | margin: 0 !important; 88 | padding: 0 !important; 89 | 90 | overflow: visible; 91 | display: block; 92 | 93 | -webkit-perspective: none; 94 | -moz-perspective: none; 95 | -ms-perspective: none; 96 | perspective: none; 97 | 98 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 99 | -moz-perspective-origin: 50% 50%; 100 | -ms-perspective-origin: 50% 50%; 101 | perspective-origin: 50% 50%; 102 | } 103 | .reveal .slides section { 104 | page-break-after: always !important; 105 | 106 | visibility: visible !important; 107 | position: relative !important; 108 | display: block !important; 109 | position: relative !important; 110 | 111 | margin: 0 !important; 112 | padding: 0 !important; 113 | box-sizing: border-box !important; 114 | min-height: 1px; 115 | 116 | opacity: 1 !important; 117 | 118 | -webkit-transform-style: flat !important; 119 | -moz-transform-style: flat !important; 120 | -ms-transform-style: flat !important; 121 | transform-style: flat !important; 122 | 123 | -webkit-transform: none !important; 124 | -moz-transform: none !important; 125 | -ms-transform: none !important; 126 | transform: none !important; 127 | } 128 | .reveal section.stack { 129 | margin: 0 !important; 130 | padding: 0 !important; 131 | page-break-after: avoid !important; 132 | height: auto !important; 133 | min-height: auto !important; 134 | } 135 | .reveal img { 136 | box-shadow: none; 137 | } 138 | .reveal .roll { 139 | overflow: visible; 140 | line-height: 1em; 141 | } 142 | 143 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 144 | .reveal section .slide-background { 145 | display: block !important; 146 | position: absolute; 147 | top: 0; 148 | left: 0; 149 | width: 100%; 150 | z-index: -1; 151 | } 152 | /* All elements should be above the slide-background */ 153 | .reveal section>* { 154 | position: relative; 155 | z-index: 1; 156 | } 157 | 158 | -------------------------------------------------------------------------------- /presentation/css/theme/black.css: -------------------------------------------------------------------------------- 1 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 2 | /** 3 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 4 | * 5 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 6 | */ 7 | section.has-light-background, section.has-light-background h1, section.has-light-background h2, section.has-light-background h3, section.has-light-background h4, section.has-light-background h5, section.has-light-background h6 { 8 | color: #222; } 9 | 10 | /********************************************* 11 | * GLOBAL STYLES 12 | *********************************************/ 13 | body { 14 | background: #222; 15 | background-color: #222; } 16 | 17 | .reveal { 18 | font-family: 'Source Sans Pro', Helvetica, sans-serif; 19 | font-size: 38px; 20 | font-weight: normal; 21 | color: #fff; } 22 | 23 | ::selection { 24 | color: #fff; 25 | background: #bee4fd; 26 | text-shadow: none; } 27 | 28 | .reveal .slides > section, .reveal .slides > section > section { 29 | line-height: 1.3; 30 | font-weight: inherit; } 31 | 32 | /********************************************* 33 | * HEADERS 34 | *********************************************/ 35 | .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { 36 | margin: 0 0 20px 0; 37 | color: #fff; 38 | font-family: 'Source Sans Pro', Helvetica, sans-serif; 39 | font-weight: 600; 40 | line-height: 1.2; 41 | letter-spacing: normal; 42 | text-transform: uppercase; 43 | text-shadow: none; 44 | word-wrap: break-word; } 45 | 46 | .reveal h1 { 47 | font-size: 2.5em; } 48 | 49 | .reveal h2 { 50 | font-size: 1.6em; } 51 | 52 | .reveal h3 { 53 | font-size: 1.3em; } 54 | 55 | .reveal h4 { 56 | font-size: 1em; } 57 | 58 | .reveal h1 { 59 | text-shadow: none; } 60 | 61 | /********************************************* 62 | * OTHER 63 | *********************************************/ 64 | .reveal p { 65 | margin: 20px 0; 66 | line-height: 1.3; } 67 | 68 | /* Ensure certain elements are never larger than the slide itself */ 69 | .reveal img, .reveal video, .reveal iframe { 70 | max-width: 95%; 71 | max-height: 95%; } 72 | 73 | .reveal strong, .reveal b { 74 | font-weight: bold; } 75 | 76 | .reveal em { 77 | font-style: italic; } 78 | 79 | .reveal ol, .reveal dl, .reveal ul { 80 | display: inline-block; 81 | text-align: left; 82 | margin: 0 0 0 1em; } 83 | 84 | .reveal ol { 85 | list-style-type: decimal; } 86 | 87 | .reveal ul { 88 | list-style-type: disc; } 89 | 90 | .reveal ul ul { 91 | list-style-type: square; } 92 | 93 | .reveal ul ul ul { 94 | list-style-type: circle; } 95 | 96 | .reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { 97 | display: block; 98 | margin-left: 40px; } 99 | 100 | .reveal dt { 101 | font-weight: bold; } 102 | 103 | .reveal dd { 104 | margin-left: 40px; } 105 | 106 | .reveal q, .reveal blockquote { 107 | quotes: none; } 108 | 109 | .reveal blockquote { 110 | display: block; 111 | position: relative; 112 | width: 70%; 113 | margin: 20px auto; 114 | padding: 5px; 115 | font-style: italic; 116 | background: rgba(255, 255, 255, 0.05); 117 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 118 | 119 | .reveal blockquote p:first-child, .reveal blockquote p:last-child { 120 | display: inline-block; } 121 | 122 | .reveal q { 123 | font-style: italic; } 124 | 125 | .reveal pre { 126 | display: block; 127 | position: relative; 128 | width: 90%; 129 | margin: 20px auto; 130 | text-align: left; 131 | font-size: 0.55em; 132 | font-family: monospace; 133 | line-height: 1.2em; 134 | word-wrap: break-word; 135 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 136 | 137 | .reveal code { 138 | font-family: monospace; } 139 | 140 | .reveal pre code { 141 | display: block; 142 | padding: 5px; 143 | overflow: auto; 144 | max-height: 400px; 145 | word-wrap: normal; 146 | background: #3F3F3F; 147 | color: #DCDCDC; } 148 | 149 | .reveal table { 150 | margin: auto; 151 | border-collapse: collapse; 152 | border-spacing: 0; } 153 | 154 | .reveal table th { 155 | font-weight: bold; } 156 | 157 | .reveal table th, .reveal table td { 158 | text-align: left; 159 | padding: 0.2em 0.5em 0.2em 0.5em; 160 | border-bottom: 1px solid; } 161 | 162 | .reveal table th[align="center"], .reveal table td[align="center"] { 163 | text-align: center; } 164 | 165 | .reveal table th[align="right"], .reveal table td[align="right"] { 166 | text-align: right; } 167 | 168 | .reveal table tr:last-child td { 169 | border-bottom: none; } 170 | 171 | .reveal sup { 172 | vertical-align: super; } 173 | 174 | .reveal sub { 175 | vertical-align: sub; } 176 | 177 | .reveal small { 178 | display: inline-block; 179 | font-size: 0.6em; 180 | line-height: 1.2em; 181 | vertical-align: top; } 182 | 183 | .reveal small * { 184 | vertical-align: top; } 185 | 186 | /********************************************* 187 | * LINKS 188 | *********************************************/ 189 | .reveal a { 190 | color: #42affa; 191 | text-decoration: none; 192 | -webkit-transition: color 0.15s ease; 193 | -moz-transition: color 0.15s ease; 194 | transition: color 0.15s ease; } 195 | 196 | .reveal a:hover { 197 | color: #8dcffc; 198 | text-shadow: none; 199 | border: none; } 200 | 201 | .reveal .roll span:after { 202 | color: #fff; 203 | background: #068ee9; } 204 | 205 | /********************************************* 206 | * IMAGES 207 | *********************************************/ 208 | .reveal section img { 209 | margin: 15px 0px; 210 | background: rgba(255, 255, 255, 0.12); 211 | border: 4px solid #fff; 212 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 213 | 214 | .reveal a img { 215 | -webkit-transition: all 0.15s linear; 216 | -moz-transition: all 0.15s linear; 217 | transition: all 0.15s linear; } 218 | 219 | .reveal a:hover img { 220 | background: rgba(255, 255, 255, 0.2); 221 | border-color: #42affa; 222 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 223 | 224 | /********************************************* 225 | * NAVIGATION CONTROLS 226 | *********************************************/ 227 | .reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { 228 | border-right-color: #42affa; } 229 | 230 | .reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { 231 | border-left-color: #42affa; } 232 | 233 | .reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { 234 | border-bottom-color: #42affa; } 235 | 236 | .reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { 237 | border-top-color: #42affa; } 238 | 239 | .reveal .controls div.navigate-left.enabled:hover { 240 | border-right-color: #8dcffc; } 241 | 242 | .reveal .controls div.navigate-right.enabled:hover { 243 | border-left-color: #8dcffc; } 244 | 245 | .reveal .controls div.navigate-up.enabled:hover { 246 | border-bottom-color: #8dcffc; } 247 | 248 | .reveal .controls div.navigate-down.enabled:hover { 249 | border-top-color: #8dcffc; } 250 | 251 | /********************************************* 252 | * PROGRESS BAR 253 | *********************************************/ 254 | .reveal .progress { 255 | background: rgba(0, 0, 0, 0.2); } 256 | 257 | .reveal .progress span { 258 | background: #42affa; 259 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 260 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 261 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 262 | 263 | /********************************************* 264 | * SLIDE NUMBER 265 | *********************************************/ 266 | .reveal .slide-number { 267 | color: #42affa; } 268 | -------------------------------------------------------------------------------- /presentation/img/.gitignore: -------------------------------------------------------------------------------- 1 | *.psd 2 | -------------------------------------------------------------------------------- /presentation/img/BenjaminSchmid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/img/BenjaminSchmid.jpg -------------------------------------------------------------------------------- /presentation/img/javadoc-html5-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/img/javadoc-html5-example.png -------------------------------------------------------------------------------- /presentation/img/puzzle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/img/puzzle.jpg -------------------------------------------------------------------------------- /presentation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Java 9: A short summary & overview over the new features 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 38 | 39 | 40 | 41 | 42 | 43 | Fork me on GitHub 46 | 47 |
48 | 49 | 50 |
51 | 52 | 55 | 56 |
57 |
58 |

Java 9

59 |
Lightning Talk:
60 |

An overview over
the new features

61 |
62 |
63 | ? for help, space to navigate 64 |

65 |
66 |
67 | 2016-07-05 68 |
69 | 70 |
71 |
72 |
73 | 74 |
75 |
76 |
77 | Benjamin Schmid 78 |
79 |
80 | Technology Advisor 81 |
82 |
83 |
84 |
85 | @bentolor 86 |
87 |
88 | 89 |
90 | Tip: filename and JEP are direct links 91 |
92 | 93 |
94 | 95 | Creative Commons Lizenzvertrag 97 |
Java 9: An short summary & overview over the new features 100 | by 101 | Benjamin Schmid 103 |
is licensed under a 104 | 105 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.. 106 | Based in parts on the work of Reveal.JS. 108 |
109 |
110 | 111 | 112 | 115 | 116 | 117 |
118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |
126 |
127 | ## Datasheet 128 |
129 |
130 |
131 | ##### Datasheet 132 | - **82** JEP targeted 133 | - GA Release: 134 | ~~2016-09-22~~ **2017-03-23** 135 | - Brewing since: 2014-08-11 136 |
137 |
138 | ##### Highlights 139 | - Jigsaw 140 | - Tooling 141 | - HTTP API 142 | - Language details 143 |
144 |
145 |
146 | 147 | 148 |
149 | 150 | 153 | 154 |
155 | 156 | 157 |
158 | 159 |
160 | # Tooling 161 |
162 |
163 | 164 | 165 |
166 |
167 | 190 |
191 |
192 | 193 | 194 |
195 |
196 | 203 |
204 |
205 | 206 | 207 |
208 |

HTML5 Javadoc example output

209 | Example Java 9 Javadoc output with HTML5 enabled 210 |
211 | 212 | 213 |
214 |
215 | 230 |
231 |
232 | 233 | 234 |
235 | 236 | 237 |
238 | 239 | 240 |
241 |
242 |
243 | ## Language details 244 |
245 | 246 |
247 |
248 | 264 |
265 |
266 |
267 | 280 |
281 |
282 |
283 | 284 | 285 |
286 |
287 | ### Process Control 288 | ````java 289 |
// Get PIDs of own or started processes
290 |                     out.println("Your pid is " + ProcessHandle.current().pid());
291 | 
292 |                     Process p = Runtime.getRuntime().exec("sleep 1h");
293 |                     ProcessHandle h = ProcessHandle.of(p.pid())  // Optional
294 |                             .orElseThrow(IllegalStateException::new);
295 | 
296 |                     // Do things on exiting process          // CompletableFuture
297 |                     h.onExit().thenRun( ()-> out.println("Sleeper exited") );
298 | 
299 |                     // Get info on process
300 |                     out.printf("[%d] %s - %s\n", h.pid(),
301 |                                h.info().user().orElse("unknown"),
302 |                                h.info().commandLine().orElse("none"));
303 | 
304 |                     // Kill a process
305 |                     h.destroy();
306 | ```` 307 |
308 |
309 | 310 | 311 |
312 |
313 | ### Immutable Collection Factories 314 | ````java 315 |
/* Comment sections would break ... */
316 |                     List<Integer> listOfNumbers = List.of(1, 2, 3, 4, 5/*, null*/);
317 | 
318 |                     Set<Integer> setOfNumbers = Set.of(1, 2, 3, 4, 5/*, 1*/);
319 | 
320 |                     Map<String, String> mapOfString =
321 |                         Map.of("key1", "value1", "key2", "value2");
322 | 
323 |                     Map<String, String> moreMapOfString =
324 |                         Map.ofEntries(
325 |                             Map.entry("key1", "value1"),
326 |                             Map.entry("key2", "value2")/*,
327 |                             Map.entry("key1", "value3")*/
328 |                     );
329 |                     ````
330 |                 
331 |
332 | 333 | 334 |
335 |
336 | ### StackWalker 337 | ````java 338 |
// return class/method only for our classes.
339 |                     private static List<String> walkAndFilterStackframe() {
340 |                       return StackWalker.getInstance().walk(s ->
341 |                         s.map( frame-> frame.getClassName()+"/"+frame.getMethodName())
342 |                                .filter(name -> name.startsWith("de.exxcellent"))
343 |                                .limit(10)
344 |                                .collect(Collectors.toList()) );
345 |                     }
346 | ```` 347 |
348 |
349 | 350 | 351 |
352 |
353 | ### New Input Stream Utilities 354 | ````java 355 |
// All bytes from an InputStream at once
356 |                     byte[] result = new ByteArrayInputStream(buf)
357 |                         .readAllBytes();
358 | 
359 |                     // Directly redirect an InputStream to an OutputStream
360 |                     new ByteArrayInputStream(buf)
361 |                         .transferTo(System.out);
362 | ```` 363 |
364 |
365 | 366 | 367 |
368 | 369 | 370 |
371 |
372 | ### HTTP/2 Client 373 | ````java 374 | /** 375 | * The HTTP API functions asynchronously & synchronously. In 376 | * asynchronous mode, work is done in threads (ExecutorService). 377 | */ 378 | public static void main(String[] args) throws Exception { 379 | HttpClient.getDefault() 380 | .request(URI.create("https://www.exxcellent.de")) 381 | .GET() 382 | .responseAsync() // CompletableFuture :D 383 | .thenAccept(httpResponse -> 384 | out.println(httpResponse.body(HttpResponse.asString())) 385 | ); 386 | Thread.sleep(999); // Give worker thread some time. 387 | } 388 | ```` 389 |
390 |
391 | 392 | 393 | 394 | 397 |
398 | 399 | 400 |
401 |
402 | # Jigsaw 403 |
404 |
405 | 406 | 407 |
408 |
409 | 420 |
421 |
422 | 423 | 424 |
425 |
426 | 443 |
444 |
445 | 446 | 447 |
448 |
449 | 462 |
463 |
464 | 465 | 466 |
467 |
468 | 488 |
489 |
490 | 491 | 492 |
493 |
494 | 507 |
508 |
509 | 510 | 511 |
512 |
513 | 531 |
532 |
533 | 534 | 535 |
536 |
537 |
538 | ### Tools 539 | - List built-in modules: `java –listmods` 540 | - Find dependencies: `jdeps –jdkinternals app.jar` 541 |
542 |
543 | ### Resources 544 | - [JVM Module Summary](http://cr.openjdk.java.net/~mr/jigsaw/ea/module-summary.html) 545 | - [The State of the Module System](http://openjdk.java.net/projects/jigsaw/spec/sotms/) 546 |
547 |
548 |
549 | 550 | 551 |
552 | 553 | 554 |
555 |
556 |
557 |
558 | ## Many (obscure) Details 559 |
560 | 561 |
562 | 582 |
583 | 584 |
585 | 603 |
604 | 605 |
606 |
607 | 608 | 609 |
610 |
611 | 615 |
616 |
617 | 618 | 619 |
620 | 621 | 622 |
623 |
624 | 625 | 626 | 627 | 628 | 760 | 761 | 762 | 763 | 788 | 789 | 790 | 791 | -------------------------------------------------------------------------------- /presentation/js/zepto.min.js: -------------------------------------------------------------------------------- 1 | /* Zepto v1.1.6 - zepto event ajax form ie - zeptojs.com/license */ 2 | var Zepto=function(){function L(t){return null==t?String(t):j[S.call(t)]||"object"}function Z(t){return"function"==L(t)}function _(t){return null!=t&&t==t.window}function $(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==L(t)}function M(t){return D(t)&&!_(t)&&Object.getPrototypeOf(t)==Object.prototype}function R(t){return"number"==typeof t.length}function k(t){return s.call(t,function(t){return null!=t})}function z(t){return t.length>0?n.fn.concat.apply([],t):t}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function q(t){return t in f?f[t]:f[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function H(t,e){return"number"!=typeof e||c[F(t)]?e:e+"px"}function I(t){var e,n;return u[t]||(e=a.createElement(t),a.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),u[t]=n),u[t]}function V(t){return"children"in t?o.call(t.children):n.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function B(n,i,r){for(e in i)r&&(M(i[e])||A(i[e]))?(M(i[e])&&!M(n[e])&&(n[e]={}),A(i[e])&&!A(n[e])&&(n[e]=[]),B(n[e],i[e],r)):i[e]!==t&&(n[e]=i[e])}function U(t,e){return null==e?n(t):n(t).filter(e)}function J(t,e,n,i){return Z(e)?e.call(t,n,i):e}function X(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function W(e,n){var i=e.className||"",r=i&&i.baseVal!==t;return n===t?r?i.baseVal:i:void(r?i.baseVal=n:e.className=n)}function Y(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?n.parseJSON(t):t):t}catch(e){return t}}function G(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)G(t.childNodes[n],e)}var t,e,n,i,C,N,r=[],o=r.slice,s=r.filter,a=window.document,u={},f={},c={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,h=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,p=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,d=/^(?:body|html)$/i,m=/([A-Z])/g,g=["val","css","html","text","data","width","height","offset"],v=["after","prepend","before","append"],y=a.createElement("table"),x=a.createElement("tr"),b={tr:a.createElement("tbody"),tbody:y,thead:y,tfoot:y,td:x,th:x,"*":a.createElement("div")},w=/complete|loaded|interactive/,E=/^[\w-]*$/,j={},S=j.toString,T={},O=a.createElement("div"),P={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},A=Array.isArray||function(t){return t instanceof Array};return T.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=O).appendChild(t),i=~T.qsa(r,e).indexOf(t),o&&O.removeChild(t),i},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return s.call(t,function(e,n){return t.indexOf(e)==n})},T.fragment=function(e,i,r){var s,u,f;return h.test(e)&&(s=n(a.createElement(RegExp.$1))),s||(e.replace&&(e=e.replace(p,"<$1>")),i===t&&(i=l.test(e)&&RegExp.$1),i in b||(i="*"),f=b[i],f.innerHTML=""+e,s=n.each(o.call(f.childNodes),function(){f.removeChild(this)})),M(r)&&(u=n(s),n.each(r,function(t,e){g.indexOf(t)>-1?u[t](e):u.attr(t,e)})),s},T.Z=function(t,e){return t=t||[],t.__proto__=n.fn,t.selector=e||"",t},T.isZ=function(t){return t instanceof T.Z},T.init=function(e,i){var r;if(!e)return T.Z();if("string"==typeof e)if(e=e.trim(),"<"==e[0]&&l.test(e))r=T.fragment(e,RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=T.qsa(a,e)}else{if(Z(e))return n(a).ready(e);if(T.isZ(e))return e;if(A(e))r=k(e);else if(D(e))r=[e],e=null;else if(l.test(e))r=T.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=T.qsa(a,e)}}return T.Z(r,e)},n=function(t,e){return T.init(t,e)},n.extend=function(t){var e,n=o.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){B(t,n,e)}),t},T.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],s=i||r?e.slice(1):e,a=E.test(s);return $(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:o.call(a&&!i?r?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=a.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=L,n.isFunction=Z,n.isWindow=_,n.isArray=A,n.isPlainObject=M,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.inArray=function(t,e,n){return r.indexOf.call(e,t,n)},n.camelCase=C,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.map=function(t,e){var n,r,o,i=[];if(R(t))for(r=0;r=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return r.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return Z(t)?this.not(this.not(t)):n(s.call(this,function(e){return T.matches(e,t)}))},add:function(t,e){return n(N(this.concat(n(t,e))))},is:function(t){return this.length>0&&T.matches(this[0],t)},not:function(e){var i=[];if(Z(e)&&e.call!==t)this.each(function(t){e.call(this,t)||i.push(this)});else{var r="string"==typeof e?this.filter(e):R(e)&&Z(e.item)?o.call(e):n(e);this.forEach(function(t){r.indexOf(t)<0&&i.push(t)})}return n(i)},has:function(t){return this.filter(function(){return D(t)?n.contains(this,t):n(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!D(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!D(t)?t:n(t)},find:function(t){var e,i=this;return e=t?"object"==typeof t?n(t).filter(function(){var t=this;return r.some.call(i,function(e){return n.contains(e,t)})}):1==this.length?n(T.qsa(this[0],t)):this.map(function(){return T.qsa(this,t)}):n()},closest:function(t,e){var i=this[0],r=!1;for("object"==typeof t&&(r=n(t));i&&!(r?r.indexOf(i)>=0:T.matches(i,t));)i=i!==e&&!$(i)&&i.parentNode;return n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,function(t){return(t=t.parentNode)&&!$(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return U(e,t)},parent:function(t){return U(N(this.pluck("parentNode")),t)},children:function(t){return U(this.map(function(){return V(this)}),t)},contents:function(){return this.map(function(){return o.call(this.childNodes)})},siblings:function(t){return U(this.map(function(t,e){return s.call(V(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return n.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=I(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=Z(t);if(this[0]&&!e)var i=n(t).get(0),r=i.parentNode||this.length>1;return this.each(function(o){n(this).wrapAll(e?t.call(this,o):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){n(this[0]).before(t=n(t));for(var e;(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=Z(t);return this.each(function(i){var r=n(this),o=r.contents(),s=e?t.call(this,i):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(e){return this.each(function(){var i=n(this);(e===t?"none"==i.css("display"):e)?i.show():i.hide()})},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var i=this.innerHTML;n(this).empty().append(J(this,t,e,i))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=J(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(n,i){var r;return"string"!=typeof n||1 in arguments?this.each(function(t){if(1===this.nodeType)if(D(n))for(e in n)X(this,e,n[e]);else X(this,n,J(this,i,t,this.getAttribute(n)))}):this.length&&1===this[0].nodeType?!(r=this[0].getAttribute(n))&&n in this[0]?this[0][n]:r:t},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){X(this,t)},this)})},prop:function(t,e){return t=P[t]||t,1 in arguments?this.each(function(n){this[t]=J(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(e,n){var i="data-"+e.replace(m,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?Y(r):t},val:function(t){return 0 in arguments?this.each(function(e){this.value=J(this,t,e,this.value)}):this[0]&&(this[0].multiple?n(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var i=n(this),r=J(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(t,i){if(arguments.length<2){var r,o=this[0];if(!o)return;if(r=getComputedStyle(o,""),"string"==typeof t)return o.style[C(t)]||r.getPropertyValue(t);if(A(t)){var s={};return n.each(t,function(t,e){s[e]=o.style[C(e)]||r.getPropertyValue(e)}),s}}var a="";if("string"==L(t))i||0===i?a=F(t)+":"+H(t,i):this.each(function(){this.style.removeProperty(F(t))});else for(e in t)t[e]||0===t[e]?a+=F(e)+":"+H(e,t[e])+";":this.each(function(){this.style.removeProperty(F(e))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?r.some.call(this,function(t){return this.test(W(t))},q(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var r=W(this),o=J(this,t,e,r);o.split(/\s+/g).forEach(function(t){n(this).hasClass(t)||i.push(t)},this),i.length&&W(this,r+(r?" ":"")+i.join(" "))}}):this},removeClass:function(e){return this.each(function(n){if("className"in this){if(e===t)return W(this,"");i=W(this),J(this,e,n,i).split(/\s+/g).forEach(function(t){i=i.replace(q(t)," ")}),W(this,i.trim())}})},toggleClass:function(e,i){return e?this.each(function(r){var o=n(this),s=J(this,e,r,W(this));s.split(/\s+/g).forEach(function(e){(i===t?!o.hasClass(e):i)?o.addClass(e):o.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),r=d.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css("margin-top"))||0,i.left-=parseFloat(n(t).css("margin-left"))||0,r.top+=parseFloat(n(e[0]).css("border-top-width"))||0,r.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||a.body;t&&!d.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t})}},n.fn.detach=n.fn.remove,["width","height"].forEach(function(e){var i=e.replace(/./,function(t){return t[0].toUpperCase()});n.fn[e]=function(r){var o,s=this[0];return r===t?_(s)?s["inner"+i]:$(s)?s.documentElement["scroll"+i]:(o=this.offset())&&o[e]:this.each(function(t){s=n(this),s.css(e,J(this,r,t,s[e]()))})}}),v.forEach(function(t,e){var i=e%2;n.fn[t]=function(){var t,o,r=n.map(arguments,function(e){return t=L(e),"object"==t||"array"==t||null==e?e:T.fragment(e)}),s=this.length>1;return r.length<1?this:this.each(function(t,u){o=i?u:u.parentNode,u=0==e?u.nextSibling:1==e?u.firstChild:2==e?u:null;var f=n.contains(a.documentElement,o);r.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!o)return n(t).remove();o.insertBefore(t,u),f&&G(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},n.fn[i?t+"To":"insert"+(e?"Before":"After")]=function(e){return n(e)[t](this),this}}),T.Z.prototype=n.fn,T.uniq=N,T.deserializeValue=Y,n.zepto=T,n}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function l(t){return t._zid||(t._zid=e++)}function h(t,e,n,i){if(e=p(e),e.ns)var r=d(e.ns);return(s[l(t)]||[]).filter(function(t){return!(!t||e.e&&t.e!=e.e||e.ns&&!r.test(t.ns)||n&&l(t.fn)!==l(n)||i&&t.sel!=i)})}function p(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function d(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function m(t,e){return t.del&&!u&&t.e in f||!!e}function g(t){return c[t]||u&&f[t]||t}function v(e,i,r,o,a,u,f){var h=l(e),d=s[h]||(s[h]=[]);i.split(/\s/).forEach(function(i){if("ready"==i)return t(document).ready(r);var s=p(i);s.fn=r,s.sel=a,s.e in c&&(r=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?s.fn.apply(this,arguments):void 0}),s.del=u;var l=u||r;s.proxy=function(t){if(t=j(t),!t.isImmediatePropagationStopped()){t.data=o;var i=l.apply(e,t._args==n?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},s.i=d.length,d.push(s),"addEventListener"in e&&e.addEventListener(g(s.e),s.proxy,m(s,f))})}function y(t,e,n,i,r){var o=l(t);(e||"").split(/\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(g(e.e),e.proxy,m(e,r))})})}function j(e,i){return(i||!e.isDefaultPrevented)&&(i||(i=e),t.each(E,function(t,n){var r=i[t];e[t]=function(){return this[n]=x,r&&r.apply(i,arguments)},e[n]=b}),(i.defaultPrevented!==n?i.defaultPrevented:"returnValue"in i?i.returnValue===!1:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=x)),e}function S(t){var e,i={originalEvent:t};for(e in t)w.test(e)||t[e]===n||(i[e]=t[e]);return j(i,t)}var n,e=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return"string"==typeof t},s={},a={},u="onfocusin"in window,f={focus:"focusin",blur:"focusout"},c={mouseenter:"mouseover",mouseleave:"mouseout"};a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",t.event={add:v,remove:y},t.proxy=function(e,n){var s=2 in arguments&&i.call(arguments,2);if(r(e)){var a=function(){return e.apply(n,s?s.concat(i.call(arguments)):arguments)};return a._zid=l(e),a}if(o(n))return s?(s.unshift(e[n],e),t.proxy.apply(null,s)):t.proxy(e[n],e);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var x=function(){return!0},b=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,s,a,u,f){var c,l,h=this;return e&&!o(e)?(t.each(e,function(t,e){h.on(t,s,a,e,f)}),h):(o(s)||r(u)||u===!1||(u=a,a=s,s=n),(r(a)||a===!1)&&(u=a,a=n),u===!1&&(u=b),h.each(function(n,r){f&&(c=function(t){return y(r,t.type,u),u.apply(this,arguments)}),s&&(l=function(e){var n,o=t(e.target).closest(s,r).get(0);return o&&o!==r?(n=t.extend(S(e),{currentTarget:o,liveFired:r}),(c||u).apply(o,[n].concat(i.call(arguments,1)))):void 0}),v(r,e,u,a,s,l||c)}))},t.fn.off=function(e,i,s){var a=this;return e&&!o(e)?(t.each(e,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||s===!1||(s=i,i=n),s===!1&&(s=b),a.each(function(){y(this,e,s,i)}))},t.fn.trigger=function(e,n){return e=o(e)||t.isPlainObject(e)?t.Event(e):j(e),e._args=n,this.each(function(){e.type in f&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){i=S(o(e)?t.Event(e):e),i._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){o(t)||(e=t,t=e.type);var n=document.createEvent(a[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),j(n)}}(Zepto),function(t){function h(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function p(t,e,i,r){return t.global?h(e||n,i,r):void 0}function d(e){e.global&&0===t.active++&&p(e,null,"ajaxStart")}function m(e){e.global&&!--t.active&&p(e,null,"ajaxStop")}function g(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||p(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void p(e,n,"ajaxSend",[t,e])}function v(t,e,n,i){var r=n.context,o="success";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),p(n,r,"ajaxSuccess",[e,n,t]),x(o,e,n)}function y(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),p(i,o,"ajaxError",[n,i,t||e]),x(e,n,i)}function x(t,e,n){var i=n.context;n.complete.call(i,e,t),p(n,i,"ajaxComplete",[e,n]),m(n)}function b(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==f?"html":t==u?"json":s.test(t)?"script":a.test(t)&&"xml")||"text"}function E(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function j(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=E(e.url,e.data),e.data=void 0)}function S(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function C(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(u.name,u.value):"array"==o||!i&&"object"==o?C(e,u,i,n):e.add(n,u)})}var i,r,e=0,n=window.document,o=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,a=/^(?:text|application)\/xml/i,u="application/json",f="text/html",c=/^\s*$/,l=n.createElement("a");l.href=window.location.href,t.active=0,t.ajaxJSONP=function(i,r){if(!("type"in i))return t.ajax(i);var f,h,o=i.jsonpCallback,s=(t.isFunction(o)?o():o)||"jsonp"+ ++e,a=n.createElement("script"),u=window[s],c=function(e){t(a).triggerHandler("error",e||"abort")},l={abort:c};return r&&r.promise(l),t(a).on("load error",function(e,n){clearTimeout(h),t(a).off().remove(),"error"!=e.type&&f?v(f[0],l,i,r):y(null,n||"error",l,i,r),window[s]=u,f&&t.isFunction(u)&&u(f[0]),u=f=void 0}),g(l,i)===!1?(c("abort"),l):(window[s]=function(){f=arguments},a.src=i.url.replace(/\?(.+)=\?/,"?$1="+s),n.head.appendChild(a),i.timeout>0&&(h=setTimeout(function(){c("timeout")},i.timeout)),l)},t.ajaxSettings={type:"GET",beforeSend:b,success:b,error:b,complete:b,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:u,xml:"application/xml, text/xml",html:f,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var a,o=t.extend({},e||{}),s=t.Deferred&&t.Deferred();for(i in t.ajaxSettings)void 0===o[i]&&(o[i]=t.ajaxSettings[i]);d(o),o.crossDomain||(a=n.createElement("a"),a.href=o.url,a.href=a.href,o.crossDomain=l.protocol+"//"+l.host!=a.protocol+"//"+a.host),o.url||(o.url=window.location.toString()),j(o);var u=o.dataType,f=/\?.+=\?/.test(o.url);if(f&&(u="jsonp"),o.cache!==!1&&(e&&e.cache===!0||"script"!=u&&"jsonp"!=u)||(o.url=E(o.url,"_="+Date.now())),"jsonp"==u)return f||(o.url=E(o.url,o.jsonp?o.jsonp+"=?":o.jsonp===!1?"":"callback=?")),t.ajaxJSONP(o,s);var C,h=o.accepts[u],p={},m=function(t,e){p[t.toLowerCase()]=[t,e]},x=/^([\w-]+:)\/\//.test(o.url)?RegExp.$1:window.location.protocol,S=o.xhr(),T=S.setRequestHeader;if(s&&s.promise(S),o.crossDomain||m("X-Requested-With","XMLHttpRequest"),m("Accept",h||"*/*"),(h=o.mimeType||h)&&(h.indexOf(",")>-1&&(h=h.split(",",2)[0]),S.overrideMimeType&&S.overrideMimeType(h)),(o.contentType||o.contentType!==!1&&o.data&&"GET"!=o.type.toUpperCase())&&m("Content-Type",o.contentType||"application/x-www-form-urlencoded"),o.headers)for(r in o.headers)m(r,o.headers[r]);if(S.setRequestHeader=m,S.onreadystatechange=function(){if(4==S.readyState){S.onreadystatechange=b,clearTimeout(C);var e,n=!1;if(S.status>=200&&S.status<300||304==S.status||0==S.status&&"file:"==x){u=u||w(o.mimeType||S.getResponseHeader("content-type")),e=S.responseText;try{"script"==u?(1,eval)(e):"xml"==u?e=S.responseXML:"json"==u&&(e=c.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?y(n,"parsererror",S,o,s):v(e,S,o,s)}else y(S.statusText||null,S.status?"error":"abort",S,o,s)}},g(S,o)===!1)return S.abort(),y(null,"abort",S,o,s),S;if(o.xhrFields)for(r in o.xhrFields)S[r]=o.xhrFields[r];var N="async"in o?o.async:!0;S.open(o.type,o.url,N,o.username,o.password);for(r in p)T.apply(S,p[r]);return o.timeout>0&&(C=setTimeout(function(){S.onreadystatechange=b,S.abort(),y(null,"timeout",S,o,s)},o.timeout)),S.send(o.data?o.data:null),S},t.get=function(){return t.ajax(S.apply(null,arguments))},t.post=function(){var e=S.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=S.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var a,r=this,s=e.split(/\s/),u=S(e,n,i),f=u.success;return s.length>1&&(u.url=s[0],a=s[1]),u.success=function(e){r.html(a?t("
").html(e.replace(o,"")).find(a):e),f&&f.apply(r,arguments)},t.ajax(u),this};var T=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(T(e)+"="+T(n))},C(i,e,n),i.join("&").replace(/%20/g,"+")}}(Zepto),function(t){t.fn.serializeArray=function(){var e,n,i=[],r=function(t){return t.forEach?t.forEach(r):void i.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(i,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&r(t(o).val())}),i},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(Zepto); -------------------------------------------------------------------------------- /presentation/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-tag, 16 | .css .hljs-class, 17 | .css .hljs-id, 18 | .lisp .hljs-title, 19 | .nginx .hljs-title, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #E3CEAB; 24 | } 25 | 26 | .django .hljs-template_tag, 27 | .django .hljs-variable, 28 | .django .hljs-filter .hljs-argument { 29 | color: #DCDCDC; 30 | } 31 | 32 | .hljs-number, 33 | .hljs-date { 34 | color: #8CD0D3; 35 | } 36 | 37 | .dos .hljs-envvar, 38 | .dos .hljs-stream, 39 | .hljs-variable, 40 | .apache .hljs-sqbracket { 41 | color: #EFDCBC; 42 | } 43 | 44 | .dos .hljs-flow, 45 | .diff .hljs-change, 46 | .python .exception, 47 | .python .hljs-built_in, 48 | .hljs-literal, 49 | .tex .hljs-special { 50 | color: #EFEFAF; 51 | } 52 | 53 | .diff .hljs-chunk, 54 | .hljs-subst { 55 | color: #8F8F8F; 56 | } 57 | 58 | .dos .hljs-keyword, 59 | .python .hljs-decorator, 60 | .hljs-title, 61 | .haskell .hljs-type, 62 | .diff .hljs-header, 63 | .ruby .hljs-class .hljs-parent, 64 | .apache .hljs-tag, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .hljs-prompt { 68 | color: #efef8f; 69 | } 70 | 71 | .dos .hljs-winutils, 72 | .ruby .hljs-symbol, 73 | .ruby .hljs-symbol .hljs-string, 74 | .ruby .hljs-string { 75 | color: #DCA3A3; 76 | } 77 | 78 | .diff .hljs-deletion, 79 | .hljs-string, 80 | .hljs-tag .hljs-value, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .hljs-built_in, 84 | .sql .hljs-aggregate, 85 | .hljs-javadoc, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rules .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #CC9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .java .hljs-annotation, 102 | .hljs-template_comment, 103 | .hljs-pi, 104 | .hljs-doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bentolor/java9-in-action/105d6ed493a36b05f196ffdacb2f93467674916b/presentation/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /presentation/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /presentation/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c 2 | 3 | 4 | 5 | 6 | 7 | reveal.js - Markdown Demo 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 |
23 | 24 | 25 |
26 | 36 |
37 | 38 | 39 |
40 | 54 |
55 | 56 | 57 |
58 | 69 |
70 | 71 | 72 |
73 | 77 |
78 | 79 | 80 |
81 | 86 |
87 | 88 | 89 |
90 | 100 |
101 | 102 |
103 |
104 | 105 | 106 | 107 | 108 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /presentation/plugin/markdown/example.md: -------------------------------------------------------------------------------- 1 | # Markdown Demo 2 | 3 | 4 | 5 | ## External 1.1 6 | 7 | Content 1.1 8 | 9 | Note: This will only appear in the speaker notes window. 10 | 11 | 12 | ## External 1.2 13 | 14 | Content 1.2 15 | 16 | 17 | 18 | ## External 2 19 | 20 | Content 2.1 21 | 22 | 23 | 24 | ## External 3.1 25 | 26 | Content 3.1 27 | 28 | 29 | ## External 3.2 30 | 31 | Content 3.2 32 | -------------------------------------------------------------------------------- /presentation/plugin/markdown/markdown.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The reveal.js markdown plugin. Handles parsing of 3 | * markdown inside of presentations as well as loading 4 | * of external markdown documents. 5 | */ 6 | (function( root, factory ) { 7 | if( typeof exports === 'object' ) { 8 | module.exports = factory( require( './marked' ) ); 9 | } 10 | else { 11 | // Browser globals (root is window) 12 | root.RevealMarkdown = factory( root.marked ); 13 | root.RevealMarkdown.initialize(); 14 | } 15 | }( this, function( marked ) { 16 | 17 | if( typeof marked === 'undefined' ) { 18 | throw 'The reveal.js Markdown plugin requires marked to be loaded'; 19 | } 20 | 21 | if( typeof hljs !== 'undefined' ) { 22 | marked.setOptions({ 23 | highlight: function( lang, code ) { 24 | return hljs.highlightAuto( lang, code ).value; 25 | } 26 | }); 27 | } 28 | 29 | var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$', 30 | DEFAULT_NOTES_SEPARATOR = 'note:', 31 | DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$', 32 | DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$'; 33 | 34 | 35 | /** 36 | * Retrieves the markdown contents of a slide section 37 | * element. Normalizes leading tabs/whitespace. 38 | */ 39 | function getMarkdownFromSlide( section ) { 40 | 41 | var template = section.querySelector( 'script' ); 42 | 43 | // strip leading whitespace so it isn't evaluated as code 44 | var text = ( template || section ).textContent; 45 | 46 | var leadingWs = text.match( /^\n?(\s*)/ )[1].length, 47 | leadingTabs = text.match( /^\n?(\t*)/ )[1].length; 48 | 49 | if( leadingTabs > 0 ) { 50 | text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' ); 51 | } 52 | else if( leadingWs > 1 ) { 53 | text = text.replace( new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n' ); 54 | } 55 | 56 | return text; 57 | 58 | } 59 | 60 | /** 61 | * Given a markdown slide section element, this will 62 | * return all arguments that aren't related to markdown 63 | * parsing. Used to forward any other user-defined arguments 64 | * to the output markdown slide. 65 | */ 66 | function getForwardedAttributes( section ) { 67 | 68 | var attributes = section.attributes; 69 | var result = []; 70 | 71 | for( var i = 0, len = attributes.length; i < len; i++ ) { 72 | var name = attributes[i].name, 73 | value = attributes[i].value; 74 | 75 | // disregard attributes that are used for markdown loading/parsing 76 | if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue; 77 | 78 | if( value ) { 79 | result.push( name + '="' + value + '"' ); 80 | } 81 | else { 82 | result.push( name ); 83 | } 84 | } 85 | 86 | return result.join( ' ' ); 87 | 88 | } 89 | 90 | /** 91 | * Inspects the given options and fills out default 92 | * values for what's not defined. 93 | */ 94 | function getSlidifyOptions( options ) { 95 | 96 | options = options || {}; 97 | options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR; 98 | options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR; 99 | options.attributes = options.attributes || ''; 100 | 101 | return options; 102 | 103 | } 104 | 105 | /** 106 | * Helper function for constructing a markdown slide. 107 | */ 108 | function createMarkdownSlide( content, options ) { 109 | 110 | options = getSlidifyOptions( options ); 111 | 112 | var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) ); 113 | 114 | if( notesMatch.length === 2 ) { 115 | content = notesMatch[0] + ''; 116 | } 117 | 118 | return ''; 119 | 120 | } 121 | 122 | /** 123 | * Parses a data string into multiple slides based 124 | * on the passed in separator arguments. 125 | */ 126 | function slidify( markdown, options ) { 127 | 128 | options = getSlidifyOptions( options ); 129 | 130 | var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ), 131 | horizontalSeparatorRegex = new RegExp( options.separator ); 132 | 133 | var matches, 134 | lastIndex = 0, 135 | isHorizontal, 136 | wasHorizontal = true, 137 | content, 138 | sectionStack = []; 139 | 140 | // iterate until all blocks between separators are stacked up 141 | while( matches = separatorRegex.exec( markdown ) ) { 142 | notes = null; 143 | 144 | // determine direction (horizontal by default) 145 | isHorizontal = horizontalSeparatorRegex.test( matches[0] ); 146 | 147 | if( !isHorizontal && wasHorizontal ) { 148 | // create vertical stack 149 | sectionStack.push( [] ); 150 | } 151 | 152 | // pluck slide content from markdown input 153 | content = markdown.substring( lastIndex, matches.index ); 154 | 155 | if( isHorizontal && wasHorizontal ) { 156 | // add to horizontal stack 157 | sectionStack.push( content ); 158 | } 159 | else { 160 | // add to vertical stack 161 | sectionStack[sectionStack.length-1].push( content ); 162 | } 163 | 164 | lastIndex = separatorRegex.lastIndex; 165 | wasHorizontal = isHorizontal; 166 | } 167 | 168 | // add the remaining slide 169 | ( wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1] ).push( markdown.substring( lastIndex ) ); 170 | 171 | var markdownSections = ''; 172 | 173 | // flatten the hierarchical stack, and insert
tags 174 | for( var i = 0, len = sectionStack.length; i < len; i++ ) { 175 | // vertical 176 | if( sectionStack[i] instanceof Array ) { 177 | markdownSections += '
'; 178 | 179 | sectionStack[i].forEach( function( child ) { 180 | markdownSections += '
' + createMarkdownSlide( child, options ) + '
'; 181 | } ); 182 | 183 | markdownSections += '
'; 184 | } 185 | else { 186 | markdownSections += '
' + createMarkdownSlide( sectionStack[i], options ) + '
'; 187 | } 188 | } 189 | 190 | return markdownSections; 191 | 192 | } 193 | 194 | /** 195 | * Parses any current data-markdown slides, splits 196 | * multi-slide markdown into separate sections and 197 | * handles loading of external markdown. 198 | */ 199 | function processSlides() { 200 | 201 | var sections = document.querySelectorAll( '[data-markdown]'), 202 | section; 203 | 204 | for( var i = 0, len = sections.length; i < len; i++ ) { 205 | 206 | section = sections[i]; 207 | 208 | if( section.getAttribute( 'data-markdown' ).length ) { 209 | 210 | var xhr = new XMLHttpRequest(), 211 | url = section.getAttribute( 'data-markdown' ); 212 | 213 | datacharset = section.getAttribute( 'data-charset' ); 214 | 215 | // see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes 216 | if( datacharset != null && datacharset != '' ) { 217 | xhr.overrideMimeType( 'text/html; charset=' + datacharset ); 218 | } 219 | 220 | xhr.onreadystatechange = function() { 221 | if( xhr.readyState === 4 ) { 222 | // file protocol yields status code 0 (useful for local debug, mobile applications etc.) 223 | if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) { 224 | 225 | section.outerHTML = slidify( xhr.responseText, { 226 | separator: section.getAttribute( 'data-separator' ), 227 | verticalSeparator: section.getAttribute( 'data-separator-vertical' ), 228 | notesSeparator: section.getAttribute( 'data-separator-notes' ), 229 | attributes: getForwardedAttributes( section ) 230 | }); 231 | 232 | } 233 | else { 234 | 235 | section.outerHTML = '
' + 236 | 'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' + 237 | 'Check your browser\'s JavaScript console for more details.' + 238 | '

Remember that you need to serve the presentation HTML from a HTTP server.

' + 239 | '
'; 240 | 241 | } 242 | } 243 | }; 244 | 245 | xhr.open( 'GET', url, false ); 246 | 247 | try { 248 | xhr.send(); 249 | } 250 | catch ( e ) { 251 | alert( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e ); 252 | } 253 | 254 | } 255 | else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-separator-vertical' ) || section.getAttribute( 'data-separator-notes' ) ) { 256 | 257 | section.outerHTML = slidify( getMarkdownFromSlide( section ), { 258 | separator: section.getAttribute( 'data-separator' ), 259 | verticalSeparator: section.getAttribute( 'data-separator-vertical' ), 260 | notesSeparator: section.getAttribute( 'data-separator-notes' ), 261 | attributes: getForwardedAttributes( section ) 262 | }); 263 | 264 | } 265 | else { 266 | section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) ); 267 | } 268 | } 269 | 270 | } 271 | 272 | /** 273 | * Check if a node value has the attributes pattern. 274 | * If yes, extract it and add that value as one or several attributes 275 | * the the terget element. 276 | * 277 | * You need Cache Killer on Chrome to see the effect on any FOM transformation 278 | * directly on refresh (F5) 279 | * http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277 280 | */ 281 | function addAttributeInElement( node, elementTarget, separator ) { 282 | 283 | var mardownClassesInElementsRegex = new RegExp( separator, 'mg' ); 284 | var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"=]+?)\"", 'mg' ); 285 | var nodeValue = node.nodeValue; 286 | if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) { 287 | 288 | var classes = matches[1]; 289 | nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex ); 290 | node.nodeValue = nodeValue; 291 | while( matchesClass = mardownClassRegex.exec( classes ) ) { 292 | elementTarget.setAttribute( matchesClass[1], matchesClass[2] ); 293 | } 294 | return true; 295 | } 296 | return false; 297 | } 298 | 299 | /** 300 | * Add attributes to the parent element of a text node, 301 | * or the element of an attribute node. 302 | */ 303 | function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) { 304 | 305 | if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) { 306 | previousParentElement = element; 307 | for( var i = 0; i < element.childNodes.length; i++ ) { 308 | childElement = element.childNodes[i]; 309 | if ( i > 0 ) { 310 | j = i - 1; 311 | while ( j >= 0 ) { 312 | aPreviousChildElement = element.childNodes[j]; 313 | if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) { 314 | previousParentElement = aPreviousChildElement; 315 | break; 316 | } 317 | j = j - 1; 318 | } 319 | } 320 | parentSection = section; 321 | if( childElement.nodeName == "section" ) { 322 | parentSection = childElement ; 323 | previousParentElement = childElement ; 324 | } 325 | if ( typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE ) { 326 | addAttributes( parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes ); 327 | } 328 | } 329 | } 330 | 331 | if ( element.nodeType == Node.COMMENT_NODE ) { 332 | if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) { 333 | addAttributeInElement( element, section, separatorSectionAttributes ); 334 | } 335 | } 336 | } 337 | 338 | /** 339 | * Converts any current data-markdown slides in the 340 | * DOM to HTML. 341 | */ 342 | function convertSlides() { 343 | 344 | var sections = document.querySelectorAll( '[data-markdown]'); 345 | 346 | for( var i = 0, len = sections.length; i < len; i++ ) { 347 | 348 | var section = sections[i]; 349 | 350 | // Only parse the same slide once 351 | if( !section.getAttribute( 'data-markdown-parsed' ) ) { 352 | 353 | section.setAttribute( 'data-markdown-parsed', true ) 354 | 355 | var notes = section.querySelector( 'aside.notes' ); 356 | var markdown = getMarkdownFromSlide( section ); 357 | 358 | section.innerHTML = marked( markdown ); 359 | addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) || 360 | section.parentNode.getAttribute( 'data-element-attributes' ) || 361 | DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR, 362 | section.getAttribute( 'data-attributes' ) || 363 | section.parentNode.getAttribute( 'data-attributes' ) || 364 | DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR); 365 | 366 | // If there were notes, we need to re-add them after 367 | // having overwritten the section's HTML 368 | if( notes ) { 369 | section.appendChild( notes ); 370 | } 371 | 372 | } 373 | 374 | } 375 | 376 | } 377 | 378 | // API 379 | return { 380 | 381 | initialize: function() { 382 | processSlides(); 383 | convertSlides(); 384 | }, 385 | 386 | // TODO: Do these belong in the API? 387 | processSlides: processSlides, 388 | convertSlides: convertSlides, 389 | slidify: slidify 390 | 391 | }; 392 | 393 | })); 394 | -------------------------------------------------------------------------------- /presentation/plugin/markdown/marked.js: -------------------------------------------------------------------------------- 1 | /** 2 | * marked - a markdown parser 3 | * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) 4 | * https://github.com/chjj/marked 5 | */ 6 | (function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.rules=this.options.tables?p.tables:p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.rules=this.options.breaks?u.breaks:u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function i(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?String.fromCharCode("x"===t.charAt(1)?parseInt(t.substring(2),16):+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;rAn error occured:

"+s(c.message+"",!0)+"
";throw c}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;c>u;u++)h=i[u],a=h.length,h=h.replace(/^ *([*+-]|\d+\.) +/,""),~h.indexOf("\n ")&&(a-=h.length,h=this.options.pedantic?h.replace(/^ {1,4}/gm,""):h.replace(new RegExp("^ {1,"+a+"}","gm"),"")),this.options.smartLists&&u!==c-1&&(o=p.bullet.exec(i[u+1])[0],l===o||l.length>1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=this.mangle(":"===i[1].charAt(6)?i[1].substring(7):i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=s(this.smartypants(i[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){for(var t,n="",r=e.length,s=0;r>s;s++)t=e.charCodeAt(s),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:s(e,!0))+"\n
\n":"
"+(n?e:s(e,!0))+"\n
"},n.prototype.blockquote=function(e){return"
\n"+e+"
\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(s){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var l='
    "},n.prototype.image=function(e,t,n){var r=''+n+'":">"},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;e 2 | 3 | 4 | 5 | 6 | reveal.js - Slide Notes 7 | 8 | 150 | 151 | 152 | 153 | 154 |
    155 |
    UPCOMING:
    156 |
    157 |
    158 |

    Time Click to Reset

    159 |
    160 | 0:00 AM 161 |
    162 |
    163 | 00:00:00 164 |
    165 |
    166 |
    167 | 168 | 172 |
    173 | 174 | 175 | 176 | 177 | 394 | 395 | 396 | 397 | -------------------------------------------------------------------------------- /presentation/plugin/notes/notes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | reveal.js - Slide Notes 7 | 8 | 151 | 152 | 153 | 154 | 155 |
    156 |
    UPCOMING:
    157 |
    158 |
    159 |

    Time Click to Reset

    160 |
    161 | 0:00 AM 162 |
    163 |
    164 | 00:00:00 165 |
    166 |
    167 |
    168 | 169 | 173 |
    174 | 175 | 176 | 405 | 406 | 407 | -------------------------------------------------------------------------------- /presentation/plugin/notes/notes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles opening of and synchronization with the reveal.js 3 | * notes window. 4 | * 5 | * Handshake process: 6 | * 1. This window posts 'connect' to notes window 7 | * - Includes URL of presentation to show 8 | * 2. Notes window responds with 'connected' when it is available 9 | * 3. This window proceeds to send the current presentation state 10 | * to the notes window 11 | */ 12 | var RevealNotes = (function() { 13 | 14 | function openNotes() { 15 | var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path 16 | jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path 17 | var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1100,height=700' ); 18 | 19 | /** 20 | * Connect to the notes window through a postmessage handshake. 21 | * Using postmessage enables us to work in situations where the 22 | * origins differ, such as a presentation being opened from the 23 | * file system. 24 | */ 25 | function connect() { 26 | // Keep trying to connect until we get a 'connected' message back 27 | var connectInterval = setInterval( function() { 28 | notesPopup.postMessage( JSON.stringify( { 29 | namespace: 'reveal-notes', 30 | type: 'connect', 31 | url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, 32 | state: Reveal.getState() 33 | } ), '*' ); 34 | }, 500 ); 35 | 36 | window.addEventListener( 'message', function( event ) { 37 | var data = JSON.parse( event.data ); 38 | if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) { 39 | clearInterval( connectInterval ); 40 | onConnected(); 41 | } 42 | } ); 43 | } 44 | 45 | /** 46 | * Posts the current slide data to the notes window 47 | */ 48 | function post() { 49 | 50 | var slideElement = Reveal.getCurrentSlide(), 51 | notesElement = slideElement.querySelector( 'aside.notes' ); 52 | 53 | var messageData = { 54 | namespace: 'reveal-notes', 55 | type: 'state', 56 | notes: '', 57 | markdown: false, 58 | state: Reveal.getState() 59 | }; 60 | 61 | // Look for notes defined in a slide attribute 62 | if( slideElement.hasAttribute( 'data-notes' ) ) { 63 | messageData.notes = slideElement.getAttribute( 'data-notes' ); 64 | } 65 | 66 | // Look for notes defined in an aside element 67 | if( notesElement ) { 68 | messageData.notes = notesElement.innerHTML; 69 | messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string'; 70 | } 71 | 72 | notesPopup.postMessage( JSON.stringify( messageData ), '*' ); 73 | 74 | } 75 | 76 | /** 77 | * Called once we have established a connection to the notes 78 | * window. 79 | */ 80 | function onConnected() { 81 | 82 | // Monitor events that trigger a change in state 83 | Reveal.addEventListener( 'slidechanged', post ); 84 | Reveal.addEventListener( 'fragmentshown', post ); 85 | Reveal.addEventListener( 'fragmenthidden', post ); 86 | Reveal.addEventListener( 'overviewhidden', post ); 87 | Reveal.addEventListener( 'overviewshown', post ); 88 | Reveal.addEventListener( 'paused', post ); 89 | Reveal.addEventListener( 'resumed', post ); 90 | 91 | // Post the initial state 92 | post(); 93 | 94 | } 95 | 96 | connect(); 97 | } 98 | 99 | if( !/receiver/i.test( window.location.search ) ) { 100 | 101 | // If the there's a 'notes' query set, open directly 102 | if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) { 103 | openNotes(); 104 | } 105 | 106 | // Open the notes when the 's' key is hit 107 | document.addEventListener( 'keydown', function( event ) { 108 | // Disregard the event if the target is editable or a 109 | // modifier is present 110 | if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; 111 | 112 | if( event.keyCode === 83 ) { 113 | event.preventDefault(); 114 | openNotes(); 115 | } 116 | }, false ); 117 | 118 | } 119 | 120 | return { open: openNotes }; 121 | 122 | })(); 123 | -------------------------------------------------------------------------------- /presentation/plugin/print-pdf/print-pdf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * phantomjs script for printing presentations to PDF. 3 | * 4 | * Example: 5 | * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf 6 | * 7 | * By Manuel Bieh (https://github.com/manuelbieh) 8 | */ 9 | 10 | // html2pdf.js 11 | var page = new WebPage(); 12 | var system = require( 'system' ); 13 | 14 | var slideWidth = system.args[3] ? system.args[3].split( 'x' )[0] : 960; 15 | var slideHeight = system.args[3] ? system.args[3].split( 'x' )[1] : 700; 16 | 17 | page.viewportSize = { 18 | width: slideWidth, 19 | height: slideHeight 20 | }; 21 | 22 | // TODO 23 | // Something is wrong with these config values. An input 24 | // paper width of 1920px actually results in a 756px wide 25 | // PDF. 26 | page.paperSize = { 27 | width: Math.round( slideWidth * 2 ), 28 | height: Math.round( slideHeight * 2 ), 29 | border: 0 30 | }; 31 | 32 | var inputFile = system.args[1] || 'index.html?print-pdf'; 33 | var outputFile = system.args[2] || 'slides.pdf'; 34 | 35 | if( outputFile.match( /\.pdf$/gi ) === null ) { 36 | outputFile += '.pdf'; 37 | } 38 | 39 | console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.paperSize.height +')' ); 40 | 41 | page.open( inputFile, function( status ) { 42 | window.setTimeout( function() { 43 | console.log( 'Printed succesfully' ); 44 | page.render( outputFile ); 45 | phantom.exit(); 46 | }, 1000 ); 47 | } ); 48 | 49 | -------------------------------------------------------------------------------- /presentation/plugin/remotes/remotes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Touch-based remote controller for your presentation courtesy 3 | * of the folks at http://remotes.io 4 | */ 5 | 6 | (function(window){ 7 | 8 | /** 9 | * Detects if we are dealing with a touch enabled device (with some false positives) 10 | * Borrowed from modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touch.js 11 | */ 12 | var hasTouch = (function(){ 13 | return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch; 14 | })(); 15 | 16 | /** 17 | * Detects if notes are enable and the current page is opened inside an /iframe 18 | * this prevents loading Remotes.io several times 19 | */ 20 | var isNotesAndIframe = (function(){ 21 | return window.RevealNotes && !(self == top); 22 | })(); 23 | 24 | if(!hasTouch && !isNotesAndIframe){ 25 | head.ready( 'remotes.ne.min.js', function() { 26 | new Remotes("preview") 27 | .on("swipe-left", function(e){ Reveal.right(); }) 28 | .on("swipe-right", function(e){ Reveal.left(); }) 29 | .on("swipe-up", function(e){ Reveal.down(); }) 30 | .on("swipe-down", function(e){ Reveal.up(); }) 31 | .on("tap", function(e){ Reveal.next(); }) 32 | .on("zoom-out", function(e){ Reveal.toggleOverview(true); }) 33 | .on("zoom-in", function(e){ Reveal.toggleOverview(false); }) 34 | ; 35 | } ); 36 | 37 | head.js('https://hakim-static.s3.amazonaws.com/reveal-js/remotes.ne.min.js'); 38 | } 39 | })(window); -------------------------------------------------------------------------------- /presentation/plugin/search/search.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Handles finding a text string anywhere in the slides and showing the next occurrence to the user 3 | * by navigatating to that slide and highlighting it. 4 | * 5 | * By Jon Snyder , February 2013 6 | */ 7 | 8 | var RevealSearch = (function() { 9 | 10 | var matchedSlides; 11 | var currentMatchedIndex; 12 | var searchboxDirty; 13 | var myHilitor; 14 | 15 | // Original JavaScript code by Chirp Internet: www.chirp.com.au 16 | // Please acknowledge use of this code by including this header. 17 | // 2/2013 jon: modified regex to display any match, not restricted to word boundaries. 18 | 19 | function Hilitor(id, tag) 20 | { 21 | 22 | var targetNode = document.getElementById(id) || document.body; 23 | var hiliteTag = tag || "EM"; 24 | var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM|SPAN)$"); 25 | var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"]; 26 | var wordColor = []; 27 | var colorIdx = 0; 28 | var matchRegex = ""; 29 | var matchingSlides = []; 30 | 31 | this.setRegex = function(input) 32 | { 33 | input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); 34 | matchRegex = new RegExp("(" + input + ")","i"); 35 | } 36 | 37 | this.getRegex = function() 38 | { 39 | return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " "); 40 | } 41 | 42 | // recursively apply word highlighting 43 | this.hiliteWords = function(node) 44 | { 45 | if(node == undefined || !node) return; 46 | if(!matchRegex) return; 47 | if(skipTags.test(node.nodeName)) return; 48 | 49 | if(node.hasChildNodes()) { 50 | for(var i=0; i < node.childNodes.length; i++) 51 | this.hiliteWords(node.childNodes[i]); 52 | } 53 | if(node.nodeType == 3) { // NODE_TEXT 54 | if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) { 55 | //find the slide's section element and save it in our list of matching slides 56 | var secnode = node.parentNode; 57 | while (secnode.nodeName != 'SECTION') { 58 | secnode = secnode.parentNode; 59 | } 60 | 61 | var slideIndex = Reveal.getIndices(secnode); 62 | var slidelen = matchingSlides.length; 63 | var alreadyAdded = false; 64 | for (var i=0; i < slidelen; i++) { 65 | if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) { 66 | alreadyAdded = true; 67 | } 68 | } 69 | if (! alreadyAdded) { 70 | matchingSlides.push(slideIndex); 71 | } 72 | 73 | if(!wordColor[regs[0].toLowerCase()]) { 74 | wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length]; 75 | } 76 | 77 | var match = document.createElement(hiliteTag); 78 | match.appendChild(document.createTextNode(regs[0])); 79 | match.style.backgroundColor = wordColor[regs[0].toLowerCase()]; 80 | match.style.fontStyle = "inherit"; 81 | match.style.color = "#000"; 82 | 83 | var after = node.splitText(regs.index); 84 | after.nodeValue = after.nodeValue.substring(regs[0].length); 85 | node.parentNode.insertBefore(match, after); 86 | } 87 | } 88 | }; 89 | 90 | // remove highlighting 91 | this.remove = function() 92 | { 93 | var arr = document.getElementsByTagName(hiliteTag); 94 | while(arr.length && (el = arr[0])) { 95 | el.parentNode.replaceChild(el.firstChild, el); 96 | } 97 | }; 98 | 99 | // start highlighting at target node 100 | this.apply = function(input) 101 | { 102 | if(input == undefined || !input) return; 103 | this.remove(); 104 | this.setRegex(input); 105 | this.hiliteWords(targetNode); 106 | return matchingSlides; 107 | }; 108 | 109 | } 110 | 111 | function openSearch() { 112 | //ensure the search term input dialog is visible and has focus: 113 | var inputbox = document.getElementById("searchinput"); 114 | inputbox.style.display = "inline"; 115 | inputbox.focus(); 116 | inputbox.select(); 117 | } 118 | 119 | function toggleSearch() { 120 | var inputbox = document.getElementById("searchinput"); 121 | if (inputbox.style.display !== "inline") { 122 | openSearch(); 123 | } 124 | else { 125 | inputbox.style.display = "none"; 126 | myHilitor.remove(); 127 | } 128 | } 129 | 130 | function doSearch() { 131 | //if there's been a change in the search term, perform a new search: 132 | if (searchboxDirty) { 133 | var searchstring = document.getElementById("searchinput").value; 134 | 135 | //find the keyword amongst the slides 136 | myHilitor = new Hilitor("slidecontent"); 137 | matchedSlides = myHilitor.apply(searchstring); 138 | currentMatchedIndex = 0; 139 | } 140 | 141 | //navigate to the next slide that has the keyword, wrapping to the first if necessary 142 | if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) { 143 | currentMatchedIndex = 0; 144 | } 145 | if (matchedSlides.length > currentMatchedIndex) { 146 | Reveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v); 147 | currentMatchedIndex++; 148 | } 149 | } 150 | 151 | var dom = {}; 152 | dom.wrapper = document.querySelector( '.reveal' ); 153 | 154 | if( !dom.wrapper.querySelector( '.searchbox' ) ) { 155 | var searchElement = document.createElement( 'div' ); 156 | searchElement.id = "searchinputdiv"; 157 | searchElement.classList.add( 'searchdiv' ); 158 | searchElement.style.position = 'absolute'; 159 | searchElement.style.top = '10px'; 160 | searchElement.style.left = '10px'; 161 | //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/: 162 | searchElement.innerHTML = ''; 163 | dom.wrapper.appendChild( searchElement ); 164 | } 165 | 166 | document.getElementById("searchbutton").addEventListener( 'click', function(event) { 167 | doSearch(); 168 | }, false ); 169 | 170 | document.getElementById("searchinput").addEventListener( 'keyup', function( event ) { 171 | switch (event.keyCode) { 172 | case 13: 173 | event.preventDefault(); 174 | doSearch(); 175 | searchboxDirty = false; 176 | break; 177 | default: 178 | searchboxDirty = true; 179 | } 180 | }, false ); 181 | 182 | // Open the search when the 's' key is hit (yes, this conflicts with the notes plugin, disabling for now) 183 | /* 184 | document.addEventListener( 'keydown', function( event ) { 185 | // Disregard the event if the target is editable or a 186 | // modifier is present 187 | if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; 188 | 189 | if( event.keyCode === 83 ) { 190 | event.preventDefault(); 191 | openSearch(); 192 | } 193 | }, false ); 194 | */ 195 | return { open: openSearch }; 196 | })(); 197 | -------------------------------------------------------------------------------- /presentation/plugin/zoom-js/zoom.js: -------------------------------------------------------------------------------- 1 | // Custom reveal.js integration 2 | (function(){ 3 | var isEnabled = true; 4 | 5 | document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) { 6 | var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key'; 7 | 8 | var zoomPadding = 20; 9 | var revealScale = Reveal.getScale(); 10 | 11 | if( event[ modifier ] && isEnabled ) { 12 | event.preventDefault(); 13 | 14 | var bounds = event.target.getBoundingClientRect(); 15 | 16 | zoom.to({ 17 | x: ( bounds.left * revealScale ) - zoomPadding, 18 | y: ( bounds.top * revealScale ) - zoomPadding, 19 | width: ( bounds.width * revealScale ) + ( zoomPadding * 2 ), 20 | height: ( bounds.height * revealScale ) + ( zoomPadding * 2 ), 21 | pan: false 22 | }); 23 | } 24 | } ); 25 | 26 | Reveal.addEventListener( 'overviewshown', function() { isEnabled = false; } ); 27 | Reveal.addEventListener( 'overviewhidden', function() { isEnabled = true; } ); 28 | })(); 29 | 30 | /*! 31 | * zoom.js 0.3 (modified for use with reveal.js) 32 | * http://lab.hakim.se/zoom-js 33 | * MIT licensed 34 | * 35 | * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se 36 | */ 37 | var zoom = (function(){ 38 | 39 | // The current zoom level (scale) 40 | var level = 1; 41 | 42 | // The current mouse position, used for panning 43 | var mouseX = 0, 44 | mouseY = 0; 45 | 46 | // Timeout before pan is activated 47 | var panEngageTimeout = -1, 48 | panUpdateInterval = -1; 49 | 50 | // Check for transform support so that we can fallback otherwise 51 | var supportsTransforms = 'WebkitTransform' in document.body.style || 52 | 'MozTransform' in document.body.style || 53 | 'msTransform' in document.body.style || 54 | 'OTransform' in document.body.style || 55 | 'transform' in document.body.style; 56 | 57 | if( supportsTransforms ) { 58 | // The easing that will be applied when we zoom in/out 59 | document.body.style.transition = 'transform 0.8s ease'; 60 | document.body.style.OTransition = '-o-transform 0.8s ease'; 61 | document.body.style.msTransition = '-ms-transform 0.8s ease'; 62 | document.body.style.MozTransition = '-moz-transform 0.8s ease'; 63 | document.body.style.WebkitTransition = '-webkit-transform 0.8s ease'; 64 | } 65 | 66 | // Zoom out if the user hits escape 67 | document.addEventListener( 'keyup', function( event ) { 68 | if( level !== 1 && event.keyCode === 27 ) { 69 | zoom.out(); 70 | } 71 | } ); 72 | 73 | // Monitor mouse movement for panning 74 | document.addEventListener( 'mousemove', function( event ) { 75 | if( level !== 1 ) { 76 | mouseX = event.clientX; 77 | mouseY = event.clientY; 78 | } 79 | } ); 80 | 81 | /** 82 | * Applies the CSS required to zoom in, prefers the use of CSS3 83 | * transforms but falls back on zoom for IE. 84 | * 85 | * @param {Object} rect 86 | * @param {Number} scale 87 | */ 88 | function magnify( rect, scale ) { 89 | 90 | var scrollOffset = getScrollOffset(); 91 | 92 | // Ensure a width/height is set 93 | rect.width = rect.width || 1; 94 | rect.height = rect.height || 1; 95 | 96 | // Center the rect within the zoomed viewport 97 | rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2; 98 | rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2; 99 | 100 | if( supportsTransforms ) { 101 | // Reset 102 | if( scale === 1 ) { 103 | document.body.style.transform = ''; 104 | document.body.style.OTransform = ''; 105 | document.body.style.msTransform = ''; 106 | document.body.style.MozTransform = ''; 107 | document.body.style.WebkitTransform = ''; 108 | } 109 | // Scale 110 | else { 111 | var origin = scrollOffset.x +'px '+ scrollOffset.y +'px', 112 | transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')'; 113 | 114 | document.body.style.transformOrigin = origin; 115 | document.body.style.OTransformOrigin = origin; 116 | document.body.style.msTransformOrigin = origin; 117 | document.body.style.MozTransformOrigin = origin; 118 | document.body.style.WebkitTransformOrigin = origin; 119 | 120 | document.body.style.transform = transform; 121 | document.body.style.OTransform = transform; 122 | document.body.style.msTransform = transform; 123 | document.body.style.MozTransform = transform; 124 | document.body.style.WebkitTransform = transform; 125 | } 126 | } 127 | else { 128 | // Reset 129 | if( scale === 1 ) { 130 | document.body.style.position = ''; 131 | document.body.style.left = ''; 132 | document.body.style.top = ''; 133 | document.body.style.width = ''; 134 | document.body.style.height = ''; 135 | document.body.style.zoom = ''; 136 | } 137 | // Scale 138 | else { 139 | document.body.style.position = 'relative'; 140 | document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px'; 141 | document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px'; 142 | document.body.style.width = ( scale * 100 ) + '%'; 143 | document.body.style.height = ( scale * 100 ) + '%'; 144 | document.body.style.zoom = scale; 145 | } 146 | } 147 | 148 | level = scale; 149 | 150 | if( document.documentElement.classList ) { 151 | if( level !== 1 ) { 152 | document.documentElement.classList.add( 'zoomed' ); 153 | } 154 | else { 155 | document.documentElement.classList.remove( 'zoomed' ); 156 | } 157 | } 158 | } 159 | 160 | /** 161 | * Pan the document when the mosue cursor approaches the edges 162 | * of the window. 163 | */ 164 | function pan() { 165 | var range = 0.12, 166 | rangeX = window.innerWidth * range, 167 | rangeY = window.innerHeight * range, 168 | scrollOffset = getScrollOffset(); 169 | 170 | // Up 171 | if( mouseY < rangeY ) { 172 | window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) ); 173 | } 174 | // Down 175 | else if( mouseY > window.innerHeight - rangeY ) { 176 | window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) ); 177 | } 178 | 179 | // Left 180 | if( mouseX < rangeX ) { 181 | window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y ); 182 | } 183 | // Right 184 | else if( mouseX > window.innerWidth - rangeX ) { 185 | window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y ); 186 | } 187 | } 188 | 189 | function getScrollOffset() { 190 | return { 191 | x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset, 192 | y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset 193 | } 194 | } 195 | 196 | return { 197 | /** 198 | * Zooms in on either a rectangle or HTML element. 199 | * 200 | * @param {Object} options 201 | * - element: HTML element to zoom in on 202 | * OR 203 | * - x/y: coordinates in non-transformed space to zoom in on 204 | * - width/height: the portion of the screen to zoom in on 205 | * - scale: can be used instead of width/height to explicitly set scale 206 | */ 207 | to: function( options ) { 208 | 209 | // Due to an implementation limitation we can't zoom in 210 | // to another element without zooming out first 211 | if( level !== 1 ) { 212 | zoom.out(); 213 | } 214 | else { 215 | options.x = options.x || 0; 216 | options.y = options.y || 0; 217 | 218 | // If an element is set, that takes precedence 219 | if( !!options.element ) { 220 | // Space around the zoomed in element to leave on screen 221 | var padding = 20; 222 | var bounds = options.element.getBoundingClientRect(); 223 | 224 | options.x = bounds.left - padding; 225 | options.y = bounds.top - padding; 226 | options.width = bounds.width + ( padding * 2 ); 227 | options.height = bounds.height + ( padding * 2 ); 228 | } 229 | 230 | // If width/height values are set, calculate scale from those values 231 | if( options.width !== undefined && options.height !== undefined ) { 232 | options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 ); 233 | } 234 | 235 | if( options.scale > 1 ) { 236 | options.x *= options.scale; 237 | options.y *= options.scale; 238 | 239 | magnify( options, options.scale ); 240 | 241 | if( options.pan !== false ) { 242 | 243 | // Wait with engaging panning as it may conflict with the 244 | // zoom transition 245 | panEngageTimeout = setTimeout( function() { 246 | panUpdateInterval = setInterval( pan, 1000 / 60 ); 247 | }, 800 ); 248 | 249 | } 250 | } 251 | } 252 | }, 253 | 254 | /** 255 | * Resets the document zoom state to its default. 256 | */ 257 | out: function() { 258 | clearTimeout( panEngageTimeout ); 259 | clearInterval( panUpdateInterval ); 260 | 261 | magnify( { x: 0, y: 0 }, 1 ); 262 | 263 | level = 1; 264 | }, 265 | 266 | // Alias 267 | magnify: function( options ) { this.to( options ) }, 268 | reset: function() { this.out() }, 269 | 270 | zoomLevel: function() { 271 | return level; 272 | } 273 | } 274 | 275 | })(); 276 | 277 | 278 | 279 | -------------------------------------------------------------------------------- /run-with-modules: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # This shows how to compile & run the example 5 | # modules using the new Java9 command line parameters 6 | # 7 | 8 | # make module directories 9 | mkdir -p target/module/de.exxcellent.java9 10 | mkdir -p target/module/anothermodule 11 | 12 | # compiling 13 | echo "=== Compiling playground" 14 | javac $(find playground/src/main/java -name "*.java") \ 15 | -d target/module/de.exxcellent.java9 16 | 17 | echo -e "\n=== Compiling playground-dependent" 18 | javac $(find playground-dependent/src/main/java -name "*.java")\ 19 | -d target/module/anothermodule \ 20 | -modulepath target/module 21 | 22 | $ java -modulepath target/module \ 23 | -m anothermodule/de.exxcellent.anothermodule.TestJigsawSPI 24 | 25 | echo -e "\n=== Running anothermodule/de.exxcellent.anothermodule.RetrieveModuleInfo" 26 | java -modulepath target/module -m anothermodule/de.exxcellent.anothermodule.RetrieveModuleInfo 27 | 28 | 29 | echo -e "\n=== Running anothermodule/de.exxcellent.anothermodule.TestJigsawSPI" 30 | java -modulepath target/module \ 31 | -m anothermodule/de.exxcellent.anothermodule.TestJigsawSPI 32 | --------------------------------------------------------------------------------