Skip to content

Commit

Permalink
Add dedicated showcase page
Browse files Browse the repository at this point in the history
  • Loading branch information
colepeters committed Oct 6, 2023
1 parent 2b4eabc commit 1bd3f02
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 98 deletions.
36 changes: 0 additions & 36 deletions app/docs/md/learn/showcase.md

This file was deleted.

53 changes: 0 additions & 53 deletions app/elements/doc/showcase.mjs

This file was deleted.

88 changes: 88 additions & 0 deletions app/elements/showcase/project.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
export default function DocShowcase({ html, state }) {
const { attrs, instanceID } = state
const {
title,
image,
url,
contributor = '',
'contributor-url': contributorUrl = '',
} = attrs

const contributorMarkup = contributor
? `<p class="mbs0">Contributed by: <a class="underline" href="${contributorUrl}">${contributor}</a></p>`
: ''

const axolStyles = `
<style>
@media screen and (min-width: 67.5em) {
article[data-instance-id]:after {
content: '';
background-image: url('/_public/img/landing/axol-face-front.svg');
background-size: contain;
inline-size: 12rem;
aspect-ratio: 215 / 117;
position: absolute;
margin: auto;
inset-block: 0;
inset-inline-start: 0;
inset-inline-end: initial;
translate: -56% 0;
rotate: -20deg;
z-index: -1;
}
:host:nth-of-type(odd) article:after {
inset-inline-start: initial;
inset-inline-end: 0;
translate: 56% 0;
rotate: 20deg;
}
}
</style>
`

return html`
<style>
:host {
display: block;
max-inline-size: 52rem;
margin-inline: auto;
--radius: 0.5em;
}
article {
background-color: var(--smoke-denim);
border-radius: var(--radius);
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}
img {
border-radius: var(--radius);
}
p {
max-width: 64ch;
}
a {
color: inherit;
}
</style>
${contributor ? '' : axolStyles}
<article
class="mbs0 mbe2 p0 p2-lg relative"
${contributor ? '' : 'data-instance-id="${instanceID}"'}>
<a href="${url}" target="_blank">
<figure class="mbe1">
<img src="${image}" alt="" />
</figure>
<h1 class="font-semibold mbe0 text1 text2-lg">${title}</h1>
<p class="leading3 text1-lg">
<slot></slot>
</p>
</a>
${contributorMarkup}
</article>
`
}
11 changes: 11 additions & 0 deletions app/elements/showcase/white-to-blue.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default function WhiteToBlue({ html }) {
return html`
<style>
:host {
display: block;
background: linear-gradient(to bottom, white, #fff0fe 5%, #c9ecff);
}
</style>
<slot></slot>
`
}
87 changes: 78 additions & 9 deletions app/pages/showcase.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<style scope='global'>
section {
color: var(--ateneo);
}

#showcase-header {
inline-size: var(--editorial-width);
}

Expand All @@ -11,18 +14,84 @@
p {
max-inline-size: 42ch;
}

#cloud-wide {
translate: -20% 50%;
z-index: -1;
inline-size: max(300px, 60vw);
opacity: 0.5;
}

#cloud-chunky {
translate: 20% -50%;
z-index: -1;
inline-size: max(100px, 40vw);
opacity: 0.5;
}

@media screen and (min-width: 48em) {
#cloud-chunky {
translate: 25% -25%;
}
}
</style>

<docs-symbols></docs-symbols>

<editorial-header></editorial-header>

