Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGargano committed Mar 28, 2024
1 parent 8c0f4a7 commit 18baf70
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 11,349 deletions.
2 changes: 1 addition & 1 deletion inc/accordion.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5" />

<h3 id="s-accordion" class="py-3">Accordion example</h3>
<h3 id="s-accordion" class="py-3">Accordion esempio</h3>
<div class="accordion" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header">
Expand Down
2 changes: 1 addition & 1 deletion inc/alert.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-alert" class="py-3">Alert example</h3>
<h3 id="s-alert" class="py-3">Alert esempio</h3>

<div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
Expand Down
8 changes: 4 additions & 4 deletions inc/button.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-button" class="py-3">Button example</h3>
<h3 id="s-button" class="py-3 pt-5">Button esempio</h3>

<button type="button" class="btn m-1 btn-primary">Primary</button>
<button type="button" class="btn m-1 btn-secondary">Secondary</button>
Expand Down Expand Up @@ -34,7 +34,7 @@ <h3 id="s-button" class="py-3">Button example</h3>

<hr class="col-3 col-md-2 my-5">

<h3 id="s-badge" class="py-3">Badge example</h3>
<h3 id="s-badge" class="py-3">Badge esempio</h3>
<span class="badge rounded-pill text-bg-primary">Primary</span>
<span class="badge rounded-pill text-bg-secondary">Secondary</span>
<span class="badge rounded-pill text-bg-success">Success</span>
Expand All @@ -46,7 +46,7 @@ <h3 id="s-badge" class="py-3">Badge example</h3>

<hr class="col-3 col-md-2 my-5">

<h3 id="s-dropdown" class="py-3">Dropdown example</h3>
<h3 id="s-dropdown" class="py-3">Dropdown esempio</h3>
<div class="dropdown">
<button class="btn btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Dropdown button</button>
<ul class="dropdown-menu">
Expand All @@ -65,7 +65,7 @@ <h6 class="dropdown-header">Dropdown header</h6>

<hr class="col-3 col-md-2 my-5">

<h3 id="s-nav" class="py-3">Nav example</h3>
<h3 id="s-nav" class="py-3">Nav esempio</h3>
<ul class="nav nav-pills justify-content-center bg-light p-1">
<li class="nav-item m-1">
<a class="nav-link active" aria-current="page" href="#!">Active</a>
Expand Down
2 changes: 1 addition & 1 deletion inc/form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-form" class="py-3">Form example</h3>
<h3 id="s-form" class="py-3">Form esempio</h3>

<div class="form-floating mb-3">
<input type="email" class="form-control" id="floatingInput" placeholder="[email protected]" />
Expand Down
16 changes: 8 additions & 8 deletions inc/heroes.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<main>

<div class="container p-5">
<h1 class="mb-5">Button example</h1>
<h1 class="mb-5">Button esempio</h1>
<button type="button" class="btn m-1 btn-primary">Primary</button>
<button type="button" class="btn m-1 btn-secondary">Secondary</button>
<button type="button" class="btn m-1 btn-success">Success</button>
Expand All @@ -64,7 +64,7 @@ <h1 class="mb-5">Button example</h1>
</div>

<div class="container p-5">
<h1 class="mb-5">Badge example</h1>
<h1 class="mb-5">Badge esempio</h1>
<span class="badge rounded-pill text-bg-primary">Primary</span>
<span class="badge rounded-pill text-bg-secondary">Secondary</span>
<span class="badge rounded-pill text-bg-success">Success</span>
Expand All @@ -76,7 +76,7 @@ <h1 class="mb-5">Badge example</h1>
</div>

<div class="container p-5">
<h1 class="bm-5">Dropdown example</h1>
<h1 class="bm-5">Dropdown esempio</h1>
<div class="dropdown">
<button class="btn btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown"
aria-expanded="false">
Expand All @@ -98,7 +98,7 @@ <h6 class="dropdown-header">Dropdown header</h6>
</div>

<div class="container p-5">
<h1 class="bm-5">Modal example</h1>
<h1 class="bm-5">Modal esempio</h1>
<!-- Button trigger modal -->
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
Launch demo modal
Expand All @@ -124,7 +124,7 @@ <h1 class="modal-title fs-5" id="exampleModalLabel">Modal title</h1>
</div>

<div class="container p-5">
<h1 class="bm-5">Nav example</h1>
<h1 class="bm-5">Nav esempio</h1>
<ul class="nav nav-pills justify-content-center bg-light p-1">
<li class="nav-item m-1">
<a class="nav-link active" aria-current="page" href="#!">Active</a>
Expand All @@ -142,7 +142,7 @@ <h1 class="bm-5">Nav example</h1>
</div>

