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

Indentation for Bootstrap snippets #10

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 30 additions & 17 deletions snippets/bootstrap/$.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<title>${1:Title}</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="${2:https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css}" integrity="${3:sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO}" crossorigin="anonymous">
</head>
<body>
$10$END$
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="${4:https://code.jquery.com/jquery-3.3.1.slim.min.js}" integrity="${5:sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo}" crossorigin="anonymous"></script>
<script src="${6:https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js}" integrity="${7:sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49}" crossorigin="anonymous"></script>
<script src="${8:https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js}" integrity="${9:sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy}" crossorigin="anonymous"></script>
</body>
<head>
<title>${1:Title}</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="${2:https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css}"
integrity="${3:sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO}"
crossorigin="anonymous">
</head>

<body>
10$END$

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="${4:https://code.jquery.com/jquery-3.3.1.slim.min.js}"
integrity="${5:sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>

<script src="${6:https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js}"
integrity="${7:sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49}"
crossorigin="anonymous"></script>

<script src="${8:https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js}"
integrity="${9:sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy}"
crossorigin="anonymous"></script>
</body>
</html>
8 changes: 5 additions & 3 deletions snippets/bootstrap/components/alert/additional-content.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="alert alert-success" role="alert">
<h4 class="alert-heading">$1</h4>
<p>$2</p>
<p class="mb-0">$3</p>
<h4 class="alert-heading">$1</h4>

<p>$2</p>

<p class="mb-0">$3</p>
</div>
14 changes: 8 additions & 6 deletions snippets/bootstrap/components/alert/closable.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<strong>$1</strong> $2

<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>

<strong>$1</strong> $2
</div>

<script>
$(".alert").alert();
</script>
$(".alert").alert();
</script>
5 changes: 4 additions & 1 deletion snippets/bootstrap/components/alert/dismissible.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="alert alert-${2:primary|secondary|success|info|warning|danger|light|dark} alert-dismissible fade show" role="alert">

<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>

<span class="sr-only">Close</span>
</button>

${1:<strong>Holy guacamole!</strong> You should check in on some of those fields below.}
</div>
</div>
2 changes: 1 addition & 1 deletion snippets/bootstrap/components/badge/button.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button class="btn">
${1:Notification} <span class="badge badge-${3:primary|secondary|success|danger|warning|info|light|dark}">$2</span>
${1:Notification} <span class="badge badge-${3:primary|secondary|success|danger|warning|info|light|dark}">$2</span>
</button>
4 changes: 3 additions & 1 deletion snippets/bootstrap/components/badge/heading.html
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<h${1:1-6}>${3:Example heading}<span class="badge badge-${2:primary|secondary|success|danger|warning|info|light|dark}">${4:New}</span></h${1:1-6}>
<h$ {1:1-6}>
${3:Example heading}<span class="badge badge-${2:primary|secondary|success|danger|warning|info|light|dark}">${4:New}</span>
</h$ {1:1-6}>
2 changes: 2 additions & 0 deletions snippets/bootstrap/components/bgroup/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="btn-group" role="group" aria-label="$2">
<button type="button" class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">$3</button>

<button type="button" class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">$4</button>

<button type="button" class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">$5</button>
</div>
13 changes: 9 additions & 4 deletions snippets/bootstrap/components/bgroup/dropdown-vertical.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<div class="btn-group-vertical" role="group" aria-label="$1">
<button type="button" class="btn btn-secondary">$2</button>
<button type="button" class="btn btn-secondary">$3</button>

<div class="btn-group" role="group">
<button id="${5:dropdownId}" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
$4
</button>
<button id="${5:dropdownId}"
type="button"
class="btn btn-secondary dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">$4</button>

<div class="dropdown-menu" aria-labelledby="${5:dropdownId}">
<a class="dropdown-item" href="${7:#}">$6</a>

<a class="dropdown-item" href="${9:#}">$8</a>
</div>
</div>
Expand Down
13 changes: 9 additions & 4 deletions snippets/bootstrap/components/bgroup/dropdown.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<div class="btn-group" role="group" aria-label="$1">
<button type="button" class="btn btn-secondary">$2</button>
<button type="button" class="btn btn-secondary">$3</button>

<div class="btn-group" role="group">
<button id="${5:dropdownId}" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
$4
</button>
<button id="${5:dropdownId}"
type="button"
class="btn btn-secondary dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">$4</button>

