Skip to content

Commit

Permalink
deploy: 0d35ec1
Browse files Browse the repository at this point in the history
  • Loading branch information
bkardell committed Jan 2, 2024
1 parent 8779803 commit 1f1e9f0
Show file tree
Hide file tree
Showing 298 changed files with 50,370 additions and 2,539 deletions.
2 changes: 1 addition & 1 deletion bkardell-patch-3/.stamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Thu Mar 30 14:43:51 UTC 2023
Tue Jan 2 21:10:43 UTC 2024
3 changes: 1 addition & 2 deletions bkardell-patch-3/README/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ <h2 id="development" tabindex="-1">Development</h2>
<p>In order to setup, you just just have to check it out, switch to the checked out directory and then <code>npm install</code>.</p>
<h2 id="building-wpewebkit.org-site-locally" tabindex="-1">Building wpewebkit.org site locally</h2>
<p>In order to test it all you need to do is</p>
<pre class="language-sh"><code class="language-sh"><span class="token function">npm</span> <span class="token function">install</span> <span class="token operator">&amp;&amp;</span> <span class="token function">npm</span> run serve
</code></pre>
<pre class="language-sh"><code class="language-sh"><span class="token function">npm</span> <span class="token function">install</span> <span class="token operator">&amp;&amp;</span> <span class="token function">npm</span> run serve</code></pre>
<p>This will build the project, start a server, and your terminal will provide you useful links to actually get to it.</p>
<h3 id="structure" tabindex="-1">Structure</h3>
<ul>
Expand Down
148 changes: 142 additions & 6 deletions bkardell-patch-3/about/a-good-choice.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<title>Why Choose WPE?</title>
<link rel="canonical" href="https://igalia.github.io/wpewebkit.org/bkardell-patch-3/about/a-good-choice.html">
<link rel="alternate" type="application/rss+xml" title="" href="https://igalia.github.io/wpewebkit.org/bkardell-patch-3/feed.xml">
<link rel="alternate" type="application/rss+xml" title="WPE blog" href="https://igalia.github.io/wpewebkit.org/bkardell-patch-3/blog.xml">
<meta property="og:url" content="https://igalia.github.io/wpewebkit.org/bkardell-patch-3/about/a-good-choice.html">
<meta property="og:title" content="Why Choose WPE?">
<meta property="og:image" content="https://igalia.github.io/wpewebkit.org/bkardell-patch-3/assets/twitter_Profile_WhiteBg_400px.png">
Expand All @@ -21,7 +22,7 @@
<meta property="og:image:width" content="400">
<meta property="og:image:height" content="400">
<meta property="og:type" content="article">
<meta property="article:published_time" content="2023-03-30T14:43:41.540Z">
<meta property="article:published_time" content="2024-01-02T21:10:33.160Z">
<meta property="article:tag" content="about">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@WPEWebKit">
Expand Down Expand Up @@ -60,7 +61,6 @@
})();
</script>
<!-- End Matomo Code -->

</head>


Expand All @@ -71,14 +71,14 @@
<a class="igalia logo home" href="/wpewebkit.org/bkardell-patch-3/"><img src="/wpewebkit.org/bkardell-patch-3/assets/img/logo-blue.svg" alt="WPE"></a>
<ul class="about off"><li>
<a class="nav-link" href="/wpewebkit.org/bkardell-patch-3/">Home</a>
</li><li>
</li><li class="currentPage">
<a class="nav-link" href="/wpewebkit.org/bkardell-patch-3/about/">Learn & Discover</a>
</li><li>
<a class="nav-link" href="/wpewebkit.org/bkardell-patch-3/blog/">Blog</a>
</li><li>
<a class="nav-link" href="/wpewebkit.org/bkardell-patch-3/developers/">Developers</a>
</li><li>
<a class="btn cta" href="/wpewebkit.org/bkardell-patch-3/about/explore-wpe.html">Get Started</a>
<a class="btn cta" href="/wpewebkit.org/bkardell-patch-3/about/get-wpe.html">Get WPE</a>
</li></ul>
<a href="#" class="burger">Menu</a>
</div>
Expand Down Expand Up @@ -163,9 +163,65 @@ <h2 id="some-advantages-of-wpe-webkit" tabindex="-1">Some advantages of WPE WebK
</ul>
</section>

