Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedziolkaMichal committed Nov 24, 2022
1 parent ea62585 commit 175b936
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 53 deletions.
4 changes: 3 additions & 1 deletion editor/tmpl/live-tabbed-tmpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ <h4 class="console-label">Console Output</h4>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="../../css/editor-tabbed.css%cache-buster%" rel="stylesheet" />
<style>%example-hidden-css-src%</style>
<style>
%example-hidden-css-src%
</style>
<style id="css-output">
%css-content%
</style>
Expand Down
2 changes: 1 addition & 1 deletion lib/tabbedPageBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function addHiddenCSS(currentPage, tmpl) {
if (currentPage.cssHiddenSrc) {
const content = fse.readFileSync(currentPage.cssHiddenSrc, "utf8");
const minified = new CleanCSS().minify(content).styles;

return tmpl.replace("%example-hidden-css-src%", minified);
} else {
return tmpl.replace("%example-hidden-css-src%", "");
Expand Down
4 changes: 2 additions & 2 deletions live-examples/fonts/molot.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@font-face {
font-family: molot;
src: url("/media/fonts/molot.woff2") format("woff2");
font-family: molot;
src: url("/media/fonts/molot.woff2") format("woff2");
}
44 changes: 23 additions & 21 deletions live-examples/html-examples/table-content/caption.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<table>
<caption>He-Man and Skeletor facts</caption>
<tr>
<td> </td>
<th scope="col" class="heman">He-Man</th>
<th scope="col" class="skeletor">Skeletor</th>
</tr>
<tr>
<th scope="row">Role</th>
<td>Hero</td>
<td>Villain</td>
</tr>
<tr>
<th scope="row">Weapon</th>
<td>Power Sword</td>
<td>Havoc Staff</td>
</tr>
<tr>
<th scope="row">Dark secret</th>
<td>Expert florist</td>
<td>Cries at romcoms</td>
</tr>
<caption>
He-Man and Skeletor facts
</caption>
<tr>
<td> </td>
<th scope="col" class="heman">He-Man</th>
<th scope="col" class="skeletor">Skeletor</th>
</tr>
<tr>
<th scope="row">Role</th>
<td>Hero</td>
<td>Villain</td>
</tr>
<tr>
<th scope="row">Weapon</th>
<td>Power Sword</td>
<td>Havoc Staff</td>
</tr>
<tr>
<th scope="row">Dark secret</th>
<td>Expert florist</td>
<td>Cries at romcoms</td>
</tr>
</table>
36 changes: 18 additions & 18 deletions live-examples/html-examples/table-content/css/caption.css
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
caption {
padding: 10px;
caption-side: bottom;
padding: 10px;
caption-side: bottom;
}

table {
border-collapse: collapse;
border: 2px solid rgb(200, 200, 200);
letter-spacing: 1px;
font-family: sans-serif;
font-size: .8rem;
border-collapse: collapse;
border: 2px solid rgb(200, 200, 200);
letter-spacing: 1px;
font-family: sans-serif;
font-size: 0.8rem;
}

td,
th {
border: 1px solid rgb(190, 190, 190);
padding: 7px 5px;
border: 1px solid rgb(190, 190, 190);
padding: 7px 5px;
}

th {
background-color: rgb(235, 235, 235);
background-color: rgb(235, 235, 235);
}

td {
text-align: center;
text-align: center;
}

tr:nth-child(even) td {
background-color: rgb(250, 250, 250);
background-color: rgb(250, 250, 250);
}

tr:nth-child(odd) td {
background-color: rgb(240, 240, 240);
background-color: rgb(240, 240, 240);
}

.heman {
font: 1.4rem molot;
text-shadow: 1px 1px 1px #fff, 2px 2px 1px #000;
font: 1.4rem molot;
text-shadow: 1px 1px 1px #fff, 2px 2px 1px #000;
}

.skeletor {
font: 1.7rem rapscallion;
letter-spacing: 3px;
text-shadow: 1px 1px 0 #fff, 0 0 9px #000;
font: 1.7rem rapscallion;
letter-spacing: 3px;
text-shadow: 1px 1px 0 #fff, 0 0 9px #000;
}
20 changes: 10 additions & 10 deletions live-examples/html-examples/table-content/meta.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"pages": {
"dialog": {
"exampleCode": "live-examples/html-examples/table-content/caption.html",
"cssExampleSrc": "live-examples/html-examples/table-content/css/caption.css",
"cssHiddenSrc": "live-examples/fonts/molot.css",
"fileName": "caption.html",
"title": "HTML Demo: <caption>",
"type": "tabbed",
"height": "tabbed-taller"
}
"pages": {
"dialog": {
"exampleCode": "live-examples/html-examples/table-content/caption.html",
"cssExampleSrc": "live-examples/html-examples/table-content/css/caption.css",
"cssHiddenSrc": "live-examples/fonts/molot.css",
"fileName": "caption.html",
"title": "HTML Demo: <caption>",
"type": "tabbed",
"height": "tabbed-taller"
}
}
}

0 comments on commit 175b936

Please sign in to comment.