diff --git a/.github/workflows/style_check.yaml b/.github/workflows/style_check.yaml index 9b90a4f4d..9e0211c53 100644 --- a/.github/workflows/style_check.yaml +++ b/.github/workflows/style_check.yaml @@ -4,7 +4,7 @@ on: pull_request: paths-ignore: - '.3rd-party/**' - - 'site/**' + - 'docs/**' - '**.md' workflow_dispatch: diff --git a/.github/workflows/verify-hibernate.yaml b/.github/workflows/verify-hibernate.yaml index 463af5aea..76d72936d 100644 --- a/.github/workflows/verify-hibernate.yaml +++ b/.github/workflows/verify-hibernate.yaml @@ -7,13 +7,11 @@ on: paths-ignore: - '.3rd-party/**' - 'docs/**' - - 'site/**' - '**.md' pull_request: paths-ignore: - '.3rd-party/**' - 'docs/**' - - 'site/**' - '**.md' workflow_dispatch: diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 11d887025..647f7add2 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -7,13 +7,11 @@ on: paths-ignore: - '.3rd-party/**' - 'docs/**' - - 'site/**' - '**.md' pull_request: paths-ignore: - '.3rd-party/**' - 'docs/**' - - 'site/**' - '**.md' workflow_dispatch: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index fed02f423..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "site/themes/hugo-material-docs"] - path = site/themes/hugo-material-docs - url = https://github.com/digitalcraftsman/hugo-material-docs.git diff --git a/hawkbit-ddi/hawkbit-ddi-server/README.md b/hawkbit-ddi/hawkbit-ddi-server/README.md index 663f5168e..eacaeea07 100644 --- a/hawkbit-ddi/hawkbit-ddi-server/README.md +++ b/hawkbit-ddi/hawkbit-ddi-server/README.md @@ -26,4 +26,4 @@ The root url http://localhost:8081 will redirect directly to the Swagger Managem # Clustering (Experimental!!!) ## Remote Events between micro-services -[See more information](../../site/content/guides/clustering.md) \ No newline at end of file +[See more information](../../docs/content/guides/clustering.md) \ No newline at end of file diff --git a/hawkbit-dmf/hawkbit-dmf-server/README.md b/hawkbit-dmf/hawkbit-dmf-server/README.md index 770d6d3b9..24ef1ff05 100644 --- a/hawkbit-dmf/hawkbit-dmf-server/README.md +++ b/hawkbit-dmf/hawkbit-dmf-server/README.md @@ -16,4 +16,4 @@ run org.eclipse.hawkbit.app.dmf.DMFStart ``` # Clustering (Experimental!!!) ## Remote Events between micro-services -[See more information](../../site/content/guides/clustering.md) \ No newline at end of file +[See more information](../../docs/content/guides/clustering.md) \ No newline at end of file diff --git a/pom.xml b/pom.xml index a220e9c98..4388a1866 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,6 @@ 3.6.2 1.7.3 - 3.21.0 3.5.4 0.8.14 @@ -475,16 +474,6 @@ - - org.apache.maven.plugins - maven-site-plugin - ${maven.site.plugin.version} - - true - true - - - org.jacoco jacoco-maven-plugin @@ -579,13 +568,10 @@ docker/** licenses/LICENSE* - **/*.sql docs/** - /docs/rest-api/** - /docs/images/** - **/application-local.properties eclipse_codeformatter.xml intellij_codeformatter.xml + **/*.sql **/banner.txt **/robots.txt @@ -596,11 +582,8 @@ **/vite.config.ts **/vite.generated.ts - - site/layouts/** - site/static/** - site/*.toml - + + **/application-local.properties diff --git a/site/.gitignore b/site/.gitignore deleted file mode 100644 index 86c6bcd0a..000000000 --- a/site/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# rest api doc -content/rest-api/*.json -content/rest-api/*.html -content/rest-api/*.yaml -static/rest-api/*.html -# npm leftover -node_modules -package.json -package-lock.json -# themes -themes -themes/hugo-material-docs -# hugo -public -.hugo_build.lock diff --git a/site/README.md b/site/README.md deleted file mode 100644 index 7585152ed..000000000 --- a/site/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Eclipse hawkBit Documentation - -The hawkBit documentation is built with [Hugo](https://www.gohugo.io/) using -the [Material](http://github.com/digitalcraftsman/hugo-material-docs) -theme. Compiling the documentation is not included within the regular Maven build. - -## Prerequisites - -1. **Install Hugo**: see [installing Hugo](https://gohugo.io/getting-started/installing/) documentation on how to - install Hugo. -2. **Install NODE.js and npm** - see [installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) documentation on - how to install Node.js and npm -3. **Install Redocly CLI** see [installing Redocly CLI](https://redocly.com/docs/cli/installation/) documentation on how - to install Redocly CLI -4. **Install hawkBit**: run `mvn install` in the parent directory to generate the latest REST docs for hawkBit. - -## Build and Serve documentation - -The following Maven targets are available in order to build and serve the documentation: - -* `mvn install`: _i._ Copies the generated REST docs to `content/rest-api/` and _ii._ downloads the required Hugo theme -* `mvn site`: Serve the documentation on [localhost:1313/hawkbit/](http://localhost:1313/hawkbit/) - - _Note_: the local port could be different. Please, look at the _mvn site_ command output. -* `mvn clean`: Delete generated artifacts (REST docs, Hugo theme) - -## Generate /public folder - -In order to generate the `/public` folder, which can be put on a web-server, run the following command: - -```bash -$ hugo -``` \ No newline at end of file diff --git a/site/build-htmls.bat b/site/build-htmls.bat deleted file mode 100644 index c80bb62d8..000000000 --- a/site/build-htmls.bat +++ /dev/null @@ -1,38 +0,0 @@ -@echo off -@REM -@REM Copyright (c) 2023 Bosch.IO GmbH and others -@REM -@REM This program and the accompanying materials are made -@REM available under the terms of the Eclipse Public License 2.0 -@REM which is available at https://www.eclipse.org/legal/epl-2.0/ -@REM -@REM SPDX-License-Identifier: EPL-2.0 -@REM - -rem Checking for Redoc CLI and npm -call npx @redocly/cli --version 1> nul 2> nul - -if ERRORLEVEL 1 ( - echo [ERROR] Redoc CLI is not installed! Please make suer to install it before trying again. - exit 1 -) - -rem Execute the npx command -call npx @redocly/cli build-docs %cd%\content\rest-api\mgmt.yaml -o %cd%\content\rest-api\mgmt.html - -if ERRORLEVEL 1 ( - echo [ERROR] Failed to execute the Redoc CLI command form MGMT API. - exit 1 -) else ( - echo [INFO] Successfully executed the Redoc CLI command for MGMT API. -) - -rem Execute the npx command -call npx @redocly/cli build-docs %cd%\content\rest-api\ddi.yaml -o %cd%\content\rest-api\ddi.html - -if ERRORLEVEL 1 ( - echo [ERROR] Failed to execute the Redoc CLI command form DDI API. - exit 1 -) else ( - echo [INFO] Successfully executed the Redoc CLI command for DDI API. -) \ No newline at end of file diff --git a/site/build-htmls.sh b/site/build-htmls.sh deleted file mode 100644 index 69b9d9702..000000000 --- a/site/build-htmls.sh +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2018 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -#!/bin/bash - -CURRENT_DIR=$(pwd) - -# Checking for Redoc CLI and npm -npx @redocly/cli --version > /dev/null 2>&1 - -if [ $? != 0 ]; then - echo "[ERROR] Redoc CLI is not installed! Please make suer to install it before trying again." - exit 1 -fi - -# Execute the npx command -npx @redocly/cli build-docs ${CURRENT_DIR}/content/rest-api/mgmt.yaml -o ${CURRENT_DIR}/static/rest-api/mgmt.html - -if [ $? != 0 ]; then - echo "[ERROR] Failed to execute the Redoc CLI command form MGMT API." - exit 1 -else - echo "[INFO] Successfully executed the Redoc CLI command for MGMT API." -fi - -# Execute the npx command -npx @redocly/cli build-docs ${CURRENT_DIR}/content/rest-api/ddi.yaml -o ${CURRENT_DIR}/static/rest-api/ddi.html - -if [ $? != 0 ]; then - echo "[ERROR] Failed to execute the Redoc CLI command form DDI API." - exit 1 -else - echo "[INFO] Successfully executed the Redoc CLI command for DDI API." -fi \ No newline at end of file diff --git a/site/cleanup.bat b/site/cleanup.bat deleted file mode 100644 index d8b5ab0e7..000000000 --- a/site/cleanup.bat +++ /dev/null @@ -1,22 +0,0 @@ -@echo off -@REM -@REM Copyright (c) 2023 Bosch.IO GmbH and others -@REM -@REM This program and the accompanying materials are made -@REM available under the terms of the Eclipse Public License 2.0 -@REM which is available at https://www.eclipse.org/legal/epl-2.0/ -@REM -@REM SPDX-License-Identifier: EPL-2.0 -@REM - -rem This script is used to clean up the previously generated or downloaded files. - -echo [INFO] Remove Hugo Theme -rmdir /Q /S themes resources public -echo [INFO] ... done - -echo [INFO] - -echo [INFO] Remove generated REST docs -del /Q content\rest-api\*.html -echo [INFO] ... done diff --git a/site/cleanup.sh b/site/cleanup.sh deleted file mode 100644 index 3a4d60a06..000000000 --- a/site/cleanup.sh +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) 2018 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# This script is used to clean up the previously generated or downloaded files. - -#!/bin/bash - - -echo "[INFO] Remove Hugo Theme" -rm -rf themes resources public -echo "[INFO] ... done" - -echo "[INFO] " - -echo "[INFO] Remove generated REST docs" -rm -f content/rest-api/*.json -rm -f content/rest-api/*.html -echo "[INFO] ... done" - - diff --git a/site/config.toml b/site/config.toml deleted file mode 100755 index 8b7303789..000000000 --- a/site/config.toml +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (c) 2018 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -baseurl = "https://eclipse.dev/hawkbit/" -languageCode = "en-us" -title = "Eclipse hawkBit" -theme = "hugo-material-docs" -metadataformat = "toml" -canonifyurls = false - -[markup] - [markup.goldmark] - [markup.goldmark.extensions] - typographer = true - [markup.goldmark.renderer] - unsafe = true - -[markup.highlight] - codeFences = false - -[params] - # General information - author = "The Eclipse hawkBit Project" - description = "IoT. Update. Device." - copyright = "The Eclipse hawkBit Project" - logo = "images/hawkbit_icon.png" - favicon = "images/favicon.ico" - - # Repository - provider = "GitHub" - repo_url = "https://github.com/eclipse-hawkbit/hawkbit" - - permalink = "#" - - # Custom assets - custom_css = ["css/hawkbit.css","//www.eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/vendor/cookieconsent/cookieconsent.min.css"] - custom_js = [] - - # Syntax highlighting theme - highlight_css = "" - -[params.palette] - primary = "deep-purple" - accent = "light-green" - -[params.font] - text = "Ubuntu" - code = "Ubuntu Mono" - -[social] - github = "eclipse/hawkbit" - gitter = "eclipse/hawkbit" - docker = "hawkbit" - -[[menu.main]] - name = "What is hawkBit" - url = "/whatishawkbit/" - weight = 10 - -[[menu.main]] - name = "Getting started" - url = "/gettingstarted/" - weight = 20 - -[[menu.main]] - name = "Guides" - url = "/guides/" - weight = 30 - -[[menu.main]] - name = "Features" - url = "/features/" - weight = 40 - -[[menu.main]] - name = "Concepts" - url = "/concepts/" - weight = 50 - -[[menu.main]] - name = "Architecture" - url = "/architecture/" - weight = 60 - -[[menu.main]] - name = "APIs" - url = "/apis/" - weight = 80 - -[[menu.main]] - name = "Release notes" - url = "/release-notes/" - weight = 90 - -[[menu.main]] - name = "Blog" - url = "/blog/" - weight = 100 - -[[menu.main]] - name = "Community" - url = "/community/" - weight = 110 diff --git a/site/content/apis/ddi_api.md b/site/content/apis/ddi_api.md deleted file mode 100644 index b084390d6..000000000 --- a/site/content/apis/ddi_api.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Direct Device Integration API -parent: APIs -weight: 82 ---- - -The hawkBit [update server](https://github.com/eclipse-hawkbit/hawkbit) provides REST resources which are consumed by -the device to retrieve software update tasks. -This API is based on HTTP standards and a polling mechanism. - - -{{% note %}} -In DDI the target is identified using a **controllerId**. Controller is used as a term for the actual service/client on -the device. That allows users to have in some cases even multiple clients on the same target for different tasks, e.g. -Firmware update and App management. -{{% /note %}} - -## State Machine Mapping - -For historical reasons the DDI has a different state machine and status messages than -the [Target State Machine](../../concepts/targetstate/) of the hawkBit update server. - -This is kept in order to ensure that _DDI_ stays compatible for devices out there in the field. A future version "2" of -_DDI_ might change that. _DDI_ also defines more states than the update server, e.g. multiple DDI states are currently -mapped by the _DDI_ implementation to _RUNNING_ state. It is possible that in the future hawkBit will fully leverage -these additional states. - -The _DDI_ API allows the device to provide the following feedback messages: - - DDI `status.execution` type | handling by update server | Mapped ActionStatus type ------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------- - CANCELED | This is send by the target as confirmation of a cancellation request by the update server. | CANCELED - REJECTED | This is send by the target in case an update of a cancellation is rejected, i.e. cannot be fulfilled at this point in time. Note: the target should send a CLOSED->ERROR if it believes it will not be able to proceed the action at all. | WARNING - CLOSED | Target completes the action either with `status.result.finished` SUCCESS or FAILURE as result. Note: DDI defines also a status NONE which will not be interpreted by the update server and handled like SUCCESS. | ERROR (DDI FAILURE) or FINISHED (DDI SUCCESS or NONE) - DOWNLOAD | This can be used by the target to inform that it is downloading artifacts of the action. | DOWNLOAD - DOWNLOADED | This can be used by the target to inform that it has downloaded artifacts of the action. | DOWNLOADED - PROCEEDING | This can be used by the target to inform that it is working on the action. | RUNNING - SCHEDULED | This can be used by the target to inform that it scheduled on the action. | RUNNING - RESUMED | This can be used by the target to inform that it continued to work on the action. | RUNNING - -See this [issue](https://github.com/eclipse-hawkbit/hawkbit/issues/952) for additional information, concerning the cancellation of updates. To finally accept a cancellation, you must send a "closed" status.exection type. -## DDI APIs - - diff --git a/site/content/apis/dmf_api.md b/site/content/apis/dmf_api.md deleted file mode 100644 index 27eb6221c..000000000 --- a/site/content/apis/dmf_api.md +++ /dev/null @@ -1,617 +0,0 @@ ---- -title: Device Management Federation API -parent: API -weight: 83 ---- - -The DMF API provides Java classes which allows that the message body can be deserialized at runtime into a Java object. -Also Java classes can be used to serialize Java objects into JSON bodies to send a message to hawkBit. -Currently, bodies of messages are based on JSON. - - - -## Basics - -There are three basic concepts of AMQP: - -- Exchanges - what you publish to. -- Queues - what you consume from. -- Bindings - configuration that maps an exchange to a queue. - -**Queues** are just a place for receiving messages. -Bindings determine how messages get put in this place -Queues can also be bound to multiple exchanges. - -**Exchanges** are just publish messages. -The user decides who can produce on an exchange and who can create bindings on that exchange for delivery to a specific -queue. - -hawkBit will create all necessary queues, exchanges and bindings for the user, making it easy to get started. -The exchange name for outgoing messages is **dmf.exchange**. - -The user has to set a `reply_to` header (see chapter below), in order to specify the exchange to which hawkBit should -reply to. - -The following chapter describes the message body, header and properties. - -Note: the DMF protocol was intended to be compatible to other use cases by design. As a result, DMF uses the term * -*thing** and not **target** but they are actually synonyms in this case. - -## Messages sent to hawkBit (Client -> hawkBit) - -### THING_CREATED - -Message to register and update a provisioning target. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|------------------------------|-----------| -| type | Type of the message | Fixed string "THING_CREATED" | true | -| thingId | The ID of the registered provisioning target | String | true | -| tenant | The tenant this provisioning target belongs to | String | true | -| sender | Name of the message sender | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | -| reply_to | Exchange to reply to | String | true | - -Example headers and payload: - -| Header | MessageProperties | -|--------------------------------------------------------------------------------------|--------------------------------------------------------------------| -| type=THING\_CREATED
tenant=default
thingId=abc
sender=myClient | content\_type=application/json
reply_to=myExchangeToReplyTo | - -Payload Template (optional): - -```json -{ - "name": "String", - "type": "String", - "attributeUpdate": { - "attributes": { - "exampleKey1" : "exampleValue1", - "exampleKey2" : "exampleValue2" - }, - "mode": "String" - } -} -``` - -The "name" property specifies the name of the thing, which by default is the thing ID. This property is optional.
-
-The "type" property specifies name of a target type which should be assigned to the created/updated target. The -target type with the specified name should be created in advance, otherwise it can't be assigned to the target, -resulting in: - -* error is logged -* if the target does not exist then it is created without any target type assigned -* if it exists already then no changes to its target type assignment are made. - -If the "type" property is set to a blank string while updating an existing target then any eventual target type -assignment is removed from the target. This property is optional and if omitted then no changes to the target type -assignment are made.
-
-The "attributeUpdate" property provides the attributes of the thing, for details see UPDATE_ATTRIBUTES message. This -property is optional. - -### THING_REMOVED - -Message to request the deletion of a provisioning target. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|------------------------------|-----------| -| type | Type of the message | Fixed string "THING_REMOVED" | true | -| thingId | The ID of the registered provisioning target | String | true | -| tenant | The tenant this provisioning target belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | - -Example headers - -| Header | MessageProperties | -|--------------------------------------------------------------|--------------------------------| -| type=THING\_REMOVED
tenant=default
thingId=abc | content\_type=application/json | - -### UPDATE_ATTRIBUTES - -Message to update target attributes. This message can be send in response to a REQUEST_ATTRIBUTES_UPDATE event, sent by -hawkBit. - -| Header | Description | Type | Mandatory | -|---------|----------------------------------|----------------------------------|-----------| -| type | Type of the message | Fixed string "EVENT" | true | -| topic | Topic name identifying the event | Fixed string "UPDATE_ATTRIBUTES" | true | -| thingId | The ID of the registered thing | String | true | -| tenant | The tenant this thing belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | - -Example header and payload: - -| Header | MessageProperties | -|--------------------------------------------------------------------------------------|---------------------------------------| -| type=EVENT
tenant=default
thingId=abc
topic=UPDATE\_ATTRIBUTES | content\_type=application/json
| - -Payload Template: - -```json -{ - "attributes": { - "exampleKey1" : "exampleValue1", - "exampleKey2" : "exampleValue2" - }, - "mode": "String" -} -``` - -The "mode" property specifies the update mode that should be applied. This property is optional. -Possible [mode](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfUpdateMode.java) -values: - -| Value | Description | -|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| MERGE | The target attributes specified in the payload are merged into the existing attributes. This is the default mode that is applied if no "mode" property is specified in the payload. | -| REPLACE | The existing attributes are replaced with the target attributes specified in the payload. | -| REMOVE | The target attributes specified in the payload are removed from the existing attributes. | - -### UPDATE_ACTION_STATUS - -Message to send an action status event to hawkBit. - -| Header | Description | Type | Mandatory | -|--------|----------------------------------|-------------------------------------|-----------| -| type | Type of the message | Fixed string "EVENT" | true | -| topic | Topic name identifying the event | Fixed string "UPDATE_ACTION_STATUS" | true | -| tenant | The tenant this thing belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | - -Payload Template (the Java representation -is [ActionUpdateStatus](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfActionUpdateStatus.java)): - -```json -{ - "actionId": long, - "softwareModuleId": long, - "actionStatus":"String", - "message":["String"], - "timestamp": long -} -``` - -Possible [actionStatus](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfActionStatus.java) -values: - -| Value | Description | -|-----------------|-----------------------------------------| -| DOWNLOAD | Device is downloading | -| DOWNLOADED | Device completed download | -| RETRIEVED | Device has retrieved the artifact | -| RUNNING | Update is running | -| FINISHED | Update process finished successful | -| ERROR | Error during update process | -| WARNING | Warning during update process | -| CANCELED | Cancel update process successful | -| CANCEL_REJECTED | Cancel update process has been rejected | - -Example header and payload: - -| Header | MessageProperties | -|-----------------------------------------------------------------------|-------------------------------| -| type=EVENT
tenant=default
topic=UPDATE\_ACTION\_STATUS | content_type=application/json | - -```json -{ - "actionId":137, - "softwareModuleId":17, - "actionStatus":"DOWNLOAD", - "message":["The download has started"], - "timestamp": 1704070800000 -} -``` - -### PING - -hawkBit allows DMF clients to check the availability of the DMF service. For this scenario DMF specifies a PING message -that can be sent by the client: - -| Header | Description | Type | Mandatory | -|--------|--------------------------------|---------------------|-----------| -| type | Type of the message | Fixed string "PING" | true | -| tenant | The tenant the PING belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|-----------------------------------------------------------------------------|--------|-----------| -| correlationId | CorrelationId that allows the client to map a PING request to PING_RESPONSE | String | true | - -## Messages sent by hawkBit (hawkBit -> Client) - -### CANCEL_DOWNLOAD - -Message to cancel an update task. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|--------------------------------|-----------| -| type | Type of the message | Fixed string "Event" | true | -| thingId | The ID of the registered provisioning target | String | true | -| topic | Topic name identifying the event | Fixed string "CANCEL_DOWNLOAD" | true | -| tenant | The tenant this provisioning target belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | - -Payload template: - -```json -{ - "actionId": long -} -``` - -Example Headers and Payload: - -| Header | MessageProperties | -|------------------------------------------------------------------------------------|-------------------------------| -| type=EVENT
tenant=default
thingId=abc
topic=CANCEL\_DOWNLOAD | content_type=application/json | - -```json -{ -"actionId":137 -} -``` - -After sending this message, an action status event with either actionStatus=CANCELED or actionStatus=CANCEL_REJECTED has -to be returned. - -Example header and payload when cancellation is successful: - -| Header | MessageProperties | -|-----------------------------------------------------------------------|-------------------------------| -| type=EVENT
tenant=default
topic=UPDATE\_ACTION\_STATUS | content_type=application/json | - -```json -{ - "actionId":137, - "softwareModuleId":17, - "actionStatus":"CANCELED", - "message":["The update was canceled."], - "timestamp": 1704070800000 -} -``` - -Example header and payload when cancellation is rejected: - -| Header | MessageProperties | -|-----------------------------------------------------------------------|-------------------------------| -| type=EVENT
tenant=default
topic=UPDATE\_ACTION\_STATUS | content_type=application/json | - -```json -{ - "actionId":137, - "softwareModuleId":17, - "actionStatus":"CANCEL_REJECTED", - "message":["The cancellation was not possible since the target sent an unexpected response."], - "timestamp": 1704070800000 -} -``` - -### DOWNLOAD_AND_INSTALL or DOWNLOAD - -Message sent by hawkBit to initialize an update or download task. Note: in case of a maintenance window configured but -not yet active the message will have the topic _DOWNLOAD_ instead of _DOWNLOAD_AND_INSTALL_. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|---------------------------------------------------|-----------| -| type | Type of the message | Fixed string "EVENT" | true | -| thingId | The ID of the registered provisioning target | String | true | -| topic | Topic name identifying the event | Fixed string "DOWNLOAD_AND_INSTALL" or "DOWNLOAD" | true | -| tenant | The tenant this provisioning target belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | - -Payload Template (the Java representation -is [DmfDownloadAndUpdateRequest](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java)): - -```json -{ -"actionId": long, -"targetSecurityToken": "String", -"softwareModules":[ - { - "moduleId": long, - "moduleType":"String", - "moduleVersion":"String", - "artifacts":[ - { - "filename":"String", - "urls":{ - "HTTP":"String", - "HTTPS":"String" - }, - "hashes":{ - "md5":"String", - "sha1":"String" - }, - "size":long - }], - "metadata":[ - { - "key":"String", - "value":"String" - } - ] - }] -} -``` - -Example header and payload: - -| Header | MessageProperties | -|-------------------------------------------------------------------------------------------|-------------------------------| -| type=EVENT
tenant=default
thingId=abc
topic=DOWNLOAD\_AND\_INSTALL | content_type=application/json | - -```json -{ -"actionId":137, -"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY", -"softwareModules":[ - { - "moduleId":7, - "moduleType":"firmware", - "moduleVersion":"7.7.7", - "artifacts":[ - { - "filename":"artifact.zip", - "urls":{ - "HTTP":"http://download-from-url.com", - "HTTPS":"https://download-from-url.com" - }, - "hashes":{ - "md5":"", - "sha1":"" - }, - "size":512 - }], - "metadata":[ - { - "key":"installationType", - "value":"5784K#" - } - ] - }] -} -``` - -### MULTI_ACTION - -If `multi.assignments.enabled` is enabled, this message is sent instead of DOWNLOAD_AND_INSTALL, DOWNLOAD, or -CANCEL_DOWNLOAD -by hawkBit to initialize update, download, or cancel task(s). - -With weight, one can set the priority to the action. The higher the weight, the higher is the priority of an action. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|-----------------------------|-----------| -| type | Type of the message | Fixed string "EVENT" | true | -| thingId | The ID of the registered provisioning target | String | true | -| topic | Topic name identifying the event | Fixed string "MULTI_ACTION" | true | -| tenant | The tenant this provisioning target belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|---------------------------------|--------|-----------| -| content_type | The content type of the payload | String | true | - -Payload Template (the Java representation -is [DmfMultiActionRequest](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMultiActionRequest.java)): - -```json -[{ -"topic": "String", -"weight": long, -"action": { - "actionId": long, - "targetSecurityToken": "String", - "softwareModules":[ - { - "moduleId": long, - "moduleType":"String", - "moduleVersion":"String", - "artifacts":[ - { - "filename":"String", - "urls":{ - "HTTP":"String", - "HTTPS":"String" - }, - "hashes":{ - "md5":"String", - "sha1":"String" - }, - "size":long - }], - "metadata":[ - { - "key":"String", - "value":"String" - } - ] - }] - } -}, -{ -"topic": "String", -"weight": long, -"action": { - "actionId": long, - "targetSecurityToken": "String", - "softwareModules":[ - { - "moduleId": long, - "moduleType":"String", - "moduleVersion":"String", - "artifacts":[ - { - "filename":"String", - "urls":{ - "HTTP":"String", - "HTTPS":"String" - }, - "hashes":{ - "md5":"String", - "sha1":"String" - }, - "size":long - }], - "metadata":[ - { - "key":"String", - "value":"String" - } - ] - }] - } -}] -``` - -Example header and payload: - -| Header | MessageProperties | -|----------------------------------------------------------------------------------|-------------------------------| -| type=EVENT
tenant=default
thingId=abc
topic=MULTI\_ACTION | content_type=application/json | - -```json -[{ -"topic": "DOWNLOAD_AND_INSTALL", -"weight": 600, -"action": { - "actionId":137, - "targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY", - "softwareModules":[ - { - "moduleId":7, - "moduleType":"firmware", - "moduleVersion":"7.7.7", - "artifacts":[ - { - "filename":"artifact.zip", - "urls":{ - "HTTP":"http://download-from-url.com", - "HTTPS":"https://download-from-url.com" - }, - "hashes":{ - "md5":"", - "sha1":"" - }, - "size":512 - }], - "metadata":[ - { - "key":"installationType", - "value":"5784K#" - } - ] - }] - } -}, -{ -"topic": "DOWNLOAD", -"weight": 500, -"action": { - "actionId":138, - "targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY", - "softwareModules":[ - { - "moduleId":4, - "moduleType":"firmware", - "moduleVersion":"7.7.9", - "artifacts":[ - { - "filename":"artifact.zip", - "urls":{ - "HTTP":"http://download-from-url.com", - "HTTPS":"https://download-from-url.com" - }, - "hashes":{ - "md5":"", - "sha1":"" - }, - "size":512 - }], - "metadata":[ - { - "key":"installationType", - "value":"5784K#" - } - ] - }] - } -}] -``` - -### THING_DELETED - -Message sent by hawkBit when a target has been deleted. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|------------------------------|-----------| -| type | Type of the message | Fixed string "THING_DELETED" | true | -| thingId | The ID of the registered provisioning target | String | true | -| tenant | The tenant this provisioning target belongs to | String | true | - -Example header: - -| Header | MessageProperties | -|--------------------------------------------------------------|-------------------| -| type=THING\_DELETED
tenant=default
thingId=abc | | - -### REQUEST_ATTRIBUTES_UPDATE - -Message sent by Eclipse hawkBit when a re-transmission of target attributes is requested. - -| Header | Description | Type | Mandatory | -|---------|------------------------------------------------|------------------------------------------|-----------| -| type | Type of the message | Fixed string "EVENT" | true | -| thingId | The ID of the registered provisioning target | String | true | -| topic | Topic name identifying the event | Fixed string "REQUEST_ATTRIBUTES_UPDATE" | true | -| tenant | The tenant this provisioning target belongs to | String | true | - -Example headers: - -| Header | MessageProperties | -|----------------------------------------------------------------------------------------------|-------------------| -| type=EVENT
tenant=default
thingId=abc
topic=REQUEST\_ATTRIBUTES\_UPDATE | | - -### PING_RESPONSE - -_hawkBit_ will respond to the PING message with a PING_RESPONSE type message that has the same correlationId as the -original PING message: - -| Header | Description | Type | Mandatory | -|--------|--------------------------------|------------------------------|-----------| -| type | Type of the message | Fixed string "PING_RESPONSE" | true | -| tenant | The tenant the PING belongs to | String | false | - -| Message Properties | Description | Type | Mandatory | -|--------------------|--------------------------------------------|--------|-----------| -| correlationId | CorrelationId of the original PING request | String | true | -| content_type | The content type of the payload | String | true | - -The PING_RESPONSE also contains a timestamp (i.e. the difference, measured in milliseconds, between the current time and -midnight, January 1, 1970 UTC) as plain text. It is not guaranteed that this timestamp is completely accurate. - -| Header | MessageProperties | -|-------------------------------------------|-------------------------| -| type=PING_RESPONSE
tenant=default | content_type=text/plain | - -```text -1505215891247 -``` diff --git a/site/content/apis/management_api.md b/site/content/apis/management_api.md deleted file mode 100644 index cf0751778..000000000 --- a/site/content/apis/management_api.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Management API -parent: API -weight: 81 ---- - -The Management API is a RESTful API that enables to perform Create/Read/Update/Delete operations for provisioning -targets (i.e. devices) and repository content (i.e. software). - - -Based on the Management API you can manage and monitor software update operations via HTTP/HTTPS. The _Management API_ -supports JSON payload with hypermedia as well as filtering, sorting and paging. Furthermore the Management API provides -permission based access control and standard roles as well as custom role creation. - -The API is protected and needs authentication and authorization based on the security concept. - -## API Version - -hawkBit provides an consistent Management API interface that guarantees backwards compatibility for future releases by -version control. - -The current version of the Management API is `version 1 (v1)` with the URI http://localhost:8080/rest/v1/ - -## API Resources - -Supported HTTP-methods are: - -- GET -- POST -- PUT -- DELETE - -## Headers - -For all requests an `Authorization` header has to be set. - -* Username: `username` -* Password: `password` - -Also have a look to the [Security](../../concepts/authentication/) chapter. - -In addition, for POST and PUT requests the `Content-Type` header has to be set. Accepted content-types are. - -* `application/json` -* `application/hal+json` - -## Request Body - -Besides the relevant data (name, description, createdBy etc.) of a resource entity, a resource entity also has -URIs (`_links`) to linked resource entities. - -A _Distribution Set_ entity may have for example URIs to artifacts, _Software Modules_, _Software Module Types_ and -metadata. - -```json -"_links": { - "artifacts": { - "href": "http://localhost:8080/rest/v1/softwaremodules/83/artifacts" - }, - "self": { - "href": "http://localhost:8080/rest/v1/softwaremodules/83" - }, - "type": { - "href": "http://localhost:8080/rest/v1/softwaremoduletypes/43" - }, - "metadata": { - "href": "http://localhost:8080/rest/v1/softwaremodules/83/metadata?offset=0&limit=50" - } -``` - -## Management APIs - - diff --git a/site/content/architecture.md b/site/content/architecture.md deleted file mode 100644 index 82c999eb6..000000000 --- a/site/content/architecture.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Architecture -weight: 60 ---- - -Overview of hawkBit modules and used 3rd party technology: -![](../static/images/architecture/architecture.png) diff --git a/site/content/blog/2018-07-26-first-release.md b/site/content/blog/2018-07-26-first-release.md deleted file mode 100644 index 507568836..000000000 --- a/site/content/blog/2018-07-26-first-release.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: Eclipse hawkBit 0.2.0 - First Release -parent: Blog -weight: 200 ---- - -hawkBit is a domain-independent back-end framework for rolling out software updates to constrained edge devices as well -as more powerful controllers and gateways connected to IP based networking infrastructure. It is part of the Eclipse IoT -since 2015 and with version _0.2.0_ a first release is available. - -In this article, we want to give an overview of the latest highlights of hawkBit and let you know how you can get -started in seconds. - -## Finally, it is here! - -After being around in the Eclipse IoT realm for quite some time now, we are more than happy to announce our first -release: -[_Eclipse hawkBit 0.2.0_](https://projects.eclipse.org/projects/iot.hawkbit/releases/0.2.0). The release can be found -on [Maven Central](https://mvnrepository.com/artifact/org.eclipse.hawkbit) -and [Docker Hub](https://hub.docker.com/r/hawkbit/hawkbit-update-server/). It includes the following core features: - -* Device and Software Repository -* Update Management -* Artifact Content Delivery -* Rollout Management - -The features are accessible via the following interfaces: - -* Management UI -* Management API -* Direct Device Integration (DDI) API -* Device Management Federation (DMF) API - -![hawkBit Overview](../../images/hawkBit_overview.jpeg) - -## What's new? - -Whenever there is a new release, the first question that comes to mind is: What's new? Since this is our first release, -one could argue that everything is new. However, most of the features are already well-established. This holds true, for -example, for our APIs or the Rollout Management. Nevertheless, there have been some recent updates to hawkBit, which we -do not want to leave unmentioned: - -### Streamlined UI - -The probably most noticeable change has been the removal of the two buttons (`Drop here to delete` and `Actions`) at the -bottom of the _Deployment_, _Distributions_, and _Upload_ view. This is a major usability improvement! For example, -deleting an item required (1) dragging an item onto the delete button, (2) opening the delete pop-up, and (3) confirming -the deletion. Now, an item can be easily removed by clicking on its remove icon and confirming the action. Moreover, -multiple (or all `CTRL` + `A`) items can be selected and removed at once using the same mechanism. This is not only -faster and more intuitive, it also saves a lot of display real estate which can now be used to focus on what is -important. -We hope you like this change as much as we do! _(Requires: hawkBit > 0.2.2)_ - -![Screenshot of improved UI](../../images/hawkbit_ui.png) - -### MS SQL Server - -Eclipse hawkBit supports a range of different SQL databases. Up to now, these have been the internal H2 database (which -can be -used for testing, development, or trial) and MySQL/MariaDB for production-grade usage. This list is now extended by -Microsoft's SQL Server which is also available in production grade, as well as, IBM's DB2 for testing and development. - -### Open Sourced REST docs - -A huge benefit for the community is the recently open sourced REST docs of hawkBit. This has been -an [open request](https://github.com/eclipse-hawkbit/hawkbit/issues/480) -for some time, which we were happy to meet. The documentation is generated -using [Spring REST docs](https://spring.io/projects/spring-restdocs), based on unit-tests. These tests, with the -respective documentation, are now available in the [code base](https://github.com/eclipse-hawkbit/hawkbit/pull/688). -Furthermore, the API documentation will be hosted on our new [website](https://www.eclipse.org/hawkbit/) (coming soon). - -### Docker Images - -In order to enable interested parties to get started with hawkBit conveniently, we decided to provide the -[Update Server as a Docker image](https://hub.docker.com/r/hawkbit/hawkbit-update-server/) on Docker Hub. The image -comes -in two flavors: The default image uses the internal H2 database, while the images with a `-mysql` suffix contain the -MySQL -driver to allow connecting a MySQL database. In addition to the Docker image, the hawkBit repository contains a -[docker-compose.yml](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-runtime/hawkbit-update-server/docker/docker-compose.yml) -that not only starts the Update Server, but further includes a MySQL database and a RabbitMQ message broker so you're -able to use Device Management Federation (DMF) as well. - -To start the hawkBit Update Server image, open a terminal and run: - -``` -$ docker run -d -p 8080:8080 hawkbit/hawkbit-update-server -``` - -{{% note %}} -_Note: This requires a running [Docker deamon](https://docs.docker.com/install/) on your system._ -{{% /note %}} - -Now, browse to [http://localhost:8080](http://localhost:8080) and log-in with `admin:admin`. There you go! - -## Community Updates - -Although features and functionality play a major role in the hawkBit project, there is also some interesting news from -the community. As of July 2018, there have been: - -* Pull Requests: 587 -* Forks: 54 -* Stars: 137 -* Contributors: 25 -* Gitter Chat members: 119 - -### New Project Lead and Committers - -We are happy to announce that the hawkBit project got a new project lead. In addition to -[Kai Zimmermann](https://projects.eclipse.org/user/6364), project lead from the first hour, -[Jeroen Laverman](https://projects.eclipse.org/user/10982) joined the lead to support him in this responsibility. -Moreover, with [Stefan Behl](https://projects.eclipse.org/user/10842) and Jeroen Laverman, two new committers are -aboard. - -## What's next? - -Looking ahead, there are two major topics that we want to tackle next: First, there is the migration of our UI from -Vaadin -7 to Vaadin 8, since Vaadin announced the end-of-life for our current version. Another big topic will be the update -to Spring Boot 2. On the community side, we are in the final stage of updating -our [website](https://www.eclipse.org/hawkbit/) -with a new design, so make sure you stop by in a couple of days to check it out. Finally, the hawkBit team will be -present at EclipseCon Europe 2018, so if you are interested in meeting us, that is the place to be. - diff --git a/site/content/blog/2023-09-21-epl2.0.md b/site/content/blog/2023-09-21-epl2.0.md deleted file mode 100644 index fce631504..000000000 --- a/site/content/blog/2023-09-21-epl2.0.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Eclipse hawkBit upgrade to Eclipse Public License - v 2.0 -parent: Blog -weight: 100 ---- - -hawkBit is a domain-independent back-end framework for rolling out software updates to constrained edge devices as well -as more powerful controllers and gateways connected to IP based networking infrastructure. It is part of the Eclipse IoT -since 2015. - -In this article, we want to give an overview of the latest highlights of hawkBit license changes. - -## hawkBit license upgraded to Eclipse Public License - v 2.0 - -Based on the issues -[Switch to EPL 2.0 License](https://github.com/eclipse-hawkbit/hawkbit/issues/1393) and -[Update hawkBit's license to EPL 2.0](https://github.com/eclipse-hawkbit/hawkbit/issues/1008) -the hawkBit license is upgraded -from [Eclipse Public License - Version 1.0](http://www.eclipse.org/org/documents/epl-v10.php) to -[Eclipse Public License - v 2.0](https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt). - diff --git a/site/content/blog/2023-11-22-vaadin8_ui_discontinuation.md b/site/content/blog/2023-11-22-vaadin8_ui_discontinuation.md deleted file mode 100644 index f6784e201..000000000 --- a/site/content/blog/2023-11-22-vaadin8_ui_discontinuation.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: Vaadin 8 UI discontinuation -parent: Blog -weight: 99 ---- - -In this article, we want to give an overview of the future of the hawkBit UI - -## hawkBit Vaadin 8 UI discontinuation - -The hawkBit UI uses Vaadin as a web UI framework. It uses Vaadin 8 (8.14.3). This major version, -according [Vaadin Roadmap](https://vaadin.com/roadmap), has no free support since 21st Feb 2022. There are some version -releases after that date (8.15.0 - 8.16.0) that are Apache 2.0 licensed. However, since -8.16.1 ([see here](https://mvnrepository.com/artifact/com.vaadin/vaadin-server)) the license -is [Commercial Vaadin Developer License 4.0](https://vaadin.com/license/cvdl-4.0), so they could not be used in hawkBit. - -We believe it is not a good practice to keep an out of free support library in an open source project like hawkBit. And -moreover, even if we keep it, if a security vulnerability is discovered - all users shall opt for commercial support or -to drop UI. - -There is another critical obstacle with keeping Vaadin 8 UI. At the moment hawkBit uses Spring Boot 2.7. According -to [Spring Boot EOL](https://endoflife.date/spring-boot) Spring Boot 2.7 stream will reach end of support 24th Nov 2023. -So, hawkBit shall be migrated to Spring Boot 3.0+. Since Vaadin 8 seem to be incompatible with Spring Boot 3 (they added -support for Spring Boot 3 in Vaadin -24 ([Vaadin 24 pre release](https://vaadin.com/blog/vaadin-24-pre-release-available-for-spring-boot-3.0)) we shall drop -Vaadin UI 8 anyway. - -Many months ago we asked for community help to migrate hawkBit UI to newer Vaadin -versions - [Urgent migration needed to a newer Vaadin version -](https://github.com/eclipse-hawkbit/hawkbit/issues/1376) and gitter channel. However, there was no volunteer found to -do the migration. - -All this being said, unfortunately, we've come to the decision to drop the Vaadin 8 UI from the Eclipse hawkBit and the -latest hawkBit release 0.3.0 is the last version of hawkBit that includes it. For the next 0.4.0 release we plan to -remove this Vaadin 8 UI. Thus the hawkBit may become an UI-less project. - -There were steps taken to mitigate the problem: - -* extending the REST API -* introducing Swagger UI which allow easier use of the REST API - -however, the user experience will become much worse. - -We hope to see future contributions with migration of the UI or, why not, even new generation UI! - diff --git a/site/content/blog/2024-01-16-0.4.1-release.md b/site/content/blog/2024-01-16-0.4.1-release.md deleted file mode 100644 index 005d4bd30..000000000 --- a/site/content/blog/2024-01-16-0.4.1-release.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: 0.4.1 Release -parent: Blog -weight: 98 ---- - -In this article, we want to give an overview of the 0.4.1 hawkBit release (Friday, January 12, 2024) - -## hawkBit [0.4.1](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.4.1) release - -### Steps towards removal of the legacy Vaadin8-based UI - -As announced at [Vaadin 8 UI discontinuation](2023-11-22-vaadin8_ui_discontinuation.md) the current Vaadin 8 based UI -will be removed. This release will likely be the last one including it. Some steps are taken to mitigate this. - -* First of all, this release - introduces [Simple UI](https://github.com/eclipse-hawkbit/hawkbit/tree/0.4.1/hawkbit-runtime/hawkbit-simple-ui) - a - demo/PoC level UI. It includes the most essential functionality allowing you to play around with hawkBit. It could not - be compared to legacy UI in features and maturity in any case. Some notes for it: - * *Status* - as already said - low maturity and very feature-limited, *EXPERIMENTAL* - * Intended for demo/play-around purposes. It could become an initial version of a new hawkBit UI but currently, - there are no resources for further development. Any contribution to this UI in the direction of making it a - full-fledged mature UI is welcome! - * It provides features like - create software modules & distribution sets, targets, and rollouts - * In contrast with legacy UI the new UI is a standalone application and uses only REST API to provide functionality - to the user. -* To the legacy monolith update server application there is added a new microservice-based application. As part of this - effort, there was introduced an example - of [legacy Vaadin 8 UI standalone application](https://github.com/eclipse-hawkbit/hawkbit/tree/0.4.1/hawkbit-runtime/hawkbit-vv8-ui). - This legacy UI standalone application could be used together with future hawkBit update server versions as long as it - is compatible and on the user's responsibility. Some notes for it: - * *NOT RECOMMENDED* - it might contain security vulnerabilities and bugs. It could be hard to verify its - compatibility with the new hawkBit versions. - * *ON USER's RESPONSIBILITY* - no guarantees of any kind are provided for that application. It is entirely the - user's responsibility to test, scan for vulnerabilities, and use it. - * Provides an option to use the legacy Vaadin 8 UI with the new hawkBit versions under the conditions above - * It uses directly the database and legacy update server code - * It includes the outdated Spring Boot 2.7 which is after its end of support - * It will not be developed any further and new features won't be available - * No bugfixes would be provided for it - -### Extended access control management - entity-based - -There is a new feature implemented in access control management. Up until now, permissions (e.g. CREATE_TARGET) were -assigned to the users, and based on that users were able to execute some action or not. Now there is added a pluggable -mechanism -via [AccessController](https://github.com/eclipse-hawkbit/hawkbit/blob/0.4.1/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/acm/AccessController.java) -that allows to further restrict the access based on the entity. For instance, a developer could implement its custom -access controller for targets that, depending on the user, could grant or reject permissions for accessing targets of -certain target types. \ No newline at end of file diff --git a/site/content/community.md b/site/content/community.md deleted file mode 100755 index 3d5fdfc72..000000000 --- a/site/content/community.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Community -weight: 90 ---- - -## Presentations - -Here you can find links to arbitrary material covering Eclipse hawkBit which has been presented at events, conferences -and meet-ups. - -- 09/23/2015 - Eclipse IoT Working Group - meeting - [slides](https://docs.bosch-iot-rollouts.com/slides/hawkBitProposal20150923.html) -- 04/11/2015 - EclipseCon Europe 2015 - [slides](https://docs.bosch-iot-rollouts.com/slides/eclipseCon2015.html) -- 03/09/2016 - EclipseCon North America - 2016 - [slides](https://docs.bosch-iot-rollouts.com/slides/eclipseConNA2016.html) -- 05/16/2016 - Eclipse Virtual IoT - Meetup - [video](https://www.youtube.com/watch?v=g-dhKMaaanE) - [slides](https://docs.bosch-iot-rollouts.com/slides/virtualIoTMeetup2016.html) -- 03/20/2017 - Eclipse IoT Day SanJose, - CA - [video](https://www.youtube.com/watch?v=x5OfBgnYW44) - [slides](https://docs.bosch-iot-rollouts.com/slides/iotDaySanJose2017.pdf) -- 09/12/2017 - Eclipse IoT Day ThingMonk 2017 - [video](https://www.youtube.com/watch?v=7hK-kiQjKGA) -- 01/10/2018 - Eclipse Virtual IoT - Meetup - [video](https://www.youtube.com/watch?v=8vcLXs9lc-4) - [slides](https://docs.bosch-iot-rollouts.com/slides/hawkBitIntroduction.html) -- 10/22/2018 - Community Day EclipseCon Europe - 2018 - [slides](https://www.eclipse.org/hawkbit/slides/community-day-2018.html) -- 10/21/2019 - Community Day EclipseCon Europe - 2019 - [slides](https://www.eclipse.org/hawkbit/slides/community-day-2019.html) -- 10/19/2020 - Community Day EclipseCon Europe - 2020 - [slides](https://www.eclipse.org/hawkbit/slides/community-day-2020.html) - -## Articles - -- 10/27/2015 - Why software provisioning goes open - source - [article](http://blog.bosch-si.com/categories/technology/2015/10/software-provisioning-goes-open-source-find/) -- 05/25/2016 - jaxenter: Eclipse - hawkBit - [english](https://jaxenter.com/eclipse-hawkbit-126445.html) - [german](https://jaxenter.de/eclipse-hawkbit-46372) -- 09/27/2016 - Eclipse Newsletter - 'IoT is the new - black' - [article](http://www.eclipse.org/community/eclipse_newsletter/2016/september/article2.php) - -## Ask a question - -Visit [stackoverflow.com](https://stackoverflow.com/questions/tagged/eclipse-hawkbit) to find questions or raise your -own tagged with `eclipse-hawkbit`. - -## Chat - -Searching for a quick response from the team behind hawkBit and the hawkBit community, join -the [Gitter Chat](https://gitter.im/eclipse/hawkbit). - -## Mailing List - -A great way to stay up to date with hawkBit activity is to subscribe to the Mailing list provided by Eclipse. Sign up -for the mailing list [here](https://dev.eclipse.org/mailman/listinfo/hawkbit-dev). - -## Issue Tracker - -Issues and bugs related to hawkBit are tracked with the Github Issue tracking system. If you find any issues, please -report them [here](https://github.com/eclipse-hawkbit/hawkbit/issues). - -## Contributing - -An overview of the contribution process is [here](https://wiki.eclipse.org/Development_Resources/Contributing_via_Git). -Checkout the [Contribution Guidelines](https://github.com/eclipse-hawkbit/hawkbit/blob/master/CONTRIBUTING.md) on the -Eclipse hawkBit GitHub Repository. diff --git a/site/content/concepts/authentication.md b/site/content/concepts/authentication.md deleted file mode 100644 index c6ba5b8fa..000000000 --- a/site/content/concepts/authentication.md +++ /dev/null @@ -1,293 +0,0 @@ ---- -title: Authentication -parent: Concepts -weight: 51 ---- - -A hawkBit update server can be accessed in four different ways: - -- _Direct Device Integration (DDI) API_ by **targets**. -- _Management API_ by 3rd party **applications**. -- _Device Management Federation (DMF) API_ by 3rd party **applications** through AMQP. - - - -## DDI API Authentication Modes - -### Security Token - -hawkBit supports multiple ways to authenticate a target against the server. The different authentication modes can be -individual enabled and disabled within hawkBit. Both on system level (with Spring Boot properties) as per individual -tenant. - -#### Target Security Token Authentication - -There is a 32 alphanumeric character security-token for each created target within IoT hawkBit. This token can be used -to authenticate the target at hawkBit through the HTTP-Authorization header with the custom scheme _TargetToken_. - -``` -GET /DEFAULT/controller/v1/0e945f95-9117-4500-9b0a-9c6d72fa6c07 HTTP/1.1 -Host: your.hawkBit.server -Authorization: TargetToken bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY -``` - -The target security token is provided in [DMF API](../../apis/dmf_api/) as part of the update message in order to allow -DMF clients to leverage the feature or can it be manually retrieved per target -by [Management API](../../apis/management_api/) or in the [Management UI](../../ui) in the target details. - -Note: needs to be enabled in your hawkBit installation (See [DdiSecurityProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java) -for system-wide enablement) **and** in the tenant configuration (set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#TenantConfigurationKey.AUTHENTICATION_MODE_TARGET_SECURITY_TOKEN_ENABLED, _authentication.targettoken.enabled_ to true). That allows both the -operator and the individual customer (if run in a multi-tenant setup) to enable this access method. - -#### Gateway Security Token Authentication - -Often the targets are connected through a gateway which manages the targets directly and as a result are indirectly -connected to the hawkBit update server. - -To authenticate this gateway and allow it to manage all target instances under its tenant there is a _GatewayToken_ to -authenticate this gateway through the HTTP-Authorization header with a custom scheme _GatewayToken_. This is of course -also handy during development or for testing purposes. However, we generally recommend to use this token with care as it -allows to act _in the name of_ any device. - -``` -GET /DEVICE/controller/v1/0e945f95-9117-4500-9b0a-9c6d72fa6c07 HTTP/1.1 -Host: your.hawkBit.server -Authorization: GatewayToken 3nkswAZhX81oDtktq0FF9Pn0Tc0UGXPW -``` - -Note: needs to be enabled in your hawkBit installation (See [DdiSecurityProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java) -for system-wide enablement) **and** in the tenant configuration (set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, _authentication.gatewaytoken.enabled_ to true). That allows both the -operator and the individual customer (if run in a multi-tenant setup) to enable this access method. - -### Certificate Authentication by Reverse Proxy - -hawkBit offers a certificate-based authentication mechanism, also known as mutual TLS (mTLS), which eliminates the need -to share a security token with the server. To implement this, you'll require a reverse proxy deployed in front of the -hawkBit server to handle authentication. This process involves obtaining certificates (and keys) for both the client and -the reverse proxy and configuring hawkBit accordingly. - -Initially, you'll need to obtain certificates (and keys) for these components from the same or different Certificate -Authorities (CAs). Once you have acquired certificates you have to set them up to both the client and the hawkBit -server. - -Then you shall enable *Allow targets to authenticate via a certificate authenticated by a reverse proxy* and set the -fingerprint of the client certificate issuer(s) (as a comma separated list). - -To authenticate the request to hawBit the following condition shall be met: - -- the common name of the client certificate shall match the controller/client id -- the TLS Issuer(s) hash of the presented client certificate shall be set for the tenant. - -For that you shall: -- enable header authentication in the tenant configuration - set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_ENABLED, _authentication.header.enabled_ to true. -- set / configure the issuer, for the tenant, in the tenant configuration - set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#AUTHENTICATION_MODE_HEADER_AUTHORITY_NAME.AUTHENTICATION_MODE_HEADER_ENABLED, _aauthentication.header.authority_ to issuer hash. - - You can use the following command to get the issuer hash - ```shell - openssl x509 -in client_certificate.crt -issuer_hash -noout` - ``` - -Here is an example diagram that shows all the communication between the hawkBit, reverse proxy and client. For the sake -of simplification we assume that there are not intermediate certificates and the certificate and key are as follows: - -- client_ca.crt signs client.crt -- server_ca.crt signs server.crt - -- client has the client.crt, client.key and server_ca.crt -- server (in this case reverse proxy) has the server.crt, server.key and client_ca.crt - -![Example Reverse Proxy Architecture](../../images/security/exampleReverseProxyArchitecture.png) - -#### Example - Nginx Reverse Proxy Configurations - -Nginx doesn't support obtaining the issuer hash without addons. Therefore, in this example we bypass sending real SSL -Issuer hash to hawhBit but do certificate issuer validation at Nginx and then supply shared (between Nginx and hawkBit) -fixed hash "Hawkbit". You could use any value here as long as it is matched with the *Allow targets to authenticate via -a certificate authenticated by a reverse proxy* setting in the hawkBit UI. Note that for multi-tenant scenarios with -different trusted CAs this example won't work. - -1. Hawkbit Configurations - - There are also some configurations that you need update when you deployed your hawkbit service. - - You need to add the given setting to your hawkBit configurations so that hawkBit can generate the URLs according to - the https that the client will use to download. If you're deploying hawkBit as a Docker container, add these - configurations as environmental values in the docker-compose.yml file. - -``` -server.forward-headers-strategy=NATIVE -``` - -2. In Hawkbit's UI section, under system configuration, make sure to select *Allow targets to authenticate via a - certificate authenticated by a reverse proxy* and input the fixed issuer hash as "Hawkbit". This can be whetever you - have configured in the nginx configuration in `proxy_set_header X-Ssl-Issuer-Hash-1` below. - -3. After placing your certificates and keys, you need to deploy your proxy server and apply the provided configurations. - You can apply mutual TLS specifically to the URL given below to implement the process only for devices using the - Device Integration API: - - `hawkbit.dev.example.com/default/controller/` - - This ensures that other clients, like UI users, can connect to hawkBit without requiring client certificates. They - can use Username and Password in the Management API, eliminating the need for authentication and making it more - user-friendly. - -```nginx -# Nginx Hawkbit Configurations - -# Gets the Common Name of the certificate from the client certificate. -map $ssl_client_s_dn $ssl_client_s_dn_cn { - default ""; - ~CN=(?[^,]+) $CN; -} - -server { - listen 80; - listen [::]:80; - - server_name hawkbit.dev.example.com www.hawkbit.dev.example.com; - server_tokens off; - - location /.well-known/acme-challenge/ { - root /var/www/certbot; - } - - location / { - return 301 https://hawkbit.dev.example.com$request_uri; - } -} - -server { - listen 443 ssl; - listen [::]:443 ssl; - - server_name hawkbit.dev.example.com; - - ssl_certificate /etc/nginx/ssl/live/hawkbit.dev.example.com/server.crt; - ssl_certificate_key /etc/nginx/ssl/live/hawkbit.dev.example.com/server.key; - - ssl_client_certificate /etc/nginx/client-cer/client_ca.crt; - ssl_verify_client optional; - ssl_verify_depth 3; - - - # For devices that is using device integration API, - # Mutual TLS is required. - location ~*/.*/controller/ { - if ($ssl_client_verify != SUCCESS) { - return 403; - } - - proxy_pass http://hawkbit.dev.example.com:8080; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - - # Client certificate Common Name and Issuer Hash is required - # for auth in hawkbit. - proxy_set_header X-Ssl-Client-Cn $ssl_client_s_dn_cn; - proxy_set_header X-Ssl-Issuer-Hash-1 Hawkbit; - - # These are required for clients to upload and download software. - proxy_request_buffering off; - client_max_body_size 1000m; - } - - # For clients that is using UI or Management API - location / { - proxy_pass http://hawkbit.dev.example.com:8080; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_request_buffering off; - client_max_body_size 1000m; - } -} -``` - -4. To deploy Nginx, you could use a `.yml` file. Here's an example `docker-compose.yml` file for Nginx Docker. - -```yml -version: '3' - -services: - webserver: - image: nginx:latest - ports: - - 80:80 - - 443:443 - restart: always - volumes: - - ./nginx/conf/:/etc/nginx/conf.d/:ro - - ./certbot/www:/var/www/certbot/:ro - - ./certbot/conf/:/etc/nginx/ssl/:ro - - ./client-cer/:/etc/nginx/client-cer/ - - ./landing-page/:/etc/webserver/landing-page - certbot: - image: certbot/certbot:latest - volumes: - - ./certbot/www/:/var/www/certbot/:rw - - ./certbot/conf/:/etc/letsencrypt/:rw -``` - -`/client-cer/:/etc/nginx/client-cer/` is the designated location for the certificate authority that has signed the -client certificate. The presented client certificate will be verified against this CA. - -5. After successfully generating your certificates with the correct chain, deploying your Nginx and Hawkbit services - with appropriate configurations, and updating the settings on the device side, you will be able to establish a - certificate-based authentication mechanism. This will eliminate the necessity of sharing a security token with the - server. - -  - -##### Swupdate Suricatta Configurations - -If the client is utilizing the SWUpdate Suricatta service, the configurations on the device or client side should also -be adjusted as follows. Remember to change id, url and certificate names to your needs. - -The location of the config file is `/etc/swupdate/swupdate.conf` - -```yml -suricatta : -{ -tenant = "default"; -id = "device_id"; -url = "https://hawkbit.dev.example.com"; -nocheckcert = false; -cafile = "server_ca.crt"; -sslkey = "/etc/ssl/certs/client.key"; -sslcert = "/etc/ssl/certs/client.crt"; -}; -``` - -If your client service is a linux, you can use the command bellow to see the logs produced by the swupdate. - -```shell -journalctl --follow -u swupdate -``` - -  - -##### Testing - -You can test the communication by using the Curl command below to see if you successfully implemented mutual TLS: - -```shell -curl -L -v --cert client.crt --key client.key --cacert server_ca.crt https://hawkbit.dev.example.com/default/controller/v1/{device-id} -``` - -In the UI, after uploading an SWU package and requesting a firmware update, you can use the link below to attempt to -install the software package. - -``` -curl -L -v --cert client.crt --key client.key --cacert server_ca.crt https://hawkbit.dev.example.com/default/controller/v1/{device-id}/softwaremodules/{artifact-id}/artifacts/hawkbit_updated_5.swu --output outputfile -``` - -## DMF API - -Authentication is provided by _RabbitMQ_ [vhost and user credentials](https://www.rabbitmq.com/access-control.html) that -is used for the integration. - -## Management API - -- Basic Auth diff --git a/site/content/concepts/authorization.md b/site/content/concepts/authorization.md deleted file mode 100644 index 5e0cf9257..000000000 --- a/site/content/concepts/authorization.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Authorization -parent: Concepts -weight: 52 ---- - -Authorization is handled separately for _Direct Device Integration (DDI) API_ and _Device Management Federation (DMF) -API_ (where successful authentication includes full authorization) and _Management API_ and _UI_ which is based on -Spring -security [authorities](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/im/authentication/SpPermission.java). - - -However, keep in mind that hawkBit does not offer an off the shelf authentication provider to leverage these permissions -and the underlying multi user/tenant capabilities of hawkBit but it supports authentication providers offering an OpenID -Connect interface. Check out [Spring security documentation](http://projects.spring.io/spring-security/) for further -information. In -hawkBit [SecurityAutoConfiguration](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityAutoConfiguration.java) -is a good starting point for integration. - -The default implementation is single user/tenant with basic auth and the logged in user is provided with all -permissions. Additionally, the application properties may be configured for multiple static users; -see [Multiple Users](#multiple-users) for details. - -## DDI API - -An authenticated target is permitted to: - -- retrieve commands from the server -- provide feedback to the the server -- download artifacts that are assigned to it - -A target might be permitted to download artifacts without authentication (if enabled, see above). Only the download can -be permitted to disable the authentication. This can be used in scenarios where the artifacts itself are e.g. signed and -secured. - -## Management API and UI - -### Multiple Users - -hawkBit optionally supports configuring multiple static users through the application properties. In this case, the user -and password Spring security properties are ignored. -An example configuration is given below. - - hawkbit.security.user.admin.password={noop}admin - hawkbit.security.user.admin.firstname=Test - hawkbit.security.user.admin.lastname=Admin - hawkbit.security.user.admin.email=admin@test.de - hawkbit.security.user.admin.permissions=ALL - - hawkbit.security.user.test.password={noop}test - hawkbit.security.user.test.firstname=Test - hawkbit.security.user.test.lastname=Tester - hawkbit.security.user.test.email=test@tester.com - hawkbit.security.user.test.permissions=READ_TARGET,UPDATE_TARGET,CREATE_TARGET,DELETE_TARGET - -A permissions value of `ALL` will provide that user with all possible permissions. Passwords need to be specified with -the used password encoder in brackets. In this example, `noop` is used as the plaintext encoder. For production use, it -is recommended to use a hash function designed for passwords such as *bcrypt*. See -this [blog post](https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released#password-storage-format) for more -information on password encoders in Spring Security. - -### OpenID Connect - -hawkbit supports authentication providers which use the OpenID Connect standard, an authentication layer built on top of -the OAuth 2.0 protocol. -An example configuration is given below. - - spring.security.oauth2.client.registration.oidc.client-id=clientID - spring.security.oauth2.client.provider.oidc.issuer-uri=https://oidc-provider/issuer-uri - spring.security.oauth2.client.provider.oidc.jwk-set-uri=https://oidc-provider/jwk-set-uri - -Note: at the moment only DEFAULT tenant is supported. By default the resource_access//roles claim is mapped -to hawkBit permissions. - -### Delivered Permissions - -- READ_/UPDATE_/CREATE_/DELETE_TARGET for: - - Target entities including metadata (that includes also the installed and assigned distribution sets) - - Target tags - - Target actions - - Target registration rules - - Bulk operations - - Target filters - -- READ_/UPDATE_/CREATE_/DELETE_REPOSITORY for: - - Distribution sets - - Software Modules - - Artifacts - - DS tags - -- SOFTWARE_MODULE_DOWNLOAD - - Permission to download artifacts of a software module (Note: READ_REPOSITORY allows only to read the metadata). - -- READ_TARGET_SECURITY_TOKEN - - Permission to read the target security token. The security token is security concerned and should be protected. - -- READ_TENANT_CONFIGURATION/TENANT_CONFIGURATION - - Permission to read/administrate the tenant settings. - -- READ_/UPDATE_/CREATE_/DELETE_/HANDLE_/APPROVE_ROLLOUT for: - - Managing rollouts and provision targets through a rollout. - -### Permission Matrix for example uses cases that need more than one permission - -| Use Case | Needed permissions | -|----------------------------------------------------------------------------|----------------------------------------------------------------------------| -| Search _targets_ by installed or assigned _distribution set_ | READ_REPOSITORY, READ_TARGET | -| Assign _DS_ to a _target_ | READ_REPOSITORY, UPDATE_TARGET | -| Assign DS to target through a _Rollout_, i.e. _Rollout_ creation and start | READ_REPOSITORY, READ_TARGET, READ_ROLLOUT, CREATE_ROLLOUT, HANDLE_ROLLOUT | -| Read _Rollout_ status including its _deployment groups_ | READ_REPOSITORY, READ_ROLLOUT | -| Checks _targets_ inside _Rollout deployment group_ | READ_REPOSITORY, READ_TARGET, READ_ROLLOUT | - -## Device Management Federation API - -The provided _RabbitMQ_ [vhost and user](https://www.rabbitmq.com/access-control.html) should be provided with the -necessary permissions to send messages to hawkBit through the exchange and receive messages from it through the -specified queue. diff --git a/site/content/concepts/datamodel.md b/site/content/concepts/datamodel.md deleted file mode 100644 index 9a226e93b..000000000 --- a/site/content/concepts/datamodel.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Data Model -parent: Concepts -weight: 53 ---- - -The hawkBit data model was designed to have enough flexibility to define complex software structures (e.g. operating -system, runtimes, apps, different kind of artifacts) on one side and simplicity compared to the capabilities of a full -blown configuration management on the other. - - -It does define a hierarchy of software that starts with a distribution, which can have (sub-)modules and these may have -multiple artifacts. However, it does not consider any kind of dependency definitions between modules or artifacts. As a -result, dependency checks - if necessary - have to be done outside hawkBit, i.e. on the device itself or before the -entity creation in hawkBit by the origin. - -## Provisioning Target Definition - -A Provisioning Target is a neutral definition that may be an actual real device (e.g. gateway, embedded sensor) or a -virtual device (e.g. vehicle, smart home). - -The definition in hawkBit might reflect the transactional behavior if necessary on the device side. A vehicle might be -updated device by device or as a whole. As a result one way of defining a vehicle in hawkBit could be to have one all -inclusive Software Module or one module per (sub-) device. - -A Target can have, next to its defined properties (e.g. controller ID, target type, name, description, security token), -a generic set of attributes and meta data, both in key:value format. Target attributes are owned and managed by the -device whereas target meta data are managed by the operator. If a target is defined to be of a certain target type, then -during the assignment of a distribution set, a compatibility check will be performed between the target type and -distribution set type. - -## Software Structure Definition - -The structure defines the model of the supported software by the provisioning target - -- Distribution Set Type:defines a package structure that is supported by certain devices -- Consists of Software Module Types both for - - Firmware - device can have only one module of that type (e.g. the operating system) - - Software - device can have multiple modules of that type (e.g. "Apps") - -Software Content Definition: - -- Distribution Set: can be deployed to a provisioning target -- Software Module: is a sub element of the distribution, e.g. OS, application, firmware X, firmware Y -- Artifact: binaries for a software module. Note: the decision which artifacts have to be downloaded are done on the - device side, e.g. Full package, signatures, binary deltas - -## Entity Relationships - -The public defined entities and their relation which are reflected by the Management API. - -## Deleting and Archiving Software Modules - -When a user deletes a Software Module, the update server cannot simply remove all the corresponding data. Because when -the Software Module is already assigned to a Distribution Set or was assigned to a Target in the past, the hawkBit -server has to make sure that remains a clean and full update history for every target. The history contains all -information (e.g. name, version) of the software, which was assigned to a specific Target. Obviously storing the binary -data of the artifacts is not necessary for the history purpose. - -The delete process which is performed, when there are historical connections to targets is called SoftDelete. This -process marks the Software Module as deleted and removes the artifact, but it won't delete the meta data, which -describes the SoftwareModule and the associated Artifacts. SoftwareModules, which are marked as delete won't be visible -for the user, when he is requesting all SoftwareModules. - -Just in case there are no connections to Distribution Sets and targets the server will perform a HardDelete. This -process deletes all stored data, including all meta information. - -{{% note %}} -In case of a SoftDelete the unique constraints are still in place, i.e. you cannot create an entity with the same -name/key. This constraint might be removed in future versions because of the impact on the user experience (i.e. he does -not see the soft deleted module but cannot create a new one). -{{% /note %}} \ No newline at end of file diff --git a/site/content/concepts/rollout-management.md b/site/content/concepts/rollout-management.md deleted file mode 100644 index 936d48779..000000000 --- a/site/content/concepts/rollout-management.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: Rollout Management -parent: Concepts -weight: 54 ---- - -Software update operations in large scale IoT scenarios with hundreds of thousands of devices require special handling. - - -That includes: - -- _Technical Scalability_ by means of horizontal scale of the hawkBit server cluster in the cloud. -- _Global_ artifact _content delivery_ capacities. -- _Functional Scalability_ by means of: - - Secure handling of large volumes of devices at rollout creation time. - - Monitoring of the rollout progress. - - Emergency rollout shutdown in case of problems on to many devices. - -- Reporting capabilities for a complete understanding of the rollout progress at each point in time. - -Eclipse hawkBit sees these capabilities under the term Rollout Management. - -The following capabilities are currently supported by the _Rollout Management_: - -- Create, update and start of rollouts. - - Selection of targets as input for the rollout based on _target filter_ functionality. - - Selection of a _DistributionSet_. - - Auto-splitting of the input target list into a defined number deployment groups. -- Approval workflow - - Has to be enabled explicitly in configuration. - - Enables a workflow that requires a user with adequate permissions to review any new or updated rollout before it - can be started. - - Allows integration with 3rd party workflow engines. - -- Cascading start of the deployment groups based on installation status of the previous group. -- Emergency shutdown of the rollout in case a group exceeds the defined error threshold. -- Rollout progress monitoring for the entire rollout and the individual groups. - -## Cascading Deployment Group Execution - -The cascading execution of the deployment groups is based on two thresholds that can be defined by the rollout creator. - -- success condition by means of percentage of successfully installed targets in the current groups triggers. -- error condition by means of absolute or percentage of failed installations which triggers an emergency shutdown of the - entire rollout. - -## Rollout state machine - -### State Machine on Rollout - -![](../../images/rolloutstatediagram.png) - -### State Machine on Rollout Deployment Group - -![](../../images/rolloutgroupstatediagram.png) - -## Multi-Assignments (beta) - -One of the main paradigms of Eclipse hawkBit is, that a Distribution Set represents the currently installed software of -a device. Hence, a device can have only one Distribution Set assigned/installed at a time. With _Multi-Assignments_ -enabled, this paradigm shifts. Multi-Assignments allows to assign multiple Distribution Sets to a device simultaneously, -without cancelling each other. As a consequence, an operator can trigger multiple campaigns addressing the same devices -in parallel. - -### Action weight - -To differentiate between important and less important updates a property called _weight_ is used. When multi-assignments -is enabled every action has a weight value between (and including) 0 and 1000. The higher the weight the more important -is the assignment represented by the action. Also when defining a _rollout_ or an _auto-assignment_ and -multi-assignments is enabled a weight value has to be provided. This value is passed to the actions created during the -execution of these _rollouts_ and _auto-assignments_. If no weight was provided the highest value of 1000 is used -instead. - -### Consequences - -While this feature provides more flexibility to the user and enables new use-cases, there are also some consequences one -should be aware of: - -**Critical** - -* This feature is in beta and may change unannounced. -* For now, this feature is **opt-in only**. Once activated, it cannot be deactivated. - -**Minor** - -* While on DMF-API a MULTI_ACTION request is sent, DDI-API only exposes the next action which has the highest priority - in the list of open actions(according to their weight property). -* All information regarding the currently assigned or installed Distribution Set does only respect the last assignment, - as well as the last successfully installed Distribution set. This also affects: - * Pinning a target or Distribution Set in Deployment View. - * Statistics about installed or assigned Distribution Sets. -* Auto close running actions, when a new Distribution Set is assigned (`repository.actions.autoclose.enabled`) is - deactivated. -* Marking a Distribution Set to be a *Required Migration Step* is deactivated. \ No newline at end of file diff --git a/site/content/concepts/targetstate.md b/site/content/concepts/targetstate.md deleted file mode 100644 index 2544f2c4d..000000000 --- a/site/content/concepts/targetstate.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Target State Machine -parent: Concepts -weight: 55 ---- - -A target has a current state which reflects the provisioning status of the device at this point in time. State changes -are driven either by the update server by means of starting an update or by the controller on the provisioning target -that gives feedback to the update server, e.g. "I am here", "I am working on a provisioning", "I have finished a -provisioning". - - -## Defined states - -| State | Description | -|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| UNKNOWN | Set by default for a pre-commissioned target until first status update received from the target. Is the initial starting point for targets created by UI or management API. | -| IN_SYNC | Assigned _Distribution Set_ is installed. | -| PENDING | Installation of assigned _Distribution Set_ is not yet confirmed. | -| ERROR | Installation of assigned _Distribution Set_ has failed. | -| REGISTERED | Target registered at the update server but no _Distribution Set_ assigned. Is the initial starting point for plug-and-play devices. | - -## Transitions - -![](../../images/architecture/targetStatusStates.png) diff --git a/site/content/features.md b/site/content/features.md deleted file mode 100644 index ec77de0d8..000000000 --- a/site/content/features.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Features -weight: 40 ---- - -## Device and Software Repository - -- Repository that holds the provisioning targets and assignable software distributions. -- Targets to be logically grouped by Target Types. -- That includes a full software update history for every device. -- Support for pre-commission devices in the repository and plug and play, i.e. device is created if it is authenticated - for the first time. - -## Update Management - -- Directly deploy a defined software distribution to a device (by Management API). -- Update handling is independent of the device type, integration approach or connectivity. -- Optional user consent flow, download and install updates only after respective end user has confirmed it. -- Mass cancel the distribution of an update by invalidating the distribution set. -- Use action status codes for easier analysis. - -## Artifact Content Delivery - -- Partial downloads supported. -- Download resume supported (RFC7233). -- Content management by RESTful API and UI (see above). -- Authorization based on software assignment, i.e. a device can only download what has been assigned to it in the first - place. -- Delta artifact hosting supported. -- Artifact signature hosting supported. -- Plug-point for artifact encryption allowing to encrypt artifacts on upload. - -## Rollout/Campaign Management - -- Secure handling of large volumes of devices at rollout creation time. -- Flexible deployment group definition as part of a rollout. -- Monitoring of the rollout progress. -- Emergency rollout shutdown in case of update failures. -- Manually trigger next rollout group. - -## Interfaces - -### Management API - -- RESTful API -- Create/Read/Update/Delete operations for provisioning targets (i.e. devices) and repository content (i.e. software). -- Manage and monitor software update operations. -- Online API documentation. -- JSON payload with Hypermedia support. -- Supports filtering, sorting and paging. - -### Direct Device Integration API - -- RESTful HTTP based API for direct device integration - - JSON payload. - - Traffic optimized (content based Etag generation, not modified). -- Feedback channel from device. -- TLS encryption. - -### Device Management Federation API - -- Indirect device integration through a device management service or application into hawkBit. -- Optimized for high service to service throughput with [AMQP](https://www.rabbitmq.com/amqp-0-9-1-reference.html) - messaging interface. -- Separate AMQP vHost per tenant for maximum security. - diff --git a/site/content/gettingstarted.md b/site/content/gettingstarted.md deleted file mode 100755 index f9f2516bd..000000000 --- a/site/content/gettingstarted.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: Getting Started -weight: 20 ---- - -## From Docker Image - -### Overview - -HawkBit Update Server default user has _admin/admin_ as default credentials. See below how the user can be changed. - -It supports two configurations: - -* monolith - hawkbit-update-server -* micro-service - hawkbit-mgmt-server, hawkbit-ddi-server, hawkbit-dmf-server. - -For more hawkBit Docker related info see [Docker run info](https://github.com/eclipse-hawkbit/hawkbit/blob/master/docker/README.md) and [Docker build info](https://github.com/eclipse-hawkbit/hawkbit/blob/master/docker/build/README.md) - -### A: Run hawkBit Update Server (Monolith) as Docker Container - -Start the hawkBit Update Server as a single container - -```bash -$ docker run -p 8080:8080 hawkbit/hawkbit-update-server:latest -``` -This will start hawkBit update server with embedded H2 database for evaluation purposes. - -### B: Run hawkBit Update Server (Monolith) with services as Docker Compose -Start the hawkBit Update Server together with an PostgreSQL and RabbitMQ instance as containers - -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-monolith-postgres.yml up -d -``` -or with MySQL -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-monolith-mysql.yml up -d -``` - -If you want to start also the Simple UI, you can use, for PostgreSQL: -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-monolith-with-simple-ui-postgres.yml up -d -``` -or with MySQL -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-monolith-with-simple-ui-mysql.yml up -d -``` - -Note: _-d_ flag is used to run the containers in detached mode. If you want to see the logs, you can remove the flag. - -### C: Run hawkBit Update Server (Micro-Service) with services as Docker Compose -Start the hawkBit Update Server together with an PostgreSQL and RabbitMQ instance as containers - -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-micro-services-postgres.yml up -d -``` -or with MySQL -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-micro-services-mysql.yml up -d -``` - -If you want to start also the Simple UI, you can use, for PostgreSQL: -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-micro-services-with-simple-ui-postgres.yml up -d -``` -or with MySQL -```bash -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit/docker -$ docker-compose -f docker-compose-micro-services-with-simple-ui-mysql.yml up -d -``` - -Note: _-d_ flag is used to run the containers in detached mode. If you want to see the logs, you can remove the flag. - -## From Sources - -### 1: Clone and build hawkBit - -```sh -$ git clone https://github.com/eclipse-hawkbit/hawkbit.git -$ cd hawkbit -$ mvn clean install -DskipTests -``` - -### 2: Start hawkBit [update server](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-monolith/hawkbit-update-server) (Monolith) - -```sh -$ java -jar ./hawkbit-monolith/hawkbit-update-server/target/hawkbit-update-server-0-SNAPSHOT.jar -``` - -Note: you could start it also in microservices mode by: -```sh -$ java -jar ./hawkbit-mgmt/hawkbit-mgmt-server/target/hawkbit-mgmt-server-0-SNAPSHOT.jar -``` -```sh -$ java -jar ./hawkbit-ddi/hawkbit-ddi-server/target/hawkbit-ddi-server-0-SNAPSHOT.jar -``` -and (only if you want to use the DMF feature): - -```sh -$ java -jar ./hawkbit-dmf/hawkbit-dmf-server/target/hawkbit-dmf-server-0-SNAPSHOT.jar -``` - -Note: you could start the Simple UI by: -```sh -$ java -jar ./hawkbit-simple-ui/target/hawkbit-simple-ui-0-SNAPSHOT.jar -``` - -## Configuration -### Change credentials -As stated before the default user is _admin/admin_. It could be overridden by changing the [TenantAwareUserProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-core/src/main/java/org/eclipse/hawkbit/tenancy/TenantAwareUserProperties.java) configuration using Spring ways. For instance, using a properties file like: -```properties -# should remove the admin/admin user -hawkbit.security.user.admin.tenant=#{null} -hawkbit.security.user.admin.password=#{null} -hawkbit.security.user.admin.roles=#{null} -# should add a hawkbit/isAwesome! user -hawkbit.security.user.hawkbit.tenant=DEFAULT -hawkbit.security.user.hawkbit.password={noop}isAwesome! -hawkbit.security.user.hawkbit.roles=TENANT_ADMIN -``` -which should remove the default _admin/admin_ user and add a hawkbit user _hawkbit_ with password _isAwesome!_ and a role _TENANT_ADMIN_. - -You could create multiple users with specified roles. - -For details how to configure docker compose based setup see the [Docker run info](https://github.com/eclipse-hawkbit/hawkbit/blob/master/docker/README.md) -> Configuration \ No newline at end of file diff --git a/site/content/guides/clustering.md b/site/content/guides/clustering.md deleted file mode 100644 index 4d00991fb..000000000 --- a/site/content/guides/clustering.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Clustering -parent: Guides -weight: 33 ---- - -hawkBit is able to run in a cluster. This guide provides insights in the basic concepts and how to -setup your own cluster. You can find additional information in -the [hawkBit runtimes's README](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-monolith/hawkbit-update-server/README.md). - - -## Big picture - -![](../../images/overall_cluster.png) - -## Events - -Event communication between nodes is based on [Spring Cloud Stream](http://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/). -There are different [binder implementations](http://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/#_binders) -available. The _hawkbit Update Server_ uses RabbitMQ binder. - -You can run multiple instances of any micro-service, including those consuming events. -However, the `hawkbit-mgmt-server` should typically be run as a single instance, as it schedules time-sensitive jobs such as auto-assignment checking and rollout execution. -If multiple management server instances are needed, you must extend hawkBit to ensure that scheduled tasks do not run concurrently. -Alternatively, configure all but one instance to disable scheduler execution. - -## Event Channel Types in Spring Cloud Stream - -Remote events in hawkBit are distributed through **two distinct types of channels**: - -### 1. Fanout Event Channel - -- Every service instance listening to `fanoutEventChannel` receives **a copy of every message**, regardless of instance count. -- Common for events that should be processed by each consumer independently - - In-memory cache updates - - Internal state propagation - - Logging or auditing -- Not recommended for scenarios where only one consumer should process an event (see `serviceEventChannel` for that). - -**Note**: Every instance bound to this channel will get its own copy of the message. - -### 2. Service Event Channel - -The `serviceEventChannel` is used to **ensure exclusive consumption of events** across service instances. -Only **one instance per consumer group** receives and processes each message, which is critical for non-idempotent or resource-sensitive operations. - -- Only one instance in a consumer group receives each message. -- Ideal for external integrations, third-party API calls, or any task that must not be duplicated. -- Load-balanced across instances within the same group. - - -### Optional Protostuff for Spring cloud stream - -The micro-service instances are configured to communicate via Spring Cloud Stream. Optionally, you could -use [Protostuff](https://github.com/protostuff/protostuff) based message payload serialization for improved performance. - -**Note**: If Protostuff is enabled it shall be enabled on all microservices! - -Add/Uncomment to/in your `application.properties` : - -```properties -spring.cloud.stream.default.content-type=application/binary+protostuff -``` - -Add to your `pom.xml` : - -```xml - - io.protostuff - protostuff-core - - - io.protostuff - protostuff-runtime - -``` - -## Caching - -Every node is maintaining its own caches independent of the other nodes. So there is no globally shared/synchronized cache -instance within the cluster. In order to keep nodes in sync a TTL (time to live) can be set for all caches to ensure -that after some time the cache is refreshed from the database. To enable the TTL just set the property " -hawkbit.cache.ttl" (value in format dDhHmMsS). - -## Schedulers - -Every node has multiple schedulers which run after a defined period of time. All schedulers always run on every node. -This has to be kept in mind e.g. if the scheduler executes critical code which has to be executed only once. This is implemented via using, by default, distributed database based lock. - -## Known constraints - -### Denial-of-Service (DoS) filter - -hawkBit owns the feature of guarding itself from DoS attacks, -a [DoS filter](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/security/DosFilter.java). -It reduces the maximum number of requests per seconds which can be configured for read and write requests. -This mechanism is only working for every node separately, i.e. in a cluster environment the worst-case behaviour would -be that the maximum number of requests per seconds will be increased to its product if every request is handled by a -different node. -The same constraint exists with the validator to check if a user tried too many logins within a defined period of time. diff --git a/site/content/guides/multitenancy.md b/site/content/guides/multitenancy.md deleted file mode 100644 index 11a426a3a..000000000 --- a/site/content/guides/multitenancy.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Multi-tenancy -parent: Guides -weight: 32 ---- - -hawkBit is able to support with multiple tenants with some constraints. This guide provides insights in the basic concepts and how to setup your multiple tenants. - - -## Big picture - -Multi-tenancy is a core concept of hawkBit. It is supported by providing hawkBit authentication system supporting tenants as well as by using EclipseLink and Hibernate native multi-tenant support. - -The tenant and user management, however, is only static. This means you shall configure all tenants and users into spring configurations. - -The tenant and user management could be extended to be more flexible - e.g. dynamic management, OAuth and so on. This however is left for integrators for specific use cases. - -## Constraints -* static tenant and user management -* configuration only via TenantAwareUserProperties#user configuration (i.e. hawkbit.security.user properties), hence -* username is unique for the whole system - there could not be same username for different tenants -* in order to create dynamically tenants when user is logged in you shall set hawkbit.server.repository.implicitTenantCreateAllowed=true, - -## Example - -```properties -# allow to auto/implicit create DEFAULT tenant (on mgmt api call) -hawkbit.server.repository.implicitTenantCreateAllowed=true -# setup foo tenant with two users john and smith_on_foo -hawkbit.security.user.john.tenant=foo -hawkbit.security.user.john.password={noop}john_password -hawkbit.security.user.john.roles=TENANT_ADMIN -hawkbit.security.user.smith_on_foo.tenant=foo -hawkbit.security.user.smith_on_foo.password={noop}smith_password -hawkbit.security.user.smith_on_foo.roles=TENANT_ADMIN -# setup bar tenant with single user smith_on_bar -hawkbit.security.user.smith_on_bar.tenant=bar -hawkbit.security.user.smith_on_bar.password={noop}smith_password -hawkbit.security.user.smith_on_bar.roles=TENANT_ADMIN -``` -This example creates two tenants foo and bar: -* foo has two users john and smith_on_foo - * john/john_password - * smith_on_foo/smith_password -* bar has single user smith_on_bar (it is again smith but since the user smith user could not be used for both tenants foo we need to use different username) - * smith_on_bar/smith_password diff --git a/site/content/guides/runhawkbit.md b/site/content/guides/runhawkbit.md deleted file mode 100644 index 52e8ceb68..000000000 --- a/site/content/guides/runhawkbit.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Run hawkBit -parent: Guides -weight: 31 ---- - -In this guide we describe how to run a full-featured hawkBit setup based on a production ready infrastructure. It is -based on the hawkBit example modules and update server. - - - -{{% note %}} -The update server can in fact be run stand alone. However, only with an embedded H2, no Device Management Federation API -and no artifact storage. -{{% /note %}} - -## System Architecture - -This guide describes a target architecture that you will probably expect in a production system. - -- hawkBit [Update Server](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-monolith/hawkbit-update-server). -- [MariaDB](https://mariadb.org) for the repository. -- [RabbitMQ](https://www.rabbitmq.com) for DMF communication (optional for monolith / single host deployment). - -For testing, demonstration or integrations purposes you could also use hawkBit SDK: -- [hawkBit SDK Management API client](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-sdk/hawkbit-sdk-commons/src/main/java/org/eclipse/hawkbit/sdk/HawkbitClient.java). -- [hawkBit SDK / Simulator Device](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-device). -- [hawkBit SDK / Simulator for DMF integration](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-dmf) -- [hawkBit SDK Demo Devices](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-demo) - -## Prerequisites - -- You have a working [hawkBit core build](https://github.com/eclipse-hawkbit/hawkbit). - -## Adapt hawkBit Update Server and Device Simulator to your environment. - -As mentioned you can create your own application with hawkBit inside or adapt the existing example app. The second -option will be shown here. - -### Configure MariaDB/MySQL connection settings. - -For this you can either edit the existing _application.properties_ or create -a [new profile](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-profile-specific-properties). - -```properties -spring.jpa.database=MYSQL -spring.datasource.driverClassName=org.mariadb.jdbc.Driver -spring.datasource.url=jdbc:mariadb://localhost:3306/ -spring.datasource.username= -spring.datasource.password= -``` - -### Configure RabbitMQ connection settings for services (optional for monolith single host deployments). - -We provide already defaults that should work with a standard Rabbit installation (spring boot RabbitProperties defaults). -Otherwise, configure the following in the `application.properties` of the services: - -```properties -spring.rabbitmq.host= -spring.rabbitmq.port= -spring.rabbitmq.virtualHost= -spring.rabbitmq.username= -spring.rabbitmq.password= -``` - -### Adapt hostnames of demo simulator - -Should only be necessary if your system does not run on localhost or uses a different port than the example app. - -Adapt `application.properties` or pass system / env variables for Spring properties: - -```properties -hawkbit.server.mgmtUrl= -hawkbit.server.ddiUrl= -``` - -## Compile & Run - -### Compile & Run your _"production ready"_ app - -see [update server](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-monolith/hawkbit-update-server) - -Note: you have to log into update server (e.g. via UI) before starting device / device simulator. Then hawkBit creates the mandatory tenant metadata. - -### Compile & Run demo simulator (optional) - -see [demo simulator](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-demo) - -login into either Management API (which is done by this client). - -## Enjoy hawkBit with a real database, artifact storage and all [interfaces](../../apis/) available diff --git a/site/content/release-notes.md b/site/content/release-notes.md deleted file mode 100755 index c6623e38f..000000000 --- a/site/content/release-notes.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -title: Release notes -weight: 100 ---- - -## 0.8.0 - -**Release Date:** Tuesday, March 11, 2025
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.8.0) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/29)
- -## 0.7.0 - -**Release Date:** Thursday, January 16, 2025
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.7.0) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/28)
- - -## 0.6.1 - -**Release Date:** Wednesday, October 30, 2024
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.6.1) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/27)
- -## 0.5.0 - -**Release Date:** Friday, March 22, 2024
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.5.0) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/26)
-Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.5.0) - -## 0.4.1 - -**Release Date:** Friday, January 12, 2024
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.4.1) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/25)
-Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.4.1) - -## 0.3.0 - -**Release Date:** Friday, November 17, 2023
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/11)
-Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0) - -## 0.3.0M9 - -**Release Date:** Thursday, August 24, 2023
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M9) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/24)
-Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0M9) - -## 0.3.0M8 - -**Release Date:** Friday, April 21, 2023
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M8) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/23)
-Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0M8) / -[Release](https://github.com/eclipse-hawkbit/hawkbit-extensions/milestone/2) - -## 0.3.0M7 - -**Release Date:** Monday, February 15, 2021
-Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M7) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/22?closed=1)
-Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0M7) / -[Release](https://github.com/eclipse-hawkbit/hawkbit-extensions/milestone/1?closed=1) - -## 0.3.0M6 - -**Release Date:** Friday, January 17, 2020
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M6) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/21?closed=1) - -## 0.3.0M5 - -**Release Date:** Tuesday, July 29, 2019
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M5) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/20?closed=1) - -## 0.3.0M4 - -**Release Date:** Thursday, June 6, 2019
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M4) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/19?closed=1) - -## 0.3.0M3 - -**Release Date:** Tuesday, May 21, 2019
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M3) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/18?closed=1) - -## 0.3.0M2 - -**Release Date:** Tuesday, April 2, 2019
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M2) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/17?closed=1) - -## 0.3.0M1 - -**Release Date:** Saturday, February 2, 2019
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M1) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/16?closed=1) - -## 0.2.5 - -**Release Date:** Friday, November 30, 2018
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.5) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/14?closed=1) - -## 0.2.4 - -**Release Date:** Friday, October 26, 2018
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.4) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/13?closed=1) - -## 0.2.3 - -**Release Date:** Monday, October 1, 2018
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.3) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/12?closed=1) - -## 0.2.2 - -**Release Date:** Thursday, September 21, 2018
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.2) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/10?closed=1) - -## 0.2.1 - -**Release Date:** Friday, July 6, 2018
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.1) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/9?closed=1) - -## 0.2.0 - -First Eclipse hawkBit release including: - -* **Core features:** - * Device and Software Repository - * Artifact Content Delivery - * Rollout/Campaign Management - -* **Interfaces:** - * Management API - * Direct Device Integration (DDI) API - * Device Management Federation (DMF) API - -**Release Date:** Friday, June 15, 2018
-[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.0) / -[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/1?closed=1) / -[Eclipse](https://projects.eclipse.org/projects/iot.hawkbit/releases/0.2.0) diff --git a/site/content/whatishawkbit.md b/site/content/whatishawkbit.md deleted file mode 100755 index 6d96d8ed6..000000000 --- a/site/content/whatishawkbit.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: What is hawkBit? -weight: 10 ---- - -Eclipse hawkBit™ is a domain-independent back-end framework for rolling out software updates to constrained edge -devices as well as more powerful controllers and gateways connected to IP based networking infrastructure. - -![](../images/hawkbit_logo.png) - -## Why Software Updates in IoT? - -Having software update capabilities ensures a secure IoT by means that it gives IoT projects a fighting chance against -pandora's box that they opened the moment their devices got connected. From that moment on devices are at the forefront -of IT security threats many embedded software developers historically never had to face. Shipping for instance a Linux -powered device connected to the Internet without any security updates ever applied during its lifetime is kind of a -suicidal act these days. - -A more charming argument for software update is that it enables agile development for hardware and hardware near -development. Concepts like a minimum viable product can be applied for devices as not all features need to be ready at -manufacturing time. Changes on the cloud side of the IoT project can be applied to the devices at runtime as well. - -Sometimes Software Update is a business model on its own as it makes devices much more attractive to the customer if -they are updatable, i.e. they do not only buy a product because of its current feature set but make also a bet on its -future capabilities. In addition new revenue streams may arise from the fact that feature extensions can potentially be -monetized (e.g. Apps) without the need to design, manufacture and ship a new device (revision). - -## Why hawkBit? - -**Updating software** (components) on constrained edge devices as well as more powerful controllers and gateways is as -mentioned before a **common requirement** in most IoT scenarios. - -At the time being, this process is **usually handled by the IoT solution itself**, sometimes backed by a full fledged -device management system. We believe that this approach generates unnecessary **duplicate work** in the IoT space, in -particular when considering the challenges of implementing a safe and reliable remote software update process: the -software update process must never fail and also must never be compromised as, at the one hand, it can be used to fix -almost any issue/problem on the device but at the same time also poses the greatest security threat if mis-used to -introduce malicious code to the device. - -In addition we believe the software update process to be relatively **independent from particular application domains** -when seen from the back-end (cloud) perspective. Updating the software for an entire car may differ from updating the -firmware of a single sensor with regard to the connectivity of the device to the cloud and also to the complexity of the -software package update process on the device. However, the process of rolling out the software, e.g. uploading an -artifact to the repository, assigning it to eligible devices, managing the roll out campaign for a large number of -devices, orchestrating content delivery networks to distribute the package, monitoring and reporting the progress of the -roll-out and last but not least requirements regarding security and reliability are quite similar. - -Software update itself is often seen as a sub process of general device management. In fact, most device management -systems include functionality for triggering groups of devices to perform an update, usually accompanied by an artifact -repository and basic reporting and monitoring capabilities. This is true for both systems specifically targeting IoT as -well as systems originating from the mobile area. - -Existing **device management systems** usually **lack** the capability to **efficiently organize roll outs at IoT scale -**, e.g. splitting the roll out into sub groups, cascading them, automatically stopping the roll out after a defined -error threshold etc. They are also usually restricted to a single device management protocol, either a proprietary one -or one of the existing standard protocols like LWM2M, OMA-DM or TR-069. Even if they support more than one such -protocol, they are often a result of the device management protocol they started with and restricted in their adoption -capabilities to others. - -At the same time the wide functional scope of a full fledged **device management system introduces unnecessary (and -unwanted) complexity** to many IoT projects. This is particularly true for IoT solutions working with constrained -devices where requirements regarding generic device management are often very limited only but a secure & reliable -software update process is still mandatory. - -As a result we have the need for a domain independent solution - -* that works for the majority of IoT projects -* that goes beyond the pure update and handles more complex **roll out strategies** needed by large scale IoT projects. -* that at the same time is **focused on software updates** in the IoT space -* and that is able to work on its own for simple scenarios while having the capability to integrate with existing device - management systems and protocols. - -## Cloud Ready - -* **Technical Scalability**: connect millions of devices and ship terabytes of software on a global scale. -* **Functional Scalability**: rollouts with hundreds of thousands of individual devices in it. -* **Reliability**: software update as the last line of defense against device faults and vulnerabilities. -* **Managed device complexity**: device topologies inside each individual provisioning target. -* **Integration flexibility**: connect and integrate through various (non-)standardized device management protocols - directly or through federated device managements. \ No newline at end of file diff --git a/site/install-theme.bat b/site/install-theme.bat deleted file mode 100644 index 3760bacb2..000000000 --- a/site/install-theme.bat +++ /dev/null @@ -1,40 +0,0 @@ -@echo off -@REM -@REM Copyright (c) 2023 Bosch.IO GmbH and others -@REM -@REM This program and the accompanying materials are made -@REM available under the terms of the Eclipse Public License 2.0 -@REM which is available at https://www.eclipse.org/legal/epl-2.0/ -@REM -@REM SPDX-License-Identifier: EPL-2.0 -@REM - -rem This script checks if 'hugo' is installed. Afterwards, the Hugo theme is downloaded. -hugo version -if ERRORLEVEL 1 ( - echo [ERROR] Please install Hugo first before proceeding. - exit 1 -) - -echo [INFO] -echo [INFO] Install Hugo Theme -set HUGO_THEMES=themes\hugo-material-docs -set CSS_FILE=themes\hugo-material-docs\static\stylesheets\application.css - -if not exist %HUGO_THEMES%\ ( - git submodule add --force https://github.com/digitalcraftsman/hugo-material-docs.git %HUGO_THEMES% - echo [INFO] ... done -) else echo [INFO] ... theme already installed in: %HUGO_THEMES% - -rem This script uses 'awk' to replace 1200px with 1500px in the application.css file from 'hugo' -if exist %CSS_FILE% ( -then - powershell -Command "(gc %CSS_FILE%) -replace 'max-width:1200px', 'max-width:1500px' | Out-File -encoding ASCII %CSS_FILE%" - echo [INFO] CSS updated content successfully! -else - echo [WARN] CSS file not found! -fi - -echo [INFO] -echo [INFO] Launch the documentation locally by running 'mvn site' (or 'hugo server' in the docs directory), -echo [INFO] and browse to 'http://localhost:{port}/hawkbit/'. \ No newline at end of file diff --git a/site/install-theme.sh b/site/install-theme.sh deleted file mode 100755 index 3eee718e8..000000000 --- a/site/install-theme.sh +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (c) 2018 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -#!/bin/bash - -# This script checks if 'hugo' is installed. Afterwards, the Hugo theme is downloaded. -hugo version -if [ $? != 0 ] -then - echo "[ERROR] Please install Hugo first before proceeding." - exit 1 -fi - -echo "[INFO] " -echo "[INFO] Install Hugo Theme" -HUGO_THEMES=themes/hugo-material-docs -CSS_FILE=themes/hugo-material-docs/static/stylesheets/application.css - -if [ ! -d ${HUGO_THEMES} ] -then - git submodule add --force https://github.com/digitalcraftsman/hugo-material-docs.git ${HUGO_THEMES} - echo "[INFO] ... done" -else - echo "[INFO] ... theme already installed in: ${HUGO_THEMES}" -fi - -# This script uses 'awk' to replace 1200px with 1500px in the application.css file from 'hugo' -if [ -f ${CSS_FILE} ] -then - awk '{gsub(/max-width:1200px/, "max-width:1500px"); print}' "${CSS_FILE}" > tmp_hawkbit_doc && mv tmp_hawkbit_doc "${CSS_FILE}" - echo "[INFO] CSS updated content successfully!" -else - echo "[WARN] CSS file not found!" -fi - -echo "[INFO] " -echo "[INFO] Launch the documentation locally by running 'mvn site' (or 'hugo server' in the docs directory)," -echo "[INFO] and browse to 'http://localhost:1313/hawkbit/'. " \ No newline at end of file diff --git a/site/layouts/_default/list.html b/site/layouts/_default/list.html deleted file mode 100755 index cbaeb5f78..000000000 --- a/site/layouts/_default/list.html +++ /dev/null @@ -1,54 +0,0 @@ -{{ partial "head" . }} - -{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }} - {{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}} - {{ .Scratch.Set "repo_id" $repo_id }} -{{ end }} - -
-
-
- - - - - -
- {{ partial "header" . }} -
- -
-
- {{ partial "drawer" . }} -
- -
-
-

Pages in {{ .Title }}

- - {{ range .Data.Pages }} - -

{{ .Title }}

-
- -
- {{ printf "%s" .Summary | markdownify }}
[...] - -
- {{ end }} - - {{ partial "copyright.html" . }} -
-
- -
-
-
-
-
-
-
-
-
- -{{ partial "footer_js" . }} \ No newline at end of file diff --git a/site/layouts/_default/single.html b/site/layouts/_default/single.html deleted file mode 100755 index 76ea3f734..000000000 --- a/site/layouts/_default/single.html +++ /dev/null @@ -1,49 +0,0 @@ -{{ partial "head" . }} - -{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }} - {{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}} - {{ .Scratch.Set "repo_id" $repo_id }} -{{ end }} - -
-
-
- - - - - -
- {{ partial "header" . }} -
- -
-
- {{ partial "drawer" . }} -
- -
-
-

{{ .Title }} {{ if .Draft }} (Draft){{ end }}

- - {{ .Content }} - - {{ partial "copyright.html" . }} - -
- {{ partial "footer" . }} -
-
-
- -
-
-
-
-
-
-
-
-
- -{{ partial "footer_js" . }} diff --git a/site/layouts/index.html b/site/layouts/index.html deleted file mode 100755 index 5f32f511b..000000000 --- a/site/layouts/index.html +++ /dev/null @@ -1,101 +0,0 @@ -{{ partial "head" . }} - -{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }} - {{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}} - {{ .Scratch.Set "repo_id" $repo_id }} -{{ end }} - -
-
-
- - - - - -
- {{ partial "header" . }} -
- -
-
- {{ partial "drawer" . }} -
- -
-
- -
IoT. Update. Device.
- -
-

- Eclipse hawkBit™ is a domain independent back-end framework for rolling out software updates - to constrained - edge devices as well as more powerful controllers and gateways connected to IP based networking - infrastructure. -

- -

Interfaces

-

- hawkBit offers a direct device integration via HTTP or a device management federation API - which allows to connect devices with different protocol adapter. Users can make use of the graphical - user interface - and other service can interact with hawkBit through the RESTful management API. -

- -

Rollout

-
-
-

- hawkBit supports an easy and flexible rollout management which allows you to update a large - amount of devices in separated groups. -