<div class="survey">
<p>
If you’re using WPE WebKit, or are considering doing so, <strong><a href="https://docs.google.com/forms/d/e/1FAIpQLSchPgMGzuVc9ry5bdxF2uFnW2q3FcrSSqxJdOM4Fd2BD4s7dg/viewform?usp=pp_url&amp;entry.1179679285=WPEWebKit.org+website">please take our brief user survey</a></strong>. Your input will help us make WPE WebKit better for you!
</p>
</div>
<style>
.survey {
position: relative;
padding-block: 2em 3em;
margin-block: 3em 0;
--bgrad: linear-gradient(180deg,#00C6 0.25em,#00B4 20%,40%,#00B2);
background: var(--bgrad);
border-image: var(--bgrad) 1;
border-image-outset: 0 50vmax;
border-image-width: 0 50vmax;
font-size: 1.25em;
}
.survey::before {
content: url(/assets/img/survey.svg);
position: absolute;
top: -1.5em;
left: 0;
right: 0;
margin-inline: auto;
height: 3em;
width: auto;
aspect-ratio: 1/1;
filter: drop-shadow(0.25em 0.33em 0.33em #0006);
}
.survey p {
padding-inline: 1em;
}
</style>

</main>

<footer class="global">
<dialog id="splash">
<p>If you’re using WPE WebKit, or are considering doing so, <strong>please take our brief user survey!</strong> Your input will help us make WPE WebKit better for you.</p>
<div>
<button is="dis-misser" id="dismiss-Y">Yes</button>
<button is="dis-misser" id="dismiss-L">Ask again later</button>
<button is="dis-misser" id="dismiss-N">No</button>
</div>
</dialog>
<style>
#splash {max-width: 50%; border-radius: 1em; padding-inline: 2em; outline: 50vmax solid #141316D0; background: #EEE;}
#splash p {font-size: 1.25em; color: inherit;}
#splash img {max-width: 60vw; max-height: 50vh; aspect-ratio: 1.88/1;}
@media (max-width: 600px) {
#splash img {object-fit: contain; object-position: 100% 100%;}
}
#splash div {margin-block: 1em 1.5em; text-align: center; display: flex; gap: 1em; justify-content: center;}
#splash button {font-size: 1.33em; border-radius: 1em; padding-inline: 0.75em; padding-block: 0.2em; border: 0; background: #888; color: #EEE; cursor: pointer;}
#splash button:focus {outline: 0.25em solid black;}
#splash button#dismiss-Y {background: hsl(205deg 84.8% 50%);}
#splash button#dismiss-L {background: hsl(102.5deg 15.2% 50%);}
#splash button#dismiss-N {background: hsl(0deg 84.8% 50%);}
</style>
<footer class="global">
<b></b>
<div>
<a href="/wpewebkit.org/bkardell-patch-3/" class="igalia logo home"><img src="/wpewebkit.org/bkardell-patch-3/assets/img/logo-white.svg" alt="WPE"></a>
Expand All @@ -176,11 +232,91 @@ <h2 id="some-advantages-of-wpe-webkit" tabindex="-1">Some advantages of WPE WebK
<li>Matrix: <a href="https://matrix.to/#/#wpe:matrix.org">#wpe:matrix.org</a></li>
</ul>
<ul>
<li>Copyright &copy; 2018-2023 The WPE WebKit Team</li>
<li>Copyright &copy; 2018-2024 The WPE WebKit Team</li>
<li>Hosting kindly provided by <a href="https://www.igalia.com">Igalia</a>.</li>
</ul>
</div>
</footer>
<script>
let storedInfo = {};
const flagName = 'survey-splash';

function startup(flagName) {
if (!flagName) {
console.error('Missing flagName');
return;
}
if (storageAvailable("localStorage")) {
let currentTime = Date.now();
let timeOut = 1;
timeOut *= 86400 * 1000;
let localStore = localStorage.getItem(flagName);
if (!localStore) {
storedInfo = {
'status': null,
'datetime': currentTime,
'pageloads' : 0
}
} else {
storedInfo = JSON.parse(localStore);
}
storedInfo.pageloads++;
localStorage.setItem(flagName, JSON.stringify(storedInfo));

if (storedInfo.pageloads < 11) return;
if (storedInfo.status == "Y" || storedInfo.status == "N") return;
if (storedInfo.status && currentTime - storedInfo.datetime < timeOut) return;

splash.showModal();
storedInfo.datetime = currentTime;
}
}

function storageAvailable(type) {
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API
let storage;
try {
storage = window[type];
const x = "__storage_test__";
storage.setItem(x, x);
storage.removeItem(x);
return true;
} catch (e) {
return (
e instanceof DOMException &&
// everything except Firefox
(e.code === 22 ||
// Firefox
e.code === 1014 ||
// test name field too, because code might not be present
// everything except Firefox
e.name === "QuotaExceededError" ||
// Firefox
e.name === "NS_ERROR_DOM_QUOTA_REACHED") &&
// acknowledge QuotaExceededError only if there's something already stored
storage &&
storage.length !== 0
);
}
}

function surveyRedirect() {
let surveyURL = "https://docs.google.com/forms/d/e/1FAIpQLSchPgMGzuVc9ry5bdxF2uFnW2q3FcrSSqxJdOM4Fd2BD4s7dg/viewform?usp=pp_url&entry.1179679285=WPEWebKit.org+website";
if (surveyURL) window.location = surveyURL;
}

document.querySelectorAll('button[is="dis-misser"]').forEach(el => {
el.addEventListener("click", () => {
splash.close();
storedInfo.status = el.getAttribute('id').replace('dismiss-','');
console.log(storedInfo);
localStorage.setItem(flagName, JSON.stringify(storedInfo));
if (storedInfo.status == "Y") surveyRedirect();
});
});

window.onload = startup(flagName);
</script>


</body>
Expand Down
Loading

0 comments on commit 1f1e9f0

Please sign in to comment.