Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples updates #24898

Merged
merged 72 commits into from
Jan 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3dfa327
fix cover nav
mdo Nov 27, 2017
c012d0d
Improve signin visuals and alignment with that flexbox love
mdo Nov 27, 2017
a2782b2
rewrite cover example in flexbox
mdo Nov 27, 2017
cd320fc
lighten signin bg
mdo Nov 28, 2017
bbf7e77
first pass at pricing example
mdo Nov 28, 2017
6bf011c
redo examples index with data file
mdo Nov 28, 2017
0ea59d9
tighten up spacing a bit
mdo Nov 28, 2017
af961f2
update navbar descriptions
mdo Nov 28, 2017
25bbc22
link pricing
mdo Nov 28, 2017
d1ecb3b
move that back
mdo Nov 28, 2017
bc7c566
property order
mdo Nov 28, 2017
85d74ec
Fix test errors.
XhmikosR Nov 28, 2017
49daabe
Compress pricing.png.
XhmikosR Nov 28, 2017
114c051
add form validation example
mdo Nov 28, 2017
ebb8286
remove that
mdo Nov 28, 2017
72df5f8
rename that
mdo Nov 28, 2017
4be41b4
restyle and space out
mdo Nov 28, 2017
9009d0e
Merge branch 'v4-dev' into examples-cleanup
XhmikosR Nov 28, 2017
d55d149
fix errors
mdo Nov 28, 2017
7cd29af
Merge branch 'examples-cleanup' of https://github.com/twbs/bootstrap …
mdo Nov 28, 2017
8656fce
change order
mdo Nov 28, 2017
ebea8a4
cleanup album css and styles
mdo Nov 28, 2017
e35e65b
tweak examples index
mdo Nov 28, 2017
5ebca6b
make it a badge
mdo Nov 29, 2017
cf4d7fa
options
mdo Nov 29, 2017
ea6e7eb
improve sticky footer alignment
mdo Nov 29, 2017
f0c6de7
redesign example index
mdo Nov 29, 2017
fce5f71
brand new blog layout
mdo Nov 29, 2017
692655b
start new screenshots
mdo Nov 29, 2017
633775c
new product example page a la apple
mdo Nov 29, 2017
63cb2a6
add email field
mdo Nov 29, 2017
e84da99
fix linter, remove unused blog css
mdo Nov 29, 2017
c927234
hook up feather icons to start
mdo Nov 29, 2017
77bc2b7
redo dashboard
mdo Nov 29, 2017
93f86f7
fix linting
mdo Dec 1, 2017
801cc04
Merge branch 'v4-dev' into examples-cleanup
mdo Dec 2, 2017
d72292e
add floating labels example
mdo Dec 15, 2017
eb8101f
formatting
mdo Dec 15, 2017
f9af645
formatting
mdo Dec 15, 2017
b1cf50b
lint
mdo Dec 15, 2017
c00f591
Merge branch 'v4-dev' into examples-cleanup
mdo Dec 16, 2017
88ba9cd
fix values on select
mdo Dec 16, 2017
c31471d
optional input, plus input group
mdo Dec 16, 2017
92eb99a
new dashboard image
mdo Dec 16, 2017
28ad0ab
Merge branch 'examples-cleanup' of https://github.com/twbs/bootstrap …
mdo Dec 16, 2017
3f2bfaf
Merge branch 'examples-cleanup' of https://github.com/twbs/bootstrap …
mdo Dec 16, 2017
a11b7c7
start to reboot the offcanvas example
mdo Dec 16, 2017
9823b5a
updated images
mdo Dec 16, 2017
e081303
new offcanvas mostly implemented
mdo Dec 16, 2017
3fe3cfd
Merge branch 'examples-cleanup' of https://github.com/twbs/bootstrap …
mdo Dec 16, 2017
a6ba0ac
linting
mdo Dec 16, 2017
31f29a1
edit description
mdo Dec 17, 2017
d1b5c4e
more description changes
mdo Dec 17, 2017
4237b61
Merge branch 'v4-dev' into examples-cleanup
mdo Dec 17, 2017
e9b1271
Merge branch 'v4-dev' into examples-cleanup
mdo Dec 23, 2017
9b1eda6
- Add vertical margin to album hero buttons for when they're stacked
mdo Dec 23, 2017
18014ba
Merge branch 'v4-dev' into examples-cleanup
mdo Dec 30, 2017
49d7373
drop leading zero
mdo Dec 30, 2017
ac05e15
more linting
mdo Dec 30, 2017
daee327
swap empty images for holder, fix border
mdo Dec 31, 2017
d4cceb5
Merge branch 'v4-dev' into examples-cleanup
mdo Dec 31, 2017
75db521
dist the docs
mdo Dec 31, 2017
f976cba
Merge branch 'v4-dev' into examples-cleanup
mdo Jan 4, 2018
b322cd6
navbars have no margin-bottom to begin
mdo Jan 4, 2018
dcdb5a2
add css var, tweak padding for mobile
mdo Jan 4, 2018
8d7b88f
comment headers
mdo Jan 4, 2018
3876d37
nix commented out code
mdo Jan 4, 2018
9b351bc
nix the navbar structure for a custom one, stack it on mobile
mdo Jan 4, 2018
1f412b3
tweak heading button group for mobile
mdo Jan 4, 2018
fc84182
Removed narrow jumbotron and justified nav examples as these are easi…
mdo Jan 4, 2018
11d4992
improve card sizing on pricing
mdo Jan 4, 2018
886332d
update and compress
mdo Jan 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
55 changes: 55 additions & 0 deletions _data/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
- category: Custom components
description: "Brand new components and templates to help folks quickly get started with Bootstrap and demonstrate best practices for adding onto the framework."
examples:
- name: Album
description: "Simple one-page template for photo galleries, portfolios, and more."
- name: Pricing
description: "Example pricing page built with Cards and featuring a custom header and footer."
- name: Checkout
description: "Custom checkout form showing our form components and their validation features."
- name: Product
description: "Lean product-focused marketing page with extensive grid and image work."
- name: Cover
description: "A one-page template for building simple and beautiful home pages."
- name: Carousel
description: "Customize the navbar and carousel, then add some new components."
- name: Blog
description: "Magazine like blog template with header, navigation, featured content."
- name: Dashboard
description: "Basic admin dashboard shell with fixed sidebar and navbar."
- name: Sign-in
description: "Custom form layout and design for a simple sign in form."
- name: Sticky footer
description: "Attach a footer to the bottom of the viewport when page content is short."
- name: Sticky footer navbar
description: "Attach a footer to the bottom of the viewport with a fixed top navbar."

- category: Framework
description: "Examples that focus on implementing uses of built-in components provided by Bootstrap."
examples:
- name: "Starter template"
description: "Nothing but the basics: compiled CSS and JavaScript."
- name: Grid
description: "Multiple examples of grid layouts with all four tiers, nesting, and more."
- name: Jumbotron
description: "Build around the jumbotron with a navbar and some basic grid columns."

- category: Navbars
description: "Taking the default navbar component and showing how it can be moved, placed, and extended."
examples:
- name: Navbars
description: "Demonstration of all responsive and container options for the navbar."
- name: Navbar static
description: "Single navbar example of a static top navbar along with some additional content."
- name: Navbar fixed
description: "Single navbar example with a fixed top navbar along with some additional content."
- name: Navbar bottom
description: "Single navbar example with a bottom navbar along with some additional content."

- category: Experiments
description: "Examples that focus on future-friendly features or techniques."
examples:
- name: Floating labels
description: "Beautifully simple forms with floating labels over your inputs."
- name: Offcanvas
description: "Turn your expandable navbar into a sliding offcanvas menu."
16 changes: 16 additions & 0 deletions _layouts/examples.html
Original file line number Diff line number Diff line change
@@ -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" role="main">
{{ content }}
</main>
43 changes: 12 additions & 31 deletions docs/4.0/examples/album/album.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
body {
min-height: 75rem; /* Can be removed; just added for demo purposes */
}

