diff --git a/_includes/favicons.html b/_includes/favicons.html new file mode 100644 index 0000000000..97dab4ba8f --- /dev/null +++ b/_includes/favicons.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_includes/header.html b/_includes/header.html index d9eac3db30..c7e5dbd9e5 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -21,14 +21,10 @@ {% if page.layout == "docs" %} - + {% endif %} - - - - + {% endif %} diff --git a/apple-touch-icon.png b/apple-touch-icon.png deleted file mode 100644 index b6b1e843bb..0000000000 Binary files a/apple-touch-icon.png and /dev/null differ diff --git a/assets/img/favicons/android-chrome-192x192.png b/assets/img/favicons/android-chrome-192x192.png new file mode 100644 index 0000000000..547386f371 Binary files /dev/null and b/assets/img/favicons/android-chrome-192x192.png differ diff --git a/assets/img/favicons/android-chrome-512x512.png b/assets/img/favicons/android-chrome-512x512.png new file mode 100644 index 0000000000..ebafe360f3 Binary files /dev/null and b/assets/img/favicons/android-chrome-512x512.png differ diff --git a/assets/img/favicons/apple-touch-icon.png b/assets/img/favicons/apple-touch-icon.png new file mode 100644 index 0000000000..447cec2c47 Binary files /dev/null and b/assets/img/favicons/apple-touch-icon.png differ diff --git a/assets/img/favicons/browserconfig.xml b/assets/img/favicons/browserconfig.xml new file mode 100644 index 0000000000..8b193171af --- /dev/null +++ b/assets/img/favicons/browserconfig.xml @@ -0,0 +1,11 @@ +--- +--- + + + + + + #563d7c + + + diff --git a/assets/img/favicons/favicon-16x16.png b/assets/img/favicons/favicon-16x16.png new file mode 100644 index 0000000000..5f7d11880f Binary files /dev/null and b/assets/img/favicons/favicon-16x16.png differ diff --git a/assets/img/favicons/favicon-32x32.png b/assets/img/favicons/favicon-32x32.png new file mode 100644 index 0000000000..d752fd5d71 Binary files /dev/null and b/assets/img/favicons/favicon-32x32.png differ diff --git a/assets/img/favicons/manifest.json b/assets/img/favicons/manifest.json new file mode 100644 index 0000000000..14cd524124 --- /dev/null +++ b/assets/img/favicons/manifest.json @@ -0,0 +1,22 @@ +--- +--- +{ + "name": "Bootstrap", + "short_name": "Bootstrap", + "icons": [ + { + "src": "{{ site.baseurl }}/assets/img/favicons/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "{{ site.baseurl }}/assets/img/favicons/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "start_url": "/", + "theme_color": "#563d7c", + "background_color": "#563d7c", + "display": "standalone" +} diff --git a/assets/img/favicons/mstile-144x144.png b/assets/img/favicons/mstile-144x144.png new file mode 100644 index 0000000000..262a3c2e14 Binary files /dev/null and b/assets/img/favicons/mstile-144x144.png differ diff --git a/assets/img/favicons/mstile-150x150.png b/assets/img/favicons/mstile-150x150.png new file mode 100644 index 0000000000..bb87faf74f Binary files /dev/null and b/assets/img/favicons/mstile-150x150.png differ diff --git a/assets/img/favicons/mstile-310x150.png b/assets/img/favicons/mstile-310x150.png new file mode 100644 index 0000000000..2fc36a7268 Binary files /dev/null and b/assets/img/favicons/mstile-310x150.png differ diff --git a/assets/img/favicons/mstile-310x310.png b/assets/img/favicons/mstile-310x310.png new file mode 100644 index 0000000000..7f00d0c66a Binary files /dev/null and b/assets/img/favicons/mstile-310x310.png differ diff --git a/assets/img/favicons/mstile-70x70.png b/assets/img/favicons/mstile-70x70.png new file mode 100644 index 0000000000..4da2de9e36 Binary files /dev/null and b/assets/img/favicons/mstile-70x70.png differ diff --git a/assets/img/favicons/safari-pinned-tab.svg b/assets/img/favicons/safari-pinned-tab.svg new file mode 100644 index 0000000000..086866a177 --- /dev/null +++ b/assets/img/favicons/safari-pinned-tab.svg @@ -0,0 +1,20 @@ + + + + +Created by potrace 1.11, written by Peter Selinger 2001-2013 + + + + + diff --git a/assets/js/src/pwa.js b/assets/js/src/pwa.js new file mode 100644 index 0000000000..95ee339482 --- /dev/null +++ b/assets/js/src/pwa.js @@ -0,0 +1,15 @@ +/* eslint no-console:off */ + +(function setupSW() { + 'use strict' + + if ('serviceWorker' in navigator) { + window.addEventListener('load', function () { + navigator.serviceWorker.register('/sw.js').then(function (registration) { + console.log('ServiceWorker registration successful with scope: ', registration.scope) + }).catch(function (err) { + console.log('ServiceWorker registration failed: ', err) + }) + }) + } +}()) diff --git a/package.json b/package.json index 0f0618284a..a88d0498b1 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "js-compile-bundle": "shx cat js/src/util.js js/src/alert.js js/src/button.js js/src/carousel.js js/src/collapse.js js/src/dropdown.js js/src/modal.js js/src/scrollspy.js js/src/tab.js js/src/tooltip.js js/src/popover.js | shx sed \"s/^(import|export).*//\" | babel --filename js/src/bootstrap.js | node build/stamp.js > dist/js/bootstrap.js", "js-compile-plugins": "babel js/src/ --out-dir js/dist/ --source-maps", "js-minify": "uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.min.js dist/js/bootstrap.js", - "js-minify-docs": "uglifyjs --config-file build/uglifyjs.config.json --output assets/js/docs.min.js assets/js/vendor/anchor.min.js assets/js/vendor/clipboard.min.js assets/js/vendor/holder.min.js assets/js/src/application.js", + "js-minify-docs": "uglifyjs --config-file build/uglifyjs.config.json --output assets/js/docs.min.js assets/js/vendor/anchor.min.js assets/js/vendor/clipboard.min.js assets/js/vendor/holder.min.js assets/js/src/application.js assets/js/src/pwa.js", "js-test": "phantomjs ./node_modules/qunit-phantomjs-runner/runner.js js/tests/index.html 60", "js-test-cloud": "ruby -r webrick -e \"s = WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd, :Logger => WEBrick::Log.new('/dev/null'), :AccessLog => []); trap('INT') { s.shutdown }; s.start\" & grunt saucelabs-qunit", "docs": "npm-run-all docs-compile docs-lint", diff --git a/sw.js b/sw.js new file mode 100644 index 0000000000..44d1d2774a --- /dev/null +++ b/sw.js @@ -0,0 +1 @@ +// empty for now