Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Kitten

HTML template compiler

Created to get read of closing tags, simplify syntax and replace so many javascript libraries/frameworks

Installation

curl -o kitten https://kitten.tronlang.org/v/latest
sudo mv kitten /usr/local/bin/
sudo chmod +x /usr/local/bin/kitten

Usage/Examples

import[from:components/nav; element:$1; as:Nav; ]
import[from:components/footer; element:$2; as:Footer; ]

Nav[]
div[classname:header;]{
   p[]{"Welcome to the Kitten!"}
   span[]{
    (){
      return localStorage.getItem("name");
    }
  }
}
Footer[]
  • import[from:components/nav; element:$1; as:Nav; ] - imports element with key:$1 attribute from components/nav.kitten as Nav[]
  • div[classname:header]{} same as
  • (){return localStorage.getItem("name")} - returns item "name" from localstorage

Compiling

kitten run <filename>
  • <filename> - name of the .kitten file (main.kitten, index.kitten, blog.kitten)

Documentation

kitten.tronlang.org

About

HTML template compiler

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages