🎨 Run prettier on all files (fix #21)

This commit is contained in:
Alexandre Mouton-Brady
2021-12-24 22:42:17 +01:00
parent d8d2c5b2af
commit ccb0d1a718
38 changed files with 136 additions and 130 deletions
+28 -28
View File
@@ -1,6 +1,6 @@
import { onCleanup, onMount } from "solid-js";
import type { Component } from "solid-js";
import * as bootstrap from "bootstrap";
import { onCleanup, onMount } from 'solid-js';
import type { Component } from 'solid-js';
import * as bootstrap from 'bootstrap';
const App: Component = () => {
/**
@@ -10,18 +10,18 @@ const App: Component = () => {
function setActiveItem() {
let hash = window.location.hash;
if (hash === "") {
if (hash === '') {
return;
}
let link = document.querySelector('.bd-aside a[href="' + hash + '"]');
let active = document.querySelector(".bd-aside .active");
let active = document.querySelector('.bd-aside .active');
// @ts-ignore
let parent = link.parentNode.parentNode.previousElementSibling;
link.classList.add("active");
link.classList.add('active');
if (parent.classList.contains("collapsed")) {
if (parent.classList.contains('collapsed')) {
parent.click();
}
@@ -32,7 +32,7 @@ const App: Component = () => {
// @ts-ignore
let expanded = active.parentNode.parentNode.previousElementSibling;
active.classList.remove("active");
active.classList.remove('active');
if (expanded && parent !== expanded) {
expanded.click();
@@ -41,11 +41,11 @@ const App: Component = () => {
onMount(() => {
setActiveItem();
window.addEventListener("hashchange", setActiveItem);
window.addEventListener('hashchange', setActiveItem);
});
onCleanup(() => {
window.removeEventListener("hashchange", setActiveItem);
window.removeEventListener('hashchange', setActiveItem);
});
return (
@@ -427,7 +427,7 @@ const App: Component = () => {
<blockquote class="blockquote">
<p>A well-known quote, contained in a blockquote element.</p>
<footer class="blockquote-footer">
Someone famous in{" "}
Someone famous in{' '}
<cite title="Source Title">Source Title</cite>
</footer>
</blockquote>
@@ -1303,14 +1303,14 @@ const App: Component = () => {
<div class="accordion-body">
<strong>
This is the first item's accordion body.
</strong>{" "}
</strong>{' '}
It is hidden by default, until the collapse plugin adds
the appropriate classes that we use to style each
element. These classes control the overall appearance,
as well as the showing and hiding via CSS transitions.
You can modify any of this with custom CSS or overriding
our default variables. It's also worth noting that just
about any HTML can go within the{" "}
about any HTML can go within the{' '}
<code>.accordion-body</code>, though the transition does
limit overflow.
</div>
@@ -1338,14 +1338,14 @@ const App: Component = () => {
<div class="accordion-body">
<strong>
This is the second item's accordion body.
</strong>{" "}
</strong>{' '}
It is hidden by default, until the collapse plugin adds
the appropriate classes that we use to style each
element. These classes control the overall appearance,
as well as the showing and hiding via CSS transitions.
You can modify any of this with custom CSS or overriding
our default variables. It's also worth noting that just
about any HTML can go within the{" "}
about any HTML can go within the{' '}
<code>.accordion-body</code>, though the transition does
limit overflow.
</div>
@@ -1373,14 +1373,14 @@ const App: Component = () => {
<div class="accordion-body">
<strong>
This is the third item's accordion body.
</strong>{" "}
</strong>{' '}
It is hidden by default, until the collapse plugin adds
the appropriate classes that we use to style each
element. These classes control the overall appearance,
as well as the showing and hiding via CSS transitions.
You can modify any of this with custom CSS or overriding
our default variables. It's also worth noting that just
about any HTML can go within the{" "}
about any HTML can go within the{' '}
<code>.accordion-body</code>, though the transition does
limit overflow.
</div>
@@ -1404,7 +1404,7 @@ const App: Component = () => {
class="alert alert-primary alert-dismissible fade show"
aria-role="alert"
>
A simple primary alert with{" "}
A simple primary alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1424,7 +1424,7 @@ const App: Component = () => {
class="alert alert-secondary alert-dismissible fade show"
aria-role="alert"
>
A simple secondary alert with{" "}
A simple secondary alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1444,7 +1444,7 @@ const App: Component = () => {
class="alert alert-success alert-dismissible fade show"
aria-role="alert"
>
A simple success alert with{" "}
A simple success alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1464,7 +1464,7 @@ const App: Component = () => {
class="alert alert-danger alert-dismissible fade show"
aria-role="alert"
>
A simple danger alert with{" "}
A simple danger alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1484,7 +1484,7 @@ const App: Component = () => {
class="alert alert-warning alert-dismissible fade show"
aria-role="alert"
>
A simple warning alert with{" "}
A simple warning alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1504,7 +1504,7 @@ const App: Component = () => {
class="alert alert-info alert-dismissible fade show"
aria-role="alert"
>
A simple info alert with{" "}
A simple info alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1524,7 +1524,7 @@ const App: Component = () => {
class="alert alert-light alert-dismissible fade show"
aria-role="alert"
>
A simple light alert with{" "}
A simple light alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1544,7 +1544,7 @@ const App: Component = () => {
class="alert alert-dark alert-dismissible fade show"
aria-role="alert"
>
A simple dark alert with{" "}
A simple dark alert with{' '}
<a
href="#"
onClick={(e) => e.preventDefault()}
@@ -1603,15 +1603,15 @@ const App: Component = () => {
Example heading <span class="badge bg-danger">New</span>
</p>
<p class="h5">
Example heading{" "}
Example heading{' '}
<span class="badge bg-warning text-dark">New</span>
</p>
<p class="h6">
Example heading{" "}
Example heading{' '}
<span class="badge bg-info text-dark">New</span>
</p>
<p class="h6">
Example heading{" "}
Example heading{' '}
<span class="badge bg-light text-dark">New</span>
</p>
<p class="h6">
+12 -12
View File
@@ -30,7 +30,7 @@
width: 1em;
height: 1em;
margin-right: 0.25rem;
content: "";
content: '';
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%25230d6efd' viewBox='0 0 16 16'%3E%3Cpath d='M4 1h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2h1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1H2a2 2 0 0 1 2-2z'/%3E%3Cpath d='M2 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H2z'/%3E%3Cpath fill-rule='evenodd' d='M8.646 5.646a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L10.293 8 8.646 6.354a.5.5 0 0 1 0-.708zm-1.292 0a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L5.707 8l1.647-1.646a.5.5 0 0 0 0-.708z'/%3E%3C/svg%3E");
background-size: 1em;
}
@@ -89,7 +89,7 @@
transform-origin: 0.5em 50%;
}
.bd-aside .btn[aria-expanded="true"]::before {
.bd-aside .btn[aria-expanded='true']::before {
transform: rotate(90deg) /* rtl:ignore */;
}
@@ -101,15 +101,15 @@
overflow: auto;
}
[id="modal"] .bd-example .btn,
[id="buttons"] .bd-example .btn,
[id="tooltips"] .bd-example .btn,
[id="popovers"] .bd-example .btn,
[id="dropdowns"] .bd-example .btn-group,
[id="dropdowns"] .bd-example .dropdown,
[id="dropdowns"] .bd-example .dropup,
[id="dropdowns"] .bd-example .dropend,
[id="dropdowns"] .bd-example .dropstart {
[id='modal'] .bd-example .btn,
[id='buttons'] .bd-example .btn,
[id='tooltips'] .bd-example .btn,
[id='popovers'] .bd-example .btn,
[id='dropdowns'] .bd-example .btn-group,
[id='dropdowns'] .bd-example .dropdown,
[id='dropdowns'] .bd-example .dropup,
[id='dropdowns'] .bd-example .dropend,
[id='dropdowns'] .bd-example .dropstart {
margin: 0 1rem 1rem 0;
}
@@ -171,7 +171,7 @@
left: 0;
/* rtl:end:ignore */
z-index: -1;
content: "";
content: '';
background-image: linear-gradient(
to bottom,
rgba(255, 255, 255, 1) calc(100% - 3rem),
+5 -5
View File
@@ -1,13 +1,13 @@
import "bootstrap/scss/bootstrap.scss";
import 'bootstrap/scss/bootstrap.scss';
import { render } from "solid-js/web";
import { render } from 'solid-js/web';
/**
* This file was taken from the cheatsheet example of bootstrap.
* You will most likely remove it if using this template.
*/
import "./cheatsheet.scss";
import './cheatsheet.scss';
import App from "./App";
import App from './App';
render(() => <App />, document.getElementById("root") as HTMLElement);
render(() => <App />, document.getElementById('root') as HTMLElement);