<div class="dropdown-menu" aria-labelledby="${5:dropdownId}">
<a class="dropdown-item" href="${7:#}">$6</a>

<a class="dropdown-item" href="${9:#}">$8</a>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions snippets/bootstrap/components/bgroup/toolbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<button type="button" class="btn btn-${3:primary|secondary|success|danger|warning|info|light|dark|link}">$5</button>
<button type="button" class="btn btn-${3:primary|secondary|success|danger|warning|info|light|dark|link}">$6</button>
</div>

<div class="btn-group" role="group" aria-label="$7">
<button type="button" class="btn btn-${3:primary|secondary|success|danger|warning|info|light|dark|link}">$8</button>
<button type="button" class="btn btn-${3:primary|secondary|success|danger|warning|info|light|dark|link}">$9</button>
Expand Down
1 change: 1 addition & 0 deletions snippets/bootstrap/components/breadcrumb/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<nav class="breadcrumb">
<a class="breadcrumb-item" href="${2:#}">$1</a>
<a class="breadcrumb-item" href="${4:#}">$3</a>

<span class="breadcrumb-item active">$5</span>
</nav>
10 changes: 8 additions & 2 deletions snippets/bootstrap/components/breadcrumb/list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="${2:#}">$1</a></li>
<li class="breadcrumb-item"><a href="${4:#}">$3</a></li>
<li class="breadcrumb-item">
<a href="${2:#}">$1</a>
</li>

<li class="breadcrumb-item">
<a href="${4:#}">$3</a>
</li>

<li class="breadcrumb-item active">$5</li>
</ol>
6 changes: 5 additions & 1 deletion snippets/bootstrap/components/button/a.html
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<a name="$4" id="$4" class="btn btn-${3:primary|secondary|success|danger|warning|info|light|dark|link}" href="${2:#}" role="button">$1</a>
<a name="$4"
id="$4"
class="btn btn-${3:primary|secondary|success|danger|warning|info|light|dark|link}"
href="${2:#}"
role="button">$1</a>
5 changes: 4 additions & 1 deletion snippets/bootstrap/components/button/block.html
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<button type="button" name="$3" id="$3" class="btn btn-${2:primary|secondary|success|danger|warning|info|light|dark|link}" btn-lg btn-block">$1</button>
<button type="button"
name="$3"
id="$3"
class="btn btn-${2:primary|secondary|success|danger|warning|info|light|dark|link}" btn-lg btn-block">$1</button>
18 changes: 15 additions & 3 deletions snippets/bootstrap/components/button/checkbox.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link} active">
<input type="checkbox" name="$3" id="$3" checked autocomplete="off">$2
<input type="checkbox"
name="$3"
id="$3"
autocomplete="off"
checked>$2
</label>

<label class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">
<input type="checkbox" name="$5" id="$5" autocomplete="off">$4
<input type="checkbox"
name="$5"
id="$5"
autocomplete="off">$4
</label>

<label class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">
<input type="checkbox" name="$7" id="$7" autocomplete="off">$6
<input type="checkbox"
name="$7"
id="$7"
autocomplete="off">$6
</label>
</div>
2 changes: 2 additions & 0 deletions snippets/bootstrap/components/button/radio.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<label class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link} active">
<input type="radio" name="$3" id="$3" autocomplete="off" checked>$2
</label>

<label class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">
<input type="radio" name="$5" id="$5" autocomplete="off">$4
</label>

<label class="btn btn-${1:primary|secondary|success|danger|warning|info|light|dark|link}">
<input type=" radio" name="$7" id="$7 " autocomplete="off ">$6
</label>
Expand Down
6 changes: 5 additions & 1 deletion snippets/bootstrap/components/button/toggle.html
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<button type="button" class="btn btn-${2:primary|secondary|success|danger|warning|info|light|dark|link}" data-toggle="button" aria-pressed="false" autocomplete="off">$1</button>
<button type="button"
class="btn btn-${2:primary|secondary|success|danger|warning|info|light|dark|link}"
data-toggle="button"
aria-pressed="false"
autocomplete="off">$1</button>
11 changes: 6 additions & 5 deletions snippets/bootstrap/components/card/align.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="card text-${3:left|center|right}">
<img class="card-img-top" src="${1:holder.js/100px180/}" alt="$2">
<div class="card-body">
<h4 class="card-title">${4:Title}</h4>
<p class="card-text">${5:Body}</p>
</div>
<img class="card-img-top" src="${1:holder.js/100px180/}" alt="$2">

