├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── Utilities.php ├── blueprints.yaml ├── blueprints └── fullpage.yaml ├── css ├── bower.json ├── fullpage.css ├── fullpage.scss ├── jquery.fullpage.min.css └── transition.css ├── fullpage.php ├── fullpage.yaml ├── js └── jquery.fullpage.min.js └── templates └── fullpage.html.twig /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/node,sass,composer,phpstorm,macos,linux,windows 2 | 3 | ### Composer ### 4 | composer.phar 5 | 6 | # Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file 7 | # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file 8 | # composer.lock 9 | 10 | ### Node ### 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | node_modules 18 | 19 | # Runtime data 20 | pids 21 | *.pid 22 | *.seed 23 | *.pid.lock 24 | 25 | # Directory for instrumented libs generated by jscoverage/JSCover 26 | lib-cov 27 | 28 | # Coverage directory used by tools like istanbul 29 | coverage 30 | 31 | # nyc test coverage 32 | .nyc_output 33 | 34 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 35 | .grunt 36 | 37 | # Bower dependency directory (https://bower.io/) 38 | bower_components 39 | 40 | # node-waf configuration 41 | .lock-wscript 42 | 43 | # Compiled binary addons (http://nodejs.org/api/addons.html) 44 | build/Release 45 | 46 | # Dependency directories 47 | node_modules/ 48 | jspm_packages/ 49 | 50 | # Typescript v1 declaration files 51 | typings/ 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional REPL history 60 | .node_repl_history 61 | 62 | # Output of 'npm pack' 63 | *.tgz 64 | 65 | # Yarn Integrity file 66 | .yarn-integrity 67 | 68 | # dotenv environment variables file 69 | .env 70 | 71 | 72 | ### PhpStorm ### 73 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 74 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 75 | 76 | # User-specific stuff: 77 | .idea/**/workspace.xml 78 | .idea/**/tasks.xml 79 | .idea/dictionaries 80 | 81 | # Sensitive or high-churn files: 82 | .idea/**/dataSources/ 83 | .idea/**/dataSources.ids 84 | .idea/**/dataSources.xml 85 | .idea/**/dataSources.local.xml 86 | .idea/**/sqlDataSources.xml 87 | .idea/**/dynamic.xml 88 | .idea/**/uiDesigner.xml 89 | 90 | # Gradle: 91 | .idea/**/gradle.xml 92 | .idea/**/libraries 93 | 94 | # CMake 95 | cmake-build-debug/ 96 | 97 | # Mongo Explorer plugin: 98 | .idea/**/mongoSettings.xml 99 | 100 | ## File-based project format: 101 | *.iws 102 | 103 | ## Plugin-specific files: 104 | 105 | # IntelliJ 106 | /out/ 107 | 108 | # mpeltonen/sbt-idea plugin 109 | .idea_modules/ 110 | 111 | # JIRA plugin 112 | atlassian-ide-plugin.xml 113 | 114 | # Cursive Clojure plugin 115 | .idea/replstate.xml 116 | 117 | # Crashlytics plugin (for Android Studio and IntelliJ) 118 | com_crashlytics_export_strings.xml 119 | crashlytics.properties 120 | crashlytics-build.properties 121 | fabric.properties 122 | 123 | ### PhpStorm Patch ### 124 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 125 | 126 | # *.iml 127 | # modules.xml 128 | # .idea/misc.xml 129 | # *.ipr 130 | 131 | # Sonarlint plugin 132 | .idea/sonarlint 133 | 134 | ### Sass ### 135 | .sass-cache/ 136 | *.css.map 137 | 138 | 139 | ### Linux ### 140 | *~ 141 | 142 | # temporary files which can be created if a process still has a handle open of a deleted file 143 | .fuse_hidden* 144 | 145 | # KDE directory preferences 146 | .directory 147 | 148 | # Linux trash folder which might appear on any partition or disk 149 | .Trash-* 150 | 151 | # .nfs files are created when an open file is removed but is still being accessed 152 | .nfs* 153 | 154 | ### macOS ### 155 | *.DS_Store 156 | .AppleDouble 157 | .LSOverride 158 | 159 | # Icon must end with two \r 160 | Icon 161 | 162 | # Thumbnails 163 | ._* 164 | 165 | # Files that might appear in the root of a volume 166 | .DocumentRevisions-V100 167 | .fseventsd 168 | .Spotlight-V100 169 | .TemporaryItems 170 | .Trashes 171 | .VolumeIcon.icns 172 | .com.apple.timemachine.donotpresent 173 | 174 | # Directories potentially created on remote AFP share 175 | .AppleDB 176 | .AppleDesktop 177 | Network Trash Folder 178 | Temporary Items 179 | .apdisk 180 | 181 | ### Windows ### 182 | # Windows thumbnail cache files 183 | Thumbs.db 184 | ehthumbs.db 185 | ehthumbs_vista.db 186 | 187 | # Folder config file 188 | Desktop.ini 189 | 190 | # Recycle Bin used on file shares 191 | $RECYCLE.BIN/ 192 | 193 | # Windows Installer files 194 | *.cab 195 | *.msi 196 | *.msm 197 | *.msp 198 | 199 | # Windows shortcuts 200 | *.lnk -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # v1.3.0 2 | ## 17-07-2020 3 | 4 | 1. [](#new) 5 | * Blueprints for Admin 6 | 7 | # v1.2.1 8 | ## 28-08-2018 9 | 10 | 1. [](#bugfix) 11 | * Links to demo and docs 12 | 13 | # v1.2.0 14 | ## 03-06-2018 15 | 16 | 1. [](#new) 17 | * Bumped FullPage.js-version to 2.9.7 18 | 2. [](#improved) 19 | * Inline documentation 20 | 3. [](#bugfix) 21 | * Prevent caching Fullpage-template to fix #2 22 | 23 | # v1.1.0-beta.1 24 | ## 11-02-2018 25 | 26 | 1. [](#improved) 27 | * Move asset logic to template 28 | 29 | # v1.0.0 30 | ## 28-01-2018 31 | 32 | 1. [](#new) 33 | * Release as stable 34 | 35 | # v0.9.6 36 | ## 17-06-2017 37 | 38 | 1. [](#improved) 39 | * Transition 40 | * README 41 | 42 | # v0.9.5 43 | ## 16-06-2017 44 | 45 | 1. [](#new) 46 | * Add settings for heading font and block-text font 47 | 2. [](#improved) 48 | * Optimize CSS 49 | * Merge config with page, clean up Utilities 50 | * Clean up Utilities 51 | * Blueprints, CSS, and README 52 | 53 | # v0.9.4 54 | ## 14-06-2017 55 | 56 | 1. [](#new) 57 | * OnLoad Page-Transition 58 | 2. [](#improved) 59 | * Responsive built-in CSS from SCSS 60 | * Blueprints and README 61 | 3. [](#bugfix) 62 | * Revert to Page's content-method 63 | 64 | # v0.9.3 65 | ## 13-06-2017 66 | 67 | 1. [](#improved) 68 | * Blueprints with limited defaults 69 | * Fullpage.yaml with limited defaults 70 | 71 | # v0.9.2 72 | ## 12-06-2017 73 | 74 | 1. [](#new) 75 | * Section- and slide-specific styling from Utilities->interpretShortcodes() 76 | 2. [](#improved) 77 | * Gantry-compatibility 78 | * Twig-template injection 79 | * README and Blueprints 80 | 3. [](#bugfix) 81 | * Revert to Page's rawMarkdown-method 82 | * If empty styles in Utilities->applyStyles(), return null 83 | 84 | # v0.9.1 85 | ## 11-06-2017 86 | 87 | 1. [](#new) 88 | * Initial Blueprints 89 | * Include Theme CSS 90 | * Inject Twig-template 91 | 2. [](#improved) 92 | * README 93 | * Blocks in fullpage.html.twig 94 | * Render Twig in Markdown 95 | * Render page's body_classes-property 96 | 97 | # v0.9.0 98 | ## 11-06-2017 99 | 100 | 1. [](#new) 101 | * Initial beta-release 102 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Ole Vik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fullpage Plugin 2 | 3 | The **Fullpage** Plugin is for [Grav CMS](http://github.com/getgrav/grav). The [Fullpage](https://github.com/OleVik/grav-plugin-fullpage)-plugin provides a simple way of creating fullscreen slideshows that can be navigated vertically and horizontally, using the [fullPage.js](https://github.com/alvarotrigo/fullPage.js)-library. 4 | 5 | At its core the plugin facilitates efficient handling of content for use with the library. You can utilize fullPage.js however you want through custom initialization, and still leverage the plugin's content-handling. 6 | 7 | A [demo is available](https://olevik.me/staging/grav-plugin-fullpage/), as are docs presented [by the plugin](https://olevik.me/staging/grav-plugin-fullpage/docs). The [demo-content](https://github.com/OleVik/grav-plugin-fullpage/tree/demo-content)-branch holds copies of the pages used in these two examples. If you want to get started quickly, @PaulHibbitts has a ready-to-go [skeleton](https://github.com/paulhibbitts/fullpage-site). 8 | 9 | ## Installation 10 | 11 | Installing the Fullpage-plugin can be done in one of two ways. The GPM (Grav Package Manager) installation method enables you to quickly and easily install the plugin with a simple terminal command, while the manual method enables you to do so via a zip file. 12 | 13 | ### GPM Installation (Preferred) 14 | 15 | The simplest way to install this plugin is via the [Grav Package Manager (GPM)](http://learn.getgrav.org/advanced/grav-gpm) through your system's terminal (also called the command line). From the root of your Grav install type: 16 | 17 | bin/gpm install fullpage 18 | 19 | This will install the Fullpage-plugin into your `/user/plugins` directory within Grav. Its files can be found under `/your/site/grav/user/plugins/fullpage`. 20 | 21 | ### Manual Installation 22 | 23 | To install this plugin, just download the zip version of this repository and unzip it under `/your/site/grav/user/plugins`. Then rename the folder to `fullpage`. You can find these files on [GitHub](https://github.com/ole-vik/grav-plugin-fullpage) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras). 24 | 25 | You should now have all the plugin files under 26 | 27 | /your/site/grav/user/plugins/fullpage 28 | 29 | > NOTE: This plugin is a modular component for Grav which requires [Grav](http://github.com/getgrav/grav) and the [Error](https://github.com/getgrav/grav-plugin-error) and [Problems](https://github.com/getgrav/grav-plugin-problems) to operate. 30 | 31 | ## Configuration 32 | 33 | Before configuring this plugin, you should copy the `user/plugins/fullpage/fullpage.yaml` to `user/config/plugins/fullpage.yaml` and only edit that copy. 34 | 35 | Here is the default configuration and an explanation of available options: 36 | 37 | ```yaml 38 | enabled: true 39 | order: 40 | by: folder 41 | dir: asc 42 | builtin_css: true 43 | builtin_js: true 44 | styles: 45 | - background: "#93c0d3" 46 | - background: "#6f977d" 47 | - background: "#598495" 48 | - background: "#5e6168" 49 | - background: "#213533" 50 | color_function: "50" 51 | change_titles: true 52 | options: 53 | ... 54 | ``` 55 | 56 | All options available to the fullPage.js-library can be configured through `options`, see its [documentation for available options](https://github.com/alvarotrigo/fullPage.js#options). For example: 57 | 58 | ```yaml 59 | options: 60 | navigation: false 61 | navigationPosition: 'right' 62 | navigationTooltips: [] 63 | ``` 64 | 65 | In addition to options for the fullPage.js-library, you can define the order of the of how the pages are rendered through `order.by` and `order.dir`, and whether to use the plugin's built-in CSS and JS with `builtin_css` and `builtin_js`. Further, you can define inline-styles for each section or slide through `styles`. This last property is a list of CSS-properties that will be applied to the page, or pages if using horizontal rules, in the order they appear. If `change_titles` is enabled, the plugin will use the titles of pages to override the title of the website upon navigation. 66 | 67 | ### Page-specific configuration 68 | 69 | Any configuration set in `fullpage.yaml` can be overridden through a page's FrontMatter, like this: 70 | 71 | ```yaml 72 | --- 73 | title: Alice’s Adventures in Wonderland 74 | fullpage: 75 | order: 76 | by: date 77 | dir: desc 78 | options: 79 | navigation: true 80 | --- 81 | ``` 82 | 83 | ### Styling 84 | 85 | The `styles`-property is defined by a list of `property: value`'s and processed by the plugin. If the amount of pages exceed the amount of styles, they will be reused in the order they are defined. If the `background`-property is defined, but `color` is not, the plugin tries to estimate a suitable text-color to apply. The equations available to estimate this color is either `50` or `YIQ`, set by `color_function`. 86 | 87 | You can of course also style the plugin using your theme's /css/custom.css-file, by targeting the `#fullpage`-selector which wraps around all of the plugin's content. This behavior can be enabled or disabled with the `theme_css`-setting. All pages have a `data-anchor`-attribute set on their sections, which can be utilized by CSS like this: 88 | 89 | ```css 90 | #fullpage [data-anchor="constructing-pages"] { 91 | background: red; 92 | } 93 | ``` 94 | 95 | #### Using section- or slide-specific styles 96 | 97 | If configured with `shortcodes: true` any section or slide can use shortcodes to declare specific styles. These take the format of `[property=value]` and are defined in multiples, eg: 98 | 99 | ``` 100 | [background=#195b69] 101 | [color=cyan] 102 | ``` 103 | 104 | If the shortcode is found and applied, it is stripped from the further evaluated content. This method uses regular expressions for speed, and takes precedence over plugin- or page-defined `styles`. 105 | 106 | **Note**: The syntax is restricted to `[property=value]`. Quotes or other unexpected characters not conforming to alphanumerics or dashes will make the expression fail to pick up the shortcode. The `property` or `value` must basically conform to the [a-zA-Z0-9-]+ regular expression, separated by an equal-character (`=`) and wrapped in square brackets (`[]`). For testing, use [Regex101](https://regex101.com/r/GlH65o/1). 107 | 108 | ### Injecting Twig 109 | 110 | Using the `inject_footer`-setting you can append a Twig-template to each section globally, or a specific page's section. For example, `inject_footer: "partials/inject.html.twig"` will render the theme's `partials/inject.html.twig`-template and append it to the section(s). If the element was constructed like this: `
Injected
`, you could style it like this: 111 | 112 | ```css 113 | #fullpage .inject { 114 | display: block; 115 | position: absolute; 116 | bottom: 2em; 117 | } 118 | ``` 119 | 120 | You can also arbitrarily execute Twig within a page's Markdown by enabling it in the FrontMatter with: 121 | 122 | ```yaml 123 | twig_first: true 124 | process: 125 | twig: true 126 | ``` 127 | 128 | For example, `

{{ site.author.name }}

` will render the name of the author defined in site.yaml. 129 | 130 | ### Creating a menu 131 | 132 | The plugin makes a `fullpage_menu`-variable available through Twig on pages which use the fullscreen-template, which can be used to construct an overall menu of pages. It is an array with anchors and titles for each page, and a list of them with links to sections can be constructed like this: 133 | 134 | ``` 135 | 142 | ``` 143 | 144 | ## Usage 145 | 146 | The page-structure used in Fullpage is essentially the same as normally in Grav, with a few notable exceptions: Any horizontal rule, `---` in Markdown and `
` in HTML, is treated as a _thematic break_, as it is defined in HTML5. This means that if you separate content with a horizontal rule within a page, the plugin treats this as a new section. This is equivalent to using child-pages for new sections, which work recursively: You can have as many pages below the root-page as you want, each of them will be treated as a section. Further, these methods can be mixed by some pages using horizontal rules, and some not. 147 | 148 | ### Nomenclature 149 | 150 | With fullPage.js there is a distinction between sections and slides. Sections are single fullscreen pages listed vertically, and slides are single fullscreen pages listed horizontally. That is, if a page contains slides these are navigated horizontally rather than vertically. In the plugin, you define this by setting `horizontal: true` in the page's FrontMatter, which treats all content within it as slides. 151 | 152 | ### Example structure: 153 | 154 | ``` 155 | /user/pages/book 156 | ├── fullpage.md 157 | ├── 01.down-the-rabbit-hole 158 | │ └── default.md 159 | ├── 02.advice-from-a-caterpillar 160 | │ └── default.md 161 | ├── 03.were-all-mad-here 162 | │ └── default.md 163 | ├── 04.a-mad-tea-party 164 | │ └── default.md 165 | ├── 05.the-queens-crocquet-ground 166 | │ └── default.md 167 | ├── 06.postscript 168 | └───└── default.md 169 | ``` 170 | 171 | As seen in this example structure, only the initial page uses the `fullpage.html.twig`-template. The template used for child-pages is irrelevant, as only the content of these pages are processed. The plugin defines the `fullpage.html.twig`-template, but you can override it through your theme. 172 | 173 | ## Credits 174 | 175 | - Grav [Fullpage](https://github.com/OleVik/grav-plugin-fullpage)-plugin is written by [Ole Vik](https://github.com/OleVik) 176 | - jQuery [fullPage.js](https://github.com/alvarotrigo/fullPage.js)-plugin is created by [@imac](https://twitter.com/imac2) 177 | - Both are MIT-licensed 178 | 179 | -------------------------------------------------------------------------------- /Utilities.php: -------------------------------------------------------------------------------- 1 | config = $config; 33 | } 34 | 35 | /** 36 | * Creates page-structure recursively 37 | * 38 | * @param string $route Route to page 39 | * @param string $mode Reserved collection-mode for handling child-pages 40 | * @param integer $depth Reserved placeholder for recursion depth 41 | * 42 | * @return array Page-structure with children 43 | */ 44 | public function buildTree($route, $mode = false, $depth = 0) 45 | { 46 | $page = Grav::instance()['page']; 47 | $depth++; 48 | $mode = '@page.self'; 49 | 50 | $config = $this->config; 51 | if (isset($page->header()->fullpage)) { 52 | $config = array_merge($config, $page->header()->fullpage); 53 | } 54 | if ($depth > 1) { 55 | $mode = '@page.children'; 56 | } 57 | $pages = $page->evaluate([$mode => $route]); 58 | $pages = $pages->published()->order( 59 | $config['order']['by'], 60 | $config['order']['dir'] 61 | ); 62 | $paths = array(); 63 | foreach ($pages as $page) { 64 | $route = $page->rawRoute(); 65 | $paths[$route]['depth'] = $depth; 66 | $paths[$route]['title'] = $page->title(); 67 | $paths[$route]['menu'] = array( 68 | 'anchor' => $page->slug(), 69 | 'title' => $page->title() 70 | ); 71 | $paths[$route]['route'] = $route; 72 | $paths[$route]['slug'] = $page->slug(); 73 | $paths[$route]['header'] = $page->header(); 74 | if (isset($config['inject_footer'])) { 75 | $paths[$route]['inject_footer'] = $config['inject_footer']; 76 | } 77 | if (isset($page->header()->inject_footer)) { 78 | $paths[$route]['inject_footer'] = $page->header()->inject_footer; 79 | } 80 | if (!empty($paths[$route]['inject_footer'])) { 81 | $paths[$route]['inject_footer'] = Grav::instance()['twig']->processTemplate($paths[$route]['inject_footer'], ['page' => $page]); 82 | } 83 | if (isset($page->header()->horizontal)) { 84 | $paths[$route]['horizontal'] = $page->header()->horizontal; 85 | } 86 | if (isset($page->header()->styles)) { 87 | $paths[$route]['styles'] = $page->header()->styles; 88 | } elseif (isset($config['styles'])) { 89 | $paths[$route]['styles'] = $config['styles']; 90 | } 91 | $paths[$route]['content'] = $page->content(); 92 | 93 | if (!empty($paths[$route])) { 94 | $children = $this->buildTree($route, $mode, $depth); 95 | if (!empty($children)) { 96 | $paths[$route]['children'] = $children; 97 | } 98 | } 99 | } 100 | if (!empty($paths)) { 101 | return $paths; 102 | } else { 103 | return null; 104 | } 105 | } 106 | 107 | /** 108 | * Create HTML to use with fullPage.js 109 | * 110 | * @param array $pages Page-structure with children 111 | * 112 | * @return string HTML-structure 113 | */ 114 | public function buildContent($pages) 115 | { 116 | $parsedown = new \Parsedown(); 117 | $return = ''; 118 | foreach ($pages as $route => $page) { 119 | ob_start(); 120 | $title = $page['title']; 121 | $slug = $page['slug']; 122 | $content = $page['content']; 123 | $content = $parsedown->text($content); 124 | $index = 0; 125 | $styleIndex = 0; 126 | $styles = array(); 127 | $config = $this->config; 128 | if (isset($page['header']->fullpage)) { 129 | $config = array_merge($config, $page['header']->fullpage); 130 | } 131 | $breaks = explode("
", $content); 132 | 133 | if (isset($page['horizontal'])) { 134 | $type = 'slide'; 135 | echo "
"; 140 | } else { 141 | $type = 'section'; 142 | } 143 | foreach ($breaks as $break) { 144 | if ($index == 0) { 145 | $id = $page['slug']; 146 | } else { 147 | $id = $index; 148 | } 149 | if ($config['shortcodes']) { 150 | $shortcodes = $this->interpretShortcodes($break); 151 | $break = $shortcodes['content']; 152 | $shortcodeStyles = $shortcodes['styles']; 153 | } 154 | if (!empty($shortcodeStyles)) { 155 | $shortcodeStyles = $this->applyStyles($page['styles'][$styleIndex]); 156 | echo "
"; 162 | } else { 163 | if (isset($page['styles']) && isset($page['styles'][$styleIndex])) { 164 | $styles = $this->applyStyles($page['styles'][$styleIndex]); 165 | echo "
"; 171 | } else { 172 | echo "
"; 177 | } 178 | } 179 | echo $break; 180 | if (isset($page['inject_footer'])) { 181 | echo $page['inject_footer']; 182 | } 183 | echo "
"; 184 | if (isset($page['styles']) && count($page['styles']) == $styleIndex+1) { 185 | $styleIndex = 0; 186 | } else { 187 | $styleIndex++; 188 | } 189 | $index++; 190 | } 191 | if (isset($page['horizontal'])) { 192 | echo "
"; 193 | } 194 | $return .= ob_get_contents(); 195 | ob_end_clean(); 196 | if (isset($page['children'])) { 197 | $return .= $this->buildContent($page['children']); 198 | } 199 | } 200 | return $return; 201 | } 202 | 203 | public function interpretShortcodes($content) 204 | { 205 | $styles = array(); 206 | $re = '~((?:\[\s*(?[a-zA-Z0-9-_]+)\s*(?:\=\s*(?\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|((?:(?!=\s*|\]|\/\])[^\s])+)))?\s*(?(?:\s*(?:\w+(?:\s*\=\s*\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|\s*\=\s*((?:(?!=\s*|\]|\/\])[^\s])+)|(?=\s|\]|\/\s*\]|$))))*)\s*(?:\](?.*?)\[\s*(?\/)\s*(\k)\s*\]|\]|(?\/)\s*\])))~u'; 207 | preg_match_all($re, $content, $matches, PREG_SET_ORDER, 0); 208 | if (!empty($matches)) { 209 | foreach ($matches as $match) { 210 | $styles[$match['name']] = $match['bbCode']; 211 | $content = str_replace($match[0], '', $content); 212 | } 213 | } 214 | return ['content' => $content, 'styles' => $styles]; 215 | } 216 | 217 | /** 218 | * Generate menu with anchors and titles from pages 219 | * 220 | * @param array $tree Page-structure with children 221 | * 222 | * @return array Slide-anchors with titles 223 | */ 224 | public function buildMenu($tree) 225 | { 226 | $items = array(); 227 | foreach ($tree as $key => $value) { 228 | if (is_array($value['menu'])) { 229 | $items[$value['menu']['anchor']] = $value['menu']['title']; 230 | } 231 | if (isset($value['children'])) { 232 | $items[] = $this->buildMenu($value['children']); 233 | } 234 | } 235 | return $items; 236 | } 237 | 238 | /** 239 | * Format styles for inlining 240 | * 241 | * @param array $styles Array of quote-enclosed properties and values 242 | * 243 | * @return string CSS-styles 244 | */ 245 | public function applyStyles($styles) 246 | { 247 | if (empty($styles)) { 248 | return null; 249 | } 250 | $return = ''; 251 | foreach ($styles as $key => $value) { 252 | /* If background is defined, and color is not, try to find a suitable contrast */ 253 | if (array_key_exists('background', $styles) && !array_key_exists('color', $styles)) { 254 | if (isset($config['color_function'])) { 255 | if ($config['color_function'] == '50') { 256 | $color = $this->getContrast50($styles['background']); 257 | } elseif ($config['color_function'] == 'YIQ') { 258 | $color = $this->getContrastYIQ($styles['background']); 259 | } 260 | } else { 261 | $color = $this->getContrast50($styles['background']); 262 | } 263 | $return .= 'color: ' . $color . ';'; 264 | } 265 | $return .= $key . ': ' . $value . ';'; 266 | } 267 | return $return; 268 | } 269 | 270 | /** 271 | * Find contrasting color from 50%-equation 272 | * 273 | * @param string $hexcolor Hexadecimal color-value 274 | * 275 | * @return string black|white 276 | * 277 | * @see https://24ways.org/2010/calculating-color-contrast 278 | */ 279 | public function getContrast50($hexcolor) 280 | { 281 | return (hexdec($hexcolor) > 0xffffff/2) ? 'black':'white'; 282 | } 283 | 284 | /** 285 | * Find contrasting color from YIQ-equation 286 | * 287 | * @param string $hexcolor Hexadecimal color-value 288 | * 289 | * @return string black|white 290 | * 291 | * @see https://24ways.org/2010/calculating-color-contrast 292 | */ 293 | public function getContrastYIQ($hexcolor) 294 | { 295 | $r = hexdec(substr($hexcolor, 0, 2)); 296 | $g = hexdec(substr($hexcolor, 2, 4)); 297 | $b = hexdec(substr($hexcolor, 4, 6)); 298 | $yiq = (($r*299)+($g*587)+($b*114))/1000; 299 | return ($yiq >= 128) ? 'black' : 'white'; 300 | } 301 | 302 | /** 303 | * Flatten a multidimensional array to one dimension, optionally preserving keys 304 | * 305 | * @param array $array Array to flatten 306 | * @param integer $preserveKeys 0 (default) to not preserve keys, 1 to preserve string keys only, 2 to preserve all keys 307 | * @param array $out Internal parameter for recursion 308 | * 309 | * @return array Flattened array 310 | * 311 | * @see https://stackoverflow.com/a/7256477/603387 312 | */ 313 | public function flattenArray($array, $preserveKeys = 0, &$out = array()) 314 | { 315 | foreach ($array as $key => $child) { 316 | if (is_array($child)) { 317 | $out = $this->flattenArray($child, $preserveKeys, $out); 318 | } elseif ($preserveKeys + is_string($key) > 1) { 319 | $out[$key] = $child; 320 | } else { 321 | $out[] = $child; 322 | } 323 | } 324 | return $out; 325 | } 326 | 327 | /** 328 | * Insert string within string 329 | * 330 | * @param string $str Original string 331 | * @param string $insert String to insert 332 | * @param int $index Position to insert to 333 | * 334 | * @return string Original string with new string inserted 335 | * 336 | * @see https://stackoverflow.com/a/30820401/603387 337 | */ 338 | public function stringInsert($str, $insert, $index) 339 | { 340 | $str = substr($str, 0, $index) . $insert . substr($str, $index); 341 | return $str; 342 | } 343 | } 344 | -------------------------------------------------------------------------------- /blueprints.yaml: -------------------------------------------------------------------------------- 1 | name: FullPage 2 | version: 1.3.0 3 | testing: false 4 | description: Fullscreen navigational slideshows through fullPage.js 5 | icon: arrows-alt 6 | author: 7 | name: Ole Vik 8 | email: git@olevik.net 9 | homepage: https://github.com/OleVik/grav-plugin-fullpage 10 | demo: https://olevik.me/staging/grav-plugin-fullpage/ 11 | keywords: fullpage, fullpage.js, fullscreen, slides, fullscreen.js, presentation 12 | bugs: https://github.com/OleVik/grav-plugin-fullpage/issues 13 | docs: https://github.com/OleVik/grav-plugin-fullpage/blob/develop/README.md 14 | license: MIT 15 | dependencies: 16 | - { name: grav, version: ">=1.3" } 17 | - { name: admin, version: ">=1.5" } 18 | 19 | form: 20 | validation: strict 21 | fields: 22 | enabled: 23 | type: toggle 24 | label: Plugin status 25 | options: 26 | 1: PLUGIN_ADMIN.ENABLED 27 | 0: PLUGIN_ADMIN.DISABLED 28 | validate: 29 | type: bool 30 | order.by: 31 | type: select 32 | size: medium 33 | classes: fancy 34 | label: Order Type 35 | options: 36 | default: Default - based on folder name 37 | folder: Folder - based on prefix-less folder name 38 | title: Title - based on title field in header 39 | date: Date - based on date field in header 40 | order.dir: 41 | type: toggle 42 | label: Order Direction 43 | options: 44 | asc: Ascending 45 | desc: Descending 46 | theme_css: 47 | type: toggle 48 | label: Use Theme's CSS 49 | description: "Import current theme's /css/custom.css into fullpage.html.twig's assets" 50 | options: 51 | 1: PLUGIN_ADMIN.ENABLED 52 | 0: PLUGIN_ADMIN.DISABLED 53 | validate: 54 | type: bool 55 | builtin_css: 56 | type: toggle 57 | label: Use Plugin's CSS 58 | options: 59 | 1: PLUGIN_ADMIN.ENABLED 60 | 0: PLUGIN_ADMIN.DISABLED 61 | validate: 62 | type: bool 63 | builtin_js: 64 | type: toggle 65 | label: Use Plugin's JS 66 | options: 67 | 1: PLUGIN_ADMIN.ENABLED 68 | 0: PLUGIN_ADMIN.DISABLED 69 | validate: 70 | type: bool 71 | color_function: 72 | type: toggle 73 | label: Color function 74 | description: Default color function to apply. 75 | options: 76 | 50: "50%" 77 | YIQ: "YIQ" 78 | header_font: 79 | type: text 80 | label: Heading Font-Family 81 | description: CSS Font-Family to use for headings. 82 | block_font: 83 | type: text 84 | label: Block Font-Family 85 | description: CSS Font-Family to use for block-text. 86 | change_titles: 87 | type: toggle 88 | label: Dynamic titles 89 | description: Update document titles on navigation. 90 | options: 91 | 1: PLUGIN_ADMIN.ENABLED 92 | 0: PLUGIN_ADMIN.DISABLED 93 | validate: 94 | type: bool 95 | inject_footer: 96 | type: text 97 | label: Inject Twig 98 | description: "Render a theme's Twig-template and append it to each section, eg. 'partials/inject.html.twig'." 99 | shortcodes: 100 | type: toggle 101 | label: Shortcodes 102 | description: Enables internal shortcode-processing. 103 | options: 104 | 1: PLUGIN_ADMIN.ENABLED 105 | 0: PLUGIN_ADMIN.DISABLED 106 | validate: 107 | type: bool 108 | transition: 109 | type: toggle 110 | label: OnLoad Transition 111 | description: Fade in from white when DOM-structure is ready. 112 | options: 113 | 1: PLUGIN_ADMIN.ENABLED 114 | 0: PLUGIN_ADMIN.DISABLED 115 | validate: 116 | type: bool 117 | styles: 118 | type: section 119 | title: Default Styles 120 | text: "Array of CSS properties and values. INCOMPLETE: Will use multilevel-field." 121 | underline: true 122 | fields: 123 | styles: 124 | type: multilevel 125 | label: Styles 126 | style: vertical 127 | validate: 128 | type: array 129 | options: 130 | type: section 131 | title: Library options 132 | text: Options to pass to fullPage.js. 133 | underline: true 134 | fields: 135 | options.navigation: 136 | type: toggle 137 | label: Navigation 138 | options: 139 | 1: PLUGIN_ADMIN.ENABLED 140 | 0: PLUGIN_ADMIN.DISABLED 141 | validate: 142 | type: bool 143 | options.navigationPosition: 144 | type: toggle 145 | label: Navigation Position 146 | options: 147 | right: Right 148 | left: Left 149 | options.showActiveTooltip: 150 | type: toggle 151 | label: Persist Tooltips 152 | options: 153 | 1: PLUGIN_ADMIN.ENABLED 154 | 0: PLUGIN_ADMIN.DISABLED 155 | validate: 156 | type: bool 157 | options.slidesNavigation: 158 | type: toggle 159 | label: Slides Navigation 160 | options: 161 | 1: PLUGIN_ADMIN.ENABLED 162 | 0: PLUGIN_ADMIN.DISABLED 163 | validate: 164 | type: bool 165 | options.slidesNavPosition: 166 | type: toggle 167 | label: Slides Navigation Position 168 | options: 169 | bottom: Bottom 170 | top: Top 171 | scrolling: 172 | type: section 173 | title: Scrolling 174 | fields: 175 | options.css3: 176 | type: toggle 177 | label: CSS3 Transformations 178 | options: 179 | 1: PLUGIN_ADMIN.ENABLED 180 | 0: PLUGIN_ADMIN.DISABLED 181 | validate: 182 | type: bool 183 | options.autoScrolling: 184 | type: toggle 185 | label: "Use 'Automatic' Scrolling" 186 | options: 187 | 1: PLUGIN_ADMIN.ENABLED 188 | 0: PLUGIN_ADMIN.DISABLED 189 | validate: 190 | type: bool 191 | options.fitToSection: 192 | type: toggle 193 | label: Fit Section to Viewport 194 | options: 195 | 1: PLUGIN_ADMIN.ENABLED 196 | 0: PLUGIN_ADMIN.DISABLED 197 | validate: 198 | type: bool 199 | options.scrollBar: 200 | type: toggle 201 | label: Use Browser ScrollBar 202 | options: 203 | 1: PLUGIN_ADMIN.ENABLED 204 | 0: PLUGIN_ADMIN.DISABLED 205 | validate: 206 | type: bool 207 | options.loopTop: 208 | type: toggle 209 | label: Loop Upwards 210 | options: 211 | 1: PLUGIN_ADMIN.ENABLED 212 | 0: PLUGIN_ADMIN.DISABLED 213 | validate: 214 | type: bool 215 | options.loopBottom: 216 | type: toggle 217 | label: Loop Downwards 218 | options: 219 | 1: PLUGIN_ADMIN.ENABLED 220 | 0: PLUGIN_ADMIN.DISABLED 221 | validate: 222 | type: bool 223 | options.loopHorizontal: 224 | type: toggle 225 | label: Loop Slides 226 | options: 227 | 1: PLUGIN_ADMIN.ENABLED 228 | 0: PLUGIN_ADMIN.DISABLED 229 | validate: 230 | type: bool 231 | options.touchSensitivity: 232 | type: range 233 | label: Touch Sensitivity 234 | default: 15 235 | step: 5 236 | validate: 237 | min: 5 238 | max: 100 239 | accessibility: 240 | type: section 241 | title: Accessibility 242 | fields: 243 | options.keyboardScrolling: 244 | type: toggle 245 | label: Navigate with Keyboard 246 | options: 247 | 1: PLUGIN_ADMIN.ENABLED 248 | 0: PLUGIN_ADMIN.DISABLED 249 | validate: 250 | type: bool 251 | options.animateAnchor: 252 | type: toggle 253 | label: Auto-Navigate 254 | options: 255 | 1: PLUGIN_ADMIN.ENABLED 256 | 0: PLUGIN_ADMIN.DISABLED 257 | validate: 258 | type: bool 259 | options.recordHistory: 260 | type: toggle 261 | label: Record Browser-History 262 | options: 263 | 1: PLUGIN_ADMIN.ENABLED 264 | 0: PLUGIN_ADMIN.DISABLED 265 | validate: 266 | type: bool 267 | design: 268 | type: section 269 | title: Design 270 | fields: 271 | options.controlArrows: 272 | type: toggle 273 | label: Arrows for Slides 274 | options: 275 | 1: PLUGIN_ADMIN.ENABLED 276 | 0: PLUGIN_ADMIN.DISABLED 277 | validate: 278 | type: bool 279 | options.verticalCentered: 280 | type: toggle 281 | label: Center content vertically 282 | options: 283 | 1: PLUGIN_ADMIN.ENABLED 284 | 0: PLUGIN_ADMIN.DISABLED 285 | validate: 286 | type: bool 287 | structure: 288 | type: section 289 | title: Structure 290 | fields: 291 | options.sectionSelector: 292 | type: text 293 | label: Selector for Sections 294 | options.slideSelector: 295 | type: text 296 | label: Selector for Slides 297 | options.lazyLoading: 298 | type: toggle 299 | label: Ladyload Media 300 | options: 301 | 1: PLUGIN_ADMIN.ENABLED 302 | 0: PLUGIN_ADMIN.DISABLED 303 | validate: 304 | type: bool 305 | -------------------------------------------------------------------------------- /blueprints/fullpage.yaml: -------------------------------------------------------------------------------- 1 | title: Fullpage 2 | extends@: 3 | type: default 4 | context: blueprints://pages 5 | -------------------------------------------------------------------------------- /css/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fullpage.css", 3 | "homepage": "https://github.com/OleVik/grav-plugin-fullpage", 4 | "authors": [ 5 | "Ole Vik " 6 | ], 7 | "description": "CSS generation with SCSS for Grav Fullpage-plugin", 8 | "main": "fullpage.sass", 9 | "keywords": [ 10 | "grav", 11 | "fullpage.js", 12 | "responsive" 13 | ], 14 | "license": "MIT", 15 | "private": true, 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests" 22 | ], 23 | "devDependencies": { 24 | "include-media": "^1.4.9", 25 | "modular-scale": "^3.0.2", 26 | "compass-mixins": "^1.0.2" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /css/fullpage.css: -------------------------------------------------------------------------------- 1 | /* Configuration */ 2 | /* Sans-serif */ 3 | /* Serif */ 4 | /* Monotyped */ 5 | /* Vendor */ 6 | /* 7 | * A partial implementation of the Ruby list functions from Compass: 8 | * https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/lists.rb 9 | */ 10 | /* 11 | * A partial implementation of the Ruby constants functions from Compass: 12 | * https://github.com/Compass/compass/blob/stable/lib/compass/sass_extensions/functions/constants.rb 13 | */ 14 | /* 15 | * A partial implementation of the Ruby display functions from Compass: 16 | * https://github.com/Compass/compass/blob/stable/core/lib/compass/core/sass_extensions/functions/display.rb 17 | */ 18 | /* Global styles */ 19 | body { 20 | font-size: 16px; 21 | font-weight: 400; 22 | font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; 23 | color: #222; 24 | } 25 | 26 | body ::selection { 27 | background-color: #20B5CC; 28 | } 29 | 30 | /* Plugin-specific styles */ 31 | #fullpage .layer { 32 | position: absolute; 33 | z-index: 4; 34 | width: 100%; 35 | left: 0; 36 | top: 43%; 37 | -webkit-transform: translate3d(0, 0, 0); 38 | -ms-transform: translate3d(0, 0, 0); 39 | transform: translate3d(0, 0, 0); 40 | } 41 | 42 | #fullpage .section p, 43 | #fullpage .section .slide p { 44 | font-size: 19px; 45 | line-height: 1.4; 46 | text-align: justify; 47 | } 48 | 49 | #fullpage .fp-controlArrow.fp-prev, 50 | #fullpage .fp-controlArrow.fp-next { 51 | width: 3.5em; 52 | height: 3.5em; 53 | border-width: 0; 54 | border-color: transparent; 55 | } 56 | 57 | @media (max-width: 768px) { 58 | #fullpage .fp-controlArrow.fp-prev, 59 | #fullpage .fp-controlArrow.fp-next { 60 | display: none; 61 | } 62 | } 63 | 64 | #fullpage .fp-controlArrow.fp-prev:before, #fullpage .fp-controlArrow.fp-prev:after, 65 | #fullpage .fp-controlArrow.fp-next:before, 66 | #fullpage .fp-controlArrow.fp-next:after { 67 | content: ''; 68 | position: absolute; 69 | top: 0; 70 | left: 0; 71 | width: 2.5em; 72 | height: 0.5em; 73 | border-radius: 0.25em; 74 | background-color: black; 75 | -webkit-transition: all 0.15s ease, background-color 0.4s ease; 76 | transition: all 0.15s ease, background-color 0.4s ease; 77 | -webkit-transform-origin: 0.2em 50%; 78 | -ms-transform-origin: 0.2em 50%; 79 | transform-origin: 0.2em 50%; 80 | } 81 | 82 | #fullpage .fp-controlArrow.fp-prev:before, 83 | #fullpage .fp-controlArrow.fp-next:before { 84 | -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(45deg); 85 | -ms-transform: translateX(0.5em) translateY(1.55em) rotate(45deg); 86 | transform: translateX(0.5em) translateY(1.55em) rotate(45deg); 87 | } 88 | 89 | #fullpage .fp-controlArrow.fp-prev:after, 90 | #fullpage .fp-controlArrow.fp-next:after { 91 | -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); 92 | -ms-transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); 93 | transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); 94 | } 95 | 96 | #fullpage .fp-controlArrow.fp-prev:hover:before, #fullpage .fp-controlArrow.fp-prev:hover:after, #fullpage .fp-controlArrow.fp-prev:active:before, #fullpage .fp-controlArrow.fp-prev:active:after, #fullpage .fp-controlArrow.fp-prev:focus:before, #fullpage .fp-controlArrow.fp-prev:focus:after, 97 | #fullpage .fp-controlArrow.fp-next:hover:before, 98 | #fullpage .fp-controlArrow.fp-next:hover:after, 99 | #fullpage .fp-controlArrow.fp-next:active:before, 100 | #fullpage .fp-controlArrow.fp-next:active:after, 101 | #fullpage .fp-controlArrow.fp-next:focus:before, 102 | #fullpage .fp-controlArrow.fp-next:focus:after { 103 | background-color: white; 104 | } 105 | 106 | #fullpage .fp-controlArrow.fp-prev { 107 | top: initial; 108 | right: 4.5em; 109 | bottom: 3.5em; 110 | left: initial; 111 | } 112 | 113 | #fullpage .fp-controlArrow.fp-next { 114 | top: initial; 115 | right: 1em; 116 | bottom: 3.5em; 117 | left: initial; 118 | transform: rotate(180deg); 119 | } 120 | 121 | #fullpage a, #fullpage a:active, #fullpage a:hover, #fullpage a:visited { 122 | color: inherit; 123 | text-decoration: none; 124 | border-bottom: 1px dashed black; 125 | } 126 | 127 | #fullpage a:active, #fullpage a:hover, #fullpage a:focus { 128 | color: inherit; 129 | text-decoration: none; 130 | border-bottom: 1px solid black; 131 | } 132 | 133 | #fullpage h1, #fullpage h2, #fullpage h3, #fullpage h4, #fullpage h5, #fullpage h6 { 134 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 135 | font-weight: 300; 136 | margin: 0 auto 0.5rem auto; 137 | text-align: center; 138 | } 139 | 140 | #fullpage h1 { 141 | font-size: 48px; 142 | line-height: 1.2; 143 | } 144 | 145 | #fullpage h2 { 146 | font-size: 40px; 147 | line-height: 1.2; 148 | } 149 | 150 | #fullpage h3 { 151 | font-size: 33px; 152 | line-height: 1.3; 153 | } 154 | 155 | #fullpage h4 { 156 | font-size: 28px; 157 | line-height: 1.35; 158 | } 159 | 160 | #fullpage h5 { 161 | font-size: 23px; 162 | line-height: 1.5; 163 | } 164 | 165 | #fullpage h6 { 166 | font-size: 19px; 167 | line-height: 1.6; 168 | } 169 | 170 | #fullpage img { 171 | width: auto; 172 | max-width: 90%; 173 | max-width: 90vw; 174 | height: auto; 175 | max-height: 90%; 176 | max-height: 90vh; 177 | margin: 0 auto; 178 | display: block; 179 | } 180 | 181 | #fullpage p, 182 | #fullpage ul, 183 | #fullpage ol, 184 | #fullpage pre { 185 | font-size: 19px; 186 | padding-left: 7em; 187 | padding-right: 7em; 188 | } 189 | 190 | @media (min-width: 1200px) { 191 | #fullpage p, 192 | #fullpage ul, 193 | #fullpage ol, 194 | #fullpage pre { 195 | padding-left: 12em; 196 | padding-right: 12em; 197 | } 198 | } 199 | 200 | @media (max-width: 1199px) and (min-width: 992px) { 201 | #fullpage p, 202 | #fullpage ul, 203 | #fullpage ol, 204 | #fullpage pre { 205 | padding-left: 7em; 206 | padding-right: 7em; 207 | } 208 | } 209 | 210 | @media (max-width: 991px) and (min-width: 768px) { 211 | #fullpage p, 212 | #fullpage ul, 213 | #fullpage ol, 214 | #fullpage pre { 215 | padding-left: 5em; 216 | padding-right: 5em; 217 | } 218 | } 219 | 220 | @media (max-width: 767px) { 221 | #fullpage p, 222 | #fullpage ul, 223 | #fullpage ol, 224 | #fullpage pre { 225 | padding-left: 2.5em; 226 | padding-right: 2.5em; 227 | } 228 | } 229 | 230 | @media (max-width: 575px) { 231 | #fullpage p, 232 | #fullpage ul, 233 | #fullpage ol, 234 | #fullpage pre { 235 | padding-left: 2em; 236 | padding-right: 2em; 237 | } 238 | } 239 | 240 | #fullpage figure { 241 | margin: 0; 242 | padding: 0; 243 | } 244 | 245 | #fullpage figure figcaption { 246 | margin: 0.5em auto; 247 | text-align: center; 248 | } 249 | 250 | #fullpage pre { 251 | padding-top: 0.5em; 252 | padding-bottom: 0.5em; 253 | } 254 | 255 | #fullpage pre code { 256 | width: 100%; 257 | font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace; 258 | font-size: 12px; 259 | } 260 | 261 | #fullpage code { 262 | color: #880000; 263 | background: #F0F0F0; 264 | word-wrap: break-word; 265 | } 266 | 267 | #fullpage .backgroundVideo { 268 | position: absolute; 269 | right: 0; 270 | bottom: 0; 271 | top: 0; 272 | right: 0; 273 | width: 100%; 274 | height: 100%; 275 | background-size: 100% 100%; 276 | background-color: black; 277 | background-position: center center; 278 | background-size: contain; 279 | object-fit: cover; 280 | z-index: 3; 281 | } 282 | 283 | @media (max-width: 768px) { 284 | #fp-nav { 285 | display: none; 286 | } 287 | } 288 | -------------------------------------------------------------------------------- /css/fullpage.scss: -------------------------------------------------------------------------------- 1 | /* Configuration */ 2 | $ms-base: 16px; 3 | $ms-ratio: 1.2; 4 | $enable-rounded: false; 5 | $enable-flex: true; 6 | $enable-print-styles: false; 7 | $a-tags: 'a, a:active, a:hover, a:visited'; 8 | $a-tags-hover: 'a:active, a:hover, a:focus'; 9 | $breakpoints: ( 10 | xs: 0, 11 | sm: 576px, 12 | md: 768px, 13 | lg: 992px, 14 | xl: 1200px 15 | ); 16 | $containers: ( 17 | sm: 540px, 18 | md: 720px, 19 | lg: 960px, 20 | xl: 1140px 21 | ); 22 | 23 | /* Sans-serif */ 24 | $helvetica-font-stack: "Helvetica Neue", Helvetica, Arial, sans-serif !default; 25 | /* Serif */ 26 | $palatino-font-stack: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif !default; 27 | /* Monotyped */ 28 | $courier-font-stack: 'Courier New', Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace !default; 29 | 30 | /* Vendor */ 31 | @import "bower_components/compass-mixins/lib/_compass.scss"; 32 | @import "bower_components/compass-mixins/lib/compass/_css3.scss"; 33 | @import "bower_components/modular-scale/stylesheets/_modularscale.scss"; 34 | @import "bower_components/include-media/dist/_include-media.scss"; 35 | 36 | /* Global styles */ 37 | body { 38 | font-size: $ms-base; 39 | font-weight: 400; 40 | font-family: $palatino-font-stack; 41 | color: #222; 42 | ::selection { 43 | background-color: #20B5CC; 44 | } 45 | } 46 | 47 | /* Plugin-specific styles */ 48 | #fullpage { 49 | .layer { 50 | position: absolute; 51 | z-index: 4; 52 | width: 100%; 53 | left: 0; 54 | top: 43%; 55 | -webkit-transform: translate3d(0,0,0); 56 | -ms-transform: translate3d(0,0,0); 57 | transform: translate3d(0,0,0); 58 | } 59 | .section p, 60 | .section .slide p { 61 | font-size: ms(1); 62 | line-height: 1.4; 63 | text-align: justify; 64 | } 65 | .fp-controlArrow.fp-prev, 66 | .fp-controlArrow.fp-next { 67 | width: 3.5em; 68 | height: 3.5em; 69 | border-width: 0; 70 | border-color: transparent; 71 | @include media("<=md") { 72 | display: none; 73 | } 74 | &:before, 75 | &:after { 76 | content: ''; 77 | position: absolute; 78 | top: 0; 79 | left: 0; 80 | width: 2.5em; 81 | height: 0.5em; 82 | border-radius: 0.25em; 83 | background-color: black; 84 | -webkit-transition: all 0.15s ease, background-color 0.4s ease; 85 | transition: all 0.15s ease, background-color 0.4s ease; 86 | -webkit-transform-origin: 0.2em 50%; 87 | -ms-transform-origin: 0.2em 50%; 88 | transform-origin: 0.2em 50%; 89 | } 90 | &:before { 91 | -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(45deg); 92 | -ms-transform: translateX(0.5em) translateY(1.55em) rotate(45deg); 93 | transform: translateX(0.5em) translateY(1.55em) rotate(45deg); 94 | } 95 | &:after { 96 | -webkit-transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); 97 | -ms-transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); 98 | transform: translateX(0.5em) translateY(1.55em) rotate(-45deg); 99 | } 100 | &:hover:before, 101 | &:hover:after, 102 | &:active:before, 103 | &:active:after, 104 | &:focus:before, 105 | &:focus:after { 106 | background-color: white; 107 | } 108 | } 109 | .fp-controlArrow.fp-prev { 110 | top: initial; 111 | right: 4.5em; 112 | bottom: 3.5em; 113 | left: initial; 114 | } 115 | .fp-controlArrow.fp-next { 116 | top: initial; 117 | right: 1em; 118 | bottom: 3.5em; 119 | left: initial; 120 | transform: rotate(180deg); 121 | } 122 | 123 | #{$a-tags}{color: inherit;text-decoration: none;border-bottom: 1px dashed black;} 124 | #{$a-tags-hover}{color: inherit;text-decoration: none;border-bottom: 1px solid black;} 125 | h1, h2, h3, h4, h5, h6 { 126 | font-family: $helvetica-font-stack; 127 | font-weight: 300; 128 | margin: 0 auto 0.5rem auto; 129 | text-align: center; 130 | } 131 | h1 { 132 | font-size: ms(6); 133 | line-height: 1.2; 134 | } 135 | h2 { 136 | font-size: ms(5); 137 | line-height: 1.2; 138 | } 139 | h3 { 140 | font-size: ms(4); 141 | line-height: 1.3; 142 | } 143 | h4 { 144 | font-size: ms(3); 145 | line-height: 1.35; 146 | } 147 | h5 { 148 | font-size: ms(2); 149 | line-height: 1.5; 150 | } 151 | h6 { 152 | font-size: ms(1); 153 | line-height: 1.6; 154 | } 155 | img { 156 | width: auto; 157 | max-width: 90%; 158 | max-width: 90vw; 159 | height: auto; 160 | max-height: 90%; 161 | max-height: 90vh; 162 | margin: 0 auto; 163 | display: block; 164 | } 165 | p, 166 | ul, 167 | ol, 168 | pre { 169 | font-size: ms(1); 170 | padding-left: 7em; 171 | padding-right: 7em; 172 | @include media(">=xl") { 173 | padding-left: 12em; 174 | padding-right: 12em; 175 | } 176 | @include media("=lg") { 177 | padding-left: 7em; 178 | padding-right: 7em; 179 | } 180 | @include media("=md") { 181 | padding-left: 5em; 182 | padding-right: 5em; 183 | } 184 | @include media(" 22 | * Licensed under MIT 23 | */ 24 | .la-line-scale, 25 | .la-line-scale > div { 26 | position: relative; 27 | -webkit-box-sizing: border-box; 28 | -moz-box-sizing: border-box; 29 | box-sizing: border-box; 30 | } 31 | .la-line-scale { 32 | display: block; 33 | font-size: 0; 34 | color: #fff; 35 | } 36 | .la-line-scale.la-dark { 37 | color: #333; 38 | } 39 | .la-line-scale > div { 40 | display: inline-block; 41 | float: none; 42 | background-color: currentColor; 43 | border: 0 solid currentColor; 44 | } 45 | .la-line-scale { 46 | width: 40px; 47 | height: 32px; 48 | } 49 | .la-line-scale > div { 50 | width: 4px; 51 | height: 32px; 52 | margin: 2px; 53 | margin-top: 0; 54 | margin-bottom: 0; 55 | border-radius: 0; 56 | -webkit-animation: line-scale 1.2s infinite ease; 57 | -moz-animation: line-scale 1.2s infinite ease; 58 | -o-animation: line-scale 1.2s infinite ease; 59 | animation: line-scale 1.2s infinite ease; 60 | } 61 | .la-line-scale > div:nth-child(1) { 62 | -webkit-animation-delay: -1.2s; 63 | -moz-animation-delay: -1.2s; 64 | -o-animation-delay: -1.2s; 65 | animation-delay: -1.2s; 66 | } 67 | .la-line-scale > div:nth-child(2) { 68 | -webkit-animation-delay: -1.1s; 69 | -moz-animation-delay: -1.1s; 70 | -o-animation-delay: -1.1s; 71 | animation-delay: -1.1s; 72 | } 73 | .la-line-scale > div:nth-child(3) { 74 | -webkit-animation-delay: -1s; 75 | -moz-animation-delay: -1s; 76 | -o-animation-delay: -1s; 77 | animation-delay: -1s; 78 | } 79 | .la-line-scale > div:nth-child(4) { 80 | -webkit-animation-delay: -.9s; 81 | -moz-animation-delay: -.9s; 82 | -o-animation-delay: -.9s; 83 | animation-delay: -.9s; 84 | } 85 | .la-line-scale > div:nth-child(5) { 86 | -webkit-animation-delay: -.8s; 87 | -moz-animation-delay: -.8s; 88 | -o-animation-delay: -.8s; 89 | animation-delay: -.8s; 90 | } 91 | .la-line-scale.la-sm { 92 | width: 20px; 93 | height: 16px; 94 | } 95 | .la-line-scale.la-sm > div { 96 | width: 2px; 97 | height: 16px; 98 | margin: 1px; 99 | margin-top: 0; 100 | margin-bottom: 0; 101 | } 102 | .la-line-scale.la-2x { 103 | width: 80px; 104 | height: 64px; 105 | } 106 | .la-line-scale.la-2x > div { 107 | width: 8px; 108 | height: 64px; 109 | margin: 4px; 110 | margin-top: 0; 111 | margin-bottom: 0; 112 | } 113 | .la-line-scale.la-3x { 114 | width: 120px; 115 | height: 96px; 116 | } 117 | .la-line-scale.la-3x > div { 118 | width: 12px; 119 | height: 96px; 120 | margin: 6px; 121 | margin-top: 0; 122 | margin-bottom: 0; 123 | } 124 | /* 125 | * Animation 126 | */ 127 | @-webkit-keyframes line-scale { 128 | 0%, 129 | 40%, 130 | 100% { 131 | -webkit-transform: scaleY(.4); 132 | transform: scaleY(.4); 133 | } 134 | 20% { 135 | -webkit-transform: scaleY(1); 136 | transform: scaleY(1); 137 | } 138 | } 139 | @-moz-keyframes line-scale { 140 | 0%, 141 | 40%, 142 | 100% { 143 | -webkit-transform: scaleY(.4); 144 | -moz-transform: scaleY(.4); 145 | transform: scaleY(.4); 146 | } 147 | 20% { 148 | -webkit-transform: scaleY(1); 149 | -moz-transform: scaleY(1); 150 | transform: scaleY(1); 151 | } 152 | } 153 | @-o-keyframes line-scale { 154 | 0%, 155 | 40%, 156 | 100% { 157 | -webkit-transform: scaleY(.4); 158 | -o-transform: scaleY(.4); 159 | transform: scaleY(.4); 160 | } 161 | 20% { 162 | -webkit-transform: scaleY(1); 163 | -o-transform: scaleY(1); 164 | transform: scaleY(1); 165 | } 166 | } 167 | @keyframes line-scale { 168 | 0%, 169 | 40%, 170 | 100% { 171 | -webkit-transform: scaleY(.4); 172 | -moz-transform: scaleY(.4); 173 | -o-transform: scaleY(.4); 174 | transform: scaleY(.4); 175 | } 176 | 20% { 177 | -webkit-transform: scaleY(1); 178 | -moz-transform: scaleY(1); 179 | -o-transform: scaleY(1); 180 | transform: scaleY(1); 181 | } 182 | } -------------------------------------------------------------------------------- /fullpage.php: -------------------------------------------------------------------------------- 1 | ['onPluginsInitialized', 0] 42 | ]; 43 | } 44 | 45 | /** 46 | * Declare config from plugin-config 47 | * 48 | * @return array Plugin configuration 49 | */ 50 | public function config() 51 | { 52 | $pluginsobject = (array) $this->config->get('plugins'); 53 | if (isset($pluginsobject) && $pluginsobject['fullpage']['enabled']) { 54 | $config = $pluginsobject['fullpage']; 55 | } else { 56 | return; 57 | } 58 | return $config; 59 | } 60 | 61 | /** 62 | * Initialize the plugin and events 63 | * 64 | * @param Event $event RocketTheme events 65 | * 66 | * @return void 67 | */ 68 | public function onPluginsInitialized(Event $event) 69 | { 70 | if ($this->isAdmin()) { 71 | $this->enable( 72 | [ 73 | 'onGetPageTemplates' => ['onGetPageTemplates', 0] 74 | ] 75 | ); 76 | } else { 77 | $this->grav['config']->set('system.cache.enabled', false); 78 | $this->enable([ 79 | 'onPageContentProcessed' => ['pageIteration', 0], 80 | 'onTwigTemplatePaths' => ['templates', 0], 81 | 'onShutdown' => ['onShutdown', 0] 82 | ]); 83 | } 84 | } 85 | 86 | /** 87 | * Construct the page 88 | * 89 | * @return void 90 | */ 91 | public function pageIteration() 92 | { 93 | $page = $this->grav['page']; 94 | $config = $this->config(); 95 | if ($config['enabled'] && $page->template() == 'fullpage') { 96 | $utility = new Utilities($config); 97 | $tree = $utility->buildTree($page->route()); 98 | $slides = $utility->buildContent($tree); 99 | $page->setRawContent($slides); 100 | $menu = $utility->buildMenu($tree); 101 | $menu = $utility->flattenArray($menu, 1); 102 | $this->grav['twig']->twig_vars['fullpage_menu'] = $menu; 103 | 104 | $options = json_encode($config['options'], JSON_PRETTY_PRINT); 105 | $init = '$(document).ready(function() {'; 106 | $init .= '$("#fullpage").fullpage('; 107 | if ($config['transition']) { 108 | $transition = ", 109 | afterRender: function() { 110 | $('#page_transition').css({ 111 | 'opacity': '0', 112 | 'visibility': 'hidden' 113 | }); 114 | } 115 | "; 116 | $options = $utility->stringInsert($options, $transition, strlen($options)-1); 117 | } 118 | if ($config['change_titles']) { 119 | $changeTitles = ", 120 | afterLoad: function(anchorLink, index) { 121 | document.title = $(this).data('name'); 122 | } 123 | "; 124 | $options = $utility->stringInsert($options, $changeTitles, strlen($options)-1); 125 | } 126 | $init .= $options; 127 | $init .= ');'; 128 | $init .= '});'; 129 | $this->grav['twig']->twig_vars['fullpage_init'] = $init; 130 | if (!empty($config['header_font'])) { 131 | $header_font = $config['header_font']; 132 | $this->grav['assets']->addInlineCss(" 133 | #fullpage h1, 134 | #fullpage h2, 135 | #fullpage h3, 136 | #fullpage h4, 137 | #fullpage h5, 138 | #fullpage h6 { 139 | font-family: $header_font; 140 | } 141 | "); 142 | } 143 | if (!empty($config['block_font'])) { 144 | $block_font = $config['block_font']; 145 | $this->grav['assets']->addInlineCss(" 146 | #fullpage, 147 | #fullpage p, 148 | #fullpage ul, 149 | #fullpage ol, 150 | #fullpage blockquote, 151 | #fullpage figcaption { 152 | font-family: $block_font; 153 | } 154 | "); 155 | } 156 | } 157 | } 158 | 159 | /** 160 | * Register templates and blueprints 161 | * 162 | * @param RocketTheme\Toolbox\Event\Event $event Event handler 163 | * 164 | * @return void 165 | */ 166 | public function onGetPageTemplates(Event $event) 167 | { 168 | $types = $event->types; 169 | $res = $this->grav['locator']; 170 | $types->scanBlueprints( 171 | $res->findResource('plugin://' . $this->name . '/blueprints') 172 | ); 173 | $types->scanTemplates( 174 | $res->findResource('plugin://' . $this->name . '/templates') 175 | ); 176 | } 177 | 178 | /** 179 | * Add templates-directory to Twig paths 180 | * 181 | * @return void 182 | */ 183 | public function templates() 184 | { 185 | $this->grav['twig']->twig_paths[] = __DIR__ . '/templates'; 186 | } 187 | 188 | /** 189 | * Reset cache on shutdown 190 | * 191 | * @return void 192 | */ 193 | public function onShutdown() 194 | { 195 | $this->grav['config']->set('system.cache.enabled', $this->cache); 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /fullpage.yaml: -------------------------------------------------------------------------------- 1 | enabled: true 2 | order: 3 | by: folder 4 | dir: asc 5 | theme_css: true 6 | builtin_css: true 7 | builtin_js: true 8 | color_function: "50" 9 | header_font: "'Helvetica Neue', Helvetica, Arial, sans-serif" 10 | block_font: "Palatino, 'Palatino Linotype', 'Palatino LT STD', 'Book Antiqua', Georgia, serif" 11 | change_titles: true 12 | inject_footer: "" 13 | shortcodes: true 14 | transition: true 15 | styles: 16 | - background: "#0B110D" 17 | - background: "#2C4D56" 18 | - background: "#C3AA72" 19 | - background: "#DC7612" 20 | - background: "#BD3200" 21 | options: 22 | navigation: false 23 | navigationPosition: 'right' 24 | showActiveTooltip: false 25 | slidesNavigation: false 26 | slidesNavPosition: 'bottom' 27 | css3: true 28 | autoScrolling: true 29 | fitToSection: true 30 | scrollBar: false 31 | loopTop: false 32 | loopBottom: false 33 | loopHorizontal: true 34 | touchSensitivity: 15 35 | keyboardScrolling: true 36 | animateAnchor: true 37 | recordHistory: true 38 | controlArrows: true 39 | verticalCentered: true 40 | sectionSelector: '.section' 41 | slideSelector: '.slide' 42 | lazyLoading: true -------------------------------------------------------------------------------- /js/jquery.fullpage.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * fullPage 2.9.7 3 | * https://github.com/alvarotrigo/fullPage.js 4 | * @license MIT licensed 5 | * 6 | * Copyright (C) 2015 alvarotrigo.com - A project by Alvaro Trigo 7 | */ 8 | !function(e,o){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(n){return o(n,e,e.document,e.Math)}):"object"==typeof exports&&exports?module.exports=o(require("jquery"),e,e.document,e.Math):o(jQuery,e,e.document,e.Math)}("undefined"!=typeof window?window:this,function(e,o,n,t,i){"use strict";var a="fullpage-wrapper",l="."+a,s="fp-responsive",r="fp-notransition",c="fp-destroyed",d="fp-enabled",f="fp-viewing",u="active",h="."+u,v="fp-completely",p="."+v,g="fp-section",m="."+g,w=m+h,S=m+":first",b=m+":last",x="fp-tableCell",y="."+x,C="fp-auto-height",T="fp-normal-scroll",k="fp-nav",L="#"+k,A="fp-tooltip",O="."+A,I="fp-show-active",E="fp-slide",M="."+E,B=M+h,R="fp-slides",z="."+R,H="fp-slidesContainer",D="."+H,P="fp-table",q="fp-slidesNav",F="."+q,V=F+" a",j="fp-controlArrow",Y="."+j,N="fp-prev",X=j+" "+N,U=Y+("."+N),W="fp-next",K=j+" "+W,_=Y+".fp-next",Q=e(o),G=e(n);e.fn.fullpage=function(j){if(e("html").hasClass(d))$o();else{var W=e("html, body"),J=e("body"),Z=e.fn.fullpage;j=e.extend({menu:!1,anchors:[],lockAnchors:!1,navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,hybrid:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,fitToSectionDelay:1e3,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,continuousHorizontal:!1,scrollHorizontally:!1,interlockedSlides:!1,dragAndMove:!1,offsetSections:!1,resetSliders:!1,fadingEffect:!1,normalScrollElements:null,scrollOverflow:!1,scrollOverflowReset:!1,scrollOverflowHandler:e.fn.fp_scrolloverflow?e.fn.fp_scrolloverflow.iscrollHandler:null,scrollOverflowOptions:null,touchSensitivity:5,normalScrollElementTouchThreshold:5,bigSectionsDestination:null,keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,responsiveSlides:!1,parallax:!1,parallaxOptions:{type:"reveal",percentage:62,property:"translate"},sectionSelector:".section",slideSelector:".slide",afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null,afterResponsive:null,lazyLoading:!0},j);var $,ee,oe,ne,te=!1,ie=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),ae="ontouchstart"in o||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,le=e(this),se=Q.height(),re=!1,ce=!0,de=!0,fe=[],ue={m:{up:!0,down:!0,left:!0,right:!0}};ue.k=e.extend(!0,{},ue.m);var he,ve,pe,ge,me,we,Se,be=function(){var e;e=o.PointerEvent?{down:"pointerdown",move:"pointermove"}:{down:"MSPointerDown",move:"MSPointerMove"};return e}(),xe={touchmove:"ontouchmove"in o?"touchmove":be.move,touchstart:"ontouchstart"in o?"touchstart":be.down},ye='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]',Ce=e.extend(!0,{},j);$o(),e.extend(e.easing,{easeInOutCubic:function(e,o,n,t,i){return(o/=i/2)<1?t/2*o*o*o+n:t/2*((o-=2)*o*o+2)+n}}),e(this).length&&(Z.version="2.9.6",Z.setAutoScrolling=ze,Z.setRecordHistory=He,Z.setScrollingSpeed=De,Z.setFitToSection=Pe,Z.setLockAnchors=function(e){j.lockAnchors=e},Z.setMouseWheelScrolling=qe,Z.setAllowScrolling=Fe,Z.setKeyboardScrolling=Ve,Z.moveSectionUp=je,Z.moveSectionDown=Ye,Z.silentMoveTo=Ne,Z.moveTo=Xe,Z.moveSlideRight=Ue,Z.moveSlideLeft=We,Z.fitToSection=Je,Z.reBuild=Ke,Z.setResponsive=_e,Z.destroy=function(o){ze(!1,"internal"),Fe(!1),Ve(!1),le.addClass(c),clearTimeout(ge),clearTimeout(pe),clearTimeout(ve),clearTimeout(me),clearTimeout(we),Q.off("scroll",Ge).off("hashchange",mo).off("resize",Mo),G.off("keydown",So).off("keyup",xo).off("click touchstart",L+" a").off("mouseenter",L+" li").off("mouseleave",L+" li").off("click touchstart",V).off("mouseover",j.normalScrollElements).off("mouseout",j.normalScrollElements),e(m).off("click touchstart",Y),clearTimeout(ge),clearTimeout(pe),o&&function(){Qo(0),le.find("img[data-src], source[data-src], audio[data-src], iframe[data-src]").each(function(){co(e(this),"src")}),le.find("img[data-srcset]").each(function(){co(e(this),"srcset")}),e(L+", "+F+", "+Y).remove(),e(m).css({height:"","background-color":"",padding:""}),e(M).css({width:""}),le.css({height:"",position:"","-ms-touch-action":"","touch-action":""}),W.css({overflow:"",height:""}),e("html").removeClass(d),J.removeClass(s),e.each(J.get(0).className.split(/\s+/),function(e,o){0===o.indexOf(f)&&J.removeClass(o)}),e(m+", "+M).each(function(){j.scrollOverflowHandler&&j.scrollOverflowHandler.remove(e(this)),e(this).removeClass(P+" "+u),e(this).attr("style",e(this).data("fp-styles"))}),zo(le),le.find(y+", "+D+", "+z).each(function(){e(this).replaceWith(this.childNodes)}),le.css({"-webkit-transition":"none",transition:"none"}),W.scrollTop(0);var o=[g,E,H];e.each(o,function(o,n){e("."+n).removeClass(n)})}()},Z.shared={afterRenderActions:Qe},function(){j.css3&&(j.css3=function(){var e,t=n.createElement("p"),a={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};for(var l in n.body.insertBefore(t,null),a)t.style[l]!==i&&(t.style[l]="translate3d(1px,1px,1px)",e=o.getComputedStyle(t).getPropertyValue(a[l]));return n.body.removeChild(t),e!==i&&e.length>0&&"none"!==e}());j.scrollBar=j.scrollBar||j.hybrid,t=le.find(j.sectionSelector),j.anchors.length||(j.anchors=t.filter("[data-anchor]").map(function(){return e(this).data("anchor").toString()}).get()),j.navigationTooltips.length||(j.navigationTooltips=t.filter("[data-tooltip]").map(function(){return e(this).data("tooltip").toString()}).get()),le.css({height:"100%",position:"relative"}),le.addClass(a),e("html").addClass(d),se=Q.height(),le.removeClass(c),le.find(j.sectionSelector).addClass(g),le.find(j.slideSelector).addClass(E),e(m).each(function(o){var n,t,i,a,s=e(this),r=s.find(M),c=r.length;s.data("fp-styles",s.attr("style")),i=s,(a=o)||0!==e(w).length||i.addClass(u),ne=e(w),i.css("height",se+"px"),j.paddingTop&&i.css("padding-top",j.paddingTop),j.paddingBottom&&i.css("padding-bottom",j.paddingBottom),void 0!==j.sectionsColor[a]&&i.css("background-color",j.sectionsColor[a]),void 0!==j.anchors[a]&&i.attr("data-anchor",j.anchors[a]),n=s,t=o,void 0!==j.anchors[t]&&n.hasClass(u)&&Ho(j.anchors[t],t),j.menu&&j.css3&&e(j.menu).closest(l).length&&e(j.menu).appendTo(J),c>0?function(o,n,t){var i,a=100*t,l=100/t;n.wrapAll('
'),n.parent().wrap('
'),o.find(D).css("width",a+"%"),t>1&&(j.controlArrows&&((i=o).find(z).after('
'),"#fff"!=j.controlArrowColor&&(i.find(_).css("border-color","transparent transparent transparent "+j.controlArrowColor),i.find(U).css("border-color","transparent "+j.controlArrowColor+" transparent transparent")),j.loopHorizontal||i.find(U).hide()),j.slidesNavigation&&function(e,o){e.append('
    ');var n=e.find(F);n.addClass(j.slidesNavPosition);for(var t=0;t');n.css("margin-left","-"+n.width()/2+"px"),n.find("li").first().find("a").addClass(u)}(o,t)),n.each(function(o){e(this).css("width",l+"%"),j.verticalCentered&&Po(e(this))});var s=o.find(B);s.length&&(0!==e(w).index(m)||0===e(w).index(m)&&0!==s.index())?_o(s,"internal"):n.eq(0).addClass(u)}(s,r,c):j.verticalCentered&&Po(s)}),j.fixedElements&&j.css3&&e(j.fixedElements).appendTo(J),j.navigation&&function(){J.append('
      ');var o=e(L);o.addClass(function(){return j.showActiveTooltip?I+" "+j.navigationPosition:j.navigationPosition});for(var n=0;n',a=j.navigationTooltips[n];void 0!==a&&""!==a&&(i+='
      '+a+"
      "),i+="",o.find("ul").append(i)}e(L).css("margin-top","-"+e(L).height()/2+"px"),e(L).find("li").eq(e(w).index(m)).find("a").addClass(u)}(),le.find('iframe[src*="youtube.com/embed/"]').each(function(){var o,n,t;o=e(this),n="enablejsapi=1",t=o.attr("src"),o.attr("src",t+(/\?/.test(t)?"&":"?")+n)}),j.scrollOverflow?he=j.scrollOverflowHandler.init(j):Qe(),Fe(!0),ze(j.autoScrolling,"internal"),Bo(),Wo(),"complete"===n.readyState&&go();var t;Q.on("load",go)}(),Q.on("scroll",Ge).on("hashchange",mo).blur(ko).resize(Mo),G.keydown(So).keyup(xo).on("click touchstart",L+" a",Lo).on("click touchstart",V,Ao).on("click",O,bo),e(m).on("click touchstart",Y,To),j.normalScrollElements&&(G.on("mouseenter touchstart",j.normalScrollElements,function(){Fe(!1)}),G.on("mouseleave touchend",j.normalScrollElements,function(){Fe(!0)})));var Te=!1,ke=0,Le=0,Ae=0,Oe=0,Ie=0,Ee=(new Date).getTime(),Me=0,Be=0,Re=se}function ze(o,n){o||Qo(0),Zo("autoScrolling",o,n);var t=e(w);j.autoScrolling&&!j.scrollBar?(W.css({overflow:"hidden",height:"100%"}),He(Ce.recordHistory,"internal"),le.css({"-ms-touch-action":"none","touch-action":"none"}),t.length&&Qo(t.position().top)):(W.css({overflow:"visible",height:"initial"}),He(!1,"internal"),le.css({"-ms-touch-action":"","touch-action":""}),t.length&&W.scrollTop(t.position().top))}function He(e,o){Zo("recordHistory",e,o)}function De(e,o){Zo("scrollingSpeed",e,o)}function Pe(e,o){Zo("fitToSection",e,o)}function qe(e){e?(!function(){var e,t="";o.addEventListener?e="addEventListener":(e="attachEvent",t="on");var a="onwheel"in n.createElement("div")?"wheel":n.onmousewheel!==i?"mousewheel":"DOMMouseScroll";"DOMMouseScroll"==a?n[e](t+"MozMousePixelScroll",io,!1):n[e](t+a,io,!1)}(),le.on("mousedown",yo).on("mouseup",Co)):(n.addEventListener?(n.removeEventListener("mousewheel",io,!1),n.removeEventListener("wheel",io,!1),n.removeEventListener("MozMousePixelScroll",io,!1)):n.detachEvent("onmousewheel",io),le.off("mousedown",yo).off("mouseup",Co))}function Fe(o,n){void 0!==n?(n=n.replace(/ /g,"").split(","),e.each(n,function(e,n){Jo(o,n,"m")})):(Jo(o,"all","m"),o?(qe(!0),(ie||ae)&&(j.autoScrolling&&J.off(xe.touchmove).on(xe.touchmove,$e),e(l).off(xe.touchstart).on(xe.touchstart,no).off(xe.touchmove).on(xe.touchmove,eo))):(qe(!1),(ie||ae)&&(j.autoScrolling&&J.off(xe.touchmove),e(l).off(xe.touchstart).off(xe.touchmove))))}function Ve(o,n){void 0!==n?(n=n.replace(/ /g,"").split(","),e.each(n,function(e,n){Jo(o,n,"k")})):(Jo(o,"all","k"),j.keyboardScrolling=o)}function je(){var o=e(w).prev(m);o.length||!j.loopTop&&!j.continuousVertical||(o=e(m).last()),o.length&&so(o,null,!0)}function Ye(){var o=e(w).next(m);o.length||!j.loopBottom&&!j.continuousVertical||(o=e(m).first()),o.length&&so(o,null,!1)}function Ne(e,o){De(0,"internal"),Xe(e,o),De(Ce.scrollingSpeed,"internal")}function Xe(e,o){var n=Vo(e);void 0!==o?jo(e,o):n.length>0&&so(n)}function Ue(e){ao("right",e)}function We(e){ao("left",e)}function Ke(o){if(!le.hasClass(c)){re=!0,se=Q.height(),e(m).each(function(){var o=e(this).find(z),n=e(this).find(M);j.verticalCentered&&e(this).find(y).css("height",qo(e(this))+"px"),e(this).css("height",se+"px"),n.length>1&&Io(o,o.find(B))}),j.scrollOverflow&&he.createScrollBarForAll();var n=e(w).index(m);n&&Ne(n+1),re=!1,e.isFunction(j.afterResize)&&o&&j.afterResize.call(le),e.isFunction(j.afterReBuild)&&!o&&j.afterReBuild.call(le)}}function _e(o){var n=J.hasClass(s);o?n||(ze(!1,"internal"),Pe(!1,"internal"),e(L).hide(),J.addClass(s),e.isFunction(j.afterResponsive)&&j.afterResponsive.call(le,o)):n&&(ze(Ce.autoScrolling,"internal"),Pe(Ce.autoScrolling,"internal"),e(L).show(),J.removeClass(s),e.isFunction(j.afterResponsive)&&j.afterResponsive.call(le,o))}function Qe(){var o,n=e(w);n.addClass(v),fo(n),uo(n),j.scrollOverflow&&j.scrollOverflowHandler.afterLoad(),(!(o=Vo(wo().section))||o.length&&o.index()===ne.index())&&e.isFunction(j.afterLoad)&&j.afterLoad.call(n,n.data("anchor"),n.index(m)+1),e.isFunction(j.afterRender)&&j.afterRender.call(le)}function Ge(){var o,t,i;if(!j.autoScrolling||j.scrollBar){var a=Q.scrollTop(),l=(i=(t=a)>ke?"down":"up",ke=t,Me=t,i),s=0,r=a+Q.height()/2,c=J.height()-Q.height()===a,d=n.querySelectorAll(m);if(c)s=d.length-1;else if(a)for(var f=0;f=Q.scrollTop()+Q.height();return n<=Q.scrollTop()}(l)&&(e(w).hasClass(v)||e(w).addClass(v).siblings().removeClass(v)),!(o=e(d).eq(s)).hasClass(u)){Te=!0;var h,p,g=e(w),S=g.index(m)+1,b=Do(o),x=o.data("anchor"),y=o.index(m)+1,C=o.find(B);C.length&&(p=C.data("anchor"),h=C.index()),de&&(o.addClass(u).siblings().removeClass(u),e.isFunction(j.onLeave)&&j.onLeave.call(g,S,y,b),e.isFunction(j.afterLoad)&&j.afterLoad.call(o,x,y),vo(g),fo(o),uo(o),Ho(x,y-1),j.anchors.length&&($=x),No(h,p,x,y)),clearTimeout(me),me=setTimeout(function(){Te=!1},100)}j.fitToSection&&(clearTimeout(we),we=setTimeout(function(){j.fitToSection&&e(w).outerHeight()<=se&&Je()},j.fitToSectionDelay))}}function Je(){de&&(re=!0,so(e(w)),re=!1)}function Ze(o){if(ue.m[o]){var n="down"===o?Ye:je;if(j.scrollOverflow){var t=j.scrollOverflowHandler.scrollable(e(w)),i="down"===o?"bottom":"top";if(t.length>0){if(!j.scrollOverflowHandler.isScrolled(i,t))return!0;n()}else n()}else n()}}function $e(e){var o=e.originalEvent;j.autoScrolling&&oo(o)&&e.preventDefault()}function eo(o){var n=o.originalEvent,i=e(n.target).closest(m);if(oo(n)){j.autoScrolling&&o.preventDefault();var a=Ko(n);Oe=a.y,Ie=a.x,i.find(z).length&&t.abs(Ae-Ie)>t.abs(Le-Oe)?!te&&t.abs(Ae-Ie)>Q.outerWidth()/100*j.touchSensitivity&&(Ae>Ie?ue.m.right&&Ue(i):ue.m.left&&We(i)):j.autoScrolling&&de&&t.abs(Le-Oe)>Q.height()/100*j.touchSensitivity&&(Le>Oe?Ze("down"):Oe>Le&&Ze("up"))}}function oo(e){return void 0===e.pointerType||"mouse"!=e.pointerType}function no(e){var o=e.originalEvent;if(j.fitToSection&&W.stop(),oo(o)){var n=Ko(o);Le=n.y,Ae=n.x}}function to(e,o){for(var n=0,i=e.slice(t.max(e.length-o,1)),a=0;a149&&fe.shift(),fe.push(t.abs(l)),j.scrollBar&&(n.preventDefault?n.preventDefault():n.returnValue=!1);var d=i-Ee;if(Ee=i,d>200&&(fe=[]),de)to(fe,10)>=to(fe,70)&&c&&Ze(s<0?"down":"up");return!1}j.fitToSection&&W.stop()}function ao(o,n){var t=(void 0===n?e(w):n).find(z),i=t.find(M).length;if(!(!t.length||te||i<2)){var a=t.find(B),l=null;if(!(l="left"===o?a.prev(M):a.next(M)).length){if(!j.loopHorizontal)return;l="left"===o?a.siblings(":last"):a.siblings(":first")}te=!0,Io(t,l,o)}}function lo(){e(B).each(function(){_o(e(this),"internal")})}function so(o,n,i){if(void 0!==o){var a,s,r,c,d,f,h,v,p={element:o,callback:n,isMovementUp:i,dtop:(s=(a=o).position(),r=s.top,c=s.top>Me,d=r-se+a.outerHeight(),f=j.bigSectionsDestination,a.outerHeight()>se?(c||f)&&"bottom"!==f||(r=d):(c||re&&a.is(":last-child"))&&(r=d),Me=r,r),yMovement:Do(o),anchorLink:o.data("anchor"),sectionIndex:o.index(m),activeSlide:o.find(B),activeSection:e(w),leavingSection:e(w).index(m)+1,localIsResizing:re};if(!(p.activeSection.is(o)&&!re||j.scrollBar&&Q.scrollTop()===p.dtop&&!o.hasClass(C))){if(p.activeSlide.length&&(h=p.activeSlide.data("anchor"),v=p.activeSlide.index()),e.isFunction(j.onLeave)&&!p.localIsResizing){var g=p.yMovement;if(void 0!==i&&(g=i?"up":"down"),!1===j.onLeave.call(p.activeSection,p.leavingSection,p.sectionIndex+1,g))return}j.autoScrolling&&j.continuousVertical&&void 0!==p.isMovementUp&&(!p.isMovementUp&&"up"==p.yMovement||p.isMovementUp&&"down"==p.yMovement)&&(p=function(o){o.isMovementUp?e(w).before(o.activeSection.nextAll(m)):e(w).after(o.activeSection.prevAll(m).get().reverse());return Qo(e(w).position().top),lo(),o.wrapAroundElements=o.activeSection,o.dtop=o.element.position().top,o.yMovement=Do(o.element),o.leavingSection=o.activeSection.index(m)+1,o.sectionIndex=o.element.index(m),o}(p)),p.localIsResizing||vo(p.activeSection),j.scrollOverflow&&j.scrollOverflowHandler.beforeLeave(),o.addClass(u).siblings().removeClass(u),fo(o),j.scrollOverflow&&j.scrollOverflowHandler.onLeave(),de=!1,No(v,h,p.anchorLink,p.sectionIndex),function(o){if(j.css3&&j.autoScrolling&&!j.scrollBar){var n="translate3d(0px, -"+t.round(o.dtop)+"px, 0px)";Fo(n,!0),j.scrollingSpeed?(clearTimeout(pe),pe=setTimeout(function(){ro(o)},j.scrollingSpeed)):ro(o)}else{var i=function(e){var o={};j.autoScrolling&&!j.scrollBar?(o.options={top:-e.dtop},o.element=l):(o.options={scrollTop:e.dtop},o.element="html, body");return o}(o);e(i.element).animate(i.options,j.scrollingSpeed,j.easing).promise().done(function(){j.scrollBar?setTimeout(function(){ro(o)},30):ro(o)})}}(p),$=p.anchorLink,Ho(p.anchorLink,p.sectionIndex)}}}function ro(o){var n;(n=o).wrapAroundElements&&n.wrapAroundElements.length&&(n.isMovementUp?e(S).before(n.wrapAroundElements):e(b).after(n.wrapAroundElements),Qo(e(w).position().top),lo()),e.isFunction(j.afterLoad)&&!o.localIsResizing&&j.afterLoad.call(o.element,o.anchorLink,o.sectionIndex+1),j.scrollOverflow&&j.scrollOverflowHandler.afterLoad(),o.localIsResizing||uo(o.element),o.element.addClass(v).siblings().removeClass(v),de=!0,e.isFunction(o.callback)&&o.callback.call(this)}function co(e,o){e.attr(o,e.data(o)).removeAttr("data-"+o)}function fo(o){var n;j.lazyLoading&&po(o).find("img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]").each(function(){if(n=e(this),e.each(["src","srcset"],function(e,o){var t=n.attr("data-"+o);void 0!==t&&t&&co(n,o)}),n.is("source")){var o=n.closest("video").length?"video":"audio";n.closest(o).get(0).load()}})}function uo(o){var n=po(o);n.find("video, audio").each(function(){var o=e(this).get(0);o.hasAttribute("data-autoplay")&&"function"==typeof o.play&&o.play()}),n.find('iframe[src*="youtube.com/embed/"]').each(function(){var o=e(this).get(0);o.hasAttribute("data-autoplay")&&ho(o),o.onload=function(){o.hasAttribute("data-autoplay")&&ho(o)}})}function ho(e){e.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}function vo(o){var n=po(o);n.find("video, audio").each(function(){var o=e(this).get(0);o.hasAttribute("data-keepplaying")||"function"!=typeof o.pause||o.pause()}),n.find('iframe[src*="youtube.com/embed/"]').each(function(){var o=e(this).get(0);/youtube\.com\/embed\//.test(e(this).attr("src"))&&!o.hasAttribute("data-keepplaying")&&e(this).get(0).contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})}function po(o){var n=o.find(B);return n.length&&(o=e(n)),o}function go(){var e=wo(),o=e.section,n=e.slide;o&&(j.animateAnchor?jo(o,n):Ne(o,n))}function mo(){if(!Te&&!j.lockAnchors){var e=wo(),o=e.section,n=e.slide,t=void 0===$,i=void 0===$&&void 0===n&&!te;o&&o.length&&(o&&o!==$&&!t||i||!te&&ee!=n)&&jo(o,n)}}function wo(){var e,n,t=o.location.hash;if(t.length){var i=t.replace("#","").split("/"),a=t.indexOf("#/")>-1;e=a?"/"+i[1]:decodeURIComponent(i[0]);var l=a?i[2]:i[1];l&&l.length&&(n=decodeURIComponent(l))}return{section:e,slide:n}}function So(o){clearTimeout(Se);var n=e(":focus"),t=o.which;if(9===t)!function(o){var n=o.shiftKey,t=e(":focus"),i=e(w),a=i.find(B),l=(a.length?a:i).find(ye).not('[tabindex="-1"]');function s(e){return e.preventDefault(),l.first().focus()}t.length?t.closest(w,B).length||(t=s(o)):s(o);(!n&&t.is(l.last())||n&&t.is(l.first()))&&o.preventDefault()}(o);else if(!n.is("textarea")&&!n.is("input")&&!n.is("select")&&"true"!==n.attr("contentEditable")&&""!==n.attr("contentEditable")&&j.keyboardScrolling&&j.autoScrolling){e.inArray(t,[40,38,32,33,34])>-1&&o.preventDefault(),oe=o.ctrlKey,Se=setTimeout(function(){!function(o){var n=o.shiftKey;if(!de&&[37,39].indexOf(o.which)<0)return;switch(o.which){case 38:case 33:ue.k.up&&je();break;case 32:if(n&&ue.k.up){je();break}case 40:case 34:ue.k.down&&Ye();break;case 36:ue.k.up&&Xe(1);break;case 35:ue.k.down&&Xe(e(m).length);break;case 37:ue.k.left&&We();break;case 39:ue.k.right&&Ue();break;default:;}}(o)},150)}}function bo(){e(this).prev().trigger("click")}function xo(e){ce&&(oe=e.ctrlKey)}function yo(e){2==e.which&&(Be=e.pageY,le.on("mousemove",Oo))}function Co(e){2==e.which&&le.off("mousemove")}function To(){var o=e(this).closest(m);e(this).hasClass(N)?ue.m.left&&We(o):ue.m.right&&Ue(o)}function ko(){ce=!1,oe=!1}function Lo(o){o.preventDefault();var n=e(this).parent().index();so(e(m).eq(n))}function Ao(o){o.preventDefault();var n=e(this).closest(m).find(z);Io(n,n.find(M).eq(e(this).closest("li").index()))}function Oo(e){de&&(e.pageYBe&&ue.m.down&&Ye()),Be=e.pageY}function Io(o,n,i){var a=o.closest(m),l={slides:o,destiny:n,direction:i,destinyPos:n.position(),slideIndex:n.index(),section:a,sectionIndex:a.index(m),anchorLink:a.data("anchor"),slidesNav:a.find(F),slideAnchor:Uo(n),prevSlide:a.find(B),prevSlideIndex:a.find(B).index(),localIsResizing:re};l.xMovement=function(e,o){if(e==o)return"none";if(e>o)return"left";return"right"}(l.prevSlideIndex,l.slideIndex),l.localIsResizing||(de=!1),j.onSlideLeave&&!l.localIsResizing&&"none"!==l.xMovement&&e.isFunction(j.onSlideLeave)&&!1===j.onSlideLeave.call(l.prevSlide,l.anchorLink,l.sectionIndex+1,l.prevSlideIndex,l.direction,l.slideIndex)?te=!1:(n.addClass(u).siblings().removeClass(u),l.localIsResizing||(vo(l.prevSlide),fo(n)),!j.loopHorizontal&&j.controlArrows&&(a.find(U).toggle(0!==l.slideIndex),a.find(_).toggle(!n.is(":last-child"))),a.hasClass(u)&&!l.localIsResizing&&No(l.slideIndex,l.slideAnchor,l.anchorLink,l.sectionIndex),function(e,o,n){var i=o.destinyPos;if(j.css3){var a="translate3d(-"+t.round(i.left)+"px, 0px, 0px)";Ro(e.find(D)).css(Go(a)),ge=setTimeout(function(){n&&Eo(o)},j.scrollingSpeed,j.easing)}else e.animate({scrollLeft:t.round(i.left)},j.scrollingSpeed,j.easing,function(){n&&Eo(o)})}(o,l,!0))}function Eo(o){var n,t;n=o.slidesNav,t=o.slideIndex,n.find(h).removeClass(u),n.find("li").eq(t).find("a").addClass(u),o.localIsResizing||(e.isFunction(j.afterSlideLoad)&&j.afterSlideLoad.call(o.destiny,o.anchorLink,o.sectionIndex+1,o.slideAnchor,o.slideIndex),de=!0,uo(o.destiny)),te=!1}function Mo(){if(Bo(),ie){var o=e(n.activeElement);if(!o.is("textarea")&&!o.is("input")&&!o.is("select")){var i=Q.height();t.abs(i-Re)>20*t.max(Re,i)/100&&(Ke(!0),Re=i)}}else clearTimeout(ve),ve=setTimeout(function(){Ke(!0)},350)}function Bo(){var e=j.responsive||j.responsiveWidth,o=j.responsiveHeight,n=e&&Q.outerWidth()t?"up":"down"}function Po(o){if(!o.hasClass(P)){var n=e('
      ').height(qo(o));o.addClass(P).wrapInner(n)}}function qo(e){var o=se;if(j.paddingTop||j.paddingBottom){var n=e;n.hasClass(g)||(n=e.closest(m));var t=parseInt(n.css("padding-top"))+parseInt(n.css("padding-bottom"));o=se-t}return o}function Fo(e,o){o?Ro(le):zo(le),le.css(Go(e)),setTimeout(function(){le.removeClass(r)},10)}function Vo(o){var n=le.find(m+'[data-anchor="'+o+'"]');if(!n.length){var t=void 0!==o?o-1:0;n=e(m).eq(t)}return n}function jo(e,o){var n=Vo(e);if(n.length){var t,i,a,l=(t=o,(a=(i=n).find(M+'[data-anchor="'+t+'"]')).length||(t=void 0!==t?t:0,a=i.find(M).eq(t)),a);e===$||n.hasClass(u)?Yo(l):so(n,function(){Yo(l)})}}function Yo(e){e.length&&Io(e.closest(z),e)}function No(e,o,n,t){var i="";j.anchors.length&&!j.lockAnchors&&(e?(void 0!==n&&(i=n),void 0===o&&(o=e),ee=o,Xo(i+"/"+o)):void 0!==e?(ee=o,Xo(n)):Xo(n)),Wo()}function Xo(e){if(j.recordHistory)location.hash=e;else if(ie||ae)o.history.replaceState(i,i,"#"+e);else{var n=o.location.href.split("#")[0];o.location.replace(n+"#"+e)}}function Uo(e){var o=e.data("anchor"),n=e.index();return void 0===o&&(o=n),o}function Wo(){var o=e(w),n=o.find(B),t=Uo(o),i=Uo(n),a=String(t);n.length&&(a=a+"-"+i),a=a.replace("/","-").replace("#","");var l=new RegExp("\\b\\s?"+f+"-[^\\s]+\\b","g");J[0].className=J[0].className.replace(l,""),J.addClass(f+"-"+a)}function Ko(e){var o=[];return o.y=void 0!==e.pageY&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY,o.x=void 0!==e.pageX&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX,ae&&oo(e)&&(j.scrollBar||!j.autoScrolling)&&(o.y=e.touches[0].pageY,o.x=e.touches[0].pageX),o}function _o(e,o){De(0,"internal"),void 0!==o&&(re=!0),Io(e.closest(z),e),void 0!==o&&(re=!1),De(Ce.scrollingSpeed,"internal")}function Qo(e){var o=t.round(e);j.css3&&j.autoScrolling&&!j.scrollBar?Fo("translate3d(0px, -"+o+"px, 0px)",!1):j.autoScrolling&&!j.scrollBar?le.css("top",-o):W.scrollTop(o)}function Go(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}}function Jo(o,n,t){"all"!==n?ue[t][n]=o:e.each(Object.keys(ue[t]),function(e,n){ue[t][n]=o})}function Zo(e,o,n){j[e]=o,"internal"!==n&&(Ce[e]=o)}function $o(){e("html").hasClass(d)?en("error","Fullpage.js can only be initialized once and you are doing it multiple times!"):(j.continuousVertical&&(j.loopTop||j.loopBottom)&&(j.continuousVertical=!1,en("warn","Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),j.scrollBar&&j.scrollOverflow&&en("warn","Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox"),!j.continuousVertical||!j.scrollBar&&j.autoScrolling||(j.continuousVertical=!1,en("warn","Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),j.scrollOverflow&&!j.scrollOverflowHandler&&(j.scrollOverflow=!1,en("error","The option `scrollOverflow:true` requires the file `scrolloverflow.min.js`. Please include it before fullPage.js.")),e.each(["fadingEffect","continuousHorizontal","scrollHorizontally","interlockedSlides","resetSliders","responsiveSlides","offsetSections","dragAndMove","scrollOverflowReset","parallax"],function(e,o){j[o]&&en("warn","fullpage.js extensions require jquery.fullpage.extensions.min.js file instead of the usual jquery.fullpage.js. Requested: "+o)}),e.each(j.anchors,function(o,n){var t=G.find("[name]").filter(function(){return e(this).attr("name")&&e(this).attr("name").toLowerCase()==n.toLowerCase()}),i=G.find("[id]").filter(function(){return e(this).attr("id")&&e(this).attr("id").toLowerCase()==n.toLowerCase()});(i.length||t.length)&&(en("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE)."),i.length&&en("error",'"'+n+'" is is being used by another element `id` property'),t.length&&en("error",'"'+n+'" is is being used by another element `name` property'))}))}function en(e,o){console&&console[e]&&console[e]("fullPage: "+o)}}}); 9 | //# sourceMappingURL=jquery.fullpage.min.js.map 10 | -------------------------------------------------------------------------------- /templates/fullpage.html.twig: -------------------------------------------------------------------------------- 1 | {% set theme_config = attribute(config.themes, config.system.pages.theme) %} 2 | 3 | 4 | {% block head %} 5 | 6 | {% block meta %} 7 | 8 | {% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }} 9 | {% include 'partials/metadata.html.twig' %} 10 | 11 | {% endblock meta %} 12 | 13 | 14 | {% block stylesheets %} 15 | {% if config.plugins['fullpage'].transition %} 16 | {% do assets.addCss('plugin://fullpage/css/transition.css', {'group': 'critical'}) %} 17 | {% endif %} 18 | {% if config.plugins['fullpage'].builtin_css %} 19 | {% do assets.addCss('plugin://fullpage/css/jquery.fullpage.min.css') %} 20 | {% do assets.addCss('plugin://fullpage/css/fullpage.css') %} 21 | {% endif %} 22 | {% if config.plugins['fullpage'].theme_css %} 23 | {% do assets.addCss('theme://css/custom.css') %} 24 | {% endif %} 25 | {% endblock %} 26 | {{ assets.css('critical')|raw }} 27 | {{ assets.css()|raw }} 28 | 29 | {% endblock head %} 30 | 31 | 32 | {% if config.plugins['fullpage'].transition %} 33 |
      34 |
      35 |
      36 |
      37 |
      38 |
      39 |
      40 |
      41 |
      42 | {% endif %} 43 | {% block content %} 44 |
      45 | {{ page.content|raw }} 46 |
      47 | {% endblock content %} 48 | {% block scripts %} 49 | {% if config.plugins['fullpage'].builtin_js %} 50 | {% do assets.addJs('system://assets/jquery/jquery-3.x.min.js') %} 51 | {% do assets.addJs('plugin://fullpage/js/jquery.fullpage.min.js') %} 52 | {% endif %} 53 | {% endblock %} 54 | {{ assets.js()|raw }} 55 | {% block init_fullpage %} 56 | {% if config.plugins['fullpage'].builtin_js %} 57 | 60 | {% endif %} 61 | {% endblock %} 62 | 63 | --------------------------------------------------------------------------------