Merge pull request #23101 from twbs/v4-dev-xmr-docs-favicons
docs: New favicons and add a service worker
9
_includes/favicons.html
Normal file
@@ -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">
|
@@ -21,14 +21,10 @@
|
|||||||
|
|
||||||
<!-- Documentation extras -->
|
<!-- Documentation extras -->
|
||||||
{% if page.layout == "docs" %}
|
{% 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 %}
|
{% endif %}
|
||||||
<link href="{{ site.baseurl }}/assets/css/docs.min.css" rel="stylesheet">
|
<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>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(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),
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
<script src="{{ site.baseurl }}/assets/js/vendor/clipboard.min.js"></script>
|
<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/vendor/holder.min.js"></script>
|
||||||
<script src="{{ site.baseurl }}/assets/js/src/application.js"></script>
|
<script src="{{ site.baseurl }}/assets/js/src/application.js"></script>
|
||||||
|
<script src="{{ site.baseurl }}/assets/js/src/pwa.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>
|
<script src="{{ site.baseurl }}/assets/js/ie-emulation-modes-warning.js"></script>
|
||||||
|
Before Width: | Height: | Size: 6.0 KiB |
BIN
assets/img/favicons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/img/favicons/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
assets/img/favicons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
11
assets/img/favicons/browserconfig.xml
Normal file
@@ -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>
|
BIN
assets/img/favicons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
assets/img/favicons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 491 B |
22
assets/img/favicons/manifest.json
Normal file
@@ -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"
|
||||||
|
}
|
BIN
assets/img/favicons/mstile-144x144.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/img/favicons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/img/favicons/mstile-310x150.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/img/favicons/mstile-310x310.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
assets/img/favicons/mstile-70x70.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
20
assets/img/favicons/safari-pinned-tab.svg
Normal file
@@ -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>
|
After Width: | Height: | Size: 1.0 KiB |
15
assets/js/src/pwa.js
Normal file
@@ -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)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}())
|
@@ -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-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-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": "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": "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",
|
"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",
|
"docs": "npm-run-all docs-compile docs-lint",
|
||||||
|