Skip to content

Django-LiveView/frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

Django LiveView Frontend

Django LiveView Frontend is a set of JavaScript functions that are responsible form managing everything that a backend developer would do.

What elements does it manage?

  • WebSocket connection.
  • Events.
  • Submit actions.
  • Capture the responses from the backend and place the HTML in the indicated place.
  • Form submission.
  • History management.
  • Show the page offline in case you lose your internet connection.

How does it work?

Events are manage by Stimulus, a JavaScript framework that allows you to create controllers that are responsible for managing a specific part of the DOM. The rest of the code is written in plain JavaScript.

Install

Option 1: CDN

Add the following line to your HTML.

<script defer type="module" src="https://cdn.jsdelivr.net/gh/Django-LiveView/frontend/js/main.js"></script>

Option 2: Manual

You only need to download the js folder and link main.js in your HTML file.

<script defer type="module" src="js/main.js"></script>

About

Assets for the Django LiveView frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published