website polishing

This commit is contained in:
Mentor Palokaj 2021-10-18 15:08:46 +02:00
parent deb8f8552f
commit d892225c52
9 changed files with 83 additions and 38 deletions

View File

@ -30,13 +30,15 @@ contract Rocketeer is ERC721Tradable {
// TODO: add Api data // TODO: add Api data
// https://docs.opensea.io/docs/metadata-standards // https://docs.opensea.io/docs/metadata-standards
function baseTokenURI() override public pure returns (string memory) { function baseTokenURI() override public pure returns (string memory) {
return "https://us-central1-rocketeer-nft.cloudfunctions.net/testnetMetadata/rocketeer/"; // return "https://rocketeer.fans/testnetapi/rocketeer/";
return "https://rocketeer.fans/api/rocketeer/";
} }
// TODO: add API link // TODO: add API link
// https://docs.opensea.io/docs/contract-level-metadata // https://docs.opensea.io/docs/contract-level-metadata
function contractURI() public pure returns (string memory) { function contractURI() public pure returns (string memory) {
return "https://us-central1-rocketeer-nft.cloudfunctions.net/collection"; // return "https://rocketeer.fans/testnetapi/collection/";
return "https://rocketeer.fans/api/rocketeer/";
} }
// /////////////////////////////// // ///////////////////////////////

View File

@ -14,11 +14,11 @@
"public": "website/docs", "public": "website/docs",
"rewrites": [ "rewrites": [
{ {
"source": "/api", "source": "/api/**",
"function": "mainnetMetadata" "function": "mainnetMetadata"
}, },
{ {
"source": "/testnetapi", "source": "/testnetapi/**",
"function": "testnetMetadata" "function": "testnetMetadata"
} }
] ]

View File

@ -2,5 +2,20 @@ const express = require( 'express' )
const cors = require( 'cors' ) const cors = require( 'cors' )
// CORS enabled express generator // CORS enabled express generator
module.exports = f => express().use( cors( { origin: true } ) ) module.exports = f => {
const app = express()
app.use( cors( { origin: true } ) )
// Logger for debugging
// app.use( ( req, res, next ) => {
// console.log( 'base:', req.baseUrl, 'params:', req.params, 'body:', req.body, 'originalurl:', req.originalUrl, 'path:', req.path )
// next()
// } )
return app
}

View File

@ -14,7 +14,7 @@ const globalAttributes = [
] } ] }
] ]
const heavenlyBodies = [ "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "the Moon", "the Sun" ] const heavenlyBodies = [ "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "the Moon", "the Sun" ]
const web2domain = 'https://mentor.eth.link/' const web2domain = 'https://rocketeer.fans'
// /////////////////////////////// // ///////////////////////////////
// Rocketeer helpers // Rocketeer helpers
@ -59,7 +59,7 @@ function pickRandomAttributes( attributes ) {
// /////////////////////////////// // ///////////////////////////////
// Specific Rocketeer instances // Specific Rocketeer instances
// /////////////////////////////// // ///////////////////////////////
app.get( '/rocketeer/:id', async ( req, res ) => { app.get( '/api/rocketeer/:id', async ( req, res ) => {
// Parse the request // Parse the request
const { id } = req.params const { id } = req.params
@ -106,7 +106,7 @@ app.get( '/rocketeer/:id', async ( req, res ) => {
name: `${ name.first() } ${ name.middle() } ${ name.last() } of ${ pickRandomArrayEntry( heavenlyBodies ) }`, name: `${ name.first() } ${ name.middle() } ${ name.last() } of ${ pickRandomArrayEntry( heavenlyBodies ) }`,
description: ``, description: ``,
image: ``, image: ``,
external_url: `${ web2domain }rocketeer/${ id }`, external_url: `${ web2domain }/api/rocketeer/${ id }`,
attributes: [] attributes: []
} }
@ -132,9 +132,9 @@ app.get( '/rocketeer/:id', async ( req, res ) => {
// /////////////////////////////// // ///////////////////////////////
// Static collection data // Static collection data
// /////////////////////////////// // ///////////////////////////////
app.get( '/collection', ( req, res ) => res.json( { app.get( '/api/collection', ( req, res ) => res.json( {
description: "A testnet collection", description: "A testnet collection",
external_url: `https://openseacreatures.io/`, external_url: web2domain,
image: "https://rocketpool.net/images/rocket.png", image: "https://rocketpool.net/images/rocket.png",
name: `Rocketeer collection`, name: `Rocketeer collection`,
seller_fee_basis_points: 0, seller_fee_basis_points: 0,

View File

@ -2,7 +2,7 @@ const app = require( './express' )()
const { getTotalSupply } = require( './contract' ) const { getTotalSupply } = require( './contract' )
// Specific Rocketeer instances // Specific Rocketeer instances
app.get( '/rocketeer/:id', async ( req, res ) => res.json( { app.get( '/testnetapi/rocketeer/:id', async ( req, res ) => res.json( {
description: "A testnet Rocketeer", description: "A testnet Rocketeer",
external_url: `https://openseacreatures.io/${ req.params.id }`, external_url: `https://openseacreatures.io/${ req.params.id }`,
image: "https://rocketpool.net/images/rocket.png", image: "https://rocketpool.net/images/rocket.png",
@ -15,7 +15,7 @@ app.get( '/rocketeer/:id', async ( req, res ) => res.json( {
// Collection data // Collection data
app.get( '/collection', async ( req, res ) => res.json( { app.get( '/testnetapi/collection', async ( req, res ) => res.json( {
totalSupply: await getTotalSupply( 'rinkeby' ), totalSupply: await getTotalSupply( 'rinkeby' ),
description: "A testnet collection", description: "A testnet collection",
external_url: `https://openseacreatures.io/`, external_url: `https://openseacreatures.io/`,

View File

@ -34,7 +34,7 @@ module.exports = {
// browsers: [ 'last 2 versions', 'not dead' ], // browsers: [ 'last 2 versions', 'not dead' ],
// Format your own based on: https://github.com/browserslist/browserslist // Format your own based on: https://github.com/browserslist/browserslist
browsers: [ '>1%' ] browsers: [ '>0.2%', 'last 2 versions', 'not dead', 'not op_mini all', 'not IE 11' ]
} }
}, },

View File

@ -34,7 +34,7 @@ const file = site => new Promise( ( resolve, reject ) => {
postcss( [ postcss( [
autoprefixer, autoprefixer,
cssnano, cssnano,
doiuse( { ...site.system.browser, onFeatureUsage: cssWarning } ) doiuse( { ...site.system.browser.support, onFeatureUsage: cssWarning } )
] ) ] )
.process( result.css, { from: css.from, to: css.to } ) .process( result.css, { from: css.from, to: css.to } )
.then( result => fs.writeFile( css.to, result.css ) ) .then( result => fs.writeFile( css.to, result.css ) )

View File

@ -41,6 +41,24 @@ main
opacity: 0.6 opacity: 0.6
font-size: 13px font-size: 13px
a.button
padding: 1rem
text-decoration: none
margin: 1rem
background: black
color: white
font-size: 1.2rem
&.outline
border: 2px solid black
color: black
background: none
.row
display: flex
flex-direction: row
flex-wrap: wrap
justify-content: center
// /////////////////////////////// // ///////////////////////////////
// Index page // Index page
// /////////////////////////////// // ///////////////////////////////
@ -63,6 +81,7 @@ main
text-align: center text-align: center
&:nth-child(2n+1) &:nth-child(2n+1)
background: rgba( 0,0,0, .05 ) background: rgba( 0,0,0, .05 )
box-shadow: 0px 0 20px 2px rgba( 0, 0, 0, .2)
&:first-child &:first-child
text-align: left text-align: left
padding: 0 padding: 0
@ -70,7 +89,6 @@ main
max-width: 100% max-width: 100%
.stretch .stretch
position: absolute position: absolute
z-index: -1 z-index: -1
@ -90,7 +108,7 @@ main
height: 99vh height: 99vh
max-height: 100vh max-height: 100vh
h1, h2, a h1, h2
background: rgba( 0,0,0,.9 ) background: rgba( 0,0,0,.9 )
color: white color: white
padding: 1rem padding: 1rem
@ -98,6 +116,8 @@ main
h2 h2
font-family: "Courier New", monospace, serif font-family: "Courier New", monospace, serif
line-height: 2rem line-height: 2rem
a
margin-top: 2rem
#story #story
p p
@ -107,15 +127,21 @@ main
font-size: 1.5rem font-size: 1.5rem
border-left: 5px solid black border-left: 5px solid black
padding-left: 1.5rem padding-left: 1.5rem
margin-bottom: 4rem
#usps .usps
flex-direction: row flex-direction: row
flex-wrap: wrap flex-wrap: wrap
width: 100%
justify-content: space-evenly
.usp .usp
width: 300px width: 300px
max-width: 100% max-width: 100%
padding: 1rem padding: 1rem
text-align: center text-align: center
img
height: 200px
width: 200px
p p
&:first-child &:first-child
font-size: 4rem font-size: 4rem
@ -127,21 +153,9 @@ main
margin-top: 4rem margin-top: 4rem
width: 100% width: 100%
text-align: center text-align: center
a
padding: 1rem
text-decoration: none
margin: 0 1rem
&:first-child
background: black
color: white
&:last-child
border: 2px solid black
color: black
#cta #cta
#compressed
height: 200px
width: 200px
a a
background: black background: black
color: white color: white

View File

@ -27,11 +27,15 @@ html( lang=content.lang )
h2 The Rocketeers stand.<br/> h2 The Rocketeers stand.<br/>
| Moon looms, rocket waits, eyes stare.<br/> | Moon looms, rocket waits, eyes stare.<br/>
| The sole thought is wen. | The sole thought is wen.
//- a( target='_blank' href='' ) Mint now
p Launching Soon™ //- p Launching Soon™
+rimg.stretch( src=site.system.url+'/assets/mike-kiev-Opzk_hvwO9Q-unsplash.jpg' ) +rimg.stretch( src=site.system.url+'/assets/mike-kiev-Opzk_hvwO9Q-unsplash.jpg' )
section#story section#story
p Until minted, each Rocketeer exists in a superposition of 10,000,000 possible identities. They are each unique, but share a foundational desire to reach the moon. p Until minted, each Rocketeer exists in a superposition of 10,000,000 possible identities. They are each unique, but share a foundational desire to reach the moon.
div.row
a( target='_blank' href='' ).button Mint now
a( target='_blank' href='' ).button.outline View on Opensea
//- section#usps //- section#usps
//- div.usp //- div.usp
//- p 🕶 //- p 🕶
@ -47,20 +51,30 @@ html( lang=content.lang )
//- //- a( href='/' ) View on Opensea //- //- a( href='/' ) View on Opensea
//- p Launching Soon™ //- p Launching Soon™
section#cta //- section#cta
+cimg.circle#compressed( size=200 src=site.system.url+'/assets/adam-miller-dBaz0xhCkPY-unsplash-cropped.jpg' ) //- +cimg.circle#compressed( size=200 src=site.system.url+'/assets/adam-miller-dBaz0xhCkPY-unsplash-cropped.jpg' )
//- a( href='/' ) Mint now //- a( href='/' ) Mint now
p Launching Soon™ //- //- p Launching Soon™
section#credits section#credits
h1 Acknowledgements h1 Acknowledgements
p Designs by unvetica.eth, code by mentor.eth, logistical support from colfax and LookingForOwls.
div.row.usps
div.usp
+cimg.circle( size=200 src=site.system.url+'/assets/adam-miller-dBaz0xhCkPY-unsplash-cropped.jpg' )
p NFT design components by unvetica.eth and team.
div.usp
+cimg.circle( size=200 src=site.system.url+'/assets/adam-miller-dBaz0xhCkPY-unsplash-cropped.jpg' )
p Contract, frontend and API code by mentor.eth
div.usp
+cimg.circle( size=200 src=site.system.url+'/assets/adam-miller-dBaz0xhCkPY-unsplash-cropped.jpg' )
p Logistical support by LookingForOwls and colfax
p Photos taken by Mike Kiev and Adam Miller. Illustrations by Katerina Limpitsouni. p Photos taken by Mike Kiev and Adam Miller. Illustrations by Katerina Limpitsouni.
section#about section#about
h1 About this project h1 About this project
p This is a Rocketpool community led initiative to fill the void between the present and mainnet. p This is a Rocketpool community inspired initiative to fill the void between the present and mainnet.
p We all hope to look back 10 years from now at our Rocketeers and remember the days when we asked silly questions like wen mainnet and wen moon. p We all hope to look back 10 years from now at our Rocketeers and remember the days when we asked silly questions like wen mainnet and wen moon.
include pug/_footer.pug include pug/_footer.pug