Changes:
* adds --listen-port for specifying http port to listen on.
* renames --port to --neptune-rpc-port which is clearer
* updates README accordingly
We use axum route wildcards to merge duplicate page routes and handlers
into a single route and handler.
This makes the routes simpler/cleaner as well as the handlers, as there
is now just one of each for each html page.
Previous:
.route("/block/:selector", get(block_page))
.route("/block/:selector/value", get(block_page_with_value))
New:
.route("/block/*selector", get(block_page))
This is achieved by replacing PathBlockSelector with
BlockSelectorExtended which wraps BlockSelector to provide parsing for
height_or_digest/value. (which is needed for javascript-free input
form)
Changes:
* merge dup handlers for each of block, block_digest, block_info
* merge routes for same
* add BlockSelectorExtended and HeightOrDigest
* remove PathBlockSelector
implements a generic solution to redirect query strings generated by
forms to path based URIs that can be handled by existing routes.
This eliminates the need for javascript that was doing the equivalent
client-side.
Changes:
+ present not-found page for unhandled uri paths, eg /stuff
+ display the tip-height on front page
+ add favicon and neptune logo to front page
+ use ServerDir instead of ServeFile for /image and /css
+ add help tooltips for fields on front page
+ use monospace font for digests
Changes:
1. integrates pico minimal responsive css framework for light/dark
themes and overall better looks.
2. adds a not-found page for bad url queries.
3. catches axum/serde deserialization errors of user input and routes
them to the not-found page with a helpful hint (parse error msg)