.navbar {
margin-bottom: 0;
:root {
--jumbotron-padding-y: 3rem;
}

.jumbotron {
padding-top: 6rem;
padding-bottom: 6rem;
padding-top: var(--jumbotron-padding-y);
padding-bottom: var(--jumbotron-padding-y);
margin-bottom: 0;
background-color: #fff;
}
@media (min-width: 768px) {
.jumbotron {
padding-top: calc(var(--jumbotron-padding-y) * 2);
padding-bottom: calc(var(--jumbotron-padding-y) * 2);
}
}

.jumbotron p:last-child {
margin-bottom: 0;
Expand All @@ -25,29 +27,6 @@ body {
max-width: 40rem;
}

.album {
min-height: 50rem; /* Can be removed; just added for demo purposes */
padding-top: 3rem;
padding-bottom: 3rem;
background-color: #f7f7f7;
}

.card {
float: left;
width: 33.333%;
padding: .75rem;
margin-bottom: 2rem;
border: 0;
}

.card > img {
margin-bottom: .75rem;
}

.card-text {
font-size: 85%;
}

footer {
padding-top: 3rem;
padding-bottom: 3rem;
Expand All @@ -56,3 +35,5 @@ footer {
footer p {
margin-bottom: .25rem;
}

.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); }
171 changes: 136 additions & 35 deletions docs/4.0/examples/album/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
<div class="collapse bg-dark" id="navbarHeader">
<div class="container">
<div class="row">
<div class="col-sm-8 py-4">
<div class="col-sm-8 col-md-7 py-4">
<h4 class="text-white">About</h4>
<p class="text-muted">Add some information about the album below, the author, or any other background context. Make it a few sentences long so folks can pick up some informative tidbits. Then, link them off to some social networking sites or contact information.</p>
</div>
<div class="col-sm-4 py-4">
<div class="col-sm-4 offset-md-1 py-4">
<h4 class="text-white">Contact</h4>
<ul class="list-unstyled">
<li><a href="#" class="text-white">Follow on Twitter</a></li>
Expand All @@ -37,9 +37,12 @@ <h4 class="text-white">Contact</h4>
</div>
</div>
</div>
<div class="navbar navbar-dark bg-dark">
<div class="navbar navbar-dark bg-dark box-shadow">
<div class="container d-flex justify-content-between">
<a href="#" class="navbar-brand">Album</a>
<a href="#" class="navbar-brand d-flex align-items-center">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mr-2"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>
<strong>Album</strong>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
Expand All @@ -54,56 +57,154 @@ <h4 class="text-white">Contact</h4>
<h1 class="jumbotron-heading">Album example</h1>
<p class="lead text-muted">Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don't simply skip over it entirely.</p>
<p>
<a href="#" class="btn btn-primary">Main call to action</a>
<a href="#" class="btn btn-secondary">Secondary action</a>
<a href="#" class="btn btn-primary my-2">Main call to action</a>
<a href="#" class="btn btn-secondary my-2">Secondary action</a>
</p>
</div>
</section>

<div class="album text-muted">
<div class="album py-5 bg-light">
<div class="container">

<div class="row">
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>

<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>

<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
<div class="card">
<img data-src="holder.js/100px280?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<img class="card-img-top" data-src="holder.js/100px225?theme=thumb&bg=55595c&fg=eceeef&text=Thumbnail" alt="Card image cap">
<div class="card-body">
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-outline-secondary">View</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>
</div>
<small class="text-muted">9 mins</small>
</div>
</div>
</div>
</div>
</div>

</div>
</div>

Expand Down