Giter Site home page Giter Site logo

htmx-prototype's Introduction

htmx-prototype

Prototype of using HTMX with Asp.Net Core instead of JavaScript UI framework

Requirements

You need to implement certain behaviours (functionality) to see HTMX in usage:

  • infinite scroll with loading of new items
  • sending and validation forms, including images
  • autosave on typing with debounce
  • pasing new html into existing page
  • using boost

Implementation

We don't need authorization for now, let's not complicate.

Home page should contain form to add new item and list of all items. List sholud be lazily loaded using infinite scroll. Form should have image field and several validations. When product is successfully added into database htmx should add item for this html at the top of current list (without refreshing whole page and without loading all products from start).

Product Edit page should save changes on typing but with debounce (waiting untill stops typing).

As well there should be product details page.

Tech Stack

  • Asp.Net Core
  • Pico CSS
  • HTMX

Remove jQuery and Bootstrap and any other unnesessary libraries. Download htmx and pico css minified files and serve as static ones, don't forget version.

htmx-prototype's People

Contributors

dimitri-fliud avatar mariia-shcherbak avatar roman-koshchei avatar

Stargazers

 avatar Rick Graner avatar

htmx-prototype's Issues

Delete MUST NOT reload all items

Fix delete of item. Item itself should disappear.
All other items should not be effected!
No reloading of all items. Just remove this one.

Form image field

Image field should be not a link, but FILE.

<input type="file" />

Use hx-boost

To make pages load more smoothly, add hx-boost attribute to body.
Read more about what it does in docs, simple thing.

Form validation

Required fields should be required! I want to see also validation for image file size (no more than 5MB).
If more then html should show error. This validation should happen on backend.

Sort items

Sort items by name or by creation date/time

Fix routing

When I click on Privacy in navbar I get super strange route:

image

Fix it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.