<div class="container p-5">
<h1 class="mb-5">Card example</h1>
<h1 class="mb-5">Card esempio</h1>
<div class="row row-cols-1 row-cols-md-3 g-4">
<div class="col">
<div class="card h-100">
Expand Down Expand Up @@ -190,7 +190,7 @@ <h5 class="card-title mt-2">Card title</h5>
</div>

<div class="container p-5">
<h1 class="mb-5">Alert example</h1>
<h1 class="mb-5">Alert esempio</h1>
<div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
</div>
Expand Down Expand Up @@ -224,7 +224,7 @@ <h4 class="alert-heading">Well done!</h4>
</div>
</div>

<h1 class="visually-hidden">Heroes examples</h1>
<h1 class="visually-hidden">Heroes esempios</h1>

<div class="px-4 py-5 my-5 text-center">
<img class="d-block mx-auto mb-4" src="https://getbootstrap.com/docs/5.3/assets/brand/bootstrap-logo.svg" alt=""
Expand Down
11 changes: 11 additions & 0 deletions inc/image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-image" class="py-3">Image esempio</h3>

<img src="https://placehold.co/80" class="rounded-0" alt="Img">
<img src="https://placehold.co/80" class="rounded-1" alt="Img">
<img src="https://placehold.co/80" class="rounded-2" alt="Img">
<img src="https://placehold.co/80" class="rounded-3" alt="Img">
<img src="https://placehold.co/80" class="rounded-4" alt="Img">
<img src="https://placehold.co/80" class="rounded-5" alt="Img">
<img src="https://placehold.co/80" class="rounded-end-pill" alt="Img">
2 changes: 1 addition & 1 deletion inc/modal.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-modal" class="py-3">Modal example</h3>
<h3 id="s-modal" class="py-3">Modal esempio</h3>
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
Launch demo modal
Expand Down
2 changes: 1 addition & 1 deletion inc/nav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-navbar" class="py-3">Navbar example</h3>
<h3 id="s-navbar" class="py-3">Navbar esempio</h3>

<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
Expand Down
2 changes: 1 addition & 1 deletion inc/offcanvas.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-offcanvas" class="py-3">Offcanvas example</h3>
<h3 id="s-offcanvas" class="py-3">Offcanvas esempio</h3>

<a class="btn btn-primary" data-bs-toggle="offcanvas" href="#offcanvasExample" role="button" aria-controls="offcanvasExample">
Open offcanvas demo
Expand Down
2 changes: 1 addition & 1 deletion inc/sidebars.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</svg>

<main class="d-flex flex-nowrap">
<h1 class="visually-hidden">Sidebars examples</h1>
<h1 class="visually-hidden">Sidebars esempios</h1>

<div class="d-flex flex-column flex-shrink-0 p-3 text-bg-dark" style="width: 280px;">
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-white text-decoration-none">
Expand Down
2 changes: 1 addition & 1 deletion inc/tab.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-tab" class="py-3">Tab example</h3>
<h3 id="s-tab" class="py-3">Tab esempio</h3>

<ul class="nav nav-tabs mb-3">
<li class="nav-item">
Expand Down
2 changes: 1 addition & 1 deletion inc/table.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr class="col-3 col-md-2 my-5">

<h3 id="s-table" class="py-3">Table example</h3>
<h3 id="s-table" class="py-3">Table esempio</h3>

<table class="table table-striped table-hover mb-5">
<thead>
Expand Down
80 changes: 61 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
<meta name="author" content="Marco Gargano" />
<title>Simplify Bootstrap - v. 0.1</title>
<link rel="stylesheet" href="style.css" />
<style>
[id^=s-] {
padding-top: 5rem !important;
}
</style>
</head>

<body>
Expand All @@ -19,7 +24,7 @@ <h5>Semplice ed elegante abito sartoriale. </h5>

<main>
<div class="row">
<div class="col-9">
<div class="col-sm-9">
<h4>👋 Ciao! Mi chiamo Marco, <br />sono appassionato di front-end e utilizzo Bootstrap da tanti anni.</h4>
<p class="mb-1">Ritengo che Bootstrap sia un <strong>framework CSS completo</strong> e sopratutto
<strong>pronto all'uso</strong>.
Expand Down Expand Up @@ -61,17 +66,40 @@ <h4>☝️ Il mio approccio!</h4>
<div class="my-4">
<a href="style.css" download="" class="btn btn-primary">Get the CSS file</a>
</div>

<p class="mb-5">
<small>Basato su Bootstrap v. 5.3 2024</small>
</p>
</div>
</div>

<hr class="col-3 col-md-2 mb-5" />
<div class="row sticky-bottom sticky-top z-3">
<div class="col">
<div class="my-2 p-3 bg-light rounded-5 shadow-lg">
<form class="" method="post" action="">
<div class="d-sm-flex flex-sm-row align-items-center gap-4">
<h5 class="d-flex align-items-center flex-fill mb-sm-0">Crea il tuo stile personalizzato</h5>
<p class="d-flex align-items-center pb-0">Seleziona i colori e scarica il file .css</p>
<label class="d-flex align-items-center form-label mb-sm-0" for="primary-color">Primary
<input type="color" class="float-start form-control form-control-color form-control-sm ms-1"
id="primary-color" name="primary-color" value="#9d33e7" />
</label>
<label class="d-flex align-items-center form-label mb-sm-0" for="secondary-color">Secondary
<input type="color" class="float-start form-control form-control-color form-control-sm ms-1"
id="secondary-color" name="secondary-color" value="#91abc1" />
</label>
<button id="download-btn flex-fill" class="btn btn-outline-primary">Download</button>
</div>
</form>
</div>
</div>
</div>

<div class="row g-5">
<div class="col-md-2">
<div class="col-sm-3">
<div class="py-3 sticky-top">
<hr class="col-1 mt-5 mt-4 opacity-0" />

<ul class="list ps-3">
<li>
<a class="icon-link mb-1" href="#s-button">Button</a>
Expand Down Expand Up @@ -103,6 +131,9 @@ <h4>☝️ Il mio approccio!</h4>
<li>
<a class="icon-link mb-1" href="#s-alert">Alert</a>
</li>
<li>
<a class="icon-link mb-1" href="#s-image">Image</a>
</li>
<li>
<a class="icon-link mb-1" href="#s-table">Table</a>
</li>
Expand All @@ -114,7 +145,12 @@ <h4>☝️ Il mio approccio!</h4>
<hr class="col-3 my-4" />

<form class="" method="post" action="">
<label class="d-flex align-items-center form-label" for="picker">Change <input type="color" class="float-start form-control form-control-color form-control-sm ms-1" id="picker" value="#9d33e7" /></label>
<label class="d-flex align-items-center form-label" for="picker">Try to change primary:</label>
<div class="input-group" style="max-width: 110px;">
<input type="color" class="form-control form-control-color form-control-sm" id="picker" style="max-width: 30px;"
value="#9d33e7" />
<input class="form-control form-control-sm" type="text" value="#9d33e7" id="picker-code" disabled readonly>
</div>
</form>

<div id="picker-style">
Expand All @@ -130,43 +166,46 @@ <h4>☝️ Il mio approccio!</h4>

</div>
</div>
<div class="col">
<h2 class="text-body-emphasis">Component example</h2>
<p>Belowe you can see this CSS working on main Bootstrap component.</p>
<div class="col-sm-9">
<h2 class="text-body-emphasis pt-5 mt-4">Component esempio</h2>
<p>Di seguto puoi trovare alcuni esempi dei componenti Bootstrap con il nuovo stile.</p>

<div id="inc-button"></div>
<div id="inc-nav"></div>
<div id="inc-tab"></div>
<div id="inc-modal"></div>
<div id="inc-offcanvas"></div>
<div id="inc-accordion"></div>
<div id="inc-alert"></div>
<div id="inc-image"></div>
<div id="inc-table"></div>
<div id="inc-form"></div>
</div>
</div>
</main>
<footer class="pt-5 my-5 text-body-secondary border-top">Created by Marco Gargano with ☮️ & 💜 &middot; &copy; 2024</footer>

<footer class="pt-5 my-5 text-body-secondary border-top">Created by Marco Gargano with ☮️ & 💜 &middot; &copy; 2024
</footer>
</div>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>

<script>
$(document).ready(function () {

$("#picker").on("change", function() {
$("#picker").on("change", function () {
var color = $("#picker").val();
var hex = [
parseInt(color.substr(-6,2),16),
parseInt(color.substr(-4,2),16),
parseInt(color.substr(-2),16)
];
$("#picker-style").html("<style> :root { --bs-primary: " + color + "; --bs-primary-rgb: "+hex+"; } </style>");
parseInt(color.substr(-6, 2), 16),
parseInt(color.substr(-4, 2), 16),
parseInt(color.substr(-2), 16)
];
$("#picker-style").html("<style> :root { --bs-primary: " + color + "; --bs-primary-rgb: " + hex + "; } </style>");
$('#picker-code').val(color);
});




$("#inc-nav").load("inc/nav.html");
$("#inc-tab").load("inc/tab.html");
$("#inc-button").load("inc/button.html");
Expand All @@ -176,8 +215,11 @@ <h2 class="text-body-emphasis">Component example</h2>
$("#inc-accordion").load("inc/accordion.html");
$("#inc-offcanvas").load("inc/offcanvas.html");
$("#inc-modal").load("inc/modal.html");
$("#inc-image").load("inc/image.html");
});
</script>

</script>
<script src="script.js"></script>
</body>

</html>
48 changes: 48 additions & 0 deletions script.js

Large diffs are not rendered by default.

Loading

0 comments on commit 18baf70

Please sign in to comment.