aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2017-08-15 15:00:54 +0300
committerGitHub <[email protected]>2017-08-15 15:00:54 +0300
commitac718c9b6db8a2ae865213ef1d4061915b7aeb1a (patch)
treeb165349514270997b095a9922ba4bb240ea1ed59
parentaadf2dcd0345d22efef1d8394709881cb8c88119 (diff)
parent20abbc3c16d39ad92fbf0b497a3690967764a1fd (diff)
downloadbootstrap-ac718c9b6db8a2ae865213ef1d4061915b7aeb1a.tar.xz
bootstrap-ac718c9b6db8a2ae865213ef1d4061915b7aeb1a.zip
Merge pull request #23101 from twbs/v4-dev-xmr-docs-favicons
docs: New favicons and add a service worker
-rw-r--r--_includes/favicons.html9
-rw-r--r--_includes/header.html6
-rw-r--r--_includes/scripts.html1
-rw-r--r--apple-touch-icon.pngbin6140 -> 0 bytes
-rw-r--r--assets/img/favicons/android-chrome-192x192.pngbin0 -> 1935 bytes
-rw-r--r--assets/img/favicons/android-chrome-512x512.pngbin0 -> 8745 bytes
-rw-r--r--assets/img/favicons/apple-touch-icon.pngbin0 -> 1738 bytes
-rw-r--r--assets/img/favicons/browserconfig.xml11
-rw-r--r--assets/img/favicons/favicon-16x16.pngbin0 -> 310 bytes
-rw-r--r--assets/img/favicons/favicon-32x32.pngbin0 -> 491 bytes
-rw-r--r--assets/img/favicons/manifest.json22
-rw-r--r--assets/img/favicons/mstile-144x144.pngbin0 -> 1479 bytes
-rw-r--r--assets/img/favicons/mstile-150x150.pngbin0 -> 1428 bytes
-rw-r--r--assets/img/favicons/mstile-310x150.pngbin0 -> 1746 bytes
-rw-r--r--assets/img/favicons/mstile-310x310.pngbin0 -> 3085 bytes
-rw-r--r--assets/img/favicons/mstile-70x70.pngbin0 -> 1104 bytes
-rw-r--r--assets/img/favicons/safari-pinned-tab.svg20
-rw-r--r--assets/js/src/pwa.js15
-rw-r--r--package.json2
-rw-r--r--sw.js1
20 files changed, 81 insertions, 6 deletions
diff --git a/_includes/favicons.html b/_includes/favicons.html
new file mode 100644
index 000000000..97dab4ba8
--- /dev/null
+++ b/_includes/favicons.html
@@ -0,0 +1,9 @@
+<!-- Favicons -->
+<link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
+<link rel="icon" href="{{ site.baseurl }}/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
+<link rel="icon" href="{{ site.baseurl }}/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
+<link rel="manifest" href="{{ site.baseurl }}/assets/img/favicons/manifest.json">
+<link rel="mask-icon" href="{{ site.baseurl }}/assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
+<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
+<meta name="msapplication-config" content="{{ site.baseurl }}/assets/img/favicons/browserconfig.xml">
+<meta name="theme-color" content="#563d7c">
diff --git a/_includes/header.html b/_includes/header.html
index d9eac3db3..c7e5dbd9e 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -21,14 +21,10 @@
<!-- Documentation extras -->
{% if page.layout == "docs" %}
-<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" />
+<link href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" rel="stylesheet">
{% endif %}
<link href="{{ site.baseurl }}/assets/css/docs.min.css" rel="stylesheet">
-<!-- Favicons -->
-<link rel="apple-touch-icon" href="{{ site.baseurl }}/apple-touch-icon.png">
-<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
-
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
diff --git a/_includes/scripts.html b/_includes/scripts.html
index 058ba1b33..fca699880 100644
--- a/_includes/scripts.html
+++ b/_includes/scripts.html
@@ -16,6 +16,7 @@
<script src="{{ site.baseurl }}/assets/js/vendor/clipboard.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/vendor/holder.min.js"></script>
<script src="{{ site.baseurl }}/assets/js/src/application.js"></script>
+ <script src="{{ site.baseurl }}/assets/js/src/pwa.js"></script>
{% endif %}
<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>
diff --git a/apple-touch-icon.png b/apple-touch-icon.png
deleted file mode 100644
index b6b1e843b..000000000
--- a/apple-touch-icon.png
+++ /dev/null
Binary files differ
diff --git a/assets/img/favicons/android-chrome-192x192.png b/assets/img/favicons/android-chrome-192x192.png
new file mode 100644
index 000000000..547386f37
--- /dev/null
+++ b/assets/img/favicons/android-chrome-192x192.png
Binary files differ
diff --git a/assets/img/favicons/android-chrome-512x512.png b/assets/img/favicons/android-chrome-512x512.png
new file mode 100644
index 000000000..ebafe360f
--- /dev/null
+++ b/assets/img/favicons/android-chrome-512x512.png
Binary files differ
diff --git a/assets/img/favicons/apple-touch-icon.png b/assets/img/favicons/apple-touch-icon.png
new file mode 100644
index 000000000..447cec2c4
--- /dev/null
+++ b/assets/img/favicons/apple-touch-icon.png
Binary files differ
diff --git a/assets/img/favicons/browserconfig.xml b/assets/img/favicons/browserconfig.xml
new file mode 100644
index 000000000..8b193171a
--- /dev/null
+++ b/assets/img/favicons/browserconfig.xml
@@ -0,0 +1,11 @@
+---
+---
+<?xml version="1.0" encoding="utf-8"?>
+<browserconfig>
+ <msapplication>
+ <tile>
+ <square150x150logo src="{{ site.baseurl }}/assets/img/favicons/mstile-150x150.png"/>
+ <TileColor>#563d7c</TileColor>
+ </tile>
+ </msapplication>
+</browserconfig>
diff --git a/assets/img/favicons/favicon-16x16.png b/assets/img/favicons/favicon-16x16.png
new file mode 100644
index 000000000..5f7d11880
--- /dev/null
+++ b/assets/img/favicons/favicon-16x16.png
Binary files differ
diff --git a/assets/img/favicons/favicon-32x32.png b/assets/img/favicons/favicon-32x32.png
new file mode 100644
index 000000000..d752fd5d7
--- /dev/null
+++ b/assets/img/favicons/favicon-32x32.png
Binary files differ
diff --git a/assets/img/favicons/manifest.json b/assets/img/favicons/manifest.json
new file mode 100644
index 000000000..14cd52412
--- /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 000000000..262a3c2e1
--- /dev/null
+++ b/assets/img/favicons/mstile-144x144.png
Binary files differ
diff --git a/assets/img/favicons/mstile-150x150.png b/assets/img/favicons/mstile-150x150.png
new file mode 100644
index 000000000..bb87faf74
--- /dev/null
+++ b/assets/img/favicons/mstile-150x150.png
Binary files differ
diff --git a/assets/img/favicons/mstile-310x150.png b/assets/img/favicons/mstile-310x150.png
new file mode 100644
index 000000000..2fc36a726
--- /dev/null
+++ b/assets/img/favicons/mstile-310x150.png
Binary files differ
diff --git a/assets/img/favicons/mstile-310x310.png b/assets/img/favicons/mstile-310x310.png
new file mode 100644
index 000000000..7f00d0c66
--- /dev/null
+++ b/assets/img/favicons/mstile-310x310.png
Binary files differ
diff --git a/assets/img/favicons/mstile-70x70.png b/assets/img/favicons/mstile-70x70.png
new file mode 100644
index 000000000..4da2de9e3
--- /dev/null
+++ b/assets/img/favicons/mstile-70x70.png
Binary files differ
diff --git a/assets/img/favicons/safari-pinned-tab.svg b/assets/img/favicons/safari-pinned-tab.svg
new file mode 100644
index 000000000..086866a17
--- /dev/null
+++ b/assets/img/favicons/safari-pinned-tab.svg
@@ -0,0 +1,20 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
+ preserveAspectRatio="xMidYMid meet">
+<metadata>
+Created by potrace 1.11, written by Peter Selinger 2001-2013
+</metadata>
+<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M975 6983 c-494 -88 -870 -467 -959 -965 -13 -72 -15 -404 -14 -2513
+0 -1970 3 -2446 13 -2515 46 -295 206 -564 445 -747 60 -46 164 -113 175 -113
+3 0 31 -13 62 -28 73 -35 146 -58 260 -82 84 -17 196 -18 2563 -16 2334 1
+2479 3 2545 19 39 10 77 20 85 22 74 18 226 87 310 139 92 58 255 209 298 276
+9 14 28 41 43 60 36 48 111 200 138 280 12 36 30 106 40 155 18 86 19 188 17
+2570 l-1 2480 -27 95 c-52 188 -106 300 -207 434 -170 225 -400 372 -691 442
+-71 17 -200 18 -2545 20 -2111 2 -2482 0 -2550 -13z"/>
+</g>
+</svg>
diff --git a/assets/js/src/pwa.js b/assets/js/src/pwa.js
new file mode 100644
index 000000000..95ee33948
--- /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 0f0618284..a88d0498b 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 000000000..44d1d2774
--- /dev/null
+++ b/sw.js
@@ -0,0 +1 @@
+// empty for now