Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <markdotto@gmail.com>2018-06-21 07:31:38 +0300
committerMark Otto <otto@github.com>2018-07-12 09:30:46 +0300
commit0e920ce3f481a23c00c22c10565463ce58c0aac2 (patch)
treeb66e8c4bf2244d3b71d7f2e6f2376ae528f6bd93 /site/_layouts
parent9e126b26a863505b048bc927c6c6f731d42d2ba4 (diff)
Reorganize docs for easier deploys
With the current docs directory setup, I'm making too many mistakes and have to manually address path changes and directory moves on deploy. This makes for a frustrating experience developing locally and shipping releases. With this PR, we're basically back to the same setup from v3—duplicating the dist directory into our docs directory. Not the most ideal, but very straightforward for me as the release manager.
Diffstat (limited to 'site/_layouts')
-rw-r--r--site/_layouts/default.html22
-rw-r--r--site/_layouts/docs.html34
-rw-r--r--site/_layouts/examples.html16
-rw-r--r--site/_layouts/home.html16
-rw-r--r--site/_layouts/redirect.html38
-rw-r--r--site/_layouts/simple.html12
6 files changed, 138 insertions, 0 deletions
diff --git a/site/_layouts/default.html b/site/_layouts/default.html
new file mode 100644
index 0000000000..28f4cdccb0
--- /dev/null
+++ b/site/_layouts/default.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ {% include header.html %}
+ </head>
+ <body>
+ {% include skippy.html %}
+
+ {% include docs-navbar.html %}
+
+ {% if page.layout == "simple" or page.layout == "examples" %}
+ {{ content }}
+ {% else %}
+ <main id="content" role="main">
+ {{ content }}
+ </main>
+ {% endif %}
+
+ {% include footer.html %}
+ {% include scripts.html %}
+ </body>
+</html>
diff --git a/site/_layouts/docs.html b/site/_layouts/docs.html
new file mode 100644
index 0000000000..1d2125508e
--- /dev/null
+++ b/site/_layouts/docs.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ {% include header.html %}
+ </head>
+ <body>
+ {% include skippy.html %}
+
+ {% include docs-navbar.html %}
+
+ <div class="container-fluid">
+ <div class="row flex-xl-nowrap">
+ <div class="col-12 col-md-3 col-xl-2 bd-sidebar">
+ {% include docs-sidebar.html %}
+ </div>
+
+ {% if page.toc %}
+ <div class="d-none d-xl-block col-xl-2 bd-toc">
+ {{ content | toc_only }}
+ </div>
+ {% endif %}
+
+ <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main">
+ <h1 class="bd-title" id="content">{{ page.title | smartify }}</h1>
+ <p class="bd-lead">{{ page.description | smartify }}</p>
+ {% include ads.html %}
+ {{ content }}
+ </main>
+ </div>
+ </div>
+
+ {% include scripts.html %}
+ </body>
+</html>
diff --git a/site/_layouts/examples.html b/site/_layouts/examples.html
new file mode 100644
index 0000000000..1f8fbcdec7
--- /dev/null
+++ b/site/_layouts/examples.html
@@ -0,0 +1,16 @@
+---
+layout: default
+---
+
+<header class="d-flex flex-column flex-md-row align-items-md-center p-5 bg-light">
+ <div class="pt-md-3 pb-md-4">
+ <h1 class="bd-title mt-0">{{ page.title | smartify }}</h1>
+ <p class="bd-lead">{{ page.description | smartify }}</p>
+ <a href="{{ site.download.source }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
+ </div>
+ {% include ads.html %}
+</header>
+
+<main class="bd-content p-5" id="content" role="main">
+ {{ content }}
+</main>
diff --git a/site/_layouts/home.html b/site/_layouts/home.html
new file mode 100644
index 0000000000..88a23d49ce
--- /dev/null
+++ b/site/_layouts/home.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ {% include header.html %}
+ </head>
+ <body>
+ {% include skippy.html %}
+
+ {% include docs-navbar.html %}
+
+ {{ content }}
+
+ {% include footer.html %}
+ {% include scripts.html %}
+ </body>
+</html>
diff --git a/site/_layouts/redirect.html b/site/_layouts/redirect.html
new file mode 100644
index 0000000000..a30e77bf4a
--- /dev/null
+++ b/site/_layouts/redirect.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+ <title>Bootstrap · Content moved</title>
+ <link rel="canonical" href="{{ page.redirect.to }}">
+ <script>window.location="{{ page.redirect.to }}";</script>
+ <meta http-equiv="refresh" content="0; url={{ page.redirect.to }}">
+ <meta name="robots" content="noindex">
+ <style>
+ html {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0;
+ width: 100vw;
+ height: 100vh;
+ text-align: center;
+ }
+ body {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+ }
+ h1 {
+ margin-top: 0;
+ margin-bottom: .5rem;
+ }
+ a {
+ color: #007bff;
+ text-decoration: none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Redirecting&hellip;</h1>
+ <a href="{{ page.redirect.to }}">Click here if you are not redirected</a>
+ </body>
+</html>
diff --git a/site/_layouts/simple.html b/site/_layouts/simple.html
new file mode 100644
index 0000000000..dfd9afd167
--- /dev/null
+++ b/site/_layouts/simple.html
@@ -0,0 +1,12 @@
+---
+layout: default
+---
+
+<div class="container my-5">
+ <main class="bd-content" role="main">
+ <h1 class="bd-title" id="content">{{ page.title | smartify }}</h1>
+ <p class="bd-lead">{{ page.description | smartify }}</p>
+ {% include ads.html %}
+ {{ content }}
+ </main>
+</div>