From 43c20b912eed45e43be83d71e5aec9136aecb137 Mon Sep 17 00:00:00 2001
From: XhmikosR <xhmikosr@gmail.com>
Date: Mon, 15 Oct 2018 11:49:15 +0300
Subject: [PATCH] Combine examples and simple layouts.

---
 site/_layouts/examples.html       | 16 ----------
 site/_layouts/simple.html         | 15 ++++++++-
 site/docs/4.1/examples/index.html |  2 +-
 site/docs/versions.html           | 52 +++++++++++++------------------
 4 files changed, 36 insertions(+), 49 deletions(-)
 delete mode 100644 site/_layouts/examples.html

diff --git a/site/_layouts/examples.html b/site/_layouts/examples.html
deleted file mode 100644
index 1f8fbcdec7..0000000000
--- a/site/_layouts/examples.html
+++ /dev/null
@@ -1,16 +0,0 @@
----
-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/simple.html b/site/_layouts/simple.html
index 5e7112684a..bbf808df33 100644
--- a/site/_layouts/simple.html
+++ b/site/_layouts/simple.html
@@ -2,4 +2,17 @@
 layout: default
 ---
 
-{{ content }}
+<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>
+    {%- if page.title == "Examples" -%}
+    <a href="{{ site.download.source }}" class="btn btn-lg btn-bd-primary" onclick="ga('send', 'event', 'Examples', 'Hero', 'Download');">Download source code</a>
+    {%- endif -%}
+  </div>
+  {% include ads.html %}
+</header>
+
+<main class="bd-content p-5" id="content" role="main">
+  {{ content }}
+</main>
diff --git a/site/docs/4.1/examples/index.html b/site/docs/4.1/examples/index.html
index 3bb984382f..328ec397a2 100644
--- a/site/docs/4.1/examples/index.html
+++ b/site/docs/4.1/examples/index.html
@@ -1,5 +1,5 @@
 ---
-layout: examples
+layout: simple
 title: Examples
 description: Quickly get a project started with any of our examples ranging from using parts of the framework to custom components and layouts.
 redirect_from: "/examples/"
diff --git a/site/docs/versions.html b/site/docs/versions.html
index 935872de67..f883f52854 100644
--- a/site/docs/versions.html
+++ b/site/docs/versions.html
@@ -4,35 +4,25 @@ title: Versions
 description: An appendix of hosted documentation for nearly every release of Bootstrap, from v1 through v4.
 ---
 
-<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>
+<div class="row">
+{% for release in site.data.docs-versions %}
+  <div class="col-md">
+    <h2>{{ release.group }}</h2>
+    <p>{{ release.description }}</p>
+    {% for version in release.versions %}
+      {% if forloop.first %}<div class="list-group">{% endif %}
+        {% if version.v == site.docs_version %}
+          <a class="list-group-item list-group-item-action py-2 text-primary d-flex justify-content-between align-items-center" href="{{ release.baseurl }}/{{ version.v }}/">
+            {{ version.v }}
+            <span class="badge badge-primary">Latest</span>
+          </a>
+        {% else %}
+          <a class="list-group-item list-group-item-action py-2 text-primary" href="{{ release.baseurl }}/{{ version.v }}/">
+            {{ version.v }}
+          </a>
+        {% endif %}
+      {% if forloop.last %}</div>{% endif %}
+    {% endfor %}
   </div>
-  {% include ads.html %}
-</header>
-
-<main class="bd-content p-5">
-  <div class="row">
-  {% for release in site.data.docs-versions %}
-    <div class="col-md">
-      <h2>{{ release.group }}</h2>
-      <p>{{ release.description }}</p>
-      {% for version in release.versions %}
-        {% if forloop.first %}<div class="list-group">{% endif %}
-          {% if version.v == site.docs_version %}
-            <a class="list-group-item list-group-item-action py-2 text-primary d-flex justify-content-between align-items-center" href="{{ release.baseurl }}/{{ version.v }}/">
-              {{ version.v }}
-              <span class="badge badge-primary">Latest</span>
-            </a>
-          {% else %}
-            <a class="list-group-item list-group-item-action py-2 text-primary" href="{{ release.baseurl }}/{{ version.v }}/">
-              {{ version.v }}
-            </a>
-          {% endif %}
-        {% if forloop.last %}</div>{% endif %}
-      {% endfor %}
-    </div>
-  {% endfor %}
-  </div>
-</main>
+{% endfor %}
+</div>
-- 
GitLab