From aadf2dcd0345d22efef1d8394709881cb8c88119 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 15 Aug 2017 14:25:19 +0300 Subject: [PATCH 1/7] Beautify _config.yml. (#23448) --- _config.yml | 91 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 37 deletions(-) diff --git a/_config.yml b/_config.yml index 92725a90141c..c40fc8841bbe 100644 --- a/_config.yml +++ b/_config.yml @@ -1,21 +1,39 @@ # Dependencies -markdown: kramdown -highlighter: rouge +markdown: kramdown +highlighter: rouge kramdown: - auto_ids: true + auto_ids: true # Permalinks -permalink: pretty +permalink: pretty # Server -source: . -destination: ./_gh_pages -port: 9001 -baseurl: "" -url: https://getbootstrap.com -encoding: UTF-8 -exclude: [.git, .github, assets/scss/, build, js, node_modules, nuget, scss, vendor, bower.json, composer.json, Gemfile, Gemfile.lock, Gruntfile.js, package.js, package.json, package-lock.json, sache.json] +source: "." +destination: ./_gh_pages +port: 9001 +baseurl: "" +url: "https://getbootstrap.com" +encoding: UTF-8 +exclude: + - .git + - .github + - assets/scss/ + - build + - js + - node_modules + - nuget + - scss + - vendor + - bower.json + - composer.json + - Gemfile + - Gemfile.lock + - Gruntfile.js + - package.js + - package.json + - package-lock.json + - sache.json plugins: - jekyll-redirect-from @@ -23,35 +41,34 @@ plugins: - jekyll-toc # Social -title: Bootstrap -description: The most popular HTML, CSS, and JS library in the world. -twitter: getbootstrap -authors: Mark Otto, Jacob Thornton, and Bootstrap contributors -social_logo_path: /assets/brand/bootstrap-social-logo.png -social_image_path: /assets/brand/bootstrap-social.png - -# Custom vars -current_version: 4.0.0-beta -docs_version: 4.0 -repo: https://github.com/twbs/bootstrap -slack: https://bootstrap-slack.herokuapp.com +title: Bootstrap +description: "The most popular HTML, CSS, and JS library in the world." +twitter: getbootstrap +authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors" +social_image_path: /assets/brand/bootstrap-social.png +social_logo_path: /assets/brand/bootstrap-social-logo.png +# Custom variables +current_version: 4.0.0-beta +docs_version: 4.0 +repo: "https://github.com/twbs/bootstrap" +slack: "https://bootstrap-slack.herokuapp.com" download: - source: https://github.com/twbs/bootstrap/archive/v4.0.0-beta.zip - dist: https://github.com/twbs/bootstrap/releases/download/v4.0.0-beta/bootstrap-4.0.0-beta-dist.zip + source: "https://github.com/twbs/bootstrap/archive/v4.0.0-beta.zip" + dist: "https://github.com/twbs/bootstrap/releases/download/v4.0.0-beta/bootstrap-4.0.0-beta-dist.zip" -blog: https://blog.getbootstrap.com -expo: https://expo.getbootstrap.com -themes: https://themes.getbootstrap.com -jobs: https://jobs.getbootstrap.com +blog: "https://blog.getbootstrap.com" +expo: "https://expo.getbootstrap.com" +jobs: "https://jobs.getbootstrap.com" +themes: "https://themes.getbootstrap.com" cdn: # See https://www.srihash.org for info on how to generate the hashes - css: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css - css_hash: "sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" - js: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js - js_hash: "sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" - jquery: https://code.jquery.com/jquery-3.2.1.slim.min.js - jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" - popper: https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js - popper_hash: "sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" + css: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" + css_hash: "sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" + js: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" + js_hash: "sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" + jquery: "https://code.jquery.com/jquery-3.2.1.slim.min.js" + jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" + popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" + popper_hash: "sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" From e9323459ab226d9eb0d15217707c1ce12cf490eb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 16 Jul 2017 14:58:52 +0300 Subject: [PATCH 2/7] New favicons. Include everything for most browsers to work including Android. Kept favicon.ico to the root dir. Also added a manifest.json for PWA. --- _includes/favicons.html | 9 +++++++ _includes/header.html | 6 +---- apple-touch-icon.png | Bin 6140 -> 0 bytes .../img/favicons/android-chrome-192x192.png | Bin 0 -> 1935 bytes .../img/favicons/android-chrome-512x512.png | Bin 0 -> 8745 bytes assets/img/favicons/apple-touch-icon.png | Bin 0 -> 1738 bytes assets/img/favicons/browserconfig.xml | 11 +++++++++ assets/img/favicons/favicon-16x16.png | Bin 0 -> 310 bytes assets/img/favicons/favicon-32x32.png | Bin 0 -> 491 bytes assets/img/favicons/manifest.json | 22 ++++++++++++++++++ assets/img/favicons/mstile-144x144.png | Bin 0 -> 1479 bytes assets/img/favicons/mstile-150x150.png | Bin 0 -> 1428 bytes assets/img/favicons/mstile-310x150.png | Bin 0 -> 1746 bytes assets/img/favicons/mstile-310x310.png | Bin 0 -> 3085 bytes assets/img/favicons/mstile-70x70.png | Bin 0 -> 1104 bytes assets/img/favicons/safari-pinned-tab.svg | 20 ++++++++++++++++ 16 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 _includes/favicons.html delete mode 100644 apple-touch-icon.png create mode 100644 assets/img/favicons/android-chrome-192x192.png create mode 100644 assets/img/favicons/android-chrome-512x512.png create mode 100644 assets/img/favicons/apple-touch-icon.png create mode 100644 assets/img/favicons/browserconfig.xml create mode 100644 assets/img/favicons/favicon-16x16.png create mode 100644 assets/img/favicons/favicon-32x32.png create mode 100644 assets/img/favicons/manifest.json create mode 100644 assets/img/favicons/mstile-144x144.png create mode 100644 assets/img/favicons/mstile-150x150.png create mode 100644 assets/img/favicons/mstile-310x150.png create mode 100644 assets/img/favicons/mstile-310x310.png create mode 100644 assets/img/favicons/mstile-70x70.png create mode 100644 assets/img/favicons/safari-pinned-tab.svg diff --git a/_includes/favicons.html b/_includes/favicons.html new file mode 100644 index 000000000000..97dab4ba8f8a --- /dev/null +++ b/_includes/favicons.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/_includes/header.html b/_includes/header.html index d9eac3db3017..c7e5dbd9e5fa 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -21,14 +21,10 @@ {% if page.layout == "docs" %} - + {% endif %} - - - - + {% endif %} diff --git a/assets/js/src/pwa.js b/assets/js/src/pwa.js new file mode 100644 index 000000000000..95ee339482e9 --- /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 0f0618284a2d..a88d0498b141 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 000000000000..44d1d2774a24 --- /dev/null +++ b/sw.js @@ -0,0 +1 @@ +// empty for now From 1f4486c31b41208108e3d39df3e2dbcc47effa03 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 15 Aug 2017 14:41:34 +0300 Subject: [PATCH 4/7] Reduce liquid's whitespace for a few pages. Also fix a couple of typos while at it and change header tags' order. --- _includes/callout-danger-async-methods.md | 2 +- ...ut-warning-color-assistive-technologies.md | 2 +- _includes/docs-sidebar.html | 40 +++++++++---------- _includes/header.html | 10 ++--- _includes/scripts.html | 2 +- _includes/social.html | 8 ++-- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/_includes/callout-danger-async-methods.md b/_includes/callout-danger-async-methods.md index c354d9c1161c..89d2e2cabb39 100644 --- a/_includes/callout-danger-async-methods.md +++ b/_includes/callout-danger-async-methods.md @@ -1,7 +1,7 @@ {% callout danger %} #### Asynchronous methods and transitions -All API methods are **asynchronous** and start a **transition**. They returns to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**. +All API methods are **asynchronous** and start a **transition**. They return to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**. [See our JavaScript documentation for more information.]({{ site.baseurl }}/docs/{{ site.docs_version }}/getting-started/javascript/) {% endcallout %} diff --git a/_includes/callout-warning-color-assistive-technologies.md b/_includes/callout-warning-color-assistive-technologies.md index b92a1c3418ba..0b929e16d2b7 100644 --- a/_includes/callout-warning-color-assistive-technologies.md +++ b/_includes/callout-warning-color-assistive-technologies.md @@ -2,4 +2,4 @@ #### Conveying meaning to assistive technologies Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the `.sr-only` class. -{% endcallout %} \ No newline at end of file +{% endcallout %} diff --git a/_includes/docs-sidebar.html b/_includes/docs-sidebar.html index 71ea14f7d821..00eaf47a60d7 100644 --- a/_includes/docs-sidebar.html +++ b/_includes/docs-sidebar.html @@ -1,37 +1,37 @@ diff --git a/_includes/header.html b/_includes/header.html index c7e5dbd9e5fa..b6fad53e9844 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -3,15 +3,13 @@ - {% if page.title %} + {%- if page.title -%} {{ page.title }} · {{ site.title }} - {% else %} + {%- else -%} {{ site.title }} · {{ site.description }} - {% endif %} + {%- endif -%} -{% include social.html %} - {% if site.github %} @@ -25,6 +23,8 @@ {% endif %} +{% include social.html %} + diff --git a/_includes/social.html b/_includes/social.html index 35bd9fde3252..977142b19a0f 100644 --- a/_includes/social.html +++ b/_includes/social.html @@ -1,3 +1,7 @@ + + + + @@ -30,7 +34,3 @@ - - - - From 703c7daf571c750b6ee93cf8032fee2268e6bed0 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 15 Aug 2017 15:06:27 +0300 Subject: [PATCH 5/7] Move About menu link to the end. --- _data/nav.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_data/nav.yml b/_data/nav.yml index c4c342dd2788..784ec9a7334a 100644 --- a/_data/nav.yml +++ b/_data/nav.yml @@ -75,6 +75,8 @@ # - title: Approach - title: Icons +- title: Migration + - title: About pages: - title: History @@ -82,5 +84,3 @@ - title: Brand - title: License - title: Translations - -- title: Migration From 839fa0fe9886b36c76dae03f6c2905d3209a23ad Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 15 Aug 2017 18:08:54 +0300 Subject: [PATCH 6/7] README.md: use https for the Bootstrap logo. (#23458) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 552066cc25a0..3f988e19601d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- +

Bootstrap

From b15041066089a6b533457468c2927f1c02d85ca9 Mon Sep 17 00:00:00 2001 From: Rolandas Barysas Date: Tue, 15 Aug 2017 18:16:40 +0300 Subject: [PATCH 7/7] Remove $zindex-dropdown-backdrop from docs (#23461) It was removed in 6d64afe. --- docs/4.0/layout/overview.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/4.0/layout/overview.md b/docs/4.0/layout/overview.md index 45919171933b..c86a432d3c4c 100644 --- a/docs/4.0/layout/overview.md +++ b/docs/4.0/layout/overview.md @@ -162,7 +162,6 @@ Several Bootstrap components utilize `z-index`, the CSS property that helps cont We don't encourage customization of these values; should you change one, you likely need to change them all. ```scss -$zindex-dropdown-backdrop: 990 !default; $zindex-dropdown: 1000 !default; $zindex-fixed: 1030 !default; $zindex-sticky: 1030 !default;