Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Bootstrap framework
Make sure a web server like Apache or Lighttpd is installed
An introduction from W3 schools
Alternatives
Warning: Bootstrap has a (big?) learning curve
Privacy issues
There can be privacy issues. Bootstrap requires jquery
Install
- cd /var/www/html
- /usr/local/bin/composer/composer.phar require twbs/bootstrap:5.1.3
- Remark: All JavaScript plugins require jQuery to be included
- mkdir bootstrap
- mv vendor/ bootstrap/
- mv composer.* bootstrap/
- cd bootstrap/
- vi index.html
- Put the contents of initial index.html in it
- Save and close the file
- In the web browser goto http://127.0.0.1/bootstrap/
- Examples can be found in /var/www/html/bootstrap/vendor/twbs/bootstrap/site/content/docs/5.1/examples/
- cp /var/www/html/bootstrap/vendor/twbs/bootstrap/site/content/docs/5.1/examples/blog /var/www/html/bootstrap
- Open it with http://127.0.0.1/bootstrap/blog
- Have fun
- You can also download an try (the same) examples from https://getbootstrap.com/docs/5.0/examples/
- Download to /tmp
- unzip /tmp/bootstrap-5.0.2-examples.zip
- Copy a folder (blog for example): cp /tmp/bootstrap-5.0.2-examples/blog to /var/www/html/bootstrap
- Open it with http://127.0.0.1/bootstrap/blog
- Have fun
initial index.html
<!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/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <title>Hello, world!</title> </head> <body> <h1>Hello, world!</h1> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> <!-- Option 2: Separate Popper and Bootstrap JS --> <!-- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script> --> </body> </html>
Using the blog template
/var/www/html/bootstrap/vendor/twbs/bootstrap/site/content/docs/5.1/examples/blog
As often when starting to learn something new in software land a lot of things you need to know are not to be found any where. Bootstrap is no different
When we put the blog example files index.html and blog.css in /var/www/html/bootstrap and open http://127.0.0.1/bootstrap/ we get a page without the blog.css being used. We solved this by copying the starter template into a text editor and incorporated the code from the blog index.html into it. In the blog index.html there is a section in the beginning of the file containing
--- layout: examples title: Blog Template extra_css: - "blog.css" include_js: false ---
This assumes bootstrap reading this and making the appropriate settings. We did not find how to accomplish this. So we went for the hack and merged the starter template and the blog index.html into the following file
Remark: in the code there is a <code> tag. Dokuwiki, with which this website is made also uses the <code> tag. So to make Dokuwiki not get confused we replaced the <code> tags in the code below with <code1> and </code1>. Please remove the 1's (one's) before using the file.
<!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/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <title>Hello, world!</title> </head> <body> <h1>Hello, world!</h1> <!-- blog index.html start --> <!--- layout: examples title: Blog Template extra_css: - "blog.css" include_js: false ---> <div class="container"> <header class="blog-header py-3"> <div class="row flex-nowrap justify-content-between align-items-center"> <div class="col-4 pt-1"> <a class="link-secondary" href="#">Subscribe</a> </div> <div class="col-4 text-center"> <a class="blog-header-logo text-dark" href="#">Large</a> </div> <div class="col-4 d-flex justify-content-end align-items-center"> <a class="link-secondary" href="#" aria-label="Search"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="mx-3" role="img" viewBox="0 0 24 24"><title>Search</title><circle cx="10.5" cy="10.5" r="7.5"/><path d="M21 21l-5.2-5.2"/></svg> </a> <a class="btn btn-sm btn-outline-secondary" href="#">Sign up</a> </div> </div> </header> <div class="nav-scroller py-1 mb-2"> <nav class="nav d-flex justify-content-between"> <a class="p-2 link-secondary" href="#">World</a> <a class="p-2 link-secondary" href="#">U.S.</a> <a class="p-2 link-secondary" href="#">Technology</a> <a class="p-2 link-secondary" href="#">Design</a> <a class="p-2 link-secondary" href="#">Culture</a> <a class="p-2 link-secondary" href="#">Business</a> <a class="p-2 link-secondary" href="#">Politics</a> <a class="p-2 link-secondary" href="#">Opinion</a> <a class="p-2 link-secondary" href="#">Science</a> <a class="p-2 link-secondary" href="#">Health</a> <a class="p-2 link-secondary" href="#">Style</a> <a class="p-2 link-secondary" href="#">Travel</a> </nav> </div> </div> <main class="container"> <div class="p-4 p-md-5 mb-4 text-white rounded bg-dark"> <div class="col-md-6 px-0"> <h1 class="display-4 fst-italic">Title of a longer featured blog post</h1> <p class="lead my-3">Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.</p> <p class="lead mb-0"><a href="#" class="text-white fw-bold">Continue reading...</a></p> </div> </div> <div class="row mb-2"> <div class="col-md-6"> <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> <div class="col p-4 d-flex flex-column position-static"> <strong class="d-inline-block mb-2 text-primary">World</strong> <h3 class="mb-0">Featured post</h3> <div class="mb-1 text-muted">Nov 12</div> <p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> <a href="#" class="stretched-link">Continue reading</a> </div> <div class="col-auto d-none d-lg-block"> {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}} </div> </div> </div> <div class="col-md-6"> <div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative"> <div class="col p-4 d-flex flex-column position-static"> <strong class="d-inline-block mb-2 text-success">Design</strong> <h3 class="mb-0">Post title</h3> <div class="mb-1 text-muted">Nov 11</div> <p class="mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p> <a href="#" class="stretched-link">Continue reading</a> </div> <div class="col-auto d-none d-lg-block"> {{< placeholder width="200" height="250" background="#55595c" color="#eceeef" text="Thumbnail" >}} </div> </div> </div> </div> <div class="row g-5"> <div class="col-md-8"> <h3 class="pb-4 mb-4 fst-italic border-bottom"> From the Firehose </h3> <article class="blog-post"> <h2 class="blog-post-title">Sample blog post</h2> <p class="blog-post-meta">January 1, 2021 by <a href="#">Mark</a></p> <p>This blog post shows a few different types of content that’s supported and styled with Bootstrap. Basic typography, lists, tables, images, code, and more are all supported as expected.</p> <hr> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <h2>Blockquotes</h2> <p>This is an example blockquote in action:</p> <blockquote class="blockquote"> <p>Quoted text goes here.</p> </blockquote> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <h3>Example lists</h3> <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout. This is an example unordered list:</p> <ul> <li>First list item</li> <li>Second list item with a longer description</li> <li>Third list item to close it out</li> </ul> <p>And this is an ordered list:</p> <ol> <li>First list item</li> <li>Second list item with a longer description</li> <li>Third list item to close it out</li> </ol> <p>And this is a definition list:</p> <dl> <dt>HyperText Markup Language (HTML)</dt> <dd>The language used to describe and define the content of a Web page</dd> <dt>Cascading Style Sheets (CSS)</dt> <dd>Used to describe the appearance of Web content</dd> <dt>JavaScript (JS)</dt> <dd>The programming language used to build advanced Web sites and applications</dd> </dl> <h2>Inline HTML elements</h2> <p>HTML defines a long list of available inline tags, a complete list of which can be found on the <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">Mozilla Developer Network</a>.</p> <ul> <li><strong>To bold text</strong>, use <code1 class="language-plaintext highlighter-rouge"><strong></code1>.</li> <li><em>To italicize text</em>, use <code1 class="language-plaintext highlighter-rouge"><em></code1>.</li> <li>Abbreviations, like <abbr title="HyperText Markup Langage">HTML</abbr> should use <code1 class="language-plaintext highlighter-rouge"><abbr></code1>, with an optional <code1 class="language-plaintext highlighter-rouge">title</code1> attribute for the full phrase.</li> <li>Citations, like <cite>— Mark Otto</cite>, should use <code1 class="language-plaintext highlighter-rouge"><cite></code1>.</li> <li><del>Deleted</del> text should use <code1 class="language-plaintext highlighter-rouge"><del></code1> and <ins>inserted</ins> text should use <code1 class="language-plaintext highlighter-rouge"><ins></code1>.</li> <li>Superscript <sup>text</sup> uses <code1 class="language-plaintext highlighter-rouge"><sup></code1> and subscript <sub>text</sub> uses <code1 class="language-plaintext highlighter-rouge"><sub></code1>.</li> </ul> <p>Most of these elements are styled by browsers with few modifications on our part.</p> <h2>Heading</h2> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <h3>Sub-heading</h3> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <pre><code1>Example code block</code1></pre> <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p> </article> <article class="blog-post"> <h2 class="blog-post-title">Another blog post</h2> <p class="blog-post-meta">December 23, 2020 by <a href="#">Jacob</a></p> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <blockquote> <p>Longer quote goes here, maybe with some <strong>emphasized text</strong> in the middle of it.</p> </blockquote> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <h3>Example table</h3> <p>And don't forget about tables in these posts:</p> <table class="table"> <thead> <tr> <th>Name</th> <th>Upvotes</th> <th>Downvotes</th> </tr> </thead> <tbody> <tr> <td>Alice</td> <td>10</td> <td>11</td> </tr> <tr> <td>Bob</td> <td>4</td> <td>3</td> </tr> <tr> <td>Charlie</td> <td>7</td> <td>9</td> </tr> </tbody> <tfoot> <tr> <td>Totals</td> <td>21</td> <td>23</td> </tr> </tfoot> </table> <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p> </article> <article class="blog-post"> <h2 class="blog-post-title">New feature</h2> <p class="blog-post-meta">December 14, 2020 by <a href="#">Chris</a></p> <p>This is some additional paragraph placeholder content. It has been written to fill the available space and show how a longer snippet of text affects the surrounding content. We'll repeat it often to keep the demonstration flowing, so be on the lookout for this exact same string of text.</p> <ul> <li>First list item</li> <li>Second list item with a longer description</li> <li>Third list item to close it out</li> </ul> <p>This is some additional paragraph placeholder content. It's a slightly shorter version of the other highly repetitive body text used throughout.</p> </article> <nav class="blog-pagination" aria-label="Pagination"> <a class="btn btn-outline-primary" href="#">Older</a> <a class="btn btn-outline-secondary disabled">Newer</a> </nav> </div> <div class="col-md-4"> <div class="position-sticky" style="top: 2rem;"> <div class="p-4 mb-3 bg-light rounded"> <h4 class="fst-italic">About</h4> <p class="mb-0">Customize this section to tell your visitors a little bit about your publication, writers, content, or something else entirely. Totally up to you.</p> </div> <div class="p-4"> <h4 class="fst-italic">Archives</h4> <ol class="list-unstyled mb-0"> <li><a href="#">March 2021</a></li> <li><a href="#">February 2021</a></li> <li><a href="#">January 2021</a></li> <li><a href="#">December 2020</a></li> <li><a href="#">November 2020</a></li> <li><a href="#">October 2020</a></li> <li><a href="#">September 2020</a></li> <li><a href="#">August 2020</a></li> <li><a href="#">July 2020</a></li> <li><a href="#">June 2020</a></li> <li><a href="#">May 2020</a></li> <li><a href="#">April 2020</a></li> </ol> </div> <div class="p-4"> <h4 class="fst-italic">Elsewhere</h4> <ol class="list-unstyled"> <li><a href="#">GitHub</a></li> <li><a href="#">Twitter</a></li> <li><a href="#">Facebook</a></li> </ol> </div> </div> </div> </div> </main> <footer class="blog-footer"> <p>Blog template built for <a href="https://getbootstrap.com/">Bootstrap</a> by <a href="https://twitter.com/mdo">@mdo</a>.</p> <p> <a href="#">Back to top</a> </p> </footer> <!-- blog index.html finish --> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> <!-- Option 2: Separate Popper and Bootstrap JS --> <!-- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script> --> </body> </html>
Run local
How to run Bootstrap local without the use of third party services?
With the “Source code” option this might be accomplished
Download v3.4.1.zip: “Source Less, JavaScript, and font files, along with our docs. Requires a Less compiler and some setup.”
Hmm, dead end
It seems that Bootstrap needs https://stackpath.bootstrapcdn.com and https://code.jquery.com
The documentation is not clear enough, confusing. Giving up (for now)
Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy
RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.