-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kârūn The Rich
committed
May 23, 2024
1 parent
5405b71
commit 385ba61
Showing
21 changed files
with
263 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import request from 'supertest'; | ||
import app from '../app'; | ||
|
||
describe('GET /', () => { | ||
let get: request.Test; | ||
beforeEach(() => { | ||
get = request(app).get('/'); | ||
}); | ||
it('should return w/an HTTP code = 302 Found', async () => { | ||
await get.expect(302); | ||
}); | ||
}); | ||
describe('GET /*/manifest.json', () => { | ||
let get: request.Test; | ||
beforeEach(() => { | ||
get = request(app).get('/home/manifest.json'); | ||
}); | ||
it('should return w/an HTTP code = 302 Found', async () => { | ||
await get.expect(302); | ||
}); | ||
}); | ||
describe('GET /home', () => { | ||
let get: request.Test; | ||
beforeEach(() => { | ||
get = request(app).get('/home'); | ||
}); | ||
it('should return w/an HTTP code = 200 OK', async () => { | ||
await get.expect(200); | ||
}); | ||
it('should return w/a Content-Type ~ html', async () => { | ||
await get.expect('Content-Type', /html/) | ||
}); | ||
it('should return w/a Content-Length > 0', async () => { | ||
await get.expect((res) => { | ||
const length = BigInt(res.headers['content-length']); | ||
expect(length).toBeGreaterThan(0); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Router } from 'express'; | ||
import { env_of } from './functions'; | ||
const router = Router(); | ||
|
||
/** REDIRECT to manifest.json. */ | ||
router.get(/\/[^/]+\/manifest\.json$/, (req, res) => { | ||
res.redirect('/manifest.json'); | ||
}); | ||
/** REDIRECT to home page. */ | ||
router.get('/', (req, res) => { | ||
res.redirect('/home'); | ||
}); | ||
/** GET home page. */ | ||
router.get('/home', (req, res) => { | ||
res.render('home/home.pig', { | ||
DESCRIPTION: 'Mine & Mint Proof-of-Work XPower Tokens', | ||
TITLE: 'XPower', ...env_of(req), | ||
}); | ||
}); | ||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends ../app.pug | ||
|
||
block styles | ||
include ../theme/theme.pug | ||
|
||
block globals | ||
include ../global/contracts.pug | ||
include ../global/urls.pug | ||
|
||
block header | ||
include ../header/header.pug | ||
|
||
block content | ||
content | ||
|
||
block footer | ||
include ../footer/footer.pug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
@import "../app.scss"; | ||
|
||
.two-card { | ||
align-items: center; | ||
display: grid; | ||
grid-column-gap: 1em; | ||
grid-template-columns: 1fr 1fr; | ||
justify-items: center; | ||
margin: auto 0.5em; | ||
} | ||
|
||
.two-card:last-of-type { | ||
margin-bottom: 1em; | ||
} | ||
|
||
.two-card h2 { | ||
font-weight: bold; | ||
text-align: left; | ||
} | ||
|
||
.two-card p { | ||
font-size: larger; | ||
text-align: justify; | ||
} | ||
|
||
.two-card p.emoji { | ||
font-size: 5em; | ||
text-align: center; | ||
} | ||
|
||
.two-card img { | ||
border-radius: 2px; | ||
height: auto; | ||
width: 100%; | ||
} | ||
|
||
hr { | ||
border: 1px solid var(--xp-gray); | ||
border-radius: 1px; | ||
margin: 1em auto; | ||
width: 67%; | ||
} | ||
|
||
@media screen and (max-width: 575px) { | ||
.two-card { | ||
grid-template-columns: 1fr; | ||
grid-template-rows: 1fr; | ||
margin: auto 0; | ||
} | ||
|
||
.two-card .rhs h2 { | ||
margin-top: 0.67em; | ||
} | ||
} |
Oops, something went wrong.