<div class="card-body">
<h4 class="card-title">${4:Title}</h4>
<p class="card-text">${5:Body}</p>
</div>
</div>
11 changes: 6 additions & 5 deletions snippets/bootstrap/components/card/background-custom.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="card" style="background-color:${1:cadetblue}; border-color:${2:darkblue};">
<img class="card-img-top" src="${3:holder.js/100x180/}" alt="$4">
<div class="card-body">
<h4 class="card-title">${5:Title}</h4>
<p class="card-text">${6:Text}</p>
</div>
<img class="card-img-top" src="${3:holder.js/100x180/}" alt="$4">

<div class="card-body">
<h4 class="card-title">${5:Title}</h4>
<p class="card-text">${6:Text}</p>
</div>
</div>
11 changes: 6 additions & 5 deletions snippets/bootstrap/components/card/background.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="card text-white bg-${1:primary|secondary|success|danger|warning|info|light|dark|link}">
<img class="card-img-top" src="${2:holder.js/100px180/}" alt="$3">
<div class="card-body">
<h4 class="card-title">${4:Title}</h4>
<p class="card-text">${5:Text}</p>
</div>
<img class="card-img-top" src="${2:holder.js/100px180/}" alt="$3">

<div class="card-body">
<h4 class="card-title">${4:Title}</h4>
<p class="card-text">${5:Text}</p>
</div>
</div>
15 changes: 9 additions & 6 deletions snippets/bootstrap/components/card/blockquote.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<div class="card">
<div class="card-body">
<blockquote class="blockquote">
<p>${1:Quote}</p>
<footer class="card-blockquote">${2:Footer}<cite title="${3:Source title}">${3:Source title}</cite></footer>
</blockquote>
</div>
<div class="card-body">
<blockquote class="blockquote">
<p>${1:Quote}</p>

<footer class="card-blockquote">
${2:Footer}<cite title="${3:Source title}">${3:Source title}</cite>
</footer>
</blockquote>
</div>
</div>
11 changes: 6 additions & 5 deletions snippets/bootstrap/components/card/border.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div class="card border-${1:primary|secondary|success|danger|warning|info|light|dark|link}">
<img class="card-img-top" src="${2:holder.js/100px180/}" alt="$3">
<div class="card-body">
<h4 class="card-title">${4:Title}</h4>
<p class="card-text">${5:Text}</p>
</div>
<img class="card-img-top" src="${2:holder.js/100px180/}" alt="$3">

<div class="card-body">
<h4 class="card-title">${4:Title}</h4>
<p class="card-text">${5:Text}</p>
</div>
</div>
3 changes: 3 additions & 0 deletions snippets/bootstrap/components/card/columns.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<div class="card-columns">
<div class="card">
<img class="card-img-top" src="${1:holder.js/100x180/}" alt="$2">

<div class="card-body">
<h4 class="card-title">${3:Title}</h4>
<p class="card-text">${4:Text}</p>
</div>
</div>

<div class="card">
<img class="card-img-top" src="${5:holder.js/100x180/}" alt="$6">

<div class="card-body">
<h4 class="card-title">${7:Title}</h4>
<p class="card-text">${8:Text}</p>
Expand Down
3 changes: 3 additions & 0 deletions snippets/bootstrap/components/card/decks.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<div class="card-deck">
<div class="card">
<img class="card-img-top" src="${1:holder.js/100x180/}" alt="$2">

<div class="card-body">
<h4 class="card-title">${3:Title}</h4>
<p class="card-text">${4:Text}</p>
</div>
</div>

<div class="card">
<img class="card-img-top" src="${5:holder.js/100x180/}" alt="$6">

<div class="card-body">
<h4 class="card-title">${7:Title}</h4>
<p class="card-text">${8:Text}</p>
Expand Down
1 change: 1 addition & 0 deletions snippets/bootstrap/components/card/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="card">
<img class="card-img-top" src="${1:holder.js/100x180/}" alt="$2">

<div class="card-body">
<h4 class="card-title">${3:Title}</h4>
<p class="card-text">${4:Text}</p>
Expand Down
Loading