<section class='mi-auto leading3'>
<h1 class='text3 text5-lg text-center tracking-2 leading1 mb5 mb8-lg mb10-xl'>
<span class='block'>Start with HTML.</span>
<span class='block font-semibold'>Continue with your wildest dreams.</span>
</h1>
<p class='text2-lg text-center mi-auto'>
With Enhance’s foundation in web standards, blazing fast performance, and peerless stability, the only limit to what you can build is your imagination.
</p>
</section>
<section class='leading3'>
<header id='showcase-header' class='relative mi-auto'>
<h1 class='text3 text6-lg text7-xl text-center tracking-2 leading1 pb5 pb8-lg'>
<span class='block'>Start with HTML.</span>
<span class='block font-semibold'>Build your wildest dreams.</span>
</h1>
<p class='text2-lg text-center mi-auto'>
With Enhance’s foundation in web standards, exceptionally fast performance, and peerless stability, the only limit to what you can build is your&nbsp;imagination.
</p>
<p class='text1-lg text-center mbs4 mi-auto'>
In this showcase, you’ll find some of our own example projects, as well as real world applications built by Enhance users across the&nbsp;globe.
</p>

<figure class='mb4'>
<p class='text-center font-medium mi-auto'>Want to have your Enhance project featured? <a class='underline' href='https://github.com/enhance-dev/enhance.dev/pulls'>Open a pull request</a> or <a class='underline' href='https://enhance.dev/discord'>let us know on&nbsp;Discord</a>!</p>
</figure>

<img class='mb5 mb8-lg mi-auto' src='/_public/img/landing/swash.svg' alt='' />

<img id='cloud-wide' class='absolute mb-auto inset-b-0 inset-is-0' src='/_public/img/landing/cloud-blue-wide.svg' alt='' />
<img id='cloud-chunky' class='absolute mb-auto inset-b-0 inset-ie-0' src='/_public/img/landing/cloud-cyan-chunky-light.svg' alt='' />
</header>

<showcase-white-to-blue class='block pbe4 pi-2'>
<div class='flex flex-col gap0-lg relative z1'>
<showcase-project title="Enhance Music" image="/_public/img/showcase/enhance-music.webp" url="https://enhance-music.com">

Enhance Music is a music library and audio player app built with HTML and CSS, and progressively enhanced with a couple pinches of JavaScript. Despite being built as a traditional multipage website, Enhance Music features an audio player that persists across page loads, and some gorgeous interactive UI built entirely with web standards.
</showcase-project>

<showcase-project title="Enhance Movies" image="/_public/img/showcase/enhance-movies.jpg" url="https://enhance-movies.com">
Our movies app is built with Enhance and The Movie Database API. With a strong focus on simplicity, performance, progressive enhancement, and offline local development capabilities, this application is set to transform your understanding of what can be done by focusing on the web platform.
</showcase-project>

<showcase-project title="Perfwork" contributor="Tim Kadlec" contributor-url="https://timkadlec.com/" image="/_public/img/showcase/perfwork.jpg" url="https://www.perfwork.com">
The job board for web performance professionals and people who want to work in the web performance industry.
</showcase-project>

<showcase-project title="Air Quality Index" image="/_public/img/showcase/aqi.jpg" url="https://invent-k6b.begin.app/">
With wildfire season well upon us in North America, it’s a good idea to keep an eye on local air quality. Let’s get some real time data from the US EPA’s AirNow program. Even with a limited API request budget, we can get snappy results by caching and refreshing data on demand. All with features already built into Enhance.
</showcase-project>

<showcase-project title="Design Portfolio" image="/_public/img/showcase/design-portfolio.jpg" url="https://snow-wfi.begin.app/">
With clean and easy to follow code, and a modern, responsive interface, this example application demonstrates just how sophisticated you can get when building UI with web standards. This example app can also serve as a starting point for your own portfolio.
</showcase-project>

<showcase-project title="Notes from the Underdark" contributor="Jonathan Lipps" contributor-url="https://jlipps.com/" image="/_public/img/showcase/underdark.jpg" url="https://underdark.quest/">
Stories created by a group of friends while playing Dungeons & Dragons.
</showcase-project>
</div>
</showcase-white-to-blue>

</section>

<landing-footer class='pb4'></landing-footer>

0 comments on commit 1bd3f02

Please sign in to comment.