GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — nullstack.github.io/src/Application.njs at master · MaxHariel/nullstack.github.io

Expand file tree

/

Application.njs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
109 lines (91 loc) · 3.22 KB
/

Application.njs

Copy path

File metadata and controls

109 lines (91 loc) · 3.22 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import Nullstack from 'nullstack';
import './Application.scss';
import Documentation from './Documentation';
import Components from './Components'
import Article from './Article';
import Header from './Header';
import Footer from './Footer';
import Home from './Home';
import Waifu from './Waifu';
import Contributors from './Contributors';
import Loader from './Loader';
import GoogleAnalytics from 'nullstack-google-analytics';
import path from 'path';
import {readdirSync} from 'fs';
class Application extends Nullstack {
static async startWorker({worker}) {
const articles = readdirSync(path.join(__dirname, '../i18n/en-US', 'articles'));
const illustrations = readdirSync(path.join(__dirname, '../public', 'illustrations'));
worker.preload = [
...articles.map((article) => '/' + article.replace('.md', '')),
...illustrations.map((illustration) => '/illustrations/' + illustration),
'/arrow.webp',
'/stars.webp',
'/footer.webp',
'/documentation',
'/components',
'/contributors',
'/roboto-v20-latin-300.woff2',
'/roboto-v20-latin-500.woff2',
'/crete-round-v9-latin-regular.woff2',
]
}
static async startProject({project}) {
project.name = 'Nullstack';
project.domain = 'nullstack.app';
project.color = '#d22365';
project.backgroundColor = '#2d3748';
}
static async start(context) {
await this.startProject(context);
await this.startWorker(context);
}
renderPreloader() {
return (
<head>
<link rel="preload" href="/roboto-v20-latin-300.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/roboto-v20-latin-500.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/crete-round-v9-latin-regular.woff2" as="font" type="font/woff2" crossorigin />
</head>
)
}
prepare(context) {
context.mode = 'light';
context.oppositeMode = 'dark';
}
hydrate(context) {
if(localStorage['mode']) {
context.mode = localStorage['mode'];
if(context.mode === 'dark') {
context.oppositeMode = 'light';
}
}
}
render({router, mode}) {
const locale = router.url.startsWith('/pt-br') ? 'pt-BR' : 'en-US';
return (
<main class={mode}>
<div class="dark:bg-gray-900 dark:text-white">
<Header locale={locale} />
<Home route="/" locale="en-US" />
<Home route="/pt-br" locale="pt-BR" />
<Documentation route="/documentation" locale="en-US" />
<Documentation route="/pt-br/documentacao" locale="pt-BR" />
<Components route="/components" locale="en-US" />
<Components route="/pt-br/componentes" locale="pt-BR" />
<Contributors route="/contributors" locale="en-US" />
<Contributors route="/pt-br/contribuidores" locale="pt-BR" />
<Waifu route="/waifu" locale="en-US" />
<Waifu route="/pt-br/waifu" locale="pt-BR" />
<Article route="/pt-br/:slug" locale="pt-BR" />
<Article route="/:slug" locale="en-US" />
<GoogleAnalytics id="G-E7GZ5Z4MLN" />
<Preloader />
<Loader />
<Footer locale={locale} />
</div>
</main>
)
}
}
export default Application;
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.