Skip to content

librasteve/raku-HTMX-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WORK IN PROGRESS

Contributions welcome - by PR please if possible.

See Issues for feature discussions.

HTMX EXAMPLES

This repository provides a raku Cro implementation of the HTMX examples from https://htmx.org/examples.

GETTING STARTED

Install raku - eg. from rakubrew, then:

Install Cro

  • zef install --/test cro
  • zef install Cro::WebApp

Install this repo

  • git clone https://github.com/librasteve/raku-HTMX-Examples.git
  • cd raku-HTMX-Examples && zef install .

Make a Cro server

  • cro stub http examples examples (OK all the defaults)
  • cp -R lib static templates ./examples

Run and view it

  • cd examples && cro run
  • Open a browser and go to http://localhost:20000

You will note that cro has many other options as documented at Cro if you want to deploy to a production server.

TIPS & EXTRAS

  • In development set CRO_DEV=1 in the environment
  • You can use warn $data.raku; $*ERR.flush; to say to the cro log window
  • The Keyboards Shortcut on htmx.org is flaky on my mac - this example replicates the htmx.org behaviour but probably needs tweaking
  • The Dialogs - Pico example is new, using JS from the htmx.org sandbox

AUTHOR

librasteve [email protected]

COPYRIGHT AND LICENSE

Copyright 2024 Contributors

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Releases

No releases published

Packages

No packages published