-
    -
  • Cascading start of the deployment groups based on installation status of the previous - group. -
  • -
  • Emergency shutdown of the rollout in case a group exceeds the defined error threshold. -
  • -
  • Rollout progress monitoring for the entire rollout and the individual groups.
  • -
-
- -
-
-
- -
-
- -

Package Model

-
-
-
- -
- -
-

- A software update does not always contain only a single file. The hawkBit meta model allows - you to configure your files in virtual software and distribution packages. -

-
-
-
- - {{ partial "copyright.html" . }} - -
-
- -
-
-
-
-
-
-
-
-
- -{{ partial "footer_js" . }} diff --git a/site/layouts/partials/copyright.html b/site/layouts/partials/copyright.html deleted file mode 100755 index 17aa964b2..000000000 --- a/site/layouts/partials/copyright.html +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/site/layouts/partials/drawer.html b/site/layouts/partials/drawer.html deleted file mode 100755 index 220bc6455..000000000 --- a/site/layouts/partials/drawer.html +++ /dev/null @@ -1,77 +0,0 @@ - diff --git a/site/layouts/partials/footer_js.html b/site/layouts/partials/footer_js.html deleted file mode 100755 index 8087fb6e7..000000000 --- a/site/layouts/partials/footer_js.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - {{ range .Site.Params.custom_js }} - - {{ end }} - - - - - - - diff --git a/site/layouts/partials/head.html b/site/layouts/partials/head.html deleted file mode 100755 index dee409d69..000000000 --- a/site/layouts/partials/head.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - {{ .Title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }} - {{ hugo.Generator }} - - {{ with .Site.Params.description }} - - {{ end }} - - {{ with .Site.Params.author }} - - {{ end }} - - - {{ with .Site.Title }}{{ end }} - {{ with .Site.Params.logo }}{{ end }} - {{ with .Site.Title }}{{ end }} - - - - {{ if .Params.redirectURL }}{{ end }} - - - - - - - - - - - - {{/* set default values if no custom ones are defined */}} - {{ $text := or .Site.Params.font.text "Roboto" }} - {{ $code := or .Site.Params.font.code "Roboto Mono" }} - - - - {{ range .Site.Params.custom_css }} - - {{ end }} - - - - {{ with .OutputFormats.Get "RSS" }} - - - {{ end }} - - - - diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html deleted file mode 100755 index 1be1c3ac1..000000000 --- a/site/layouts/partials/header.html +++ /dev/null @@ -1,57 +0,0 @@ - \ No newline at end of file diff --git a/site/layouts/partials/nav_link.html b/site/layouts/partials/nav_link.html deleted file mode 100755 index 2bdd8d0c4..000000000 --- a/site/layouts/partials/nav_link.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ $currentMenuEntry := .Scratch.Get "currentMenuEntry" }} -{{ $isCurrent := eq .Permalink ($currentMenuEntry.URL | absURL | printf "%s") }} - - - - {{ $currentMenuEntry.Pre }} - {{ $currentMenuEntry.Name }} - - -{{ if $isCurrent }} -
    -
