Commit graph

30 commits

Author SHA1 Message Date
86727fc723 Ideas 2025-02-02 2025-02-02 15:50:39 +01:00
937d3d3cfb Add clamping of perspective origin in Viewport
If there are elements deep into the viewport near the top or bottom they
will end up obscured by the edge of the viewport when scrolling.  This
may be undesirable in some cases.  Implement a clamping of the allowed
range of the perspective origin to give better control over the
perspective and what it obscures.
2025-02-02 15:46:53 +01:00
8a600420b5 Set perspective-origin directly
Workaround issue in Safari where setting the perspective origin using a
var() expression for one of the axes does not apply correctly causing
the 3d parallax effect to be lost.
2025-02-02 15:46:53 +01:00
e5ba70d6a9 Prevent perspective shifts when browser toolbar hides
When scrolling the page on mobile and the toolbar gets hidden or made
visible again as a result of scrolling the browser reports the size of
the page having changed when the scrolling ends, which in turn causes
perspective shifts when the finger is lifted from the screen.

Try to work around this by anticipating this resize and calculating the
perspective as if the screen hadn't changed size.

While window.visibleViewport and window.screen in theory could have been
used to determine exactly where and when the browser toolbar is present,
it was found through testing that neither Chrome nor Firefox on Android
reports useful values through these APIs, and instead pretended that the
inner viewport was the whole screen.
2025-02-02 15:46:53 +01:00
78d3f56672 Adjust perspective origin if viewport is near vertical edges
If the origin is set to the center of the screen for a small 3d element
that's near the top or bottom, then it looks out of place and can't be
scrolled to fit nicely in view.  Adjust the origin to stay inside the
bounds of the viewport when scrolled to the edge of the screen in this
case.
2025-02-02 15:46:31 +01:00
e62b947c42 Break words to prevent overflow
Prefer breaking words instead of overflowing the containers they are
inside of.  This prevents the site from scrolling to the right on
extraordinarily narrow screens.
2025-02-02 15:36:21 +01:00
9e39cd2388 Set viewport size to inital width
Declare the website width as being responsive to agents so that it
renders at a friendly size on devices that emulate a scaled viewport
by default.
2025-02-02 15:36:14 +01:00
03edcf777a Add sandbox.html page for development tests
Establish a playground for trying out complex components and styles
without having to use them in a content page.  This starts out as a
testing ground for the 3d Viewport.
2025-02-02 15:35:48 +01:00
49a329ac43 Add 3d Viewport component
Implement a Viewport component and associated update script that allows
rendering 3d content inside it.  This is based on the implementation
used at Furnavia for their 2025 website.
2025-02-02 15:34:16 +01:00
c8527f17f7 Reorganise source files into src and web
Use a more traditional source code layout with the code located in the
src/ dir and static web content in the web/ dir, while the other places
are for data not related to code or content.
2025-02-02 10:37:42 +01:00
82323c9158 Add development HTTP server
Add an HTTP server for development purposes that replies to requests
with both the static resources and on the fly generated pages.  This
serves the following needs.

- Modern module scripts requires an origin supporting CORS policies,
  which is not supported when pages are read from disk by the browser.

- Provide a way for implemting automatic reloading of pages when changes
  are made to the source files.

- Act as the starting point for making interactive features such as
  comments and analytics.
2025-02-02 10:03:55 +01:00
f708088ef7 Re-organise cli.ts into functions and sub-commands
Add the necessary boilerplate for cli.ts to provide more than one
command, with the resource gathering step split out from the build
step in order for it to be re-usable.
2025-02-01 16:25:45 +01:00
1efd21a4a0 Specify autistic in my header 2025-02-01 07:41:43 +01:00
6788e77e1b Ideas 2025-02-01 2025-02-01 07:41:20 +01:00
25f6a65981 Links 2025-01-27 2025-01-27 13:52:38 +01:00
5ae2bf387c Ideas 2025-01-27 2025-01-27 13:52:29 +01:00
7f8132d33e Draft links page 2025-01-25 10:46:08 +01:00
db0ec6f797 Add space between paragraphs and lists 2025-01-25 08:58:15 +01:00
f7bc525310 Early draft of website content 2025-01-25 08:58:08 +01:00
ef8aaa6f6d Ignore absolute URIs when resolving refs
Do not output bogus warnings in the case of links that goes to other
websites.
2025-01-25 08:52:08 +01:00
cf3229423b Fix create folder logic in cli.js
The paths changed in d003ea01 to start with a forward slash, this broke
the create folder detection logic as now it matched the first slash of
the path instead of sub-folder in the path.  Fix by ignoring the first
character in the path.
2025-01-25 08:41:25 +01:00
ac1b1f13f4 Clean up whitespace in tsconfig.json 2025-01-22 09:11:29 +01:00
4236ddd5fa Reduce confusion from import elison
Set verbatimModuleSyntax to reduce possible confusion around which
imports stay and which gets removed by TypeScript's import elision.
2025-01-22 09:07:07 +01:00
cf3610f6ff Use stable scroll-gutter
Reserve space for the scrollbar to prevent horsontal layout shift of the
page when navigating from a page with a scrollbar to one without.
2025-01-22 09:05:39 +01:00
d003ea01d0 Use absolute refs transformed to relative
Write all links as absolute refs from the virtual root of the website's
path namespace and then transform these into relative links with the
resolveRefs utility function.
2025-01-22 09:03:37 +01:00
17f8693eae Add resolveRefs transform
Provide a transformation function that maps absolute references to
resources into relative references based on the location of a page.
This makes it possible to use the same links across multiple pages
in the hierarchy that works when loaded as files from the filesystem.
2025-01-22 08:58:48 +01:00
7aa937a7e9 Use source maps
Enable source map output and use it to get better line reporting.
2025-01-22 07:16:43 +01:00
fed46dbb4a Port cli.js to TypeScript 2025-01-22 07:16:01 +01:00
8fb809fa95 Scaffold basic page layout and site generation
Set up the basic layout of the site and greybox its content based on
statically generated pages.  Content pages uses general base layouts
defined centrally to avoid duplicating code.
2025-01-22 05:52:21 +01:00
51b458103b Scaffold project structure
Setup vcs, editor, language, and package configs for a basic site
generator using TSX to build an html website.
2025-01-21 07:56:15 +01:00