Commit Graph
83 Commits
Author SHA1 Message Date
Christian Svensson 349372ad82 style: fix horizontal scrollbar for some screen sizes (#3177)
On the Fresh docs, I get a vertical scrollbar for a small range of
viewport size of the browser. This is annoying me, since I get it when I
place two windows next to each other on a 21:9 screen.

The issue seems to stem from a button using `p-1 -m-1`. But the negative
margin is there to address the increased space due to making the button
easier to click (most likely for touch/mobile). But this makes the
button overflow when there is no right-margin (`2xl:mr-0`).

<img width="1637" height="661" alt="image"
src="https://github.com/user-attachments/assets/48773cf5-316d-41f3-99e0-54f49b1f2cc9"
/>

## Solution

The simplest and easiest fix here is just to increase the margin to
cover for this case. `2xl:mr-1` seems to do the trick. But it might be a
good idea to have a little more gap towards the edge of the screen, e.g.
`2xl-mr-2`.
2025-08-05 23:49:13 +02:00
Marvin Hagemeister 3ad3e6ecf3 feat: support lazily loading routes/handlers (#3131)
We can improve cold start times by only loading route modules when the particular pattern matches. This PR introduces the concept of lazy middlewares, routes and handlers to do that.
2025-07-25 14:33:28 +02:00
bb23643779 feat: support tailwindcss v4 (#3054)
update /www and tailwind-plugin to support tailwind v4.

Thanks to the merge of #3034, the work of integrating and advancing
#2903 is promoted.

related #3034 
related #2903 

close #3056
close #2819

--patch-1 
based on review,

1. del compiler and make it more clean and simple,
2.  fix init tailwind part,
3. fix test tailwind part

--patch-2

1. fix the docs 
2. fix the docs of plugin and version

--patch-3
1. Addressed various maintenance tasks (chores)
2. Updated the Tailwind CSS plugin to align with this release. Generated
a fresh project using the updated init configuration and
3. deployed it via Deno Deploy EA. Deployment is functioning correctly.

--patch-4
Move postcss imports to Tailwind section in init script

--patch-5
Refactored Tailwind plugin type definitions by copying PluginOptions
properties from @tailwindcss/postcss and adding Fresh-specific exclude
option, while exporting types from package entrypoint for better
accessibility.

Test Project: https://fresh.fresh-press.deno.net/
Test Project Repository:
https://github.com/SisyphusZheng/fresh-tailwindv4
Test Plugin: https://jsr.io/@freshpress/fresh-plugin-tailwind@1.0.0

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2025-07-21 16:13:34 +02:00
Marvin Hagemeister 776a275b5d docs: design updates (#3098)
Update colors, spacing and fix the toc animation.
2025-07-16 14:01:30 +02:00
Asher Gomez 20162f6896 chore: use lint tags (#2952) 2025-05-15 09:34:46 +02:00
Tim Reichen 0a634bd2d2 chore: fix lint errors (#2833)
This PR fixes current lint errors thrown by `deno lint`.
2025-03-05 12:31:25 +01:00
David MonaghanandMarvin Hagemeister b1f2a989a5 www: docs: feat: add dark mode (#2820)
- Added CSS vars for dark/light colors.
- Added dark/light theme toggle as Island

Fixes #2648

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2025-02-04 11:58:05 +01:00
Luca Casonato 65d61bd1d5 feat: add open telemetry instrumentation (#2786)
This commit adds some useful automatic instrumentation for when users
are using `--unstable-otel`:

- Fresh renames the span for incoming HTTP requests to `$METHOD $ROUTE`
and the `http.route` attribute is added.
- Fresh creates a span around FS route handlers, showing whether they
returned a response or data.
- Fresh creates a span around async components, showing how long they
took to execute.
- Fresh adds a span around preact rendering, showing how long rendering
takes.
- Fresh adds a span around static file serving, showing how long it took
and whether there were requests without a cache bust key.

We can improve this in the future with more telemetry, such as metrics.
2024-12-10 15:03:50 +01:00
Marvin HagemeisterandLuca Casonato de8f1b0c59 feat: update for Deno 2 (#2655)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-30 18:30:30 +02:00
Luca Casonato c3ec742a65 feat: import fresh from fresh (#2479)
Instead of importing as `@fresh/core`.
2024-06-05 14:51:35 +02:00
Tim Hårek Andreassen a9b552945a www: Add aria-hidden to icons and illustrations (#2494)
Added `aria-hidden="true"` to all decorative icons and illustrations.

If there are any questions, suggestions or anything, please let me know
:)

Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
2024-06-05 00:05:59 +02:00
Marvin Hagemeister 287929e4d2 major: import Fresh 2.0 code (#2449)
🎉
2024-05-24 09:40:08 +02:00
Josh Collinsworth 990357629e Chore: styling and verbiage cleanup (#2451)
- Better responsive styling of header, logo, nav menu and docs sidebar
- Specify UTC on homepage (since we can't localize server-side)
- Minor copy updates
2024-05-23 12:12:47 -05:00
Josh Collinsworth 120d867d2d Fix CTA graphic (#2446) 2024-05-22 14:30:45 -05:00
Josh Collinsworth 8ef3e89a8c Change side-by-side sections to sticky (#2445) 2024-05-22 12:08:41 -05:00
Marvin Hagemeister e4981d30ad www: rework docs layout (#2429)
- Re-enable partials
- clean up layout a bit
2024-05-21 17:38:32 +02:00
Marvin Hagemeister 25d4d16a8f www: fully remove component gallery (#2430) 2024-05-17 18:39:32 +02:00
Josh CollinsworthandMarvin Hagemeister e8d1a68b58 www: refresh home page (#2418)
Overhauls the Fresh homepage with a new design, new demos, and new
sections highlighting Fresh's capabilities.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-05-17 16:08:55 +02:00
Reed von Redwitz 82c75f85e9 fix: update dependency recommendations (#2320)
closes https://github.com/denoland/fresh/issues/2319

The issue is because `imports.ts` wasn't changed before releasing. I
thought I would go through and bump some other versions as well. This
handles everything except the esbuild stuff and `tests/`.
2024-02-19 10:33:04 +01:00
David Luis 8d01051b5b docs: fix carousel not working properly (#2222)
Currently, the [Carousel component](https://fresh.deno.dev/components)
only shows "slide four" without moving to other slides.
This PR will fix that issue.
2024-01-10 10:31:06 +01:00
Reed von Redwitz 15929d37bd docs: fix navigating to components from docs with small screen (#2198)
closes https://github.com/denoland/fresh/issues/2190

Marvin, I noticed that adding the fix
[here](https://github.com/denoland/fresh/blob/a8a43ff0d4ed7ae9958a09f37ce8dadf219f76e1/www/components/Header.tsx#L41)
did not resolve the issue. I see the docs say `Partials are enabled by
adding a f-client-nav attribute to an HTML element` -- is it expected
that adding `f-client-nav={false}` to a component does not automatically
apply it to html element children?
2024-01-09 11:48:24 +01:00
Marvin Hagemeister 9af63be308 fix: switch back to URLPattern for correctness (#2151) 2023-12-07 09:40:07 +01:00
Marvin Hagemeister de55d80dee docs: improve design (#2097) 2023-11-29 22:50:51 +01:00
Reed von Redwitz 6a90fdbf1b docs: switch to aria-current in active links page (#2019) 2023-11-28 17:32:48 +01:00
Marvin Hagemeister bb035ae8da docs: port over to TailwindCSS (#2058) 2023-11-22 11:12:21 +01:00
Marvin Hagemeister 7578e50ee3 docs: fix regression in navigation (#2047) 2023-11-16 10:38:13 +01:00
Craig Doremus b5816cd001 feat(tests): add fresh-testing-library tests (#1990) 2023-11-15 18:25:13 +01:00
Marvin Hagemeister 57054d29b3 docs: fix header nav (#1941) 2023-10-15 08:43:42 +02:00
Birk SkyumandMarvin Hagemeister eb41b65d4c docs: Enhanced CSR Layout (#1908)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-10-12 12:23:37 +00:00
Marvin Hagemeister 534a0d87b3 docs: improve sidebar active style (#1888) 2023-10-07 21:05:54 +02:00
Marvin Hagemeister 9fdb0d5b01 docs: use builtin active link detection (#1850) 2023-10-04 14:34:42 +02:00
ryu a98704b076 www: remove extra whitespace in class (#1758) 2023-09-09 20:05:26 +00:00
Marvin Hagemeister 4a921d91b2 www: remove counters in sidebar (#1624) 2023-08-12 17:56:47 +02:00
Marvin Hagemeister e0bd5969e8 www: fix agolia being initialized twice (#1598) 2023-08-05 23:42:39 +02:00
Lino Le Van 5ba19abe13 fix: typos (#1526) 2023-07-26 13:09:42 +00:00
Tim Hårek Andreassen 9cae8fdd5c www: improve accessbility (#1507) 2023-07-22 20:23:42 +02:00
Roj d1e78095be www: consistently spell Fresh (#1504) 2023-07-22 13:02:31 +02:00
Yuri Gabriel Ferreira Lisboa 920869c5da feat: improve Hero responsiveness (#1468) 2023-07-17 15:06:34 +02:00
Marvin Hagemeister f061667822 www: update docs design (#1423) 2023-07-10 11:07:49 +02:00
Lino Le Van 292b4c2d6f chore: bump dependencies (#1428) 2023-07-08 22:47:12 +02:00
Marvin Hagemeister bf3e82c093 www: add versioning to docs (#1400) 2023-07-04 12:33:47 +02:00
Marvin Hagemeister 18bf977052 www: landing page redesign (#1279) 2023-06-30 18:45:46 +02:00
Marvin Hagemeister 45da639aa3 www: add discord icon + blog link (#1276) 2023-06-12 13:26:59 +02:00
Marvin Hagemeister 12bb00eae1 fix(search): work around inline click handler (#1267)
Preact, like most other popular frameworks disallows passing stringified
JavaScript code as event handlers. We have one occurrence of that in our
doc search. The recent addition of including `preact/debug` during
server rendering in #1256 surfaced this problem.

This PR works around that by injecting a tiny script tag that attaches
the event handler. Basically only a slightly different approach than
before.
2023-06-09 18:57:31 +02:00
ayame113 a724f6c591 www: fix accessibility issues (#1243)
Address accessibility issues pointed out by Lighthouse.
2023-06-03 22:19:40 +02:00
Asher Gomez 8fa4141e06 refactor: replace useState() with useSignal() (#1234) 2023-06-02 06:43:01 +10:00
Oliver Jenny ff3d754fbd fix typo (#1192) 2023-05-19 19:06:20 +10:00
ryu 4a7ecb6168 chore: update tabler_icons_tsx version (#1159) 2023-05-12 01:12:18 +09:00
ryu e1b00bfd34 fix(www): docs title align center (#1158) 2023-05-11 13:58:52 +09:00
Taylor Young ab73242933 docs: Carousel Component (#1096) 2023-04-27 04:51:13 +09:00