-{{ end }} \ No newline at end of file diff --git a/site/pom.xml b/site/pom.xml deleted file mode 100644 index fb7f0996a..000000000 --- a/site/pom.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - 4.0.0 - - org.eclipse.hawkbit - hawkbit-parent - ${revision} - - - site - hawkBit :: Documentation - Documentation for hawkBit - - - 1.6.0 - - - - - unix - - - !windows - - - - /bin/bash - - sh - - - - windows - - - windows - - - - cmd - /c - bat - - - - - - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - - build-htmls - - exec - - install - - ${shell} - ${project.basedir} - - ${shell.option} - build-htmls.${batch.ext} - - - - - install-hugo-theme - - exec - - install - - ${shell} - ${project.basedir} - - ${shell.option} - install-theme.${batch.ext} - - - - - serve - - exec - - site - - hugo - ${project.basedir} - - server - - - - - cleanup - - exec - - clean - - ${shell} - ${project.basedir} - - ${shell.option} - cleanup.${batch.ext} - - - - - - - - - - - org.eclipse.hawkbit - hawkbit-ddi-starter - ${project.version} - - - org.eclipse.hawkbit - hawkbit-mgmt-starter - ${project.version} - - - - - org.eclipse.hawkbit - hawkbit-repository-test - ${project.version} - test - - - \ No newline at end of file diff --git a/site/src/main/java/org/eclipse/hawkbit/doc/Start.java b/site/src/main/java/org/eclipse/hawkbit/doc/Start.java deleted file mode 100644 index 7054b615d..000000000 --- a/site/src/main/java/org/eclipse/hawkbit/doc/Start.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2023 Bosch.IO GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.doc; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * A {@link SpringBootApplication} annotated class with a main method to start. - * The minimal configuration for the stand alone hawkBit server. - */ -@SpringBootApplication -// Exception squid:S1118 - Spring boot standard behavior -@SuppressWarnings({ "squid:S1118" }) -public class Start { - - /** - * Main method to start the spring-boot application. - * - * @param args the VM arguments. - */ - // Exception squid:S2095 - Spring boot standard behavior - @SuppressWarnings({ "squid:S2095" }) - public static void main(final String[] args) { - SpringApplication.run(Start.class, args); - } -} diff --git a/site/src/main/resources/application.properties b/site/src/main/resources/application.properties deleted file mode 100644 index 908e33338..000000000 --- a/site/src/main/resources/application.properties +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2023 Bosch.IO GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# Spring configuration -spring.main.allow-bean-definition-overriding=true - -# User Security -spring.security.user.name=admin -spring.security.user.password={noop}admin - -# Http Encoding -server.servlet.encoding.charset=UTF-8 -server.servlet.encoding.enabled=true -server.servlet.encoding.force=true - -# DDI authentication configuration -hawkbit.server.ddi.security.authentication.targettoken.enabled=false -hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=false - -# Optional events -hawkbit.server.repository.publish-target-poll-event=false - -# Swagger Configuration -springdoc.api-docs.version=openapi_3_0 -springdoc.show-oauth2-endpoints=true -springdoc.show-login-endpoint=true -springdoc.packages-to-scan=org.eclipse.hawkbit.mgmt,org.eclipse.hawkbit.ddi -springdoc.paths-to-exclude=/system/** \ No newline at end of file diff --git a/site/src/main/resources/banner.txt b/site/src/main/resources/banner.txt deleted file mode 100644 index fca127758..000000000 --- a/site/src/main/resources/banner.txt +++ /dev/null @@ -1,14 +0,0 @@ - ______ _ _ _ _ ____ _ _ - | ____| | (_) | | | | | _ \(_) | - | |__ ___| |_ _ __ ___ ___ | |__ __ ___ _| | _| |_) |_| |_ - | __| / __| | | '_ \/ __|/ _ \ | '_ \ / _` \ \ /\ / / |/ / _ <| | __| - | |___| (__| | | |_) \__ \ __/ | | | | (_| |\ V V /| <| |_) | | |_ - |______\___|_|_| .__/|___/\___| |_| |_|\__,_| \_/\_/ |_|\_\____/|_|\__| - | | - |_| - -Eclipse hawkBit Update Server ${application.formatted-version} -using Spring Boot ${spring-boot.formatted-version} - -Go to https://www.eclipse.org/hawkbit for more information. - \ No newline at end of file diff --git a/site/src/test/java/org/eclipse/hawkbit/doc/RestApiDocTest.java b/site/src/test/java/org/eclipse/hawkbit/doc/RestApiDocTest.java deleted file mode 100644 index 8e1af8ea5..000000000 --- a/site/src/test/java/org/eclipse/hawkbit/doc/RestApiDocTest.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Copyright (c) 2023 Bosch.IO GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ - -package org.eclipse.hawkbit.doc; - -import com.fasterxml.jackson.databind.node.ArrayNode; -import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; -import org.eclipse.hawkbit.repository.test.util.SharedSqlTestDatabaseExtension; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.boot.test.web.server.LocalServerPort; -import org.springframework.http.ResponseEntity; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.Assertions.assertThat; - -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@ExtendWith({ SharedSqlTestDatabaseExtension.class }) -class RestApiDocTest { - - private static final String MANAGEMENT_PREFIX = "mgmt"; - private static final String DDI_PREFIX = "ddi"; - private static final String TARGET_DIRECTORY = "content/rest-api/"; - - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - - @LocalServerPort - private int port; - - @Autowired - private TestRestTemplate restTemplate; - - @Test - void openapiJson() throws IOException { - final ResponseEntity response = - restTemplate.getForEntity("http://localhost:" + port + "/v3/api-docs", String.class); - final String openapiDoc = response.getBody(); - assertThat(openapiDoc).isNotNull(); - splitDocumentation(openapiDoc); - } - - private static void splitDocumentation(final String json) throws IOException { - processDocumentation(json, true); - processDocumentation(json, false); - } - - private static void processDocumentation(final String json, final boolean isMgmt) throws IOException { - final JsonNode rootNode = OBJECT_MAPPER.readTree(json); - updateJsonNodeForApi(rootNode, isMgmt); - saveDocumentation(rootNode, isMgmt); - } - - private static void updateJsonNodeForApi(final JsonNode rootNode, final boolean isMgmt) { - removeTags(rootNode, isMgmt); - removePaths(rootNode, isMgmt); - removeComponents(rootNode, isMgmt); - } - - private static void removeTags(final JsonNode rootNode, final boolean isMgmt) { - final ArrayNode tagsNode = (ArrayNode) rootNode.get("tags"); - final ArrayNode modifiedTagsNode = OBJECT_MAPPER.createArrayNode(); - - for (final JsonNode tagNode : tagsNode) { - String tagName = tagNode.get("name").asText(); - if (isMgmt != tagName.startsWith("DDI")) { - modifiedTagsNode.add(tagNode); - } - } - - ((ObjectNode) rootNode).set("tags", modifiedTagsNode); - } - - private static void removePaths(final JsonNode rootNode, final boolean isMgmt) { - final ObjectNode pathsNode = (ObjectNode) rootNode.get("paths"); - final List fieldsToRemove = new ArrayList<>(); - pathsNode.fieldNames().forEachRemaining(fieldName -> { - final JsonNode pathNode = pathsNode.get(fieldName); - pathNode.fieldNames().forEachRemaining(path -> { - final JsonNode methodNode = pathNode.get(path); - final JsonNode tagsNode = methodNode.get("tags"); - if (tagsNode != null) { - for (JsonNode tagNode : tagsNode) { - final String tag = tagNode.asText(); - if (isMgmt == tag.startsWith("DDI")) { - fieldsToRemove.add(fieldName); - break; - } - } - } - }); - }); - fieldsToRemove.forEach(pathsNode::remove); - } - - private static void removeComponents(final JsonNode rootNode, final boolean isMgmt) { - final ObjectNode schemasNode = (ObjectNode) rootNode.get("components").get("schemas"); - - List fieldsToRemove = new ArrayList<>(); - schemasNode.fieldNames().forEachRemaining(fieldName -> { - if (shouldDeleteComponent(fieldName, isMgmt)) { - fieldsToRemove.add(fieldName); - } - }); - fieldsToRemove.forEach(schemasNode::remove); - } - - private static boolean shouldDeleteComponent(final String fieldName, final boolean isMgmt) { - if (isMgmt) { - return fieldName.startsWith("Ddi"); - } - return !(fieldName.startsWith("Ddi") || fieldName.equals("Link") || fieldName.equals("Links") || fieldName.equals("ExceptionInfo")); - - } - - private static void saveDocumentation(final JsonNode rootNode, final boolean isMgmt) throws IOException { - final String prefix = isMgmt ? MANAGEMENT_PREFIX : DDI_PREFIX; - saveAsJson(rootNode, prefix); - saveAsYaml(rootNode, prefix); - } - - private static void saveAsJson(final JsonNode rootNode, final String prefix) throws IOException { - final Path targetPath = getTargetPath(prefix, ".json"); - Files.writeString(targetPath, OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(rootNode)); - } - - private static void saveAsYaml(final JsonNode rootNode, final String prefix) throws IOException { - final YAMLMapper yamlMapper = new YAMLMapper(); - final Path targetPath = getTargetPath(prefix, ".yaml"); - Files.writeString(targetPath, yamlMapper.writeValueAsString(rootNode)); - } - - private static Path getTargetPath(final String prefix, final String extension) throws IOException { - final Path targetPath = Paths.get(TARGET_DIRECTORY + prefix + extension); - Files.createDirectories(targetPath.getParent()); - return targetPath; - } -} - diff --git a/site/static/css/hawkbit.css b/site/static/css/hawkbit.css deleted file mode 100755 index 34a629012..000000000 --- a/site/static/css/hawkbit.css +++ /dev/null @@ -1,57 +0,0 @@ - -.copyright { - margin-top: 5em; - margin-bottom: 1em; - overflow: auto; -} - -.copyright a { - border-bottom-style: none; -} - -.copyright p { - margin-top: 0; -} - -.copyright p.notice { - margin-top: 27px; -} - -.copyright div.logo { - float: right; - width: 20%; - padding-bottom: 2%; -} - -.copyright .quickLinks a { - float: left; - padding-right: 2em; -} - -.jumbotron { - padding-bottom: 1em; - padding-top: 2em; - text-align: center; - font-size: xx-large; - color: #734dba; -} - -.banner div.drawerlogo { - background: white; - border-radius: 100%; - width: 64px; - height: 64px; - transition: box-shadow .4s; -} - -.banner div.drawerlogo:hover { - box-shadow: 0 4px 7px rgba(0, 0, 0, .23), 0 8px 25px rgba(0, 0, 0, .05); -} - -.banner .drawerlogo img { - height: 100%; - width: 100%; - padding: 15%; - position: relative; - top: -3px -} diff --git a/site/static/images/architecture/architecture.png b/site/static/images/architecture/architecture.png deleted file mode 100644 index 67b85df44..000000000 Binary files a/site/static/images/architecture/architecture.png and /dev/null differ diff --git a/site/static/images/architecture/targetStatusStates.png b/site/static/images/architecture/targetStatusStates.png deleted file mode 100644 index db14fef74..000000000 Binary files a/site/static/images/architecture/targetStatusStates.png and /dev/null differ diff --git a/site/static/images/eclipse_foundation_logo.png b/site/static/images/eclipse_foundation_logo.png deleted file mode 100644 index fe2c278ef..000000000 Binary files a/site/static/images/eclipse_foundation_logo.png and /dev/null differ diff --git a/site/static/images/favicon.ico b/site/static/images/favicon.ico deleted file mode 100644 index 743ee5ac1..000000000 Binary files a/site/static/images/favicon.ico and /dev/null differ diff --git a/site/static/images/hawkBit_overview.jpeg b/site/static/images/hawkBit_overview.jpeg deleted file mode 100644 index c16b20d88..000000000 Binary files a/site/static/images/hawkBit_overview.jpeg and /dev/null differ diff --git a/site/static/images/hawkbit_icon.png b/site/static/images/hawkbit_icon.png deleted file mode 100644 index ffb68011e..000000000 Binary files a/site/static/images/hawkbit_icon.png and /dev/null differ diff --git a/site/static/images/hawkbit_logo.png b/site/static/images/hawkbit_logo.png deleted file mode 100644 index 3fe796127..000000000 Binary files a/site/static/images/hawkbit_logo.png and /dev/null differ diff --git a/site/static/images/hawkbit_transparency.png b/site/static/images/hawkbit_transparency.png deleted file mode 100644 index 9aaf00e19..000000000 Binary files a/site/static/images/hawkbit_transparency.png and /dev/null differ diff --git a/site/static/images/interfaces.png b/site/static/images/interfaces.png deleted file mode 100644 index 6502e29f2..000000000 Binary files a/site/static/images/interfaces.png and /dev/null differ diff --git a/site/static/images/overall_cluster.png b/site/static/images/overall_cluster.png deleted file mode 100644 index b18b8ee21..000000000 Binary files a/site/static/images/overall_cluster.png and /dev/null differ diff --git a/site/static/images/packagemodel.png b/site/static/images/packagemodel.png deleted file mode 100644 index f9c6f1775..000000000 Binary files a/site/static/images/packagemodel.png and /dev/null differ diff --git a/site/static/images/rollout.png b/site/static/images/rollout.png deleted file mode 100644 index 984e12152..000000000 Binary files a/site/static/images/rollout.png and /dev/null differ diff --git a/site/static/images/rolloutgroupstatediagram.png b/site/static/images/rolloutgroupstatediagram.png deleted file mode 100644 index 6a4728120..000000000 Binary files a/site/static/images/rolloutgroupstatediagram.png and /dev/null differ diff --git a/site/static/images/rolloutstatediagram.png b/site/static/images/rolloutstatediagram.png deleted file mode 100644 index 6fb273173..000000000 Binary files a/site/static/images/rolloutstatediagram.png and /dev/null differ diff --git a/site/static/images/security/exampleReverseProxyArchitecture.png b/site/static/images/security/exampleReverseProxyArchitecture.png deleted file mode 100644 index dec5e6f30..000000000 Binary files a/site/static/images/security/exampleReverseProxyArchitecture.png and /dev/null differ diff --git a/site/static/slides/community-day-2018.html b/site/static/slides/community-day-2018.html deleted file mode 100644 index 7b61a490d..000000000 --- a/site/static/slides/community-day-2018.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - - Eclipse hawkBit - - - - - - - - - - - - -
-
- -
-
-
-
-

Community Day - Eclipse hawkBit

-
EclipseCon Europe 2018
-
-
-
-

Welcome...

-
-
- -

Kai Zimmermann

- Project Lead - Microsoft -
-
-
- -

Dominic Schabel

- Committer - Bosch -
-
-
-
-

About

-

- Eclipse hawkBit aims to create a domain independent back end solution for rolling out software - updates - to constrained edge devices as well as more powerful controllers and gateways connected to IP based - networking infrastructure -

-
-
-

Big picture

- -
-
-

Project update...

-
-
-

New team members

-
-
- -

Jeroen Laverman

- Project Lead - Bosch -
-
-
- -

Stefan Behl

- Committer - Bosch -
-
-
- -

Dominic Schabel

- Committer - Bosch -
-
-
-
-

Statistics (10/2018)

- -
-
-

We have been busy

- -
-
-

Roadmap...

-
-
-

Upgrades, upgrades

- -
-
-

Version overview

-
- -
hawkBit
-
 
-
Spring Boot
-
0.2.x
-
-
1.4
-
0.3.0
-
-
2.0
-
-
-
-

A few features as well

