From 77b430668db6cc0f5098dd92f7d84413bdd9f94d Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 22 Sep 2026 19:40:04 +0200 Subject: WIP: view: dart: Detect page --- view/dart/ceres.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/view/dart/ceres.dart b/view/dart/ceres.dart index 541e6ff..86073b6 100644 --- a/view/dart/ceres.dart +++ b/view/dart/ceres.dart @@ -1,6 +1,19 @@ import 'package:web/web.dart' as web; +final RegExp recipeRegex = RegExp(r'^\/recipe\/(\d+)$'); + void main() { print('Dart infrastructure is available.'); print('Window location: `${web.window.location}`'); + + if (recipeRegex.hasMatch(web.window.location.pathname)) { + recipe(); + return; + } + + print('Frontend code is inactive for this path `${web.window.location.pathname}`.'); +} + +void recipe() { + print('Handling /recipe page.'); } -- cgit v1.3.1