summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/brochure/brochure-back-center.pngbin0 -> 332534 bytes
-rw-r--r--assets/brochure/brochure-back-left.pngbin0 -> 316496 bytes
-rw-r--r--assets/brochure/brochure-back-right.pngbin0 -> 304208 bytes
-rw-r--r--assets/brochure/brochure-front-center.pngbin0 -> 334345 bytes
-rw-r--r--assets/brochure/brochure-front-left.pngbin0 -> 402732 bytes
-rw-r--r--assets/brochure/brochure-front-right.pngbin0 -> 295297 bytes
-rw-r--r--brochure/brochure.html38
-rw-r--r--brochure/brochure.js34
-rw-r--r--brochure/index.php18
-rw-r--r--brochure/styles.css88
-rw-r--r--header.php12
-rw-r--r--index.php4
-rwxr-xr-xscripts/serve.sh2
13 files changed, 195 insertions, 1 deletions
diff --git a/assets/brochure/brochure-back-center.png b/assets/brochure/brochure-back-center.png
new file mode 100644
index 0000000..48ee7e2
--- /dev/null
+++ b/assets/brochure/brochure-back-center.png
Binary files differ
diff --git a/assets/brochure/brochure-back-left.png b/assets/brochure/brochure-back-left.png
new file mode 100644
index 0000000..5a2cc4a
--- /dev/null
+++ b/assets/brochure/brochure-back-left.png
Binary files differ
diff --git a/assets/brochure/brochure-back-right.png b/assets/brochure/brochure-back-right.png
new file mode 100644
index 0000000..73a5b8d
--- /dev/null
+++ b/assets/brochure/brochure-back-right.png
Binary files differ
diff --git a/assets/brochure/brochure-front-center.png b/assets/brochure/brochure-front-center.png
new file mode 100644
index 0000000..59f9f82
--- /dev/null
+++ b/assets/brochure/brochure-front-center.png
Binary files differ
diff --git a/assets/brochure/brochure-front-left.png b/assets/brochure/brochure-front-left.png
new file mode 100644
index 0000000..2ed6c56
--- /dev/null
+++ b/assets/brochure/brochure-front-left.png
Binary files differ
diff --git a/assets/brochure/brochure-front-right.png b/assets/brochure/brochure-front-right.png
new file mode 100644
index 0000000..1fd53c7
--- /dev/null
+++ b/assets/brochure/brochure-front-right.png
Binary files differ
diff --git a/brochure/brochure.html b/brochure/brochure.html
new file mode 100644
index 0000000..6690f4d
--- /dev/null
+++ b/brochure/brochure.html
@@ -0,0 +1,38 @@
+<!--
+Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
+
+
+<button class="button">Flip</button>
+<div class="paper">
+ <div class="page left">
+ <div class="side front">
+ <img src="/assets/brochure/brochure-front-left.png"/>
+ </div>
+ <div class="side back">
+ <img src="/assets/brochure/brochure-back-left.png"/>
+ </div>
+ </div>
+ <div class="page right">
+ <div class="side front">
+ <img src="/assets/brochure/brochure-front-right.png"/>
+ </div>
+ <div class="side back">
+ <img src="/assets/brochure/brochure-back-right.png"/>
+ </div>
+ </div>
+ <div class="page center">
+ <div class="side front">
+ <img src="/assets/brochure/brochure-front-center.png"/>
+ </div>
+ <div class="side back">
+ <img src="/assets/brochure/brochure-back-center.png"/>
+ </div>
+ </div>
+</div>
diff --git a/brochure/brochure.js b/brochure/brochure.js
new file mode 100644
index 0000000..4872373
--- /dev/null
+++ b/brochure/brochure.js
@@ -0,0 +1,34 @@
+/*
+Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+document.addEventListener("DOMContentLoaded", (event) => {
+ const paper = document.querySelector(".paper");
+
+ const flipButton = document.querySelector("button")
+ flipButton.addEventListener("click", () => {
+ paper.classList.toggle("flip")
+ })
+
+ const leftSide = paper.querySelector(".page.left");
+ leftSide.addEventListener("click", () => {
+ leftSide.classList.toggle("open")
+ });
+
+ const rightSide = paper.querySelector(".page.right");
+ rightSide.addEventListener("click", () => {
+ rightSide.classList.toggle("open")
+ });
+
+ const centerSide = paper.querySelector(".page.center");
+ centerSide.addEventListener("click", () => {
+ centerSide.classList.toggle("open")
+ });
+});
diff --git a/brochure/index.php b/brochure/index.php
new file mode 100644
index 0000000..237266d
--- /dev/null
+++ b/brochure/index.php
@@ -0,0 +1,18 @@
+<?php include('../header.php'); ?>
+<section class="banner">
+ <h1>Interactive brochure</h1>
+</section>
+
+<section class="quiet">
+<p>Click on pages to fold and unfold and use the <em>Flip</em> button to toggle front and back.</p>
+
+<?php include('./brochure.html')?>
+
+</section>
+
+<section></section>
+
+<script>
+<?php include('./brochure.js')?>
+</script>
+<?php include('../footer.php'); ?>
diff --git a/brochure/styles.css b/brochure/styles.css
new file mode 100644
index 0000000..351bc00
--- /dev/null
+++ b/brochure/styles.css
@@ -0,0 +1,88 @@
+/*
+Copyright (c) 2024 by Daniel Pox (https://codepen.io/danielpox/pen/abOopYo)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+
+.paper {
+ display: grid;
+
+ width: 21.25em;
+
+ grid-template-columns: 21.25em;
+ grid-template-rows: 50em; /* .425 aspect */
+
+ margin: 2rem auto;
+
+ transform-style: preserve-3d;
+ transition: transform linear 1s;
+}
+.paper.flip {
+ transform: rotateY(180deg);
+}
+
+.paper .page {
+ display: inline-block;
+
+ grid-column: 1 / 2;
+ grid-row: 1 / 2;
+
+ position: relative;
+
+ transform-style: preserve-3d;
+
+ box-shadow: 0 4px 8px #0001;
+}
+
+.paper .page .side {
+ width: inherit;
+ height: inherit;
+
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+
+ background: white;
+ backface-visibility: hidden;
+}
+
+.paper .page .side.back {
+ transform: rotateY(180deg);
+}
+
+.page {
+ transition: transform linear 1s;
+}
+.left.open {
+ transform: rotateY(-180deg);
+}
+.right.open {
+ transform: rotateY(180deg);
+}
+
+.paper .page .side {
+ box-shadow: inset 1px 0 #f2f2f2, inset -1px 0 #f2f2f2;
+}
+
+.side img {
+ max-width: 100%;
+ max-height: 100%;
+}
+
+.left {
+ transform: translateZ(2px);
+ transform-origin: center left;
+}
+
+.right {
+ transform: translateZ(1px);
+ transform-origin: center right;
+}
+
diff --git a/header.php b/header.php
index fe8b34b..6a73cbb 100644
--- a/header.php
+++ b/header.php
@@ -273,6 +273,17 @@
:target.modal .card {
overflow: auto;
}
+
+ .centered {
+ text-align: center;
+justify-content: center;
+ }
+
+ <?php
+ if (str_contains($_SERVER['REQUEST_URI'], '/brochure')) {
+ include('../brochure/styles.css');
+ }
+ ?>
</style>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Indie+Flower&family=PT+Sans&display=swap" rel="stylesheet" />
@@ -297,6 +308,7 @@
<a href="/about">Team</a>
<a href="/policies">Policies</a>
<a href="/#pricing">Pricing</a>
+ <a href="/brochure">Brochure</a>
<a href="/#offerings">Offerings</a>
<a href="/#"><img alt="logo" src="/assets/logo-simple.png" /></a>
</nav>
diff --git a/index.php b/index.php
index 9fecb0c..b6f53fd 100644
--- a/index.php
+++ b/index.php
@@ -310,6 +310,10 @@ include('header.php');
</section>
+<section class="squarshed flexible centered">
+ <a class="button primary" href="/brochure">Click here to view an interactive brochure of our offerings</a>
+</section>
+
<!-- pricing -->
<section class="quiet" id="pricing">
<table>
diff --git a/scripts/serve.sh b/scripts/serve.sh
index e7f2b4c..16a3410 100755
--- a/scripts/serve.sh
+++ b/scripts/serve.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-php -S localhost:8000
+php83 -S localhost:8000