-
    -
  • Custom key/value pairs for targets (#737) -
  • -
  • Small improvements of rollout management
  • -
-
-
-

Cloud PaaS extensions...

- -
-
-

Deprecations

-
We'll drop UAA extension support
-
-
-

Thank you

- -
-
-
- - - - - - - - - \ No newline at end of file diff --git a/site/static/slides/community-day-2019.html b/site/static/slides/community-day-2019.html deleted file mode 100644 index 49eb791b9..000000000 --- a/site/static/slides/community-day-2019.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - - Eclipse hawkBit - - - - - - - - - - - - -
-
- -
-
-
-
-

Community Day - Eclipse hawkBit

-
EclipseCon Europe 2019
-
-
-
-

Welcome...

-
-
- -

Kai Zimmermann

- Project Lead - Microsoft -
-
-
- -

Jeroen Laverman

- Project Lead - Bosch -
-
-
-
-

About

-

- Eclipse hawkBit aims to create a domain independent back end solution for rolling out - software - updates - to constrained edge devices as well as more powerful controllers and gateways connected to IP based - networking infrastructure -

-
-
-

Big picture

- -
-
-

Project update...

-
- -
-

Statistics (10/2019)

- -
-
-

We have been busy

-
    -
  • Add Multi-User support (#829) -
  • -
  • Introduce Multi-Assignments (#833) -
  • -
  • Introduce new action-type DOWNLOAD_ONLY (#810) -
  • -
  • Execute Auto-Assignments with different action-types (#789) -
  • -
  • Introduce THING_REMOVED message on DMF-API (#891) -
  • -
  • DDI-API supports SHA256 signature for artifacts (#869) -
  • -
  • ... and many - smaller enhancements and bug fixes
  • -
-
- -
-

Cloud support updates...

- -
- -
-

Roadmap...

-
-
-

Outlook

-
    -
  • Vaadin 8 (#880) -
  • -
  • Release 0.3.0 (#784) -
  • -
  • Prioritization of updates (#863) -
  • -
  • Integration with other device inventories (#796) -
  • -
  • Support of new Eclipse IoT Packages project -
  • -
-
- - -
-

Thank you

- -
-
-
- - - - - - - - - diff --git a/site/static/slides/community-day-2020.html b/site/static/slides/community-day-2020.html deleted file mode 100644 index 7c2a2f936..000000000 --- a/site/static/slides/community-day-2020.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - Eclipse hawkBit - - - - - - - - - - - - -
-
- -
-
-
-
-

Community Day - Eclipse hawkBit

-
EclipseCon Europe 2020
-
-
-
-

About

-

- Eclipse hawkBit aims to create a domain independent back end solution for rolling out - software - updates - to constrained edge devices as well as more powerful controllers and gateways connected to IP based - networking infrastructure -

-
-
-

Big picture

- -
-
-

Statistics (10/2020)

- -
-
-

We have been busy

- -
- -
-

Current challenges and next steps

-
    - -
  • Release 0.3.0 (#784) -
  • -
  • Update from EPL-1.0 to EPL-2.0 (#1008) -
  • -
  • Migrate hawkBit to Spring Boot 2.3.x (#999) -
  • -
  • Integration with other device inventories (#796) -
  • -
-
- - -
-

Thank you

- -
-
-
- - - - - - - - - diff --git a/site/static/slides/css/reveal.css b/site/static/slides/css/reveal.css deleted file mode 100755 index 26e2f6c6e..000000000 --- a/site/static/slides/css/reveal.css +++ /dev/null @@ -1,1887 +0,0 @@ -/*! - * reveal.js - * http://revealjs.com - * MIT licensed - * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se - */ -/********************************************* - * RESET STYLES - *********************************************/ -html, body, .reveal div, .reveal span, .reveal applet, .reveal object, .reveal iframe, -.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6, .reveal p, .reveal blockquote, .reveal pre, -.reveal a, .reveal abbr, .reveal acronym, .reveal address, .reveal big, .reveal cite, .reveal code, -.reveal del, .reveal dfn, .reveal em, .reveal img, .reveal ins, .reveal kbd, .reveal q, .reveal s, .reveal samp, -.reveal small, .reveal strike, .reveal strong, .reveal sub, .reveal sup, .reveal tt, .reveal var, -.reveal b, .reveal u, .reveal center, -.reveal dl, .reveal dt, .reveal dd, .reveal ol, .reveal ul, .reveal li, -.reveal fieldset, .reveal form, .reveal label, .reveal legend, -.reveal table, .reveal caption, .reveal tbody, .reveal tfoot, .reveal thead, .reveal tr, .reveal th, .reveal td, -.reveal article, .reveal aside, .reveal canvas, .reveal details, .reveal embed, -.reveal figure, .reveal figcaption, .reveal footer, .reveal header, .reveal hgroup, -.reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary, -.reveal time, .reveal mark, .reveal audio, .reveal video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} - -.reveal article, .reveal aside, .reveal details, .reveal figcaption, .reveal figure, -.reveal footer, .reveal header, .reveal hgroup, .reveal menu, .reveal nav, .reveal section { - display: block; -} - -/********************************************* - * GLOBAL STYLES - *********************************************/ -html, -body { - width: 100%; - height: 100%; - overflow: hidden; -} - -body { - position: relative; - line-height: 1; - background-color: #fff; - color: #000; -} - -/********************************************* - * VIEW FRAGMENTS - *********************************************/ -.reveal .slides section .fragment { - opacity: 0; - visibility: hidden; - transition: all .2s ease; -} - -.reveal .slides section .fragment.visible { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.grow { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.grow.visible { - -webkit-transform: scale(1.3); - transform: scale(1.3); -} - -.reveal .slides section .fragment.shrink { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.shrink.visible { - -webkit-transform: scale(0.7); - transform: scale(0.7); -} - -.reveal .slides section .fragment.zoom-in { - -webkit-transform: scale(0.1); - transform: scale(0.1); -} - -.reveal .slides section .fragment.zoom-in.visible { - -webkit-transform: none; - transform: none; -} - -.reveal .slides section .fragment.fade-out { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.fade-out.visible { - opacity: 0; - visibility: hidden; -} - -.reveal .slides section .fragment.semi-fade-out { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.semi-fade-out.visible { - opacity: 0.5; - visibility: inherit; -} - -.reveal .slides section .fragment.strike { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.strike.visible { - text-decoration: line-through; -} - -.reveal .slides section .fragment.fade-up { - -webkit-transform: translate(0, 20%); - transform: translate(0, 20%); -} - -.reveal .slides section .fragment.fade-up.visible { - -webkit-transform: translate(0, 0); - transform: translate(0, 0); -} - -.reveal .slides section .fragment.fade-down { - -webkit-transform: translate(0, -20%); - transform: translate(0, -20%); -} - -.reveal .slides section .fragment.fade-down.visible { - -webkit-transform: translate(0, 0); - transform: translate(0, 0); -} - -.reveal .slides section .fragment.fade-right { - -webkit-transform: translate(-20%, 0); - transform: translate(-20%, 0); -} - -.reveal .slides section .fragment.fade-right.visible { - -webkit-transform: translate(0, 0); - transform: translate(0, 0); -} - -.reveal .slides section .fragment.fade-left { - -webkit-transform: translate(20%, 0); - transform: translate(20%, 0); -} - -.reveal .slides section .fragment.fade-left.visible { - -webkit-transform: translate(0, 0); - transform: translate(0, 0); -} - -.reveal .slides section .fragment.current-visible { - opacity: 0; - visibility: hidden; -} - -.reveal .slides section .fragment.current-visible.current-fragment { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.highlight-red, -.reveal .slides section .fragment.highlight-current-red, -.reveal .slides section .fragment.highlight-green, -.reveal .slides section .fragment.highlight-current-green, -.reveal .slides section .fragment.highlight-blue, -.reveal .slides section .fragment.highlight-current-blue { - opacity: 1; - visibility: inherit; -} - -.reveal .slides section .fragment.highlight-red.visible { - color: #ff2c2d; -} - -.reveal .slides section .fragment.highlight-green.visible { - color: #17ff2e; -} - -.reveal .slides section .fragment.highlight-blue.visible { - color: #1b91ff; -} - -.reveal .slides section .fragment.highlight-current-red.current-fragment { - color: #ff2c2d; -} - -.reveal .slides section .fragment.highlight-current-green.current-fragment { - color: #17ff2e; -} - -.reveal .slides section .fragment.highlight-current-blue.current-fragment { - color: #1b91ff; -} - -/********************************************* - * DEFAULT ELEMENT STYLES - *********************************************/ -/* Fixes issue in Chrome where italic fonts did not appear when printing to PDF */ -.reveal:after { - content: ''; - font-style: italic; -} - -.reveal iframe { - z-index: 1; -} - -/** Prevents layering issues in certain browser/transition combinations */ -.reveal a { - position: relative; -} - -.reveal .stretch { - max-width: none; - max-height: none; -} - -.reveal pre.stretch code { - height: 100%; - max-height: 100%; - box-sizing: border-box; -} - -/********************************************* - * CONTROLS - *********************************************/ -@-webkit-keyframes bounce-right { - 0%, 10%, 25%, 40%, 50% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 20% { - -webkit-transform: translateX(10px); - transform: translateX(10px); - } - 30% { - -webkit-transform: translateX(-5px); - transform: translateX(-5px); - } -} - -@keyframes bounce-right { - 0%, 10%, 25%, 40%, 50% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 20% { - -webkit-transform: translateX(10px); - transform: translateX(10px); - } - 30% { - -webkit-transform: translateX(-5px); - transform: translateX(-5px); - } -} - -@-webkit-keyframes bounce-down { - 0%, 10%, 25%, 40%, 50% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - 20% { - -webkit-transform: translateY(10px); - transform: translateY(10px); - } - 30% { - -webkit-transform: translateY(-5px); - transform: translateY(-5px); - } -} - -@keyframes bounce-down { - 0%, 10%, 25%, 40%, 50% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - 20% { - -webkit-transform: translateY(10px); - transform: translateY(10px); - } - 30% { - -webkit-transform: translateY(-5px); - transform: translateY(-5px); - } -} - -.reveal .controls { - display: none; - position: absolute; - top: auto; - bottom: 12px; - right: 12px; - left: auto; - z-index: 1; - color: #000; - pointer-events: none; - font-size: 10px; -} - -.reveal .controls button { - position: absolute; - padding: 0; - background-color: transparent; - border: 0; - outline: 0; - cursor: pointer; - color: currentColor; - -webkit-transform: scale(0.9999); - transform: scale(0.9999); - transition: color 0.2s ease, opacity 0.2s ease, -webkit-transform 0.2s ease; - transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; - z-index: 2; - pointer-events: auto; - font-size: inherit; - visibility: hidden; - opacity: 0; - -webkit-appearance: none; - -webkit-tap-highlight-color: transparent; -} - -.reveal .controls .controls-arrow:before, -.reveal .controls .controls-arrow:after { - content: ''; - position: absolute; - top: 0; - left: 0; - width: 2.6em; - height: 0.5em; - border-radius: 0.25em; - background-color: currentColor; - transition: all 0.15s ease, background-color 0.8s ease; - -webkit-transform-origin: 0.2em 50%; - transform-origin: 0.2em 50%; - will-change: transform; -} - -.reveal .controls .controls-arrow { - position: relative; - width: 3.6em; - height: 3.6em; -} - -.reveal .controls .controls-arrow:before { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(45deg); - transform: translateX(0.5em) translateY(1.55em) rotate(45deg); -} - -.reveal .controls .controls-arrow:after { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); - transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); -} - -.reveal .controls .controls-arrow:hover:before { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(40deg); - transform: translateX(0.5em) translateY(1.55em) rotate(40deg); -} - -.reveal .controls .controls-arrow:hover:after { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(-40deg); - transform: translateX(0.5em) translateY(1.55em) rotate(-40deg); -} - -.reveal .controls .controls-arrow:active:before { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(36deg); - transform: translateX(0.5em) translateY(1.55em) rotate(36deg); -} - -.reveal .controls .controls-arrow:active:after { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(-36deg); - transform: translateX(0.5em) translateY(1.55em) rotate(-36deg); -} - -.reveal .controls .navigate-left { - right: 6.4em; - bottom: 3.2em; - -webkit-transform: translateX(-10px); - transform: translateX(-10px); -} - -.reveal .controls .navigate-right { - right: 0; - bottom: 3.2em; - -webkit-transform: translateX(10px); - transform: translateX(10px); -} - -.reveal .controls .navigate-right .controls-arrow { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} - -.reveal .controls .navigate-right.highlight { - -webkit-animation: bounce-right 2s 50 both ease-out; - animation: bounce-right 2s 50 both ease-out; -} - -.reveal .controls .navigate-up { - right: 3.2em; - bottom: 6.4em; - -webkit-transform: translateY(-10px); - transform: translateY(-10px); -} - -.reveal .controls .navigate-up .controls-arrow { - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.reveal .controls .navigate-down { - right: 3.2em; - bottom: 0; - -webkit-transform: translateY(10px); - transform: translateY(10px); -} - -.reveal .controls .navigate-down .controls-arrow { - -webkit-transform: rotate(-90deg); - transform: rotate(-90deg); -} - -.reveal .controls .navigate-down.highlight { - -webkit-animation: bounce-down 2s 50 both ease-out; - animation: bounce-down 2s 50 both ease-out; -} - -.reveal .controls[data-controls-back-arrows="faded"] .navigate-left.enabled, -.reveal .controls[data-controls-back-arrows="faded"] .navigate-up.enabled { - opacity: 0.3; -} - -.reveal .controls[data-controls-back-arrows="faded"] .navigate-left.enabled:hover, -.reveal .controls[data-controls-back-arrows="faded"] .navigate-up.enabled:hover { - opacity: 1; -} - -.reveal .controls[data-controls-back-arrows="hidden"] .navigate-left.enabled, -.reveal .controls[data-controls-back-arrows="hidden"] .navigate-up.enabled { - opacity: 0; - visibility: hidden; -} - -.reveal .controls .enabled { - visibility: visible; - opacity: 0.9; - cursor: pointer; - -webkit-transform: none; - transform: none; -} - -.reveal .controls .enabled.fragmented { - opacity: 0.5; -} - -.reveal .controls .enabled:hover, -.reveal .controls .enabled.fragmented:hover { - opacity: 1; -} - -.reveal:not(.has-vertical-slides) .controls .navigate-left { - bottom: 1.4em; - right: 5.5em; -} - -.reveal:not(.has-vertical-slides) .controls .navigate-right { - bottom: 1.4em; - right: 0.5em; -} - -.reveal:not(.has-horizontal-slides) .controls .navigate-up { - right: 1.4em; - bottom: 5em; -} - -.reveal:not(.has-horizontal-slides) .controls .navigate-down { - right: 1.4em; - bottom: 0.5em; -} - -.reveal.has-dark-background .controls { - color: #fff; -} - -.reveal.has-light-background .controls { - color: #000; -} - -.reveal.no-hover .controls .controls-arrow:hover:before, -.reveal.no-hover .controls .controls-arrow:active:before { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(45deg); - transform: translateX(0.5em) translateY(1.55em) rotate(45deg); -} - -.reveal.no-hover .controls .controls-arrow:hover:after, -.reveal.no-hover .controls .controls-arrow:active:after { - -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); - transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); -} - -@media screen and (min-width: 500px) { - .reveal .controls[data-controls-layout="edges"] { - top: 0; - right: 0; - bottom: 0; - left: 0; - } - - .reveal .controls[data-controls-layout="edges"] .navigate-left, - .reveal .controls[data-controls-layout="edges"] .navigate-right, - .reveal .controls[data-controls-layout="edges"] .navigate-up, - .reveal .controls[data-controls-layout="edges"] .navigate-down { - bottom: auto; - right: auto; - } - - .reveal .controls[data-controls-layout="edges"] .navigate-left { - top: 50%; - left: 8px; - margin-top: -1.8em; - } - - .reveal .controls[data-controls-layout="edges"] .navigate-right { - top: 50%; - right: 8px; - margin-top: -1.8em; - } - - .reveal .controls[data-controls-layout="edges"] .navigate-up { - top: 8px; - left: 50%; - margin-left: -1.8em; - } - - .reveal .controls[data-controls-layout="edges"] .navigate-down { - bottom: 8px; - left: 50%; - margin-left: -1.8em; - } -} - -/********************************************* - * PROGRESS BAR - *********************************************/ -.reveal .progress { - position: absolute; - display: none; - height: 3px; - width: 100%; - bottom: 0; - left: 0; - z-index: 10; - background-color: rgba(0, 0, 0, 0.2); - color: #fff; -} - -.reveal .progress:after { - content: ''; - display: block; - position: absolute; - height: 10px; - width: 100%; - top: -10px; -} - -.reveal .progress span { - display: block; - height: 100%; - width: 0px; - background-color: currentColor; - transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); -} - -/********************************************* - * SLIDE NUMBER - *********************************************/ -.reveal .slide-number { - position: fixed; - display: block; - right: 8px; - bottom: 8px; - z-index: 31; - font-family: Helvetica, sans-serif; - font-size: 12px; - line-height: 1; - color: #fff; - background-color: rgba(0, 0, 0, 0.4); - padding: 5px; -} - -.reveal .slide-number-delimiter { - margin: 0 3px; -} - -/********************************************* - * SLIDES - *********************************************/ -.reveal { - position: relative; - width: 100%; - height: 100%; - overflow: hidden; - -ms-touch-action: none; - touch-action: none; -} - -@media only screen and (orientation: landscape) { - .reveal.ua-iphone { - position: fixed; - } -} - -.reveal .slides { - position: absolute; - width: 100%; - height: 100%; - top: 0; - right: 0; - bottom: 0; - left: 0; - margin: auto; - pointer-events: none; - overflow: visible; - z-index: 1; - text-align: center; - -webkit-perspective: 600px; - perspective: 600px; - -webkit-perspective-origin: 50% 40%; - perspective-origin: 50% 40%; -} - -.reveal .slides > section { - -ms-perspective: 600px; -} - -.reveal .slides > section, -.reveal .slides > section > section { - display: none; - position: absolute; - width: 100%; - padding: 20px 0px; - pointer-events: auto; - z-index: 10; - -webkit-transform-style: flat; - transform-style: flat; - transition: -webkit-transform-origin 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985), -webkit-transform 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985), visibility 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985), opacity 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); - transition: transform-origin 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985), transform 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985), visibility 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985), opacity 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); -} - -/* Global transition speed settings */ -.reveal[data-transition-speed="fast"] .slides section { - transition-duration: 400ms; -} - -.reveal[data-transition-speed="slow"] .slides section { - transition-duration: 1200ms; -} - -/* Slide-specific transition speed overrides */ -.reveal .slides section[data-transition-speed="fast"] { - transition-duration: 400ms; -} - -.reveal .slides section[data-transition-speed="slow"] { - transition-duration: 1200ms; -} - -.reveal .slides > section.stack { - padding-top: 0; - padding-bottom: 0; -} - -.reveal .slides > section.present, -.reveal .slides > section > section.present { - display: block; - z-index: 11; - opacity: 1; -} - -.reveal .slides > section:empty, -.reveal .slides > section > section:empty, -.reveal .slides > section[data-background-interactive], -.reveal .slides > section > section[data-background-interactive] { - pointer-events: none; -} - -.reveal.center, -.reveal.center .slides, -.reveal.center .slides section { - min-height: 0 !important; -} - -/* Don't allow interaction with invisible slides */ -.reveal .slides > section.future, -.reveal .slides > section > section.future, -.reveal .slides > section.past, -.reveal .slides > section > section.past { - pointer-events: none; -} - -.reveal.overview .slides > section, -.reveal.overview .slides > section > section { - pointer-events: auto; -} - -.reveal .slides > section.past, -.reveal .slides > section.future, -.reveal .slides > section > section.past, -.reveal .slides > section > section.future { - opacity: 0; -} - -/********************************************* - * Mixins for readability of transitions - *********************************************/ -/********************************************* - * SLIDE TRANSITION - * Aliased 'linear' for backwards compatibility - *********************************************/ -.reveal.slide section { - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} - -.reveal .slides > section[data-transition=slide].past, -.reveal .slides > section[data-transition~=slide-out].past, -.reveal.slide .slides > section:not([data-transition]).past { - -webkit-transform: translate(-150%, 0); - transform: translate(-150%, 0); -} - -.reveal .slides > section[data-transition=slide].future, -.reveal .slides > section[data-transition~=slide-in].future, -.reveal.slide .slides > section:not([data-transition]).future { - -webkit-transform: translate(150%, 0); - transform: translate(150%, 0); -} - -.reveal .slides > section > section[data-transition=slide].past, -.reveal .slides > section > section[data-transition~=slide-out].past, -.reveal.slide .slides > section > section:not([data-transition]).past { - -webkit-transform: translate(0, -150%); - transform: translate(0, -150%); -} - -.reveal .slides > section > section[data-transition=slide].future, -.reveal .slides > section > section[data-transition~=slide-in].future, -.reveal.slide .slides > section > section:not([data-transition]).future { - -webkit-transform: translate(0, 150%); - transform: translate(0, 150%); -} - -.reveal.linear section { - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} - -.reveal .slides > section[data-transition=linear].past, -.reveal .slides > section[data-transition~=linear-out].past, -.reveal.linear .slides > section:not([data-transition]).past { - -webkit-transform: translate(-150%, 0); - transform: translate(-150%, 0); -} - -.reveal .slides > section[data-transition=linear].future, -.reveal .slides > section[data-transition~=linear-in].future, -.reveal.linear .slides > section:not([data-transition]).future { - -webkit-transform: translate(150%, 0); - transform: translate(150%, 0); -} - -.reveal .slides > section > section[data-transition=linear].past, -.reveal .slides > section > section[data-transition~=linear-out].past, -.reveal.linear .slides > section > section:not([data-transition]).past { - -webkit-transform: translate(0, -150%); - transform: translate(0, -150%); -} - -.reveal .slides > section > section[data-transition=linear].future, -.reveal .slides > section > section[data-transition~=linear-in].future, -.reveal.linear .slides > section > section:not([data-transition]).future { - -webkit-transform: translate(0, 150%); - transform: translate(0, 150%); -} - -/********************************************* - * CONVEX TRANSITION - * Aliased 'default' for backwards compatibility - *********************************************/ -.reveal .slides section[data-transition=default].stack, -.reveal.default .slides section.stack { - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -.reveal .slides > section[data-transition=default].past, -.reveal .slides > section[data-transition~=default-out].past, -.reveal.default .slides > section:not([data-transition]).past { - -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); -} - -.reveal .slides > section[data-transition=default].future, -.reveal .slides > section[data-transition~=default-in].future, -.reveal.default .slides > section:not([data-transition]).future { - -webkit-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); -} - -.reveal .slides > section > section[data-transition=default].past, -.reveal .slides > section > section[data-transition~=default-out].past, -.reveal.default .slides > section > section:not([data-transition]).past { - -webkit-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); - transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); -} - -.reveal .slides > section > section[data-transition=default].future, -.reveal .slides > section > section[data-transition~=default-in].future, -.reveal.default .slides > section > section:not([data-transition]).future { - -webkit-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); - transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); -} - -.reveal .slides section[data-transition=convex].stack, -.reveal.convex .slides section.stack { - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -.reveal .slides > section[data-transition=convex].past, -.reveal .slides > section[data-transition~=convex-out].past, -.reveal.convex .slides > section:not([data-transition]).past { - -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); -} - -.reveal .slides > section[data-transition=convex].future, -.reveal .slides > section[data-transition~=convex-in].future, -.reveal.convex .slides > section:not([data-transition]).future { - -webkit-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); -} - -.reveal .slides > section > section[data-transition=convex].past, -.reveal .slides > section > section[data-transition~=convex-out].past, -.reveal.convex .slides > section > section:not([data-transition]).past { - -webkit-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); - transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0); -} - -.reveal .slides > section > section[data-transition=convex].future, -.reveal .slides > section > section[data-transition~=convex-in].future, -.reveal.convex .slides > section > section:not([data-transition]).future { - -webkit-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); - transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0); -} - -/********************************************* - * CONCAVE TRANSITION - *********************************************/ -.reveal .slides section[data-transition=concave].stack, -.reveal.concave .slides section.stack { - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -.reveal .slides > section[data-transition=concave].past, -.reveal .slides > section[data-transition~=concave-out].past, -.reveal.concave .slides > section:not([data-transition]).past { - -webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0); -} - -.reveal .slides > section[data-transition=concave].future, -.reveal .slides > section[data-transition~=concave-in].future, -.reveal.concave .slides > section:not([data-transition]).future { - -webkit-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0); -} - -.reveal .slides > section > section[data-transition=concave].past, -.reveal .slides > section > section[data-transition~=concave-out].past, -.reveal.concave .slides > section > section:not([data-transition]).past { - -webkit-transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0); - transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0); -} - -.reveal .slides > section > section[data-transition=concave].future, -.reveal .slides > section > section[data-transition~=concave-in].future, -.reveal.concave .slides > section > section:not([data-transition]).future { - -webkit-transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0); - transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0); -} - -/********************************************* - * ZOOM TRANSITION - *********************************************/ -.reveal .slides section[data-transition=zoom], -.reveal.zoom .slides section:not([data-transition]) { - transition-timing-function: ease; -} - -.reveal .slides > section[data-transition=zoom].past, -.reveal .slides > section[data-transition~=zoom-out].past, -.reveal.zoom .slides > section:not([data-transition]).past { - visibility: hidden; - -webkit-transform: scale(16); - transform: scale(16); -} - -.reveal .slides > section[data-transition=zoom].future, -.reveal .slides > section[data-transition~=zoom-in].future, -.reveal.zoom .slides > section:not([data-transition]).future { - visibility: hidden; - -webkit-transform: scale(0.2); - transform: scale(0.2); -} - -.reveal .slides > section > section[data-transition=zoom].past, -.reveal .slides > section > section[data-transition~=zoom-out].past, -.reveal.zoom .slides > section > section:not([data-transition]).past { - -webkit-transform: translate(0, -150%); - transform: translate(0, -150%); -} - -.reveal .slides > section > section[data-transition=zoom].future, -.reveal .slides > section > section[data-transition~=zoom-in].future, -.reveal.zoom .slides > section > section:not([data-transition]).future { - -webkit-transform: translate(0, 150%); - transform: translate(0, 150%); -} - -/********************************************* - * CUBE TRANSITION - * - * WARNING: - * this is deprecated and will be removed in a - * future version. - *********************************************/ -.reveal.cube .slides { - -webkit-perspective: 1300px; - perspective: 1300px; -} - -.reveal.cube .slides section { - padding: 30px; - min-height: 700px; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - box-sizing: border-box; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -.reveal.center.cube .slides section { - min-height: 0; -} - -.reveal.cube .slides section:not(.stack):before { - content: ''; - position: absolute; - display: block; - width: 100%; - height: 100%; - left: 0; - top: 0; - background: rgba(0, 0, 0, 0.1); - border-radius: 4px; - -webkit-transform: translateZ(-20px); - transform: translateZ(-20px); -} - -.reveal.cube .slides section:not(.stack):after { - content: ''; - position: absolute; - display: block; - width: 90%; - height: 30px; - left: 5%; - bottom: 0; - background: none; - z-index: 1; - border-radius: 4px; - box-shadow: 0px 95px 25px rgba(0, 0, 0, 0.2); - -webkit-transform: translateZ(-90px) rotateX(65deg); - transform: translateZ(-90px) rotateX(65deg); -} - -.reveal.cube .slides > section.stack { - padding: 0; - background: none; -} - -.reveal.cube .slides > section.past { - -webkit-transform-origin: 100% 0%; - transform-origin: 100% 0%; - -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg); - transform: translate3d(-100%, 0, 0) rotateY(-90deg); -} - -.reveal.cube .slides > section.future { - -webkit-transform-origin: 0% 0%; - transform-origin: 0% 0%; - -webkit-transform: translate3d(100%, 0, 0) rotateY(90deg); - transform: translate3d(100%, 0, 0) rotateY(90deg); -} - -.reveal.cube .slides > section > section.past { - -webkit-transform-origin: 0% 100%; - transform-origin: 0% 100%; - -webkit-transform: translate3d(0, -100%, 0) rotateX(90deg); - transform: translate3d(0, -100%, 0) rotateX(90deg); -} - -.reveal.cube .slides > section > section.future { - -webkit-transform-origin: 0% 0%; - transform-origin: 0% 0%; - -webkit-transform: translate3d(0, 100%, 0) rotateX(-90deg); - transform: translate3d(0, 100%, 0) rotateX(-90deg); -} - -/********************************************* - * PAGE TRANSITION - * - * WARNING: - * this is deprecated and will be removed in a - * future version. - *********************************************/ -.reveal.page .slides { - -webkit-perspective-origin: 0% 50%; - perspective-origin: 0% 50%; - -webkit-perspective: 3000px; - perspective: 3000px; -} - -.reveal.page .slides section { - padding: 30px; - min-height: 700px; - box-sizing: border-box; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; -} - -.reveal.page .slides section.past { - z-index: 12; -} - -.reveal.page .slides section:not(.stack):before { - content: ''; - position: absolute; - display: block; - width: 100%; - height: 100%; - left: 0; - top: 0; - background: rgba(0, 0, 0, 0.1); - -webkit-transform: translateZ(-20px); - transform: translateZ(-20px); -} - -.reveal.page .slides section:not(.stack):after { - content: ''; - position: absolute; - display: block; - width: 90%; - height: 30px; - left: 5%; - bottom: 0; - background: none; - z-index: 1; - border-radius: 4px; - box-shadow: 0px 95px 25px rgba(0, 0, 0, 0.2); - -webkit-transform: translateZ(-90px) rotateX(65deg); -} - -.reveal.page .slides > section.stack { - padding: 0; - background: none; -} - -.reveal.page .slides > section.past { - -webkit-transform-origin: 0% 0%; - transform-origin: 0% 0%; - -webkit-transform: translate3d(-40%, 0, 0) rotateY(-80deg); - transform: translate3d(-40%, 0, 0) rotateY(-80deg); -} - -.reveal.page .slides > section.future { - -webkit-transform-origin: 100% 0%; - transform-origin: 100% 0%; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); -} - -.reveal.page .slides > section > section.past { - -webkit-transform-origin: 0% 0%; - transform-origin: 0% 0%; - -webkit-transform: translate3d(0, -40%, 0) rotateX(80deg); - transform: translate3d(0, -40%, 0) rotateX(80deg); -} - -.reveal.page .slides > section > section.future { - -webkit-transform-origin: 0% 100%; - transform-origin: 0% 100%; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); -} - -/********************************************* - * FADE TRANSITION - *********************************************/ -.reveal .slides section[data-transition=fade], -.reveal.fade .slides section:not([data-transition]), -.reveal.fade .slides > section > section:not([data-transition]) { - -webkit-transform: none; - transform: none; - transition: opacity 0.5s; -} - -.reveal.fade.overview .slides section, -.reveal.fade.overview .slides > section > section { - transition: none; -} - -/********************************************* - * NO TRANSITION - *********************************************/ -.reveal .slides section[data-transition=none], -.reveal.none .slides section:not([data-transition]) { - -webkit-transform: none; - transform: none; - transition: none; -} - -/********************************************* - * PAUSED MODE - *********************************************/ -.reveal .pause-overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: black; - visibility: hidden; - opacity: 0; - z-index: 100; - transition: all 1s ease; -} - -.reveal.paused .pause-overlay { - visibility: visible; - opacity: 1; -} - -/********************************************* - * FALLBACK - *********************************************/ -.no-transforms { - overflow-y: auto; -} - -.no-transforms .reveal .slides { - position: relative; - width: 80%; - height: auto !important; - top: 0; - left: 50%; - margin: 0; - text-align: center; -} - -.no-transforms .reveal .controls, -.no-transforms .reveal .progress { - display: none !important; -} - -.no-transforms .reveal .slides section { - display: block !important; - opacity: 1 !important; - position: relative !important; - height: auto; - min-height: 0; - top: 0; - left: -50%; - margin: 70px 0; - -webkit-transform: none; - transform: none; -} - -.no-transforms .reveal .slides section section { - left: 0; -} - -.reveal .no-transition, -.reveal .no-transition * { - transition: none !important; -} - -/********************************************* - * PER-SLIDE BACKGROUNDS - *********************************************/ -.reveal .backgrounds { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - -webkit-perspective: 600px; - perspective: 600px; -} - -.reveal .slide-background { - display: none; - position: absolute; - width: 100%; - height: 100%; - opacity: 0; - visibility: hidden; - overflow: hidden; - background-color: transparent; - background-position: 50% 50%; - background-repeat: no-repeat; - background-size: cover; - transition: all 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); -} - -.reveal .slide-background.stack { - display: block; -} - -.reveal .slide-background.present { - opacity: 1; - visibility: visible; - z-index: 2; -} - -.print-pdf .reveal .slide-background { - opacity: 1 !important; - visibility: visible !important; -} - -/* Video backgrounds */ -.reveal .slide-background video { - position: absolute; - width: 100%; - height: 100%; - max-width: none; - max-height: none; - top: 0; - left: 0; - -o-object-fit: cover; - object-fit: cover; -} - -.reveal .slide-background[data-background-size="contain"] video { - -o-object-fit: contain; - object-fit: contain; -} - -/* Immediate transition style */ -.reveal[data-background-transition=none] > .backgrounds .slide-background, -.reveal > .backgrounds .slide-background[data-background-transition=none] { - transition: none; -} - -/* Slide */ -.reveal[data-background-transition=slide] > .backgrounds .slide-background, -.reveal > .backgrounds .slide-background[data-background-transition=slide] { - opacity: 1; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} - -.reveal[data-background-transition=slide] > .backgrounds .slide-background.past, -.reveal > .backgrounds .slide-background.past[data-background-transition=slide] { - -webkit-transform: translate(-100%, 0); - transform: translate(-100%, 0); -} - -.reveal[data-background-transition=slide] > .backgrounds .slide-background.future, -.reveal > .backgrounds .slide-background.future[data-background-transition=slide] { - -webkit-transform: translate(100%, 0); - transform: translate(100%, 0); -} - -.reveal[data-background-transition=slide] > .backgrounds .slide-background > .slide-background.past, -.reveal > .backgrounds .slide-background > .slide-background.past[data-background-transition=slide] { - -webkit-transform: translate(0, -100%); - transform: translate(0, -100%); -} - -.reveal[data-background-transition=slide] > .backgrounds .slide-background > .slide-background.future, -.reveal > .backgrounds .slide-background > .slide-background.future[data-background-transition=slide] { - -webkit-transform: translate(0, 100%); - transform: translate(0, 100%); -} - -/* Convex */ -.reveal[data-background-transition=convex] > .backgrounds .slide-background.past, -.reveal > .backgrounds .slide-background.past[data-background-transition=convex] { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0); -} - -.reveal[data-background-transition=convex] > .backgrounds .slide-background.future, -.reveal > .backgrounds .slide-background.future[data-background-transition=convex] { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0); -} - -.reveal[data-background-transition=convex] > .backgrounds .slide-background > .slide-background.past, -.reveal > .backgrounds .slide-background > .slide-background.past[data-background-transition=convex] { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0) rotateX(90deg) translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0) rotateX(90deg) translate3d(0, -100%, 0); -} - -.reveal[data-background-transition=convex] > .backgrounds .slide-background > .slide-background.future, -.reveal > .backgrounds .slide-background > .slide-background.future[data-background-transition=convex] { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0) rotateX(-90deg) translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0) rotateX(-90deg) translate3d(0, 100%, 0); -} - -/* Concave */ -.reveal[data-background-transition=concave] > .backgrounds .slide-background.past, -.reveal > .backgrounds .slide-background.past[data-background-transition=concave] { - opacity: 0; - -webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0); -} - -.reveal[data-background-transition=concave] > .backgrounds .slide-background.future, -.reveal > .backgrounds .slide-background.future[data-background-transition=concave] { - opacity: 0; - -webkit-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0); -} - -.reveal[data-background-transition=concave] > .backgrounds .slide-background > .slide-background.past, -.reveal > .backgrounds .slide-background > .slide-background.past[data-background-transition=concave] { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0) rotateX(-90deg) translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0) rotateX(-90deg) translate3d(0, -100%, 0); -} - -.reveal[data-background-transition=concave] > .backgrounds .slide-background > .slide-background.future, -.reveal > .backgrounds .slide-background > .slide-background.future[data-background-transition=concave] { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0) rotateX(90deg) translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0) rotateX(90deg) translate3d(0, 100%, 0); -} - -/* Zoom */ -.reveal[data-background-transition=zoom] > .backgrounds .slide-background, -.reveal > .backgrounds .slide-background[data-background-transition=zoom] { - transition-timing-function: ease; -} - -.reveal[data-background-transition=zoom] > .backgrounds .slide-background.past, -.reveal > .backgrounds .slide-background.past[data-background-transition=zoom] { - opacity: 0; - visibility: hidden; - -webkit-transform: scale(16); - transform: scale(16); -} - -.reveal[data-background-transition=zoom] > .backgrounds .slide-background.future, -.reveal > .backgrounds .slide-background.future[data-background-transition=zoom] { - opacity: 0; - visibility: hidden; - -webkit-transform: scale(0.2); - transform: scale(0.2); -} - -.reveal[data-background-transition=zoom] > .backgrounds .slide-background > .slide-background.past, -.reveal > .backgrounds .slide-background > .slide-background.past[data-background-transition=zoom] { - opacity: 0; - visibility: hidden; - -webkit-transform: scale(16); - transform: scale(16); -} - -.reveal[data-background-transition=zoom] > .backgrounds .slide-background > .slide-background.future, -.reveal > .backgrounds .slide-background > .slide-background.future[data-background-transition=zoom] { - opacity: 0; - visibility: hidden; - -webkit-transform: scale(0.2); - transform: scale(0.2); -} - -/* Global transition speed settings */ -.reveal[data-transition-speed="fast"] > .backgrounds .slide-background { - transition-duration: 400ms; -} - -.reveal[data-transition-speed="slow"] > .backgrounds .slide-background { - transition-duration: 1200ms; -} - -/********************************************* - * OVERVIEW - *********************************************/ -.reveal.overview { - -webkit-perspective-origin: 50% 50%; - perspective-origin: 50% 50%; - -webkit-perspective: 700px; - perspective: 700px; -} - -.reveal.overview .slides { - -moz-transform-style: preserve-3d; -} - -.reveal.overview .slides section { - height: 100%; - top: 0 !important; - opacity: 1 !important; - overflow: hidden; - visibility: visible !important; - cursor: pointer; - box-sizing: border-box; -} - -.reveal.overview .slides section:hover, -.reveal.overview .slides section.present { - outline: 10px solid rgba(150, 150, 150, 0.4); - outline-offset: 10px; -} - -.reveal.overview .slides section .fragment { - opacity: 1; - transition: none; -} - -.reveal.overview .slides section:after, -.reveal.overview .slides section:before { - display: none !important; -} - -.reveal.overview .slides > section.stack { - padding: 0; - top: 0 !important; - background: none; - outline: none; - overflow: visible; -} - -.reveal.overview .backgrounds { - -webkit-perspective: inherit; - perspective: inherit; - -moz-transform-style: preserve-3d; -} - -.reveal.overview .backgrounds .slide-background { - opacity: 1; - visibility: visible; - outline: 10px solid rgba(150, 150, 150, 0.1); - outline-offset: 10px; -} - -.reveal.overview .backgrounds .slide-background.stack { - overflow: visible; -} - -.reveal.overview .slides section, -.reveal.overview-deactivating .slides section { - transition: none; -} - -.reveal.overview .backgrounds .slide-background, -.reveal.overview-deactivating .backgrounds .slide-background { - transition: none; -} - -/********************************************* - * RTL SUPPORT - *********************************************/ -.reveal.rtl .slides, -.reveal.rtl .slides h1, -.reveal.rtl .slides h2, -.reveal.rtl .slides h3, -.reveal.rtl .slides h4, -.reveal.rtl .slides h5, -.reveal.rtl .slides h6 { - direction: rtl; - font-family: sans-serif; -} - -.reveal.rtl pre, -.reveal.rtl code { - direction: ltr; -} - -.reveal.rtl ol, -.reveal.rtl ul { - text-align: right; -} - -.reveal.rtl .progress span { - float: right; -} - -/********************************************* - * PARALLAX BACKGROUND - *********************************************/ -.reveal.has-parallax-background .backgrounds { - transition: all 0.8s ease; -} - -/* Global transition speed settings */ -.reveal.has-parallax-background[data-transition-speed="fast"] .backgrounds { - transition-duration: 400ms; -} - -.reveal.has-parallax-background[data-transition-speed="slow"] .backgrounds { - transition-duration: 1200ms; -} - -/********************************************* - * LINK PREVIEW OVERLAY - *********************************************/ -.reveal .overlay { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 1000; - background: rgba(0, 0, 0, 0.9); - opacity: 0; - visibility: hidden; - transition: all 0.3s ease; -} - -.reveal .overlay.visible { - opacity: 1; - visibility: visible; -} - -.reveal .overlay .spinner { - position: absolute; - display: block; - top: 50%; - left: 50%; - width: 32px; - height: 32px; - margin: -16px 0 0 -16px; - z-index: 10; - background-image: url(data:image/gif;base64,R0lGODlhIAAgAPMAAJmZmf%2F%2F%2F6%2Bvr8nJybW1tcDAwOjo6Nvb26ioqKOjo7Ozs%2FLy8vz8%2FAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2FhpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh%2BQQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ%2FV%2FnmOM82XiHRLYKhKP1oZmADdEAAAh%2BQQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY%2FCZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB%2BA4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6%2BHo7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq%2BB6QDtuetcaBPnW6%2BO7wDHpIiK9SaVK5GgV543tzjgGcghAgAh%2BQQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK%2B%2BG%2Bw48edZPK%2BM6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE%2BG%2BcD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm%2BFNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk%2BaV%2BoJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0%2FVNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc%2BXiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30%2FiI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE%2FjiuL04RGEBgwWhShRgQExHBAAh%2BQQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR%2BipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY%2BYip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd%2BMFCN6HAAIKgNggY0KtEBAAh%2BQQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1%2BvsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d%2BjYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg%2BygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0%2Bbm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h%2BKr0SJ8MFihpNbx%2B4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX%2BBP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA%3D%3D); - visibility: visible; - opacity: 0.6; - transition: all 0.3s ease; -} - -.reveal .overlay header { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 40px; - z-index: 2; - border-bottom: 1px solid #222; -} - -.reveal .overlay header a { - display: inline-block; - width: 40px; - height: 40px; - line-height: 36px; - padding: 0 10px; - float: right; - opacity: 0.6; - box-sizing: border-box; -} - -.reveal .overlay header a:hover { - opacity: 1; -} - -.reveal .overlay header a .icon { - display: inline-block; - width: 20px; - height: 20px; - background-position: 50% 50%; - background-size: 100%; - background-repeat: no-repeat; -} - -.reveal .overlay header a.close .icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC); -} - -.reveal .overlay header a.external .icon { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==); -} - -.reveal .overlay .viewport { - position: absolute; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - top: 40px; - right: 0; - bottom: 0; - left: 0; -} - -.reveal .overlay.overlay-preview .viewport iframe { - width: 100%; - height: 100%; - max-width: 100%; - max-height: 100%; - border: 0; - opacity: 0; - visibility: hidden; - transition: all 0.3s ease; -} - -.reveal .overlay.overlay-preview.loaded .viewport iframe { - opacity: 1; - visibility: visible; -} - -.reveal .overlay.overlay-preview.loaded .viewport-inner { - position: absolute; - z-index: -1; - left: 0; - top: 45%; - width: 100%; - text-align: center; - letter-spacing: normal; -} - -.reveal .overlay.overlay-preview .x-frame-error { - opacity: 0; - transition: opacity 0.3s ease 0.3s; -} - -.reveal .overlay.overlay-preview.loaded .x-frame-error { - opacity: 1; -} - -.reveal .overlay.overlay-preview.loaded .spinner { - opacity: 0; - visibility: hidden; - -webkit-transform: scale(0.2); - transform: scale(0.2); -} - -.reveal .overlay.overlay-help .viewport { - overflow: auto; - color: #fff; -} - -.reveal .overlay.overlay-help .viewport .viewport-inner { - width: 600px; - margin: auto; - padding: 20px 20px 80px 20px; - text-align: center; - letter-spacing: normal; -} - -.reveal .overlay.overlay-help .viewport .viewport-inner .title { - font-size: 20px; -} - -.reveal .overlay.overlay-help .viewport .viewport-inner table { - border: 1px solid #fff; - border-collapse: collapse; - font-size: 16px; -} - -.reveal .overlay.overlay-help .viewport .viewport-inner table th, -.reveal .overlay.overlay-help .viewport .viewport-inner table td { - width: 200px; - padding: 14px; - border: 1px solid #fff; - vertical-align: middle; -} - -.reveal .overlay.overlay-help .viewport .viewport-inner table th { - padding-top: 20px; - padding-bottom: 20px; -} - -/********************************************* - * PLAYBACK COMPONENT - *********************************************/ -.reveal .playback { - position: absolute; - left: 15px; - bottom: 20px; - z-index: 30; - cursor: pointer; - transition: all 400ms ease; - -webkit-tap-highlight-color: transparent; -} - -.reveal.overview .playback { - opacity: 0; - visibility: hidden; -} - -/********************************************* - * ROLLING LINKS - *********************************************/ -.reveal .roll { - display: inline-block; - line-height: 1.2; - overflow: hidden; - vertical-align: top; - -webkit-perspective: 400px; - perspective: 400px; - -webkit-perspective-origin: 50% 50%; - perspective-origin: 50% 50%; -} - -.reveal .roll:hover { - background: none; - text-shadow: none; -} - -.reveal .roll span { - display: block; - position: relative; - padding: 0 2px; - pointer-events: none; - transition: all 400ms ease; - -webkit-transform-origin: 50% 0%; - transform-origin: 50% 0%; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} - -.reveal .roll:hover span { - background: rgba(0, 0, 0, 0.5); - -webkit-transform: translate3d(0px, 0px, -45px) rotateX(90deg); - transform: translate3d(0px, 0px, -45px) rotateX(90deg); -} - -.reveal .roll span:after { - content: attr(data-title); - display: block; - position: absolute; - left: 0; - top: 0; - padding: 0 2px; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-transform-origin: 50% 0%; - transform-origin: 50% 0%; - -webkit-transform: translate3d(0px, 110%, 0px) rotateX(-90deg); - transform: translate3d(0px, 110%, 0px) rotateX(-90deg); -} - -/********************************************* - * SPEAKER NOTES - *********************************************/ -.reveal aside.notes { - display: none; -} - -.reveal .speaker-notes { - display: none; - position: absolute; - width: 25vw; - height: 100%; - top: 0; - left: 100%; - padding: 14px 18px 14px 18px; - z-index: 1; - font-size: 18px; - line-height: 1.4; - border: 1px solid rgba(0, 0, 0, 0.05); - color: #222; - background-color: #f5f5f5; - overflow: auto; - box-sizing: border-box; - text-align: left; - font-family: Helvetica, sans-serif; - -webkit-overflow-scrolling: touch; -} - -.reveal .speaker-notes .notes-placeholder { - color: #ccc; - font-style: italic; -} - -.reveal .speaker-notes:focus { - outline: none; -} - -.reveal .speaker-notes:before { - content: 'Speaker notes'; - display: block; - margin-bottom: 10px; - opacity: 0.5; -} - -.reveal.show-notes { - max-width: 75vw; - overflow: visible; -} - -.reveal.show-notes .speaker-notes { - display: block; -} - -@media screen and (min-width: 1600px) { - .reveal .speaker-notes { - font-size: 20px; - } -} - -@media screen and (max-width: 1024px) { - .reveal.show-notes { - border-left: 0; - max-width: none; - max-height: 70%; - overflow: visible; - } - - .reveal.show-notes .speaker-notes { - top: 100%; - left: 0; - width: 100%; - height: 42.8571428571%; - } -} - -@media screen and (max-width: 600px) { - .reveal.show-notes { - max-height: 60%; - } - - .reveal.show-notes .speaker-notes { - top: 100%; - height: 66.6666666667%; - } - - .reveal .speaker-notes { - font-size: 14px; - } -} - -/********************************************* - * ZOOM PLUGIN - *********************************************/ -.zoomed .reveal *, -.zoomed .reveal *:before, -.zoomed .reveal *:after { - -webkit-backface-visibility: visible !important; - backface-visibility: visible !important; -} - -.zoomed .reveal .progress, -.zoomed .reveal .controls { - opacity: 0; -} - -.zoomed .reveal .roll span { - background: none; -} - -.zoomed .reveal .roll span:after { - visibility: hidden; -} diff --git a/site/static/slides/css/theme/hawkBit.css b/site/static/slides/css/theme/hawkBit.css deleted file mode 100644 index 7d3af42bc..000000000 --- a/site/static/slides/css/theme/hawkBit.css +++ /dev/null @@ -1,377 +0,0 @@ -/********************************************* - * GLOBAL STYLES - *********************************************/ -body { - border-left: 0px solid #ffffff; - overflow: auto; - background-color: white; - background-position: center bottom; - background-repeat: no-repeat; - background-size: 100% 17px; - font-family: Helvetica, Arial, sans-serif; - font-weight: normal; - color: #2e3032 -} - -.header { - position: relative; - top: 5px; - right: 20px; -} - -.footer { - font-size: 10px !Important; - font-family: Helvetica, Arial, sans-serif; - color: #687175; - position: absolute; - bottom: 20px; - left: 15px; - margin-bottom: 10px -} - -.footer a { - color: #003b6a; - text-decoration: none; -} - -.reveal { - font-family: Helvetica, Arial, sans-serif; - font-size: 25px; - font-weight: normal; - color: #551f62; - d -} - -.reveal .controls { - margin-bottom: 10px -} - -.reveal .slide-number { - margin-bottom: 10px -} - -::selection { - color: #fff; - background: #98bdef; - text-shadow: none; -} - -.reveal .slides > section, .reveal .slides > section > section { - line-height: 1.1; - font-weight: inherit; - text-align: left; - /* padding-bottom: 25px; */ -} - -/********************************************* - * HEADERS - *********************************************/ -.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 { - margin: 0 0 20px 0; - font-family: Helvetica, Arial, sans-serif; - font-weight: 100; - line-height: 1.0; - padding-bottom: 15px; - letter-spacing: normal; - text-shadow: none; - word-wrap: break-word; -} - -.reveal h1 { - font-size: 3.1em; - text-shadow: none; -} - -.reveal h2 { - margin-top: 15px; - font-size: 1.6em; -} - -.reveal h3 { - font-size: 1.2em; -} - -.reveal h4 { - font-size: 1.0em; - color: #000; -} - -/********************************************* - * OTHER - *********************************************/ - - -.reveal .intro { - color: #551f62; -} - -.noborder img { - border: none !Important; - box-shadow: none !Important; - background: none !Important; -} - -.intro { - color: #551f62; - position: relative; - top: 250px; - left: 0px; -} - -.reveal p { - margin: 20px 0; - line-height: 1.3; -} - -/* Ensure certain elements are never larger than the slide itself */ -.reveal img, .reveal video, .reveal iframe { - max-width: 80%; - max-height: 80% -} - -.reveal strong, .reveal b { - font-weight: bold; -} - -.reveal em { - font-style: italic; -} - -.reveal ol, .reveal dl, .reveal ul { - display: inline-block; - text-align: left; - margin: 0 0 0 1em; -} - -.reveal ol { - list-style-type: decimal; -} - -.reveal ul { - list-style-type: disc; - /* margin-top: -15px; - margin-bottom: 20px; */ -} - -.reveal ul ul { - list-style-type: disc; - margin-top: 0px; -} - -.reveal ul ul ul { - list-style-type: disc; - margin-top: 0px; -} - -.reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul { - display: block; - margin-left: 40px; -} - -.reveal dt { - font-weight: bold; -} - -.reveal dd { - margin-left: 40px; -} - -.reveal q, .reveal blockquote { - quotes: none; -} - -.reveal blockquote { - display: block; - position: relative; - width: 70%; - margin: 20px auto; - padding: 5px; - font-style: italic; - background: rgba(255, 255, 255, 0.05); - box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); -} - -.reveal blockquote p:first-child, .reveal blockquote p:last-child { - display: inline-block; -} - -.reveal q { - font-style: italic; -} - -.reveal pre { - display: block; - position: relative; - width: 90%; - margin: 20px auto; - text-align: left; - font-size: 0.55em; - font-family: monospace; - line-height: 1.2em; - word-wrap: break-word; - box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); -} - -.reveal code { - font-family: monospace; -} - -.reveal pre code { - display: block; - padding: 5px; - overflow: auto; - max-height: 400px; - word-wrap: normal; - background: #3F3F3F; - color: #DCDCDC; -} - -.reveal table { - margin: auto; - border-collapse: collapse; - border-spacing: 0; -} - -.reveal table th { - font-weight: bold; -} - -.reveal table th, .reveal table td { - text-align: left; - padding: 0.2em 0.5em 0.2em 0.5em; - border-bottom: 1px solid; -} - -.reveal table th[align="center"], .reveal table td[align="center"] { - text-align: center; -} - -.reveal table th[align="right"], .reveal table td[align="right"] { - text-align: right; -} - -.reveal table tr:last-child td { - border-bottom: none; -} - -.reveal sup { - vertical-align: super; -} - -.reveal sub { - vertical-align: sub; -} - -.reveal small { - display: inline-block; - font-size: 0.6em; - line-height: 1.2em; - vertical-align: top; -} - -.reveal small * { - vertical-align: top; -} - -/********************************************* - * LINKS - *********************************************/ -.reveal a { - color: #6eb553; - text-decoration: none; - -webkit-transition: color 0.15s ease; - -moz-transition: color 0.15s ease; - transition: color 0.15s ease; -} - -.reveal a:hover { - color: #6eb553; - text-shadow: none; - border: none; -} - -.reveal .roll span:after { - color: #fff; - background: #1a54a1; -} - -/********************************************* - * IMAGES - *********************************************/ -.reveal section img { - margin: 15px 0px; - background: rgba(255, 255, 255, 0.12); - border: 1px solid #fff; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); - display: block; - margin-left: auto; - margin-right: auto; -} - -.reveal a img { - -webkit-transition: all 0.15s linear; - -moz-transition: all 0.15s linear; - transition: all 0.15s linear; -} - -.reveal a:hover img { - background: rgba(255, 255, 255, 0.2); - border-color: #6eb553; - box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); -} - -/********************************************* - * NAVIGATION CONTROLS - *********************************************/ -.reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled { - border-right-color: #6eb553; -} - -.reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled { - border-left-color: #6eb553; -} - -.reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled { - border-bottom-color: #6eb553; -} - -.reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled { - border-top-color: #6eb553; -} - -.reveal .controls div.navigate-left.enabled:hover { - border-right-color: #6eb553; -} - -.reveal .controls div.navigate-right.enabled:hover { - border-left-color: #6eb553; -} - -.reveal .controls div.navigate-up.enabled:hover { - border-bottom-color: #6eb553; -} - -.reveal .controls div.navigate-down.enabled:hover { - border-top-color: #6eb553; -} - -/********************************************* - * PROGRESS BAR - *********************************************/ -.reveal .progress { - background: rgba(0, 0, 0, 0.2); -} - -.reveal .progress span { - background: #003b6a; - -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); - -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); - transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); -} - -/********************************************* - * SLIDE NUMBER - *********************************************/ -.reveal .slide-number { - color: #003b6a; -} diff --git a/site/static/slides/js/reveal.js b/site/static/slides/js/reveal.js deleted file mode 100755 index eeec02eaf..000000000 --- a/site/static/slides/js/reveal.js +++ /dev/null @@ -1,5292 +0,0 @@ -/*! - * reveal.js - * http://revealjs.com - * MIT licensed - * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se - */ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(function () { - root.Reveal = factory(); - return root.Reveal; - }); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS. - module.exports = factory(); - } else { - // Browser globals. - root.Reveal = factory(); - } -}(this, function () { - - 'use strict'; - - var Reveal; - - // The reveal.js version - var VERSION = '3.6.0'; - - var SLIDES_SELECTOR = '.slides section', - HORIZONTAL_SLIDES_SELECTOR = '.slides>section', - VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section', - HOME_SLIDE_SELECTOR = '.slides>section:first-of-type', - UA = navigator.userAgent, - - // Configuration defaults, can be overridden at initialization time - config = { - - // The "normal" size of the presentation, aspect ratio will be preserved - // when the presentation is scaled to fit different resolutions - width: 960, - height: 700, - - // Factor of the display size that should remain empty around the content - margin: 0.04, - - // Bounds for smallest/largest possible scale to apply to content - minScale: 0.2, - maxScale: 2.0, - - // Display presentation control arrows - controls: true, - - // Help the user learn the controls by providing hints, for example by - // bouncing the down arrow when they first encounter a vertical slide - controlsTutorial: true, - - // Determines where controls appear, "edges" or "bottom-right" - controlsLayout: 'bottom-right', - - // Visibility rule for backwards navigation arrows; "faded", "hidden" - // or "visible" - controlsBackArrows: 'faded', - - // Display a presentation progress bar - progress: true, - - // Display the page number of the current slide - slideNumber: false, - - // Determine which displays to show the slide number on - showSlideNumber: 'all', - - // Push each slide change to the browser history - history: false, - - // Enable keyboard shortcuts for navigation - keyboard: true, - - // Optional function that blocks keyboard events when retuning false - keyboardCondition: null, - - // Enable the slide overview mode - overview: true, - - // Vertical centering of slides - center: true, - - // Enables touch navigation on devices with touch input - touch: true, - - // Loop the presentation - loop: false, - - // Change the presentation direction to be RTL - rtl: false, - - // Randomizes the order of slides each time the presentation loads - shuffle: false, - - // Turns fragments on and off globally - fragments: true, - - // Flags if the presentation is running in an embedded mode, - // i.e. contained within a limited portion of the screen - embedded: false, - - // Flags if we should show a help overlay when the question-mark - // key is pressed - help: true, - - // Flags if it should be possible to pause the presentation (blackout) - pause: true, - - // Flags if speaker notes should be visible to all viewers - showNotes: false, - - // Global override for autolaying embedded media (video/audio/iframe) - // - null: Media will only autoplay if data-autoplay is present - // - true: All media will autoplay, regardless of individual setting - // - false: No media will autoplay, regardless of individual setting - autoPlayMedia: null, - - // Controls automatic progression to the next slide - // - 0: Auto-sliding only happens if the data-autoslide HTML attribute - // is present on the current slide or fragment - // - 1+: All slides will progress automatically at the given interval - // - false: No auto-sliding, even if data-autoslide is present - autoSlide: 0, - - // Stop auto-sliding after user input - autoSlideStoppable: true, - - // Use this method for navigation when auto-sliding (defaults to navigateNext) - autoSlideMethod: null, - - // Enable slide navigation via mouse wheel - mouseWheel: false, - - // Apply a 3D roll to links on hover - rollingLinks: false, - - // Hides the address bar on mobile devices - hideAddressBar: true, - - // Opens links in an iframe preview overlay - previewLinks: false, - - // Exposes the reveal.js API through window.postMessage - postMessage: true, - - // Dispatches all reveal.js events to the parent window through postMessage - postMessageEvents: false, - - // Focuses body when page changes visibility to ensure keyboard shortcuts work - focusBodyOnPageVisibilityChange: true, - - // Transition style - transition: 'slide', // none/fade/slide/convex/concave/zoom - - // Transition speed - transitionSpeed: 'default', // default/fast/slow - - // Transition style for full page slide backgrounds - backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom - - // Parallax background image - parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg" - - // Parallax background size - parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px" - - // Amount of pixels to move the parallax background per slide step - parallaxBackgroundHorizontal: null, - parallaxBackgroundVertical: null, - - // The maximum number of pages a single slide can expand onto when printing - // to PDF, unlimited by default - pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY, - - // Offset used to reduce the height of content within exported PDF pages. - // This exists to account for environment differences based on how you - // print to PDF. CLI printing options, like phantomjs and wkpdf, can end - // on precisely the total height of the document whereas in-browser - // printing has to end one pixel before. - pdfPageHeightOffset: -1, - - // Number of slides away from the current that are visible - viewDistance: 3, - - // The display mode that will be used to show slides - display: 'block', - - // Script dependencies to load - dependencies: [] - - }, - - // Flags if Reveal.initialize() has been called - initialized = false, - - // Flags if reveal.js is loaded (has dispatched the 'ready' event) - loaded = false, - - // Flags if the overview mode is currently active - overview = false, - - // Holds the dimensions of our overview slides, including margins - overviewSlideWidth = null, - overviewSlideHeight = null, - - // The horizontal and vertical index of the currently active slide - indexh, - indexv, - - // The previous and current slide HTML elements - previousSlide, - currentSlide, - - previousBackground, - - // Remember which directions that the user has navigated towards - hasNavigatedRight = false, - hasNavigatedDown = false, - - // Slides may hold a data-state attribute which we pick up and apply - // as a class to the body. This list contains the combined state of - // all current slides. - state = [], - - // The current scale of the presentation (see width/height config) - scale = 1, - - // CSS transform that is currently applied to the slides container, - // split into two groups - slidesTransform = {layout: '', overview: ''}, - - // Cached references to DOM elements - dom = {}, - - // Features supported by the browser, see #checkCapabilities() - features = {}, - - // Client is a mobile device, see #checkCapabilities() - isMobileDevice, - - // Client is a desktop Chrome, see #checkCapabilities() - isChrome, - - // Throttles mouse wheel navigation - lastMouseWheelStep = 0, - - // Delays updates to the URL due to a Chrome thumbnailer bug - writeURLTimeout = 0, - - // Flags if the interaction event listeners are bound - eventsAreBound = false, - - // The current auto-slide duration - autoSlide = 0, - - // Auto slide properties - autoSlidePlayer, - autoSlideTimeout = 0, - autoSlideStartTime = -1, - autoSlidePaused = false, - - // Holds information about the currently ongoing touch input - touch = { - startX: 0, - startY: 0, - startSpan: 0, - startCount: 0, - captured: false, - threshold: 40 - }, - - // Holds information about the keyboard shortcuts - keyboardShortcuts = { - 'N , SPACE': 'Next slide', - 'P': 'Previous slide', - '← , H': 'Navigate left', - '→ , L': 'Navigate right', - '↑ , K': 'Navigate up', - '↓ , J': 'Navigate down', - 'Home': 'First slide', - 'End': 'Last slide', - 'B , .': 'Pause', - 'F': 'Fullscreen', - 'ESC, O': 'Slide overview' - }; - - /** - * Starts up the presentation if the client is capable. - */ - function initialize(options) { - - // Make sure we only initialize once - if (initialized === true) return; - - initialized = true; - - checkCapabilities(); - - if (!features.transforms2d && !features.transforms3d) { - document.body.setAttribute('class', 'no-transforms'); - - // Since JS won't be running any further, we load all lazy - // loading elements upfront - var images = toArray(document.getElementsByTagName('img')), - iframes = toArray(document.getElementsByTagName('iframe')); - - var lazyLoadable = images.concat(iframes); - - for (var i = 0, len = lazyLoadable.length; i < len; i++) { - var element = lazyLoadable[i]; - if (element.getAttribute('data-src')) { - element.setAttribute('src', element.getAttribute('data-src')); - element.removeAttribute('data-src'); - } - } - - // If the browser doesn't support core features we won't be - // using JavaScript to control the presentation - return; - } - - // Cache references to key DOM elements - dom.wrapper = document.querySelector('.reveal'); - dom.slides = document.querySelector('.reveal .slides'); - - // Force a layout when the whole page, incl fonts, has loaded - window.addEventListener('load', layout, false); - - var query = Reveal.getQueryHash(); - - // Do not accept new dependencies via query config to avoid - // the potential of malicious script injection - if (typeof query['dependencies'] !== 'undefined') delete query['dependencies']; - - // Copy options over to our config object - extend(config, options); - extend(config, query); - - // Hide the address bar in mobile browsers - hideAddressBar(); - - // Loads the dependencies and continues to #start() once done - load(); - - } - - /** - * Inspect the client to see what it's capable of, this - * should only happens once per runtime. - */ - function checkCapabilities() { - - isMobileDevice = /(iphone|ipod|ipad|android)/gi.test(UA); - isChrome = /chrome/i.test(UA) && !/edge/i.test(UA); - - var testElement = document.createElement('div'); - - features.transforms3d = 'WebkitPerspective' in testElement.style || - 'MozPerspective' in testElement.style || - 'msPerspective' in testElement.style || - 'OPerspective' in testElement.style || - 'perspective' in testElement.style; - - features.transforms2d = 'WebkitTransform' in testElement.style || - 'MozTransform' in testElement.style || - 'msTransform' in testElement.style || - 'OTransform' in testElement.style || - 'transform' in testElement.style; - - features.requestAnimationFrameMethod = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; - features.requestAnimationFrame = typeof features.requestAnimationFrameMethod === 'function'; - - features.canvas = !!document.createElement('canvas').getContext; - - // Transitions in the overview are disabled in desktop and - // Safari due to lag - features.overviewTransitions = !/Version\/[\d\.]+.*Safari/.test(UA); - - // Flags if we should use zoom instead of transform to scale - // up slides. Zoom produces crisper results but has a lot of - // xbrowser quirks so we only use it in whitelsited browsers. - features.zoom = 'zoom' in testElement.style && !isMobileDevice && - (isChrome || /Version\/[\d\.]+.*Safari/.test(UA)); - - } - - /** - * Loads the dependencies of reveal.js. Dependencies are - * defined via the configuration option 'dependencies' - * and will be loaded prior to starting/binding reveal.js. - * Some dependencies may have an 'async' flag, if so they - * will load after reveal.js has been started up. - */ - function load() { - - var scripts = [], - scriptsAsync = [], - scriptsToPreload = 0; - - // Called once synchronous scripts finish loading - function proceed() { - if (scriptsAsync.length) { - // Load asynchronous scripts - head.js.apply(null, scriptsAsync); - } - - start(); - } - - function loadScript(s) { - head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0], function () { - // Extension may contain callback functions - if (typeof s.callback === 'function') { - s.callback.apply(this); - } - - if (--scriptsToPreload === 0) { - proceed(); - } - }); - } - - for (var i = 0, len = config.dependencies.length; i < len; i++) { - var s = config.dependencies[i]; - - // Load if there's no condition or the condition is truthy - if (!s.condition || s.condition()) { - if (s.async) { - scriptsAsync.push(s.src); - } else { - scripts.push(s.src); - } - - loadScript(s); - } - } - - if (scripts.length) { - scriptsToPreload = scripts.length; - - // Load synchronous scripts - head.js.apply(null, scripts); - } else { - proceed(); - } - - } - - /** - * Starts up reveal.js by binding input events and navigating - * to the current URL deeplink if there is one. - */ - function start() { - - loaded = true; - - // Make sure we've got all the DOM elements we need - setupDOM(); - - // Listen to messages posted to this window - setupPostMessage(); - - // Prevent the slides from being scrolled out of view - setupScrollPrevention(); - - // Resets all vertical slides so that only the first is visible - resetVerticalSlides(); - - // Updates the presentation to match the current configuration values - configure(); - - // Read the initial hash - readURL(); - - // Update all backgrounds - updateBackground(true); - - // Notify listeners that the presentation is ready but use a 1ms - // timeout to ensure it's not fired synchronously after #initialize() - setTimeout(function () { - // Enable transitions now that we're loaded - dom.slides.classList.remove('no-transition'); - - dom.wrapper.classList.add('ready'); - - dispatchEvent('ready', { - 'indexh': indexh, - 'indexv': indexv, - 'currentSlide': currentSlide - }); - }, 1); - - // Special setup and config is required when printing to PDF - if (isPrintingPDF()) { - removeEventListeners(); - - // The document needs to have loaded for the PDF layout - // measurements to be accurate - if (document.readyState === 'complete') { - setupPDF(); - } else { - window.addEventListener('load', setupPDF); - } - } - - } - - /** - * Finds and stores references to DOM elements which are - * required by the presentation. If a required element is - * not found, it is created. - */ - function setupDOM() { - - // Prevent transitions while we're loading - dom.slides.classList.add('no-transition'); - - if (isMobileDevice) { - dom.wrapper.classList.add('no-hover'); - } else { - dom.wrapper.classList.remove('no-hover'); - } - - if (/iphone/gi.test(UA)) { - dom.wrapper.classList.add('ua-iphone'); - } else { - dom.wrapper.classList.remove('ua-iphone'); - } - - // Background element - dom.background = createSingletonNode(dom.wrapper, 'div', 'backgrounds', null); - - // Progress bar - dom.progress = createSingletonNode(dom.wrapper, 'div', 'progress', ''); - dom.progressbar = dom.progress.querySelector('span'); - - // Arrow controls - dom.controls = createSingletonNode(dom.wrapper, 'aside', 'controls', - '' + - '' + - '' + - ''); - - // Slide number - dom.slideNumber = createSingletonNode(dom.wrapper, 'div', 'slide-number', ''); - - // Element containing notes that are visible to the audience - dom.speakerNotes = createSingletonNode(dom.wrapper, 'div', 'speaker-notes', null); - dom.speakerNotes.setAttribute('data-prevent-swipe', ''); - dom.speakerNotes.setAttribute('tabindex', '0'); - - // Overlay graphic which is displayed during the paused mode - createSingletonNode(dom.wrapper, 'div', 'pause-overlay', null); - - dom.wrapper.setAttribute('role', 'application'); - - // There can be multiple instances of controls throughout the page - dom.controlsLeft = toArray(document.querySelectorAll('.navigate-left')); - dom.controlsRight = toArray(document.querySelectorAll('.navigate-right')); - dom.controlsUp = toArray(document.querySelectorAll('.navigate-up')); - dom.controlsDown = toArray(document.querySelectorAll('.navigate-down')); - dom.controlsPrev = toArray(document.querySelectorAll('.navigate-prev')); - dom.controlsNext = toArray(document.querySelectorAll('.navigate-next')); - - // The right and down arrows in the standard reveal.js controls - dom.controlsRightArrow = dom.controls.querySelector('.navigate-right'); - dom.controlsDownArrow = dom.controls.querySelector('.navigate-down'); - - dom.statusDiv = createStatusDiv(); - } - - /** - * Creates a hidden div with role aria-live to announce the - * current slide content. Hide the div off-screen to make it - * available only to Assistive Technologies. - * - * @return {HTMLElement} - */ - function createStatusDiv() { - - var statusDiv = document.getElementById('aria-status-div'); - if (!statusDiv) { - statusDiv = document.createElement('div'); - statusDiv.style.position = 'absolute'; - statusDiv.style.height = '1px'; - statusDiv.style.width = '1px'; - statusDiv.style.overflow = 'hidden'; - statusDiv.style.clip = 'rect( 1px, 1px, 1px, 1px )'; - statusDiv.setAttribute('id', 'aria-status-div'); - statusDiv.setAttribute('aria-live', 'polite'); - statusDiv.setAttribute('aria-atomic', 'true'); - dom.wrapper.appendChild(statusDiv); - } - return statusDiv; - - } - - /** - * Converts the given HTML element into a string of text - * that can be announced to a screen reader. Hidden - * elements are excluded. - */ - function getStatusText(node) { - - var text = ''; - - // Text node - if (node.nodeType === 3) { - text += node.textContent; - } - // Element node - else if (node.nodeType === 1) { - - var isAriaHidden = node.getAttribute('aria-hidden'); - var isDisplayHidden = window.getComputedStyle(node)['display'] === 'none'; - if (isAriaHidden !== 'true' && !isDisplayHidden) { - - toArray(node.childNodes).forEach(function (child) { - text += getStatusText(child); - }); - - } - - } - - return text; - - } - - /** - * Configures the presentation for printing to a static - * PDF. - */ - function setupPDF() { - - var slideSize = getComputedSlideSize(window.innerWidth, window.innerHeight); - - // Dimensions of the PDF pages - var pageWidth = Math.floor(slideSize.width * (1 + config.margin)), - pageHeight = Math.floor(slideSize.height * (1 + config.margin)); - - // Dimensions of slides within the pages - var slideWidth = slideSize.width, - slideHeight = slideSize.height; - - // Let the browser know what page size we want to print - injectStyleSheet('@page{size:' + pageWidth + 'px ' + pageHeight + 'px; margin: 0px;}'); - - // Limit the size of certain elements to the dimensions of the slide - injectStyleSheet('.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: ' + slideWidth + 'px; max-height:' + slideHeight + 'px}'); - - document.body.classList.add('print-pdf'); - document.body.style.width = pageWidth + 'px'; - document.body.style.height = pageHeight + 'px'; - - // Make sure stretch elements fit on slide - layoutSlideContents(slideWidth, slideHeight); - - // Add each slide's index as attributes on itself, we need these - // indices to generate slide numbers below - toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)).forEach(function (hslide, h) { - hslide.setAttribute('data-index-h', h); - - if (hslide.classList.contains('stack')) { - toArray(hslide.querySelectorAll('section')).forEach(function (vslide, v) { - vslide.setAttribute('data-index-h', h); - vslide.setAttribute('data-index-v', v); - }); - } - }); - - // Slide and slide background layout - toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR)).forEach(function (slide) { - - // Vertical stacks are not centred since their section - // children will be - if (slide.classList.contains('stack') === false) { - // Center the slide inside of the page, giving the slide some margin - var left = (pageWidth - slideWidth) / 2, - top = (pageHeight - slideHeight) / 2; - - var contentHeight = slide.scrollHeight; - var numberOfPages = Math.max(Math.ceil(contentHeight / pageHeight), 1); - - // Adhere to configured pages per slide limit - numberOfPages = Math.min(numberOfPages, config.pdfMaxPagesPerSlide); - - // Center slides vertically - if (numberOfPages === 1 && config.center || slide.classList.contains('center')) { - top = Math.max((pageHeight - contentHeight) / 2, 0); - } - - // Wrap the slide in a page element and hide its overflow - // so that no page ever flows onto another - var page = document.createElement('div'); - page.className = 'pdf-page'; - page.style.height = ((pageHeight + config.pdfPageHeightOffset) * numberOfPages) + 'px'; - slide.parentNode.insertBefore(page, slide); - page.appendChild(slide); - - // Position the slide inside of the page - slide.style.left = left + 'px'; - slide.style.top = top + 'px'; - slide.style.width = slideWidth + 'px'; - - if (slide.slideBackgroundElement) { - page.insertBefore(slide.slideBackgroundElement, slide); - } - - // Inject notes if `showNotes` is enabled - if (config.showNotes) { - - // Are there notes for this slide? - var notes = getSlideNotes(slide); - if (notes) { - - var notesSpacing = 8; - var notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline'; - var notesElement = document.createElement('div'); - notesElement.classList.add('speaker-notes'); - notesElement.classList.add('speaker-notes-pdf'); - notesElement.setAttribute('data-layout', notesLayout); - notesElement.innerHTML = notes; - - if (notesLayout === 'separate-page') { - page.parentNode.insertBefore(notesElement, page.nextSibling); - } else { - notesElement.style.left = notesSpacing + 'px'; - notesElement.style.bottom = notesSpacing + 'px'; - notesElement.style.width = (pageWidth - notesSpacing * 2) + 'px'; - page.appendChild(notesElement); - } - - } - - } - - // Inject slide numbers if `slideNumbers` are enabled - if (config.slideNumber && /all|print/i.test(config.showSlideNumber)) { - var slideNumberH = parseInt(slide.getAttribute('data-index-h'), 10) + 1, - slideNumberV = parseInt(slide.getAttribute('data-index-v'), 10) + 1; - - var numberElement = document.createElement('div'); - numberElement.classList.add('slide-number'); - numberElement.classList.add('slide-number-pdf'); - numberElement.innerHTML = formatSlideNumber(slideNumberH, '.', slideNumberV); - page.appendChild(numberElement); - } - } - - }); - - // Show all fragments - toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR + ' .fragment')).forEach(function (fragment) { - fragment.classList.add('visible'); - }); - - // Notify subscribers that the PDF layout is good to go - dispatchEvent('pdf-ready'); - - } - - /** - * This is an unfortunate necessity. Some actions – such as - * an input field being focused in an iframe or using the - * keyboard to expand text selection beyond the bounds of - * a slide – can trigger our content to be pushed out of view. - * This scrolling can not be prevented by hiding overflow in - * CSS (we already do) so we have to resort to repeatedly - * checking if the slides have been offset :( - */ - function setupScrollPrevention() { - - setInterval(function () { - if (dom.wrapper.scrollTop !== 0 || dom.wrapper.scrollLeft !== 0) { - dom.wrapper.scrollTop = 0; - dom.wrapper.scrollLeft = 0; - } - }, 1000); - - } - - /** - * Creates an HTML element and returns a reference to it. - * If the element already exists the existing instance will - * be returned. - * - * @param {HTMLElement} container - * @param {string} tagname - * @param {string} classname - * @param {string} innerHTML - * - * @return {HTMLElement} - */ - function createSingletonNode(container, tagname, classname, innerHTML) { - - // Find all nodes matching the description - var nodes = container.querySelectorAll('.' + classname); - - // Check all matches to find one which is a direct child of - // the specified container - for (var i = 0; i < nodes.length; i++) { - var testNode = nodes[i]; - if (testNode.parentNode === container) { - return testNode; - } - } - - // If no node was found, create it now - var node = document.createElement(tagname); - node.className = classname; - if (typeof innerHTML === 'string') { - node.innerHTML = innerHTML; - } - container.appendChild(node); - - return node; - - } - - /** - * Creates the slide background elements and appends them - * to the background container. One element is created per - * slide no matter if the given slide has visible background. - */ - function createBackgrounds() { - - var printMode = isPrintingPDF(); - - // Clear prior backgrounds - dom.background.innerHTML = ''; - dom.background.classList.add('no-transition'); - - // Iterate over all horizontal slides - toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)).forEach(function (slideh) { - - var backgroundStack = createBackground(slideh, dom.background); - - // Iterate over all vertical slides - toArray(slideh.querySelectorAll('section')).forEach(function (slidev) { - - createBackground(slidev, backgroundStack); - - backgroundStack.classList.add('stack'); - - }); - - }); - - // Add parallax background if specified - if (config.parallaxBackgroundImage) { - - dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")'; - dom.background.style.backgroundSize = config.parallaxBackgroundSize; - - // Make sure the below properties are set on the element - these properties are - // needed for proper transitions to be set on the element via CSS. To remove - // annoying background slide-in effect when the presentation starts, apply - // these properties after short time delay - setTimeout(function () { - dom.wrapper.classList.add('has-parallax-background'); - }, 1); - - } else { - - dom.background.style.backgroundImage = ''; - dom.wrapper.classList.remove('has-parallax-background'); - - } - - } - - /** - * Creates a background for the given slide. - * - * @param {HTMLElement} slide - * @param {HTMLElement} container The element that the background - * should be appended to - * @return {HTMLElement} New background div - */ - function createBackground(slide, container) { - - var data = { - background: slide.getAttribute('data-background'), - backgroundSize: slide.getAttribute('data-background-size'), - backgroundImage: slide.getAttribute('data-background-image'), - backgroundVideo: slide.getAttribute('data-background-video'), - backgroundIframe: slide.getAttribute('data-background-iframe'), - backgroundColor: slide.getAttribute('data-background-color'), - backgroundRepeat: slide.getAttribute('data-background-repeat'), - backgroundPosition: slide.getAttribute('data-background-position'), - backgroundTransition: slide.getAttribute('data-background-transition') - }; - - var element = document.createElement('div'); - - // Carry over custom classes from the slide to the background - element.className = 'slide-background ' + slide.className.replace(/present|past|future/, ''); - - if (data.background) { - // Auto-wrap image urls in url(...) - if (/^(http|file|\/\/)/gi.test(data.background) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#]|$)/gi.test(data.background)) { - slide.setAttribute('data-background-image', data.background); - } else { - element.style.background = data.background; - } - } - - // Create a hash for this combination of background settings. - // This is used to determine when two slide backgrounds are - // the same. - if (data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe) { - element.setAttribute('data-background-hash', data.background + - data.backgroundSize + - data.backgroundImage + - data.backgroundVideo + - data.backgroundIframe + - data.backgroundColor + - data.backgroundRepeat + - data.backgroundPosition + - data.backgroundTransition); - } - - // Additional and optional background properties - if (data.backgroundSize) element.style.backgroundSize = data.backgroundSize; - if (data.backgroundSize) element.setAttribute('data-background-size', data.backgroundSize); - if (data.backgroundColor) element.style.backgroundColor = data.backgroundColor; - if (data.backgroundRepeat) element.style.backgroundRepeat = data.backgroundRepeat; - if (data.backgroundPosition) element.style.backgroundPosition = data.backgroundPosition; - if (data.backgroundTransition) element.setAttribute('data-background-transition', data.backgroundTransition); - - container.appendChild(element); - - // If backgrounds are being recreated, clear old classes - slide.classList.remove('has-dark-background'); - slide.classList.remove('has-light-background'); - - slide.slideBackgroundElement = element; - - // If this slide has a background color, add a class that - // signals if it is light or dark. If the slide has no background - // color, no class will be set - var computedBackgroundStyle = window.getComputedStyle(element); - if (computedBackgroundStyle && computedBackgroundStyle.backgroundColor) { - var rgb = colorToRgb(computedBackgroundStyle.backgroundColor); - - // Ignore fully transparent backgrounds. Some browsers return - // rgba(0,0,0,0) when reading the computed background color of - // an element with no background - if (rgb && rgb.a !== 0) { - if (colorBrightness(computedBackgroundStyle.backgroundColor) < 128) { - slide.classList.add('has-dark-background'); - } else { - slide.classList.add('has-light-background'); - } - } - } - - return element; - - } - - /** - * Registers a listener to postMessage events, this makes it - * possible to call all reveal.js API methods from another - * window. For example: - * - * revealWindow.postMessage( JSON.stringify({ - * method: 'slide', - * args: [ 2 ] - * }), '*' ); - */ - function setupPostMessage() { - - if (config.postMessage) { - window.addEventListener('message', function (event) { - var data = event.data; - - // Make sure we're dealing with JSON - if (typeof data === 'string' && data.charAt(0) === '{' && data.charAt(data.length - 1) === '}') { - data = JSON.parse(data); - - // Check if the requested method can be found - if (data.method && typeof Reveal[data.method] === 'function') { - Reveal[data.method].apply(Reveal, data.args); - } - } - }, false); - } - - } - - /** - * Applies the configuration settings from the config - * object. May be called multiple times. - * - * @param {object} options - */ - function configure(options) { - - var oldTransition = config.transition; - - // New config options may be passed when this method - // is invoked through the API after initialization - if (typeof options === 'object') extend(config, options); - - // Abort if reveal.js hasn't finished loading, config - // changes will be applied automatically once loading - // finishes - if (loaded === false) return; - - var numberOfSlides = dom.wrapper.querySelectorAll(SLIDES_SELECTOR).length; - - // Remove the previously configured transition class - dom.wrapper.classList.remove(oldTransition); - - // Force linear transition based on browser capabilities - if (features.transforms3d === false) config.transition = 'linear'; - - dom.wrapper.classList.add(config.transition); - - dom.wrapper.setAttribute('data-transition-speed', config.transitionSpeed); - dom.wrapper.setAttribute('data-background-transition', config.backgroundTransition); - - dom.controls.style.display = config.controls ? 'block' : 'none'; - dom.progress.style.display = config.progress ? 'block' : 'none'; - - dom.controls.setAttribute('data-controls-layout', config.controlsLayout); - dom.controls.setAttribute('data-controls-back-arrows', config.controlsBackArrows); - - if (config.shuffle) { - shuffle(); - } - - if (config.rtl) { - dom.wrapper.classList.add('rtl'); - } else { - dom.wrapper.classList.remove('rtl'); - } - - if (config.center) { - dom.wrapper.classList.add('center'); - } else { - dom.wrapper.classList.remove('center'); - } - - // Exit the paused mode if it was configured off - if (config.pause === false) { - resume(); - } - - if (config.showNotes) { - dom.speakerNotes.setAttribute('data-layout', typeof config.showNotes === 'string' ? config.showNotes : 'inline'); - } - - if (config.mouseWheel) { - document.addEventListener('DOMMouseScroll', onDocumentMouseScroll, false); // FF - document.addEventListener('mousewheel', onDocumentMouseScroll, false); - } else { - document.removeEventListener('DOMMouseScroll', onDocumentMouseScroll, false); // FF - document.removeEventListener('mousewheel', onDocumentMouseScroll, false); - } - - // Rolling 3D links - if (config.rollingLinks) { - enableRollingLinks(); - } else { - disableRollingLinks(); - } - - // Iframe link previews - if (config.previewLinks) { - enablePreviewLinks(); - disablePreviewLinks('[data-preview-link=false]'); - } else { - disablePreviewLinks(); - enablePreviewLinks('[data-preview-link]:not([data-preview-link=false])'); - } - - // Remove existing auto-slide controls - if (autoSlidePlayer) { - autoSlidePlayer.destroy(); - autoSlidePlayer = null; - } - - // Generate auto-slide controls if needed - if (numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame) { - autoSlidePlayer = new Playback(dom.wrapper, function () { - return Math.min(Math.max((Date.now() - autoSlideStartTime) / autoSlide, 0), 1); - }); - - autoSlidePlayer.on('click', onAutoSlidePlayerClick); - autoSlidePaused = false; - } - - // When fragments are turned off they should be visible - if (config.fragments === false) { - toArray(dom.slides.querySelectorAll('.fragment')).forEach(function (element) { - element.classList.add('visible'); - element.classList.remove('current-fragment'); - }); - } - - // Slide numbers - var slideNumberDisplay = 'none'; - if (config.slideNumber && !isPrintingPDF()) { - if (config.showSlideNumber === 'all') { - slideNumberDisplay = 'block'; - } else if (config.showSlideNumber === 'speaker' && isSpeakerNotes()) { - slideNumberDisplay = 'block'; - } - } - - dom.slideNumber.style.display = slideNumberDisplay; - - sync(); - - } - - /** - * Binds all event listeners. - */ - function addEventListeners() { - - eventsAreBound = true; - - window.addEventListener('hashchange', onWindowHashChange, false); - window.addEventListener('resize', onWindowResize, false); - - if (config.touch) { - dom.wrapper.addEventListener('touchstart', onTouchStart, false); - dom.wrapper.addEventListener('touchmove', onTouchMove, false); - dom.wrapper.addEventListener('touchend', onTouchEnd, false); - - // Support pointer-style touch interaction as well - if (window.navigator.pointerEnabled) { - // IE 11 uses un-prefixed version of pointer events - dom.wrapper.addEventListener('pointerdown', onPointerDown, false); - dom.wrapper.addEventListener('pointermove', onPointerMove, false); - dom.wrapper.addEventListener('pointerup', onPointerUp, false); - } else if (window.navigator.msPointerEnabled) { - // IE 10 uses prefixed version of pointer events - dom.wrapper.addEventListener('MSPointerDown', onPointerDown, false); - dom.wrapper.addEventListener('MSPointerMove', onPointerMove, false); - dom.wrapper.addEventListener('MSPointerUp', onPointerUp, false); - } - } - - if (config.keyboard) { - document.addEventListener('keydown', onDocumentKeyDown, false); - document.addEventListener('keypress', onDocumentKeyPress, false); - } - - if (config.progress && dom.progress) { - dom.progress.addEventListener('click', onProgressClicked, false); - } - - if (config.focusBodyOnPageVisibilityChange) { - var visibilityChange; - - if ('hidden' in document) { - visibilityChange = 'visibilitychange'; - } else if ('msHidden' in document) { - visibilityChange = 'msvisibilitychange'; - } else if ('webkitHidden' in document) { - visibilityChange = 'webkitvisibilitychange'; - } - - if (visibilityChange) { - document.addEventListener(visibilityChange, onPageVisibilityChange, false); - } - } - - // Listen to both touch and click events, in case the device - // supports both - var pointerEvents = ['touchstart', 'click']; - - // Only support touch for Android, fixes double navigations in - // stock browser - if (UA.match(/android/gi)) { - pointerEvents = ['touchstart']; - } - - pointerEvents.forEach(function (eventName) { - dom.controlsLeft.forEach(function (el) { - el.addEventListener(eventName, onNavigateLeftClicked, false); - }); - dom.controlsRight.forEach(function (el) { - el.addEventListener(eventName, onNavigateRightClicked, false); - }); - dom.controlsUp.forEach(function (el) { - el.addEventListener(eventName, onNavigateUpClicked, false); - }); - dom.controlsDown.forEach(function (el) { - el.addEventListener(eventName, onNavigateDownClicked, false); - }); - dom.controlsPrev.forEach(function (el) { - el.addEventListener(eventName, onNavigatePrevClicked, false); - }); - dom.controlsNext.forEach(function (el) { - el.addEventListener(eventName, onNavigateNextClicked, false); - }); - }); - - } - - /** - * Unbinds all event listeners. - */ - function removeEventListeners() { - - eventsAreBound = false; - - document.removeEventListener('keydown', onDocumentKeyDown, false); - document.removeEventListener('keypress', onDocumentKeyPress, false); - window.removeEventListener('hashchange', onWindowHashChange, false); - window.removeEventListener('resize', onWindowResize, false); - - dom.wrapper.removeEventListener('touchstart', onTouchStart, false); - dom.wrapper.removeEventListener('touchmove', onTouchMove, false); - dom.wrapper.removeEventListener('touchend', onTouchEnd, false); - - // IE11 - if (window.navigator.pointerEnabled) { - dom.wrapper.removeEventListener('pointerdown', onPointerDown, false); - dom.wrapper.removeEventListener('pointermove', onPointerMove, false); - dom.wrapper.removeEventListener('pointerup', onPointerUp, false); - } - // IE10 - else if (window.navigator.msPointerEnabled) { - dom.wrapper.removeEventListener('MSPointerDown', onPointerDown, false); - dom.wrapper.removeEventListener('MSPointerMove', onPointerMove, false); - dom.wrapper.removeEventListener('MSPointerUp', onPointerUp, false); - } - - if (config.progress && dom.progress) { - dom.progress.removeEventListener('click', onProgressClicked, false); - } - - ['touchstart', 'click'].forEach(function (eventName) { - dom.controlsLeft.forEach(function (el) { - el.removeEventListener(eventName, onNavigateLeftClicked, false); - }); - dom.controlsRight.forEach(function (el) { - el.removeEventListener(eventName, onNavigateRightClicked, false); - }); - dom.controlsUp.forEach(function (el) { - el.removeEventListener(eventName, onNavigateUpClicked, false); - }); - dom.controlsDown.forEach(function (el) { - el.removeEventListener(eventName, onNavigateDownClicked, false); - }); - dom.controlsPrev.forEach(function (el) { - el.removeEventListener(eventName, onNavigatePrevClicked, false); - }); - dom.controlsNext.forEach(function (el) { - el.removeEventListener(eventName, onNavigateNextClicked, false); - }); - }); - - } - - /** - * Extend object a with the properties of object b. - * If there's a conflict, object b takes precedence. - * - * @param {object} a - * @param {object} b - */ - function extend(a, b) { - - for (var i in b) { - a[i] = b[i]; - } - - return a; - - } - - /** - * Converts the target object to an array. - * - * @param {object} o - * @return {object[]} - */ - function toArray(o) { - - return Array.prototype.slice.call(o); - - } - - /** - * Utility for deserializing a value. - * - * @param {*} value - * @return {*} - */ - function deserialize(value) { - - if (typeof value === 'string') { - if (value === 'null') return null; - else if (value === 'true') return true; - else if (value === 'false') return false; - else if (value.match(/^-?[\d\.]+$/)) return parseFloat(value); - } - - return value; - - } - - /** - * Measures the distance in pixels between point a - * and point b. - * - * @param {object} a point with x/y properties - * @param {object} b point with x/y properties - * - * @return {number} - */ - function distanceBetween(a, b) { - - var dx = a.x - b.x, - dy = a.y - b.y; - - return Math.sqrt(dx * dx + dy * dy); - - } - - /** - * Applies a CSS transform to the target element. - * - * @param {HTMLElement} element - * @param {string} transform - */ - function transformElement(element, transform) { - - element.style.WebkitTransform = transform; - element.style.MozTransform = transform; - element.style.msTransform = transform; - element.style.transform = transform; - - } - - /** - * Applies CSS transforms to the slides container. The container - * is transformed from two separate sources: layout and the overview - * mode. - * - * @param {object} transforms - */ - function transformSlides(transforms) { - - // Pick up new transforms from arguments - if (typeof transforms.layout === 'string') slidesTransform.layout = transforms.layout; - if (typeof transforms.overview === 'string') slidesTransform.overview = transforms.overview; - - // Apply the transforms to the slides container - if (slidesTransform.layout) { - transformElement(dom.slides, slidesTransform.layout + ' ' + slidesTransform.overview); - } else { - transformElement(dom.slides, slidesTransform.overview); - } - - } - - /** - * Injects the given CSS styles into the DOM. - * - * @param {string} value - */ - function injectStyleSheet(value) { - - var tag = document.createElement('style'); - tag.type = 'text/css'; - if (tag.styleSheet) { - tag.styleSheet.cssText = value; - } else { - tag.appendChild(document.createTextNode(value)); - } - document.getElementsByTagName('head')[0].appendChild(tag); - - } - - /** - * Find the closest parent that matches the given - * selector. - * - * @param {HTMLElement} target The child element - * @param {String} selector The CSS selector to match - * the parents against - * - * @return {HTMLElement} The matched parent or null - * if no matching parent was found - */ - function closestParent(target, selector) { - - var parent = target.parentNode; - - while (parent) { - - // There's some overhead doing this each time, we don't - // want to rewrite the element prototype but should still - // be enough to feature detect once at startup... - var matchesMethod = parent.matches || parent.matchesSelector || parent.msMatchesSelector; - - // If we find a match, we're all set - if (matchesMethod && matchesMethod.call(parent, selector)) { - return parent; - } - - // Keep searching - parent = parent.parentNode; - - } - - return null; - - } - - /** - * Converts various color input formats to an {r:0,g:0,b:0} object. - * - * @param {string} color The string representation of a color - * @example - * colorToRgb('#000'); - * @example - * colorToRgb('#000000'); - * @example - * colorToRgb('rgb(0,0,0)'); - * @example - * colorToRgb('rgba(0,0,0)'); - * - * @return {{r: number, g: number, b: number, [a]: number}|null} - */ - function colorToRgb(color) { - - var hex3 = color.match(/^#([0-9a-f]{3})$/i); - if (hex3 && hex3[1]) { - hex3 = hex3[1]; - return { - r: parseInt(hex3.charAt(0), 16) * 0x11, - g: parseInt(hex3.charAt(1), 16) * 0x11, - b: parseInt(hex3.charAt(2), 16) * 0x11 - }; - } - - var hex6 = color.match(/^#([0-9a-f]{6})$/i); - if (hex6 && hex6[1]) { - hex6 = hex6[1]; - return { - r: parseInt(hex6.substr(0, 2), 16), - g: parseInt(hex6.substr(2, 2), 16), - b: parseInt(hex6.substr(4, 2), 16) - }; - } - - var rgb = color.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i); - if (rgb) { - return { - r: parseInt(rgb[1], 10), - g: parseInt(rgb[2], 10), - b: parseInt(rgb[3], 10) - }; - } - - var rgba = color.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i); - if (rgba) { - return { - r: parseInt(rgba[1], 10), - g: parseInt(rgba[2], 10), - b: parseInt(rgba[3], 10), - a: parseFloat(rgba[4]) - }; - } - - return null; - - } - - /** - * Calculates brightness on a scale of 0-255. - * - * @param {string} color See colorToRgb for supported formats. - * @see {@link colorToRgb} - */ - function colorBrightness(color) { - - if (typeof color === 'string') color = colorToRgb(color); - - if (color) { - return (color.r * 299 + color.g * 587 + color.b * 114) / 1000; - } - - return null; - - } - - /** - * Returns the remaining height within the parent of the - * target element. - * - * remaining height = [ configured parent height ] - [ current parent height ] - * - * @param {HTMLElement} element - * @param {number} [height] - */ - function getRemainingHeight(element, height) { - - height = height || 0; - - if (element) { - var newHeight, oldHeight = element.style.height; - - // Change the .stretch element height to 0 in order find the height of all - // the other elements - element.style.height = '0px'; - newHeight = height - element.parentNode.offsetHeight; - - // Restore the old height, just in case - element.style.height = oldHeight + 'px'; - - return newHeight; - } - - return height; - - } - - /** - * Checks if this instance is being used to print a PDF. - */ - function isPrintingPDF() { - - return (/print-pdf/gi).test(window.location.search); - - } - - /** - * Hides the address bar if we're on a mobile device. - */ - function hideAddressBar() { - - if (config.hideAddressBar && isMobileDevice) { - // Events that should trigger the address bar to hide - window.addEventListener('load', removeAddressBar, false); - window.addEventListener('orientationchange', removeAddressBar, false); - } - - } - - /** - * Causes the address bar to hide on mobile devices, - * more vertical space ftw. - */ - function removeAddressBar() { - - setTimeout(function () { - window.scrollTo(0, 1); - }, 10); - - } - - /** - * Dispatches an event of the specified type from the - * reveal DOM element. - */ - function dispatchEvent(type, args) { - - var event = document.createEvent('HTMLEvents', 1, 2); - event.initEvent(type, true, true); - extend(event, args); - dom.wrapper.dispatchEvent(event); - - // If we're in an iframe, post each reveal.js event to the - // parent window. Used by the notes plugin - if (config.postMessageEvents && window.parent !== window.self) { - window.parent.postMessage(JSON.stringify({namespace: 'reveal', eventName: type, state: getState()}), '*'); - } - - } - - /** - * Wrap all links in 3D goodness. - */ - function enableRollingLinks() { - - if (features.transforms3d && !('msPerspective' in document.body.style)) { - var anchors = dom.wrapper.querySelectorAll(SLIDES_SELECTOR + ' a'); - - for (var i = 0, len = anchors.length; i < len; i++) { - var anchor = anchors[i]; - - if (anchor.textContent && !anchor.querySelector('*') && (!anchor.className || !anchor.classList.contains(anchor, 'roll'))) { - var span = document.createElement('span'); - span.setAttribute('data-title', anchor.text); - span.innerHTML = anchor.innerHTML; - - anchor.classList.add('roll'); - anchor.innerHTML = ''; - anchor.appendChild(span); - } - } - } - - } - - /** - * Unwrap all 3D links. - */ - function disableRollingLinks() { - - var anchors = dom.wrapper.querySelectorAll(SLIDES_SELECTOR + ' a.roll'); - - for (var i = 0, len = anchors.length; i < len; i++) { - var anchor = anchors[i]; - var span = anchor.querySelector('span'); - - if (span) { - anchor.classList.remove('roll'); - anchor.innerHTML = span.innerHTML; - } - } - - } - - /** - * Bind preview frame links. - * - * @param {string} [selector=a] - selector for anchors - */ - function enablePreviewLinks(selector) { - - var anchors = toArray(document.querySelectorAll(selector ? selector : 'a')); - - anchors.forEach(function (element) { - if (/^(http|www)/gi.test(element.getAttribute('href'))) { - element.addEventListener('click', onPreviewLinkClicked, false); - } - }); - - } - - /** - * Unbind preview frame links. - */ - function disablePreviewLinks(selector) { - - var anchors = toArray(document.querySelectorAll(selector ? selector : 'a')); - - anchors.forEach(function (element) { - if (/^(http|www)/gi.test(element.getAttribute('href'))) { - element.removeEventListener('click', onPreviewLinkClicked, false); - } - }); - - } - - /** - * Opens a preview window for the target URL. - * - * @param {string} url - url for preview iframe src - */ - function showPreview(url) { - - closeOverlay(); - - dom.overlay = document.createElement('div'); - dom.overlay.classList.add('overlay'); - dom.overlay.classList.add('overlay-preview'); - dom.wrapper.appendChild(dom.overlay); - - dom.overlay.innerHTML = [ - '
', - '', - '', - '
', - '
', - '
', - '', - '', - 'Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).', - '', - '
' - ].join(''); - - dom.overlay.querySelector('iframe').addEventListener('load', function (event) { - dom.overlay.classList.add('loaded'); - }, false); - - dom.overlay.querySelector('.close').addEventListener('click', function (event) { - closeOverlay(); - event.preventDefault(); - }, false); - - dom.overlay.querySelector('.external').addEventListener('click', function (event) { - closeOverlay(); - }, false); - - setTimeout(function () { - dom.overlay.classList.add('visible'); - }, 1); - - } - - /** - * Open or close help overlay window. - * - * @param {Boolean} [override] Flag which overrides the - * toggle logic and forcibly sets the desired state. True means - * help is open, false means it's closed. - */ - function toggleHelp(override) { - - if (typeof override === 'boolean') { - override ? showHelp() : closeOverlay(); - } else { - if (dom.overlay) { - closeOverlay(); - } else { - showHelp(); - } - } - } - - /** - * Opens an overlay window with help material. - */ - function showHelp() { - - if (config.help) { - - closeOverlay(); - - dom.overlay = document.createElement('div'); - dom.overlay.classList.add('overlay'); - dom.overlay.classList.add('overlay-help'); - dom.wrapper.appendChild(dom.overlay); - - var html = '

Keyboard Shortcuts


'; - - html += ''; - for (var key in keyboardShortcuts) { - html += ''; - } - - html += '
KEYACTION
' + key + '' + keyboardShortcuts[key] + '
'; - - dom.overlay.innerHTML = [ - '
', - '', - '
', - '
', - '
' + html + '
', - '
' - ].join(''); - - dom.overlay.querySelector('.close').addEventListener('click', function (event) { - closeOverlay(); - event.preventDefault(); - }, false); - - setTimeout(function () { - dom.overlay.classList.add('visible'); - }, 1); - - } - - } - - /** - * Closes any currently open overlay. - */ - function closeOverlay() { - - if (dom.overlay) { - dom.overlay.parentNode.removeChild(dom.overlay); - dom.overlay = null; - } - - } - - /** - * Applies JavaScript-controlled layout rules to the - * presentation. - */ - function layout() { - - if (dom.wrapper && !isPrintingPDF()) { - - var size = getComputedSlideSize(); - - // Layout the contents of the slides - layoutSlideContents(config.width, config.height); - - dom.slides.style.width = size.width + 'px'; - dom.slides.style.height = size.height + 'px'; - - // Determine scale of content to fit within available space - scale = Math.min(size.presentationWidth / size.width, size.presentationHeight / size.height); - - // Respect max/min scale settings - scale = Math.max(scale, config.minScale); - scale = Math.min(scale, config.maxScale); - - // Don't apply any scaling styles if scale is 1 - if (scale === 1) { - dom.slides.style.zoom = ''; - dom.slides.style.left = ''; - dom.slides.style.top = ''; - dom.slides.style.bottom = ''; - dom.slides.style.right = ''; - transformSlides({layout: ''}); - } else { - // Prefer zoom for scaling up so that content remains crisp. - // Don't use zoom to scale down since that can lead to shifts - // in text layout/line breaks. - if (scale > 1 && features.zoom) { - dom.slides.style.zoom = scale; - dom.slides.style.left = ''; - dom.slides.style.top = ''; - dom.slides.style.bottom = ''; - dom.slides.style.right = ''; - transformSlides({layout: ''}); - } - // Apply scale transform as a fallback - else { - dom.slides.style.zoom = ''; - dom.slides.style.left = '50%'; - dom.slides.style.top = '50%'; - dom.slides.style.bottom = 'auto'; - dom.slides.style.right = 'auto'; - transformSlides({layout: 'translate(-50%, -50%) scale(' + scale + ')'}); - } - } - - // Select all slides, vertical and horizontal - var slides = toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR)); - - for (var i = 0, len = slides.length; i < len; i++) { - var slide = slides[i]; - - // Don't bother updating invisible slides - if (slide.style.display === 'none') { - continue; - } - - if (config.center || slide.classList.contains('center')) { - // Vertical stacks are not centred since their section - // children will be - if (slide.classList.contains('stack')) { - slide.style.top = 0; - } else { - slide.style.top = Math.max((size.height - slide.scrollHeight) / 2, 0) + 'px'; - } - } else { - slide.style.top = ''; - } - - } - - updateProgress(); - updateParallax(); - - if (isOverview()) { - updateOverview(); - } - - } - - } - - /** - * Applies layout logic to the contents of all slides in - * the presentation. - * - * @param {string|number} width - * @param {string|number} height - */ - function layoutSlideContents(width, height) { - - // Handle sizing of elements with the 'stretch' class - toArray(dom.slides.querySelectorAll('section > .stretch')).forEach(function (element) { - - // Determine how much vertical space we can use - var remainingHeight = getRemainingHeight(element, height); - - // Consider the aspect ratio of media elements - if (/(img|video)/gi.test(element.nodeName)) { - var nw = element.naturalWidth || element.videoWidth, - nh = element.naturalHeight || element.videoHeight; - - var es = Math.min(width / nw, remainingHeight / nh); - - element.style.width = (nw * es) + 'px'; - element.style.height = (nh * es) + 'px'; - - } else { - element.style.width = width + 'px'; - element.style.height = remainingHeight + 'px'; - } - - }); - - } - - /** - * Calculates the computed pixel size of our slides. These - * values are based on the width and height configuration - * options. - * - * @param {number} [presentationWidth=dom.wrapper.offsetWidth] - * @param {number} [presentationHeight=dom.wrapper.offsetHeight] - */ - function getComputedSlideSize(presentationWidth, presentationHeight) { - - var size = { - // Slide size - width: config.width, - height: config.height, - - // Presentation size - presentationWidth: presentationWidth || dom.wrapper.offsetWidth, - presentationHeight: presentationHeight || dom.wrapper.offsetHeight - }; - - // Reduce available space by margin - size.presentationWidth -= (size.presentationWidth * config.margin); - size.presentationHeight -= (size.presentationHeight * config.margin); - - // Slide width may be a percentage of available width - if (typeof size.width === 'string' && /%$/.test(size.width)) { - size.width = parseInt(size.width, 10) / 100 * size.presentationWidth; - } - - // Slide height may be a percentage of available height - if (typeof size.height === 'string' && /%$/.test(size.height)) { - size.height = parseInt(size.height, 10) / 100 * size.presentationHeight; - } - - return size; - - } - - /** - * Stores the vertical index of a stack so that the same - * vertical slide can be selected when navigating to and - * from the stack. - * - * @param {HTMLElement} stack The vertical stack element - * @param {string|number} [v=0] Index to memorize - */ - function setPreviousVerticalIndex(stack, v) { - - if (typeof stack === 'object' && typeof stack.setAttribute === 'function') { - stack.setAttribute('data-previous-indexv', v || 0); - } - - } - - /** - * Retrieves the vertical index which was stored using - * #setPreviousVerticalIndex() or 0 if no previous index - * exists. - * - * @param {HTMLElement} stack The vertical stack element - */ - function getPreviousVerticalIndex(stack) { - - if (typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains('stack')) { - // Prefer manually defined start-indexv - var attributeName = stack.hasAttribute('data-start-indexv') ? 'data-start-indexv' : 'data-previous-indexv'; - - return parseInt(stack.getAttribute(attributeName) || 0, 10); - } - - return 0; - - } - - /** - * Displays the overview of slides (quick nav) by scaling - * down and arranging all slide elements. - */ - function activateOverview() { - - // Only proceed if enabled in config - if (config.overview && !isOverview()) { - - overview = true; - - dom.wrapper.classList.add('overview'); - dom.wrapper.classList.remove('overview-deactivating'); - - if (features.overviewTransitions) { - setTimeout(function () { - dom.wrapper.classList.add('overview-animated'); - }, 1); - } - - // Don't auto-slide while in overview mode - cancelAutoSlide(); - - // Move the backgrounds element into the slide container to - // that the same scaling is applied - dom.slides.appendChild(dom.background); - - // Clicking on an overview slide navigates to it - toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR)).forEach(function (slide) { - if (!slide.classList.contains('stack')) { - slide.addEventListener('click', onOverviewSlideClicked, true); - } - }); - - // Calculate slide sizes - var margin = 70; - var slideSize = getComputedSlideSize(); - overviewSlideWidth = slideSize.width + margin; - overviewSlideHeight = slideSize.height + margin; - - // Reverse in RTL mode - if (config.rtl) { - overviewSlideWidth = -overviewSlideWidth; - } - - updateSlidesVisibility(); - layoutOverview(); - updateOverview(); - - layout(); - - // Notify observers of the overview showing - dispatchEvent('overviewshown', { - 'indexh': indexh, - 'indexv': indexv, - 'currentSlide': currentSlide - }); - - } - - } - - /** - * Uses CSS transforms to position all slides in a grid for - * display inside of the overview mode. - */ - function layoutOverview() { - - // Layout slides - toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)).forEach(function (hslide, h) { - hslide.setAttribute('data-index-h', h); - transformElement(hslide, 'translate3d(' + (h * overviewSlideWidth) + 'px, 0, 0)'); - - if (hslide.classList.contains('stack')) { - - toArray(hslide.querySelectorAll('section')).forEach(function (vslide, v) { - vslide.setAttribute('data-index-h', h); - vslide.setAttribute('data-index-v', v); - - transformElement(vslide, 'translate3d(0, ' + (v * overviewSlideHeight) + 'px, 0)'); - }); - - } - }); - - // Layout slide backgrounds - toArray(dom.background.childNodes).forEach(function (hbackground, h) { - transformElement(hbackground, 'translate3d(' + (h * overviewSlideWidth) + 'px, 0, 0)'); - - toArray(hbackground.querySelectorAll('.slide-background')).forEach(function (vbackground, v) { - transformElement(vbackground, 'translate3d(0, ' + (v * overviewSlideHeight) + 'px, 0)'); - }); - }); - - } - - /** - * Moves the overview viewport to the current slides. - * Called each time the current slide changes. - */ - function updateOverview() { - - var vmin = Math.min(window.innerWidth, window.innerHeight); - var scale = Math.max(vmin / 5, 150) / vmin; - - transformSlides({ - overview: [ - 'scale(' + scale + ')', - 'translateX(' + (-indexh * overviewSlideWidth) + 'px)', - 'translateY(' + (-indexv * overviewSlideHeight) + 'px)' - ].join(' ') - }); - - } - - /** - * Exits the slide overview and enters the currently - * active slide. - */ - function deactivateOverview() { - - // Only proceed if enabled in config - if (config.overview) { - - overview = false; - - dom.wrapper.classList.remove('overview'); - dom.wrapper.classList.remove('overview-animated'); - - // Temporarily add a class so that transitions can do different things - // depending on whether they are exiting/entering overview, or just - // moving from slide to slide - dom.wrapper.classList.add('overview-deactivating'); - - setTimeout(function () { - dom.wrapper.classList.remove('overview-deactivating'); - }, 1); - - // Move the background element back out - dom.wrapper.appendChild(dom.background); - - // Clean up changes made to slides - toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR)).forEach(function (slide) { - transformElement(slide, ''); - - slide.removeEventListener('click', onOverviewSlideClicked, true); - }); - - // Clean up changes made to backgrounds - toArray(dom.background.querySelectorAll('.slide-background')).forEach(function (background) { - transformElement(background, ''); - }); - - transformSlides({overview: ''}); - - slide(indexh, indexv); - - layout(); - - cueAutoSlide(); - - // Notify observers of the overview hiding - dispatchEvent('overviewhidden', { - 'indexh': indexh, - 'indexv': indexv, - 'currentSlide': currentSlide - }); - - } - } - - /** - * Toggles the slide overview mode on and off. - * - * @param {Boolean} [override] Flag which overrides the - * toggle logic and forcibly sets the desired state. True means - * overview is open, false means it's closed. - */ - function toggleOverview(override) { - - if (typeof override === 'boolean') { - override ? activateOverview() : deactivateOverview(); - } else { - isOverview() ? deactivateOverview() : activateOverview(); - } - - } - - /** - * Checks if the overview is currently active. - * - * @return {Boolean} true if the overview is active, - * false otherwise - */ - function isOverview() { - - return overview; - - } - - /** - * Checks if the current or specified slide is vertical - * (nested within another slide). - * - * @param {HTMLElement} [slide=currentSlide] The slide to check - * orientation of - * @return {Boolean} - */ - function isVerticalSlide(slide) { - - // Prefer slide argument, otherwise use current slide - slide = slide ? slide : currentSlide; - - return slide && slide.parentNode && !!slide.parentNode.nodeName.match(/section/i); - - } - - /** - * Handling the fullscreen functionality via the fullscreen API - * - * @see http://fullscreen.spec.whatwg.org/ - * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode - */ - function enterFullscreen() { - - var element = document.documentElement; - - // Check which implementation is available - var requestMethod = element.requestFullscreen || - element.webkitRequestFullscreen || - element.webkitRequestFullScreen || - element.mozRequestFullScreen || - element.msRequestFullscreen; - - if (requestMethod) { - requestMethod.apply(element); - } - - } - - /** - * Enters the paused mode which fades everything on screen to - * black. - */ - function pause() { - - if (config.pause) { - var wasPaused = dom.wrapper.classList.contains('paused'); - - cancelAutoSlide(); - dom.wrapper.classList.add('paused'); - - if (wasPaused === false) { - dispatchEvent('paused'); - } - } - - } - - /** - * Exits from the paused mode. - */ - function resume() { - - var wasPaused = dom.wrapper.classList.contains('paused'); - dom.wrapper.classList.remove('paused'); - - cueAutoSlide(); - - if (wasPaused) { - dispatchEvent('resumed'); - } - - } - - /** - * Toggles the paused mode on and off. - */ - function togglePause(override) { - - if (typeof override === 'boolean') { - override ? pause() : resume(); - } else { - isPaused() ? resume() : pause(); - } - - } - - /** - * Checks if we are currently in the paused mode. - * - * @return {Boolean} - */ - function isPaused() { - - return dom.wrapper.classList.contains('paused'); - - } - - /** - * Toggles the auto slide mode on and off. - * - * @param {Boolean} [override] Flag which sets the desired state. - * True means autoplay starts, false means it stops. - */ - - function toggleAutoSlide(override) { - - if (typeof override === 'boolean') { - override ? resumeAutoSlide() : pauseAutoSlide(); - } else { - autoSlidePaused ? resumeAutoSlide() : pauseAutoSlide(); - } - - } - - /** - * Checks if the auto slide mode is currently on. - * - * @return {Boolean} - */ - function isAutoSliding() { - - return !!(autoSlide && !autoSlidePaused); - - } - - /** - * Steps from the current point in the presentation to the - * slide which matches the specified horizontal and vertical - * indices. - * - * @param {number} [h=indexh] Horizontal index of the target slide - * @param {number} [v=indexv] Vertical index of the target slide - * @param {number} [f] Index of a fragment within the - * target slide to activate - * @param {number} [o] Origin for use in multimaster environments - */ - function slide(h, v, f, o) { - - // Remember where we were at before - previousSlide = currentSlide; - - // Query all horizontal slides in the deck - var horizontalSlides = dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR); - - // Abort if there are no slides - if (horizontalSlides.length === 0) return; - - // If no vertical index is specified and the upcoming slide is a - // stack, resume at its previous vertical index - if (v === undefined && !isOverview()) { - v = getPreviousVerticalIndex(horizontalSlides[h]); - } - - // If we were on a vertical stack, remember what vertical index - // it was on so we can resume at the same position when returning - if (previousSlide && previousSlide.parentNode && previousSlide.parentNode.classList.contains('stack')) { - setPreviousVerticalIndex(previousSlide.parentNode, indexv); - } - - // Remember the state before this slide - var stateBefore = state.concat(); - - // Reset the state array - state.length = 0; - - var indexhBefore = indexh || 0, - indexvBefore = indexv || 0; - - // Activate and transition to the new slide - indexh = updateSlides(HORIZONTAL_SLIDES_SELECTOR, h === undefined ? indexh : h); - indexv = updateSlides(VERTICAL_SLIDES_SELECTOR, v === undefined ? indexv : v); - - // Update the visibility of slides now that the indices have changed - updateSlidesVisibility(); - - layout(); - - // Apply the new state - stateLoop: for (var i = 0, len = state.length; i < len; i++) { - // Check if this state existed on the previous slide. If it - // did, we will avoid adding it repeatedly - for (var j = 0; j < stateBefore.length; j++) { - if (stateBefore[j] === state[i]) { - stateBefore.splice(j, 1); - continue stateLoop; - } - } - - document.documentElement.classList.add(state[i]); - - // Dispatch custom event matching the state's name - dispatchEvent(state[i]); - } - - // Clean up the remains of the previous state - while (stateBefore.length) { - document.documentElement.classList.remove(stateBefore.pop()); - } - - // Update the overview if it's currently active - if (isOverview()) { - updateOverview(); - } - - // Find the current horizontal slide and any possible vertical slides - // within it - var currentHorizontalSlide = horizontalSlides[indexh], - currentVerticalSlides = currentHorizontalSlide.querySelectorAll('section'); - - // Store references to the previous and current slides - currentSlide = currentVerticalSlides[indexv] || currentHorizontalSlide; - - // Show fragment, if specified - if (typeof f !== 'undefined') { - navigateFragment(f); - } - - // Dispatch an event if the slide changed - var slideChanged = (indexh !== indexhBefore || indexv !== indexvBefore); - if (slideChanged) { - dispatchEvent('slidechanged', { - 'indexh': indexh, - 'indexv': indexv, - 'previousSlide': previousSlide, - 'currentSlide': currentSlide, - 'origin': o - }); - } else { - // Ensure that the previous slide is never the same as the current - previousSlide = null; - } - - // Solves an edge case where the previous slide maintains the - // 'present' class when navigating between adjacent vertical - // stacks - if (previousSlide) { - previousSlide.classList.remove('present'); - previousSlide.setAttribute('aria-hidden', 'true'); - - // Reset all slides upon navigate to home - // Issue: #285 - if (dom.wrapper.querySelector(HOME_SLIDE_SELECTOR).classList.contains('present')) { - // Launch async task - setTimeout(function () { - var slides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR + '.stack')), i; - for (i in slides) { - if (slides[i]) { - // Reset stack - setPreviousVerticalIndex(slides[i], 0); - } - } - }, 0); - } - } - - // Handle embedded content - if (slideChanged || !previousSlide) { - stopEmbeddedContent(previousSlide); - startEmbeddedContent(currentSlide); - } - - // Announce the current slide contents, for screen readers - dom.statusDiv.textContent = getStatusText(currentSlide); - - updateControls(); - updateProgress(); - updateBackground(); - updateParallax(); - updateSlideNumber(); - updateNotes(); - - // Update the URL hash - writeURL(); - - cueAutoSlide(); - - } - - /** - * Syncs the presentation with the current DOM. Useful - * when new slides or control elements are added or when - * the configuration has changed. - */ - function sync() { - - // Subscribe to input - removeEventListeners(); - addEventListeners(); - - // Force a layout to make sure the current config is accounted for - layout(); - - // Reflect the current autoSlide value - autoSlide = config.autoSlide; - - // Start auto-sliding if it's enabled - cueAutoSlide(); - - // Re-create the slide backgrounds - createBackgrounds(); - - // Write the current hash to the URL - writeURL(); - - sortAllFragments(); - - updateControls(); - updateProgress(); - updateSlideNumber(); - updateSlidesVisibility(); - updateBackground(true); - updateNotesVisibility(); - updateNotes(); - - formatEmbeddedContent(); - - // Start or stop embedded content depending on global config - if (config.autoPlayMedia === false) { - stopEmbeddedContent(currentSlide, {unloadIframes: false}); - } else { - startEmbeddedContent(currentSlide); - } - - if (isOverview()) { - layoutOverview(); - } - - } - - /** - * Resets all vertical slides so that only the first - * is visible. - */ - function resetVerticalSlides() { - - var horizontalSlides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)); - horizontalSlides.forEach(function (horizontalSlide) { - - var verticalSlides = toArray(horizontalSlide.querySelectorAll('section')); - verticalSlides.forEach(function (verticalSlide, y) { - - if (y > 0) { - verticalSlide.classList.remove('present'); - verticalSlide.classList.remove('past'); - verticalSlide.classList.add('future'); - verticalSlide.setAttribute('aria-hidden', 'true'); - } - - }); - - }); - - } - - /** - * Sorts and formats all of fragments in the - * presentation. - */ - function sortAllFragments() { - - var horizontalSlides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)); - horizontalSlides.forEach(function (horizontalSlide) { - - var verticalSlides = toArray(horizontalSlide.querySelectorAll('section')); - verticalSlides.forEach(function (verticalSlide, y) { - - sortFragments(verticalSlide.querySelectorAll('.fragment')); - - }); - - if (verticalSlides.length === 0) sortFragments(horizontalSlide.querySelectorAll('.fragment')); - - }); - - } - - /** - * Randomly shuffles all slides in the deck. - */ - function shuffle() { - - var slides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)); - - slides.forEach(function (slide) { - - // Insert this slide next to another random slide. This may - // cause the slide to insert before itself but that's fine. - dom.slides.insertBefore(slide, slides[Math.floor(Math.random() * slides.length)]); - - }); - - } - - /** - * Updates one dimension of slides by showing the slide - * with the specified index. - * - * @param {string} selector A CSS selector that will fetch - * the group of slides we are working with - * @param {number} index The index of the slide that should be - * shown - * - * @return {number} The index of the slide that is now shown, - * might differ from the passed in index if it was out of - * bounds. - */ - function updateSlides(selector, index) { - - // Select all slides and convert the NodeList result to - // an array - var slides = toArray(dom.wrapper.querySelectorAll(selector)), - slidesLength = slides.length; - - var printMode = isPrintingPDF(); - - if (slidesLength) { - - // Should the index loop? - if (config.loop) { - index %= slidesLength; - - if (index < 0) { - index = slidesLength + index; - } - } - - // Enforce max and minimum index bounds - index = Math.max(Math.min(index, slidesLength - 1), 0); - - for (var i = 0; i < slidesLength; i++) { - var element = slides[i]; - - var reverse = config.rtl && !isVerticalSlide(element); - - element.classList.remove('past'); - element.classList.remove('present'); - element.classList.remove('future'); - - // http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute - element.setAttribute('hidden', ''); - element.setAttribute('aria-hidden', 'true'); - - // If this element contains vertical slides - if (element.querySelector('section')) { - element.classList.add('stack'); - } - - // If we're printing static slides, all slides are "present" - if (printMode) { - element.classList.add('present'); - continue; - } - - if (i < index) { - // Any element previous to index is given the 'past' class - element.classList.add(reverse ? 'future' : 'past'); - - if (config.fragments) { - var pastFragments = toArray(element.querySelectorAll('.fragment')); - - // Show all fragments on prior slides - while (pastFragments.length) { - var pastFragment = pastFragments.pop(); - pastFragment.classList.add('visible'); - pastFragment.classList.remove('current-fragment'); - } - } - } else if (i > index) { - // Any element subsequent to index is given the 'future' class - element.classList.add(reverse ? 'past' : 'future'); - - if (config.fragments) { - var futureFragments = toArray(element.querySelectorAll('.fragment.visible')); - - // No fragments in future slides should be visible ahead of time - while (futureFragments.length) { - var futureFragment = futureFragments.pop(); - futureFragment.classList.remove('visible'); - futureFragment.classList.remove('current-fragment'); - } - } - } - } - - // Mark the current slide as present - slides[index].classList.add('present'); - slides[index].removeAttribute('hidden'); - slides[index].removeAttribute('aria-hidden'); - - // If this slide has a state associated with it, add it - // onto the current state of the deck - var slideState = slides[index].getAttribute('data-state'); - if (slideState) { - state = state.concat(slideState.split(' ')); - } - - } else { - // Since there are no slides we can't be anywhere beyond the - // zeroth index - index = 0; - } - - return index; - - } - - /** - * Optimization method; hide all slides that are far away - * from the present slide. - */ - function updateSlidesVisibility() { - - // Select all slides and convert the NodeList result to - // an array - var horizontalSlides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)), - horizontalSlidesLength = horizontalSlides.length, - distanceX, - distanceY; - - if (horizontalSlidesLength && typeof indexh !== 'undefined') { - - // The number of steps away from the present slide that will - // be visible - var viewDistance = isOverview() ? 10 : config.viewDistance; - - // Limit view distance on weaker devices - if (isMobileDevice) { - viewDistance = isOverview() ? 6 : 2; - } - - // All slides need to be visible when exporting to PDF - if (isPrintingPDF()) { - viewDistance = Number.MAX_VALUE; - } - - for (var x = 0; x < horizontalSlidesLength; x++) { - var horizontalSlide = horizontalSlides[x]; - - var verticalSlides = toArray(horizontalSlide.querySelectorAll('section')), - verticalSlidesLength = verticalSlides.length; - - // Determine how far away this slide is from the present - distanceX = Math.abs((indexh || 0) - x) || 0; - - // If the presentation is looped, distance should measure - // 1 between the first and last slides - if (config.loop) { - distanceX = Math.abs(((indexh || 0) - x) % (horizontalSlidesLength - viewDistance)) || 0; - } - - // Show the horizontal slide if it's within the view distance - if (distanceX < viewDistance) { - loadSlide(horizontalSlide); - } else { - unloadSlide(horizontalSlide); - } - - if (verticalSlidesLength) { - - var oy = getPreviousVerticalIndex(horizontalSlide); - - for (var y = 0; y < verticalSlidesLength; y++) { - var verticalSlide = verticalSlides[y]; - - distanceY = x === (indexh || 0) ? Math.abs((indexv || 0) - y) : Math.abs(y - oy); - - if (distanceX + distanceY < viewDistance) { - loadSlide(verticalSlide); - } else { - unloadSlide(verticalSlide); - } - } - - } - } - - // Flag if there are ANY vertical slides, anywhere in the deck - if (dom.wrapper.querySelectorAll('.slides>section>section').length) { - dom.wrapper.classList.add('has-vertical-slides'); - } else { - dom.wrapper.classList.remove('has-vertical-slides'); - } - - // Flag if there are ANY horizontal slides, anywhere in the deck - if (dom.wrapper.querySelectorAll('.slides>section').length > 1) { - dom.wrapper.classList.add('has-horizontal-slides'); - } else { - dom.wrapper.classList.remove('has-horizontal-slides'); - } - - } - - } - - /** - * Pick up notes from the current slide and display them - * to the viewer. - * - * @see {@link config.showNotes} - */ - function updateNotes() { - - if (config.showNotes && dom.speakerNotes && currentSlide && !isPrintingPDF()) { - - dom.speakerNotes.innerHTML = getSlideNotes() || 'No notes on this slide.'; - - } - - } - - /** - * Updates the visibility of the speaker notes sidebar that - * is used to share annotated slides. The notes sidebar is - * only visible if showNotes is true and there are notes on - * one or more slides in the deck. - */ - function updateNotesVisibility() { - - if (config.showNotes && hasNotes()) { - dom.wrapper.classList.add('show-notes'); - } else { - dom.wrapper.classList.remove('show-notes'); - } - - } - - /** - * Checks if there are speaker notes for ANY slide in the - * presentation. - */ - function hasNotes() { - - return dom.slides.querySelectorAll('[data-notes], aside.notes').length > 0; - - } - - /** - * Updates the progress bar to reflect the current slide. - */ - function updateProgress() { - - // Update progress if enabled - if (config.progress && dom.progressbar) { - - dom.progressbar.style.width = getProgress() * dom.wrapper.offsetWidth + 'px'; - - } - - } - - /** - * Updates the slide number div to reflect the current slide. - * - * The following slide number formats are available: - * "h.v": horizontal . vertical slide number (default) - * "h/v": horizontal / vertical slide number - * "c": flattened slide number - * "c/t": flattened slide number / total slides - */ - function updateSlideNumber() { - - // Update slide number if enabled - if (config.slideNumber && dom.slideNumber) { - - var value = []; - var format = 'h.v'; - - // Check if a custom number format is available - if (typeof config.slideNumber === 'string') { - format = config.slideNumber; - } - - switch (format) { - case 'c': - value.push(getSlidePastCount() + 1); - break; - case 'c/t': - value.push(getSlidePastCount() + 1, '/', getTotalSlides()); - break; - case 'h/v': - value.push(indexh + 1); - if (isVerticalSlide()) value.push('/', indexv + 1); - break; - default: - value.push(indexh + 1); - if (isVerticalSlide()) value.push('.', indexv + 1); - } - - dom.slideNumber.innerHTML = formatSlideNumber(value[0], value[1], value[2]); - } - - } - - /** - * Applies HTML formatting to a slide number before it's - * written to the DOM. - * - * @param {number} a Current slide - * @param {string} delimiter Character to separate slide numbers - * @param {(number|*)} b Total slides - * @return {string} HTML string fragment - */ - function formatSlideNumber(a, delimiter, b) { - - if (typeof b === 'number' && !isNaN(b)) { - return '' + a + '' + - '' + delimiter + '' + - '' + b + ''; - } else { - return '' + a + ''; - } - - } - - /** - * Updates the state of all control/navigation arrows. - */ - function updateControls() { - - var routes = availableRoutes(); - var fragments = availableFragments(); - - // Remove the 'enabled' class from all directions - dom.controlsLeft.concat(dom.controlsRight) - .concat(dom.controlsUp) - .concat(dom.controlsDown) - .concat(dom.controlsPrev) - .concat(dom.controlsNext).forEach(function (node) { - node.classList.remove('enabled'); - node.classList.remove('fragmented'); - - // Set 'disabled' attribute on all directions - node.setAttribute('disabled', 'disabled'); - }); - - // Add the 'enabled' class to the available routes; remove 'disabled' attribute to enable buttons - if (routes.left) dom.controlsLeft.forEach(function (el) { - el.classList.add('enabled'); - el.removeAttribute('disabled'); - }); - if (routes.right) dom.controlsRight.forEach(function (el) { - el.classList.add('enabled'); - el.removeAttribute('disabled'); - }); - if (routes.up) dom.controlsUp.forEach(function (el) { - el.classList.add('enabled'); - el.removeAttribute('disabled'); - }); - if (routes.down) dom.controlsDown.forEach(function (el) { - el.classList.add('enabled'); - el.removeAttribute('disabled'); - }); - - // Prev/next buttons - if (routes.left || routes.up) dom.controlsPrev.forEach(function (el) { - el.classList.add('enabled'); - el.removeAttribute('disabled'); - }); - if (routes.right || routes.down) dom.controlsNext.forEach(function (el) { - el.classList.add('enabled'); - el.removeAttribute('disabled'); - }); - - // Highlight fragment directions - if (currentSlide) { - - // Always apply fragment decorator to prev/next buttons - if (fragments.prev) dom.controlsPrev.forEach(function (el) { - el.classList.add('fragmented', 'enabled'); - el.removeAttribute('disabled'); - }); - if (fragments.next) dom.controlsNext.forEach(function (el) { - el.classList.add('fragmented', 'enabled'); - el.removeAttribute('disabled'); - }); - - // Apply fragment decorators to directional buttons based on - // what slide axis they are in - if (isVerticalSlide(currentSlide)) { - if (fragments.prev) dom.controlsUp.forEach(function (el) { - el.classList.add('fragmented', 'enabled'); - el.removeAttribute('disabled'); - }); - if (fragments.next) dom.controlsDown.forEach(function (el) { - el.classList.add('fragmented', 'enabled'); - el.removeAttribute('disabled'); - }); - } else { - if (fragments.prev) dom.controlsLeft.forEach(function (el) { - el.classList.add('fragmented', 'enabled'); - el.removeAttribute('disabled'); - }); - if (fragments.next) dom.controlsRight.forEach(function (el) { - el.classList.add('fragmented', 'enabled'); - el.removeAttribute('disabled'); - }); - } - - } - - if (config.controlsTutorial) { - - // Highlight control arrows with an animation to ensure - // that the viewer knows how to navigate - if (!hasNavigatedDown && routes.down) { - dom.controlsDownArrow.classList.add('highlight'); - } else { - dom.controlsDownArrow.classList.remove('highlight'); - - if (!hasNavigatedRight && routes.right && indexv === 0) { - dom.controlsRightArrow.classList.add('highlight'); - } else { - dom.controlsRightArrow.classList.remove('highlight'); - } - } - - } - - } - - /** - * Updates the background elements to reflect the current - * slide. - * - * @param {boolean} includeAll If true, the backgrounds of - * all vertical slides (not just the present) will be updated. - */ - function updateBackground(includeAll) { - - var currentBackground = null; - - // Reverse past/future classes when in RTL mode - var horizontalPast = config.rtl ? 'future' : 'past', - horizontalFuture = config.rtl ? 'past' : 'future'; - - // Update the classes of all backgrounds to match the - // states of their slides (past/present/future) - toArray(dom.background.childNodes).forEach(function (backgroundh, h) { - - backgroundh.classList.remove('past'); - backgroundh.classList.remove('present'); - backgroundh.classList.remove('future'); - - if (h < indexh) { - backgroundh.classList.add(horizontalPast); - } else if (h > indexh) { - backgroundh.classList.add(horizontalFuture); - } else { - backgroundh.classList.add('present'); - - // Store a reference to the current background element - currentBackground = backgroundh; - } - - if (includeAll || h === indexh) { - toArray(backgroundh.querySelectorAll('.slide-background')).forEach(function (backgroundv, v) { - - backgroundv.classList.remove('past'); - backgroundv.classList.remove('present'); - backgroundv.classList.remove('future'); - - if (v < indexv) { - backgroundv.classList.add('past'); - } else if (v > indexv) { - backgroundv.classList.add('future'); - } else { - backgroundv.classList.add('present'); - - // Only if this is the present horizontal and vertical slide - if (h === indexh) currentBackground = backgroundv; - } - - }); - } - - }); - - // Stop content inside of previous backgrounds - if (previousBackground) { - - stopEmbeddedContent(previousBackground); - - } - - // Start content in the current background - if (currentBackground) { - - startEmbeddedContent(currentBackground); - - var backgroundImageURL = currentBackground.style.backgroundImage || ''; - - // Restart GIFs (doesn't work in Firefox) - if (/\.gif/i.test(backgroundImageURL)) { - currentBackground.style.backgroundImage = ''; - window.getComputedStyle(currentBackground).opacity; - currentBackground.style.backgroundImage = backgroundImageURL; - } - - // Don't transition between identical backgrounds. This - // prevents unwanted flicker. - var previousBackgroundHash = previousBackground ? previousBackground.getAttribute('data-background-hash') : null; - var currentBackgroundHash = currentBackground.getAttribute('data-background-hash'); - if (currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== previousBackground) { - dom.background.classList.add('no-transition'); - } - - previousBackground = currentBackground; - - } - - // If there's a background brightness flag for this slide, - // bubble it to the .reveal container - if (currentSlide) { - ['has-light-background', 'has-dark-background'].forEach(function (classToBubble) { - if (currentSlide.classList.contains(classToBubble)) { - dom.wrapper.classList.add(classToBubble); - } else { - dom.wrapper.classList.remove(classToBubble); - } - }); - } - - // Allow the first background to apply without transition - setTimeout(function () { - dom.background.classList.remove('no-transition'); - }, 1); - - } - - /** - * Updates the position of the parallax background based - * on the current slide index. - */ - function updateParallax() { - - if (config.parallaxBackgroundImage) { - - var horizontalSlides = dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR), - verticalSlides = dom.wrapper.querySelectorAll(VERTICAL_SLIDES_SELECTOR); - - var backgroundSize = dom.background.style.backgroundSize.split(' '), - backgroundWidth, backgroundHeight; - - if (backgroundSize.length === 1) { - backgroundWidth = backgroundHeight = parseInt(backgroundSize[0], 10); - } else { - backgroundWidth = parseInt(backgroundSize[0], 10); - backgroundHeight = parseInt(backgroundSize[1], 10); - } - - var slideWidth = dom.background.offsetWidth, - horizontalSlideCount = horizontalSlides.length, - horizontalOffsetMultiplier, - horizontalOffset; - - if (typeof config.parallaxBackgroundHorizontal === 'number') { - horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal; - } else { - horizontalOffsetMultiplier = horizontalSlideCount > 1 ? (backgroundWidth - slideWidth) / (horizontalSlideCount - 1) : 0; - } - - horizontalOffset = horizontalOffsetMultiplier * indexh * -1; - - var slideHeight = dom.background.offsetHeight, - verticalSlideCount = verticalSlides.length, - verticalOffsetMultiplier, - verticalOffset; - - if (typeof config.parallaxBackgroundVertical === 'number') { - verticalOffsetMultiplier = config.parallaxBackgroundVertical; - } else { - verticalOffsetMultiplier = (backgroundHeight - slideHeight) / (verticalSlideCount - 1); - } - - verticalOffset = verticalSlideCount > 0 ? verticalOffsetMultiplier * indexv : 0; - - dom.background.style.backgroundPosition = horizontalOffset + 'px ' + -verticalOffset + 'px'; - - } - - } - - /** - * Called when the given slide is within the configured view - * distance. Shows the slide element and loads any content - * that is set to load lazily (data-src). - * - * @param {HTMLElement} slide Slide to show - */ - function loadSlide(slide, options) { - - options = options || {}; - - // Show the slide element - slide.style.display = config.display; - - // Media elements with data-src attributes - toArray(slide.querySelectorAll('img[data-src], video[data-src], audio[data-src]')).forEach(function (element) { - element.setAttribute('src', element.getAttribute('data-src')); - element.setAttribute('data-lazy-loaded', ''); - element.removeAttribute('data-src'); - }); - - // Media elements with children - toArray(slide.querySelectorAll('video, audio')).forEach(function (media) { - var sources = 0; - - toArray(media.querySelectorAll('source[data-src]')).forEach(function (source) { - source.setAttribute('src', source.getAttribute('data-src')); - source.removeAttribute('data-src'); - source.setAttribute('data-lazy-loaded', ''); - sources += 1; - }); - - // If we rewrote sources for this video/audio element, we need - // to manually tell it to load from its new origin - if (sources > 0) { - media.load(); - } - }); - - - // Show the corresponding background element - var indices = getIndices(slide); - var background = getSlideBackground(indices.h, indices.v); - if (background) { - background.style.display = 'block'; - - // If the background contains media, load it - if (background.hasAttribute('data-loaded') === false) { - background.setAttribute('data-loaded', 'true'); - - var backgroundImage = slide.getAttribute('data-background-image'), - backgroundVideo = slide.getAttribute('data-background-video'), - backgroundVideoLoop = slide.hasAttribute('data-background-video-loop'), - backgroundVideoMuted = slide.hasAttribute('data-background-video-muted'), - backgroundIframe = slide.getAttribute('data-background-iframe'); - - // Images - if (backgroundImage) { - background.style.backgroundImage = 'url(' + backgroundImage + ')'; - } - // Videos - else if (backgroundVideo && !isSpeakerNotes()) { - var video = document.createElement('video'); - - if (backgroundVideoLoop) { - video.setAttribute('loop', ''); - } - - if (backgroundVideoMuted) { - video.muted = true; - } - - // Inline video playback works (at least in Mobile Safari) as - // long as the video is muted and the `playsinline` attribute is - // present - if (isMobileDevice) { - video.muted = true; - video.autoplay = true; - video.setAttribute('playsinline', ''); - } - - // Support comma separated lists of video sources - backgroundVideo.split(',').forEach(function (source) { - video.innerHTML += ''; - }); - - background.appendChild(video); - } - // Iframes - else if (backgroundIframe && options.excludeIframes !== true) { - var iframe = document.createElement('iframe'); - iframe.setAttribute('allowfullscreen', ''); - iframe.setAttribute('mozallowfullscreen', ''); - iframe.setAttribute('webkitallowfullscreen', ''); - - // Only load autoplaying content when the slide is shown to - // avoid having it play in the background - if (/autoplay=(1|true|yes)/gi.test(backgroundIframe)) { - iframe.setAttribute('data-src', backgroundIframe); - } else { - iframe.setAttribute('src', backgroundIframe); - } - - iframe.style.width = '100%'; - iframe.style.height = '100%'; - iframe.style.maxHeight = '100%'; - iframe.style.maxWidth = '100%'; - - background.appendChild(iframe); - } - } - - } - - } - - /** - * Unloads and hides the given slide. This is called when the - * slide is moved outside of the configured view distance. - * - * @param {HTMLElement} slide - */ - function unloadSlide(slide) { - - // Hide the slide element - slide.style.display = 'none'; - - // Hide the corresponding background element - var indices = getIndices(slide); - var background = getSlideBackground(indices.h, indices.v); - if (background) { - background.style.display = 'none'; - } - - // Reset lazy-loaded media elements with src attributes - toArray(slide.querySelectorAll('video[data-lazy-loaded][src], audio[data-lazy-loaded][src]')).forEach(function (element) { - element.setAttribute('data-src', element.getAttribute('src')); - element.removeAttribute('src'); - }); - - // Reset lazy-loaded media elements with children - toArray(slide.querySelectorAll('video[data-lazy-loaded] source[src], audio source[src]')).forEach(function (source) { - source.setAttribute('data-src', source.getAttribute('src')); - source.removeAttribute('src'); - }); - - } - - /** - * Determine what available routes there are for navigation. - * - * @return {{left: boolean, right: boolean, up: boolean, down: boolean}} - */ - function availableRoutes() { - - var horizontalSlides = dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR), - verticalSlides = dom.wrapper.querySelectorAll(VERTICAL_SLIDES_SELECTOR); - - var routes = { - left: indexh > 0 || config.loop, - right: indexh < horizontalSlides.length - 1 || config.loop, - up: indexv > 0, - down: indexv < verticalSlides.length - 1 - }; - - // reverse horizontal controls for rtl - if (config.rtl) { - var left = routes.left; - routes.left = routes.right; - routes.right = left; - } - - return routes; - - } - - /** - * Returns an object describing the available fragment - * directions. - * - * @return {{prev: boolean, next: boolean}} - */ - function availableFragments() { - - if (currentSlide && config.fragments) { - var fragments = currentSlide.querySelectorAll('.fragment'); - var hiddenFragments = currentSlide.querySelectorAll('.fragment:not(.visible)'); - - return { - prev: fragments.length - hiddenFragments.length > 0, - next: !!hiddenFragments.length - }; - } else { - return {prev: false, next: false}; - } - - } - - /** - * Enforces origin-specific format rules for embedded media. - */ - function formatEmbeddedContent() { - - var _appendParamToIframeSource = function (sourceAttribute, sourceURL, param) { - toArray(dom.slides.querySelectorAll('iframe[' + sourceAttribute + '*="' + sourceURL + '"]')).forEach(function (el) { - var src = el.getAttribute(sourceAttribute); - if (src && src.indexOf(param) === -1) { - el.setAttribute(sourceAttribute, src + (!/\?/.test(src) ? '?' : '&') + param); - } - }); - }; - - // YouTube frames must include "?enablejsapi=1" - _appendParamToIframeSource('src', 'youtube.com/embed/', 'enablejsapi=1'); - _appendParamToIframeSource('data-src', 'youtube.com/embed/', 'enablejsapi=1'); - - // Vimeo frames must include "?api=1" - _appendParamToIframeSource('src', 'player.vimeo.com/', 'api=1'); - _appendParamToIframeSource('data-src', 'player.vimeo.com/', 'api=1'); - - // Always show media controls on mobile devices - if (isMobileDevice) { - toArray(dom.slides.querySelectorAll('video, audio')).forEach(function (el) { - el.controls = true; - }); - } - - } - - /** - * Start playback of any embedded content inside of - * the given element. - * - * @param {HTMLElement} element - */ - function startEmbeddedContent(element) { - - if (element && !isSpeakerNotes()) { - - // Restart GIFs - toArray(element.querySelectorAll('img[src$=".gif"]')).forEach(function (el) { - // Setting the same unchanged source like this was confirmed - // to work in Chrome, FF & Safari - el.setAttribute('src', el.getAttribute('src')); - }); - - // HTML5 media elements - toArray(element.querySelectorAll('video, audio')).forEach(function (el) { - if (closestParent(el, '.fragment') && !closestParent(el, '.fragment.visible')) { - return; - } - - // Prefer an explicit global autoplay setting - var autoplay = config.autoPlayMedia; - - // If no global setting is available, fall back on the element's - // own autoplay setting - if (typeof autoplay !== 'boolean') { - autoplay = el.hasAttribute('data-autoplay') || !!closestParent(el, '.slide-background'); - } - - if (autoplay && typeof el.play === 'function') { - - if (el.readyState > 1) { - startEmbeddedMedia({target: el}); - } else { - el.removeEventListener('loadeddata', startEmbeddedMedia); // remove first to avoid dupes - el.addEventListener('loadeddata', startEmbeddedMedia); - } - - } - }); - - // Normal iframes - toArray(element.querySelectorAll('iframe[src]')).forEach(function (el) { - if (closestParent(el, '.fragment') && !closestParent(el, '.fragment.visible')) { - return; - } - - startEmbeddedIframe({target: el}); - }); - - // Lazy loading iframes - toArray(element.querySelectorAll('iframe[data-src]')).forEach(function (el) { - if (closestParent(el, '.fragment') && !closestParent(el, '.fragment.visible')) { - return; - } - - if (el.getAttribute('src') !== el.getAttribute('data-src')) { - el.removeEventListener('load', startEmbeddedIframe); // remove first to avoid dupes - el.addEventListener('load', startEmbeddedIframe); - el.setAttribute('src', el.getAttribute('data-src')); - } - }); - - } - - } - - /** - * Starts playing an embedded video/audio element after - * it has finished loading. - * - * @param {object} event - */ - function startEmbeddedMedia(event) { - - var isAttachedToDOM = !!closestParent(event.target, 'html'), - isVisible = !!closestParent(event.target, '.present'); - - if (isAttachedToDOM && isVisible) { - event.target.currentTime = 0; - event.target.play(); - } - - event.target.removeEventListener('loadeddata', startEmbeddedMedia); - - } - - /** - * "Starts" the content of an embedded iframe using the - * postMessage API. - * - * @param {object} event - */ - function startEmbeddedIframe(event) { - - var iframe = event.target; - - if (iframe && iframe.contentWindow) { - - var isAttachedToDOM = !!closestParent(event.target, 'html'), - isVisible = !!closestParent(event.target, '.present'); - - if (isAttachedToDOM && isVisible) { - - // Prefer an explicit global autoplay setting - var autoplay = config.autoPlayMedia; - - // If no global setting is available, fall back on the element's - // own autoplay setting - if (typeof autoplay !== 'boolean') { - autoplay = iframe.hasAttribute('data-autoplay') || !!closestParent(iframe, '.slide-background'); - } - - // YouTube postMessage API - if (/youtube\.com\/embed\//.test(iframe.getAttribute('src')) && autoplay) { - iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); - } - // Vimeo postMessage API - else if (/player\.vimeo\.com\//.test(iframe.getAttribute('src')) && autoplay) { - iframe.contentWindow.postMessage('{"method":"play"}', '*'); - } - // Generic postMessage API - else { - iframe.contentWindow.postMessage('slide:start', '*'); - } - - } - - } - - } - - /** - * Stop playback of any embedded content inside of - * the targeted slide. - * - * @param {HTMLElement} element - */ - function stopEmbeddedContent(element, options) { - - options = extend({ - // Defaults - unloadIframes: true - }, options || {}); - - if (element && element.parentNode) { - // HTML5 media elements - toArray(element.querySelectorAll('video, audio')).forEach(function (el) { - if (!el.hasAttribute('data-ignore') && typeof el.pause === 'function') { - el.setAttribute('data-paused-by-reveal', ''); - el.pause(); - } - }); - - // Generic postMessage API for non-lazy loaded iframes - toArray(element.querySelectorAll('iframe')).forEach(function (el) { - if (el.contentWindow) el.contentWindow.postMessage('slide:stop', '*'); - el.removeEventListener('load', startEmbeddedIframe); - }); - - // YouTube postMessage API - toArray(element.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function (el) { - if (!el.hasAttribute('data-ignore') && el.contentWindow && typeof el.contentWindow.postMessage === 'function') { - el.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*'); - } - }); - - // Vimeo postMessage API - toArray(element.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(function (el) { - if (!el.hasAttribute('data-ignore') && el.contentWindow && typeof el.contentWindow.postMessage === 'function') { - el.contentWindow.postMessage('{"method":"pause"}', '*'); - } - }); - - if (options.unloadIframes === true) { - // Unload lazy-loaded iframes - toArray(element.querySelectorAll('iframe[data-src]')).forEach(function (el) { - // Only removing the src doesn't actually unload the frame - // in all browsers (Firefox) so we set it to blank first - el.setAttribute('src', 'about:blank'); - el.removeAttribute('src'); - }); - } - } - - } - - /** - * Returns the number of past slides. This can be used as a global - * flattened index for slides. - * - * @return {number} Past slide count - */ - function getSlidePastCount() { - - var horizontalSlides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)); - - // The number of past slides - var pastCount = 0; - - // Step through all slides and count the past ones - mainLoop: for (var i = 0; i < horizontalSlides.length; i++) { - - var horizontalSlide = horizontalSlides[i]; - var verticalSlides = toArray(horizontalSlide.querySelectorAll('section')); - - for (var j = 0; j < verticalSlides.length; j++) { - - // Stop as soon as we arrive at the present - if (verticalSlides[j].classList.contains('present')) { - break mainLoop; - } - - pastCount++; - - } - - // Stop as soon as we arrive at the present - if (horizontalSlide.classList.contains('present')) { - break; - } - - // Don't count the wrapping section for vertical slides - if (horizontalSlide.classList.contains('stack') === false) { - pastCount++; - } - - } - - return pastCount; - - } - - /** - * Returns a value ranging from 0-1 that represents - * how far into the presentation we have navigated. - * - * @return {number} - */ - function getProgress() { - - // The number of past and total slides - var totalCount = getTotalSlides(); - var pastCount = getSlidePastCount(); - - if (currentSlide) { - - var allFragments = currentSlide.querySelectorAll('.fragment'); - - // If there are fragments in the current slide those should be - // accounted for in the progress. - if (allFragments.length > 0) { - var visibleFragments = currentSlide.querySelectorAll('.fragment.visible'); - - // This value represents how big a portion of the slide progress - // that is made up by its fragments (0-1) - var fragmentWeight = 0.9; - - // Add fragment progress to the past slide count - pastCount += (visibleFragments.length / allFragments.length) * fragmentWeight; - } - - } - - return pastCount / (totalCount - 1); - - } - - /** - * Checks if this presentation is running inside of the - * speaker notes window. - * - * @return {boolean} - */ - function isSpeakerNotes() { - - return !!window.location.search.match(/receiver/gi); - - } - - /** - * Reads the current URL (hash) and navigates accordingly. - */ - function readURL() { - - var hash = window.location.hash; - - // Attempt to parse the hash as either an index or name - var bits = hash.slice(2).split('/'), - name = hash.replace(/#|\//gi, ''); - - // If the first bit is invalid and there is a name we can - // assume that this is a named link - if (isNaN(parseInt(bits[0], 10)) && name.length) { - var element; - - // Ensure the named link is a valid HTML ID attribute - if (/^[a-zA-Z][\w:.-]*$/.test(name)) { - // Find the slide with the specified ID - element = document.getElementById(name); - } - - if (element) { - // Find the position of the named slide and navigate to it - var indices = Reveal.getIndices(element); - slide(indices.h, indices.v); - } - // If the slide doesn't exist, navigate to the current slide - else { - slide(indexh || 0, indexv || 0); - } - } else { - // Read the index components of the hash - var h = parseInt(bits[0], 10) || 0, - v = parseInt(bits[1], 10) || 0; - - if (h !== indexh || v !== indexv) { - slide(h, v); - } - } - - } - - /** - * Updates the page URL (hash) to reflect the current - * state. - * - * @param {number} delay The time in ms to wait before - * writing the hash - */ - function writeURL(delay) { - - if (config.history) { - - // Make sure there's never more than one timeout running - clearTimeout(writeURLTimeout); - - // If a delay is specified, timeout this call - if (typeof delay === 'number') { - writeURLTimeout = setTimeout(writeURL, delay); - } else if (currentSlide) { - var url = '/'; - - // Attempt to create a named link based on the slide's ID - var id = currentSlide.getAttribute('id'); - if (id) { - id = id.replace(/[^a-zA-Z0-9\-\_\:\.]/g, ''); - } - - // If the current slide has an ID, use that as a named link - if (typeof id === 'string' && id.length) { - url = '/' + id; - } - // Otherwise use the /h/v index - else { - if (indexh > 0 || indexv > 0) url += indexh; - if (indexv > 0) url += '/' + indexv; - } - - window.location.hash = url; - } - } - - } - - /** - * Retrieves the h/v location and fragment of the current, - * or specified, slide. - * - * @param {HTMLElement} [slide] If specified, the returned - * index will be for this slide rather than the currently - * active one - * - * @return {{h: number, v: number, f: number}} - */ - function getIndices(slide) { - - // By default, return the current indices - var h = indexh, - v = indexv, - f; - - // If a slide is specified, return the indices of that slide - if (slide) { - var isVertical = isVerticalSlide(slide); - var slideh = isVertical ? slide.parentNode : slide; - - // Select all horizontal slides - var horizontalSlides = toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)); - - // Now that we know which the horizontal slide is, get its index - h = Math.max(horizontalSlides.indexOf(slideh), 0); - - // Assume we're not vertical - v = undefined; - - // If this is a vertical slide, grab the vertical index - if (isVertical) { - v = Math.max(toArray(slide.parentNode.querySelectorAll('section')).indexOf(slide), 0); - } - } - - if (!slide && currentSlide) { - var hasFragments = currentSlide.querySelectorAll('.fragment').length > 0; - if (hasFragments) { - var currentFragment = currentSlide.querySelector('.current-fragment'); - if (currentFragment && currentFragment.hasAttribute('data-fragment-index')) { - f = parseInt(currentFragment.getAttribute('data-fragment-index'), 10); - } else { - f = currentSlide.querySelectorAll('.fragment.visible').length - 1; - } - } - } - - return {h: h, v: v, f: f}; - - } - - /** - * Retrieves all slides in this presentation. - */ - function getSlides() { - - return toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR + ':not(.stack)')); - - } - - /** - * Retrieves the total number of slides in this presentation. - * - * @return {number} - */ - function getTotalSlides() { - - return getSlides().length; - - } - - /** - * Returns the slide element matching the specified index. - * - * @return {HTMLElement} - */ - function getSlide(x, y) { - - var horizontalSlide = dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR)[x]; - var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll('section'); - - if (verticalSlides && verticalSlides.length && typeof y === 'number') { - return verticalSlides ? verticalSlides[y] : undefined; - } - - return horizontalSlide; - - } - - /** - * Returns the background element for the given slide. - * All slides, even the ones with no background properties - * defined, have a background element so as long as the - * index is valid an element will be returned. - * - * @param {number} x Horizontal background index - * @param {number} y Vertical background index - * @return {(HTMLElement[]|*)} - */ - function getSlideBackground(x, y) { - - var slide = getSlide(x, y); - if (slide) { - return slide.slideBackgroundElement; - } - - return undefined; - - } - - /** - * Retrieves the speaker notes from a slide. Notes can be - * defined in two ways: - * 1. As a data-notes attribute on the slide
- * 2. As an