Skip to content

Commit

Permalink
refactor: header as flexbox instead of grid (#15)
Browse files Browse the repository at this point in the history
* refactor: header as flexbox instead of grid

* 1.7.0

* fix: remove unused variable in Compiler test
  • Loading branch information
sapachev authored Feb 9, 2023
1 parent 1b9a337 commit 51385cb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "error-pages",
"version": "1.6.2",
"version": "1.7.0",
"description": "Lightweight tool to create static HTTP Error Pages in minimalistic adaptive and accessible design with customization and localization support",
"main": "index.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/Compiler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ describe("class Compiler", async () => {

await compiler.makePages().then(
() => assert.ok(false),
(err) => {
() => {
assert.ok(true);
}
);
Expand Down
10 changes: 5 additions & 5 deletions themes/minimalistic/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

<body class="bg-slate-200 text-slate-700">
<div class="wrapper grid grid-rows-centered items-center justify-items-center gap-4 py-4">
<div class="grid w-full items-center gap-8 sm:w-min">
<header class="grid-cols-centered grid grid-flow-row items-center justify-items-center gap-4 sm:grid-flow-col">
<h1 class="text-9xl font-semibold">{{ code }}</h1>
<h2 class="break-words text-center text-5xl sm:w-max sm:max-w-xs sm:text-left">{{ name }}</h2>
<div class="grid w-full items-center gap-8">
<header class="flex flex-col items-center justify-center justify-items-center md:flex-row">
<h1 class="text-9xl font-semibold sm:inline-block">{{ code }}</h1>
<h2 class="text-center text-5xl sm:inline-block md:ml-4">{{ name }}</h2>
</header>

<main class="mx-4 text-center text-xl sm:-mx-4">
<main class="mx-4 justify-self-center text-center text-xl sm:-mx-4 sm:w-152">
<p class="mb-8">{{ message }}</p>
<p>{{ apology }}</p>
</main>
Expand Down
3 changes: 3 additions & 0 deletions themes/minimalistic/theme.tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ exports.theme = {
gridTemplateRows: {
centered: "1fr auto",
},
width: {
152: "38rem",
},
},
};

0 comments on commit 51385cb

Please sign in to comment.