diff options
author | Indrajith K L | 2024-06-21 13:18:29 +0530 |
---|---|---|
committer | Indrajith K L | 2024-06-21 13:18:29 +0530 |
commit | ff1da010408d49320253d5cda24777c547621ece (patch) | |
tree | 6842782e86194ba12a2336e28992ee98fb24f0a8 /src/views | |
parent | 1d422d90f8d923ea8644a65d37de7d2948f1ddc4 (diff) | |
download | indrajith-dev-crystal-ff1da010408d49320253d5cda24777c547621ece.tar.gz indrajith-dev-crystal-ff1da010408d49320253d5cda24777c547621ece.tar.bz2 indrajith-dev-crystal-ff1da010408d49320253d5cda24777c547621ece.zip |
HTMX and Strapi Integration
* Re-integrates HTMX
* Integrate STRAPI API
* Adds endpoints for fetching posts
* Adds HTMX area for loading recent posts
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/home.ecr | 7 | ||||
-rw-r--r-- | src/views/layout.ecr | 1 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/views/home.ecr b/src/views/home.ecr index fb4973f..2928a32 100644 --- a/src/views/home.ecr +++ b/src/views/home.ecr @@ -6,17 +6,14 @@ </p> </div> </div> - +<span hx-get="/posts" hx-trigger="load" hx-target="#result"></span> <div> <div> <h4>Books I'm reading now</h4> <div id="gr_grid_widget_1676363812"></div> </div> <h4>Recent Posts</h4> - <ul> - <!-- - li -> posts - --> + <ul id="result"> </ul> </div> <script src="https://www.goodreads.com/review/grid_widget/162656738.Indrajith's%20currently-reading%20book%20montage?cover_size=medium&hide_link=&hide_title=true&num_books=20&order=a&shelf=currently-reading&sort=date_added&widget_id=1676363812" type="text/javascript" charset="utf-8"></script> diff --git a/src/views/layout.ecr b/src/views/layout.ecr index 2a537ea..abb2dae 100644 --- a/src/views/layout.ecr +++ b/src/views/layout.ecr @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> <%= page_title %> | {indrajith.dev}</title> <link rel="stylesheet" href="/css/styles.css"> + <script src="https://unpkg.com/htmx.org@2.0.0"></script> <link rel="icon" href="/favicon.ico"> </head> <body> |