GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — nullstack.github.io/src/Home.njs at master · joatha/nullstack.github.io Expand file tree/ Copy pathHome.njsMore file actions 160 lines (148 loc) · 5.67 KB / Copy pathHome.njsFile metadata and controls160 lines (148 loc) · 5.67 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 import Translatable from './Translatable'; import Snippet from "./Snippet"; import Arrow from '../icons/Arrow'; class Home extends Translatable { async getStarted({ router, href }) { if('clipboard' in navigator) { const command = 'npx create-nullstack-app'; await navigator.clipboard.writeText(command); } clearTimeout(this.gettingStarted); this.gettingStarted = setTimeout(() => { router.url = href; }, 3000) } renderHero({ page }) { return ( <section class="max-w-screen-xl mx-auto px-4 flex justify-between items-center flex-wrap sm:pt-12"> <div class="sm:w-5/12 grid gap-8 mt-12 sm:mt-0"> <h1 class="w-full"> <span class={`text-pink-600 ${page.locale === 'pt-BR' ? 'text-2xl sm:text-4xl' : 'text-4xl sm:text-6xl'} font-light block sm:mb-3 text-center sm:text-left`}> {this.i18n.hero.heading} </span> <span class={`text-pink-600 ${page.locale !== 'pt-BR' ? 'text-3xl sm:text-5xl' : 'text-4xl sm:text-6xl'} font-light block sm:mb-3 text-center sm:text-left`}> {this.i18n.hero.subHeading} </span> <span class="text-2xl sm:text-4xl font-light block text-center sm:text-left"> {this.i18n.hero.tagline} </span> </h1> <> {this.i18n.hero.descriptions.map(description => <p class="text-xl sm:text-2xl text-center sm:text-left"> {description} </p> )} </> <div> <button class="bg-pink-600 text-white px-6 py-4 border border-pink-600 hover:bg-transparent hover:text-pink-600 inline-block w-full sm:w-auto" onclick={this.getStarted} href={this.i18n.hero.actionLink} > {this.gettingStarted ? this.i18n.hero.actionCallback : this.i18n.hero.callToAction} </button> </div> </div> <div class="bg-center bg-0 hover:bg-100 bg-repeat-y mt-6" style="background-image: url(/stars.webp); transition: background-size 3s;"> <img src="/illustrations/nulla-hero.webp" alt="Nulla-Chan" class="max-w-full" width="627" height="765" loading="lazy" /> </div> </section> ) } renderRole({ image, title, text }) { return ( <div class="sm:w-1/3 px-8 flex flex-wrap justify-center text-center mb-8 sm:mb-0"> <div class="bg-center bg-0 hover:bg-100" style="background-image: url(/stars.webp); transition: background-size 3s;"> <img src={image} alt={title} width="192" height="192" class="transform hover:scale-105 transition delay-100" loading="lazy" /> </div> <h2 class="w-full text-center text-pink-600 dark:text-pink-500 text-xl sm:text-2xl font-light mb-4 sm:px-20"> {title} </h2> <p class="w-full text-center text-xl font-gray-600">{text}</p> </div> ) } renderTrinity() { return ( <section class="max-w-screen-xl mx-auto px-4 flex justify-between items-center flex-wrap py-12 sm:py-36"> <h2 class="w-full text-center mb-8 sm:mb-24"> <span class="w-full text-pink-600 text-4xl sm:text-6xl font-light block sm:mb-3">{this.i18n.trinity.heading}</span> <span class="sm:text-xl block">{this.i18n.trinity.subHeading}</span> </h2> {this.i18n.trinity.roles.map((role) => <Role {...role} />)} </section> ) } renderFeature({ snippet, image, title, text, inverted, locale }) { return ( <section class="max-w-screen-xl mx-auto px-4 flex justify-between items-center flex-wrap py-12 sm:py-36"> <div class={`w-full sm:w-5/12 ${inverted ? 'sm:order-2' : ''}`}> <Snippet key={snippet} locale={locale} /> </div> <div class="mt-12 sm:mt-0 sm:w-5/12"> <h3 class="text-pink-600 dark:text-pink-500 text-xl sm:text-4xl font-light mb-4"> {title} </h3> <p class="text-xl font-gray-600"> {text} </p> <img src={image} alt={title} class="mt-6" width="520" height="272" loading="lazy" /> </div> </section> ) } renderVideo({ link, title, thumbnail }) { return ( <div class="w-full sm:w-auto p-1 flex justify-center"> <a href={link} title={title} target="_blank" rel="noopener"> <img src={thumbnail} alt={title} height="209" width="372" loading="lazy" /> </a> </div> ) } renderPlaylist() { return ( <div> <section class="max-w-screen-xl mx-auto px-4 flex justify-center items-center flex-wrap py-12 sm:pt-36"> <h2 class="text-xl sm:text-4xl font-light mb-4"> {this.i18n.playlist.heading} <del>{this.i18n.playlist.slang}</del> <span class="text-pink-600 dark:text-pink-500">{this.i18n.playlist.realWord}</span> </h2> <div class="sm:flex items-center justify-center w-full mt-12 flex-wrap"> {this.i18n.playlist.videos.map(video => <Video {...video} />)} </div> </section> </div> ) } renderSeparator() { return ( <div class="h-5 bg-center bg-no-repeat w-full max-w-screen-xl mx-auto flex justify-center items-start flex-wrap border-t-4 border-gray-200 text-center dark:opacity-10 text-gray-300" > <Arrow size={30} /> </div> ) } render() { if(!this.i18n) return false; return ( <div> <Hero /> <Separator /> <Trinity /> <Separator /> {this.i18n.features.map(feature => <> <Feature {...feature} /> <Separator /> </> )} <Playlist /> </div> ) } } export default Home; |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |