Created
June 21, 2021 16:29
-
-
Save csexton/ffe317c9560e74d156705e20dfd52633 to your computer and use it in GitHub Desktop.
Vue and Bootstrap Starter Template with CDN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('DOMContentLoaded', (event) => { | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
message: 'Hello Vue!' | |
} | |
}) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> | |
<!-- JavaScript --> | |
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js" integrity="sha256-abdUg7JwQh4aiUJt1ZOHugkHcjE1YcPp+kFTlqeOiTY=" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> | |
<script src="app.js"></script> | |
<title>Hello, world!</title> | |
</head> | |
<body> | |
<nav class="navbar navbar-expand-md navbar-dark bg-dark mb-4"> | |
<div class="container-fluid"> | |
<a class="navbar-brand" href="#">Top navbar</a> | |
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> | |
<span class="navbar-toggler-icon"></span> | |
</button> | |
<div class="collapse navbar-collapse" id="navbarCollapse"> | |
<ul class="navbar-nav me-auto mb-2 mb-md-0"> | |
<li class="nav-item"> | |
<a class="nav-link active" aria-current="page" href="#">Home</a> | |
</li> | |
<li class="nav-item"> | |
<a class="nav-link" href="#">Link</a> | |
</li> | |
<li class="nav-item"> | |
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a> | |
</li> | |
<li class="nav-item dropdown"> | |
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-bs-toggle="dropdown" aria-expanded="false">Settings</a> | |
<ul class="dropdown-menu" aria-labelledby="dropdown01"> | |
<li><a class="dropdown-item" href="#">Action</a></li> | |
<li><a class="dropdown-item" href="#">Another action</a></li> | |
<li><a class="dropdown-item" href="#">Something else here</a></li> | |
</ul> | |
</li> | |
</ul> | |
<form class="d-flex"> | |
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> | |
<button class="btn btn-outline-success" type="submit">Search</button> | |
</form> | |
</div> | |
</div> | |
</nav> | |
<main class="container"> | |
<div class="bg-light p-5 rounded"> | |
<h1>Hello World!</h1> | |
<p class="lead">This example is a quick exercise to illustrate how the top-aligned navbar works. As you scroll, this navbar remains in its original position and moves with the rest of the page.</p> | |
<a class="btn btn-lg btn-primary" href="/docs/5.0/components/navbar/" role="button">View navbar docs »</a> | |
<hr> | |
<div id="app"> | |
{{ message }} | |
</div> | |
</div> | |
</main> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment