Git Product home page Git Product logo

mahal's Introduction

osnft GitHub version CI npm version

Mahal

Event based modern web application framework for UI development.

Features

  • Works without virtual DOM
  • Small in size but powerful - 7kb (minified + gzipped)
  • Truly reactive with two way binding
  • Better documenting - you can write documentation with yml syntax inside components
  • Event based architecture
  • Uses modern approach - class based components, decorators etc
  • Focuses on simplicity - simple API's and easy to learn

Install

npm i mahal

Docs

https://ujjwalguptaofficial.github.io/mahal-doc/

Examples

Check out repo - https://github.com/ujjwalguptaofficial/mahal-examples

Support

Support this project by adding stars, spreading the word.

We would be more grateful if you sponsor the project which allows us to keep developing, educate people, organize different events.

Contributors

You are very welcome to contribute, please see contributing guidelines - [Contribute].

mahal's People

Contributors

ujjwalguptaofficial avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mahal's Issues

Expressions in if

Title

Not able to use expressions in the if directive

Description

I'm not sure if that's supposed to work but I was expecting to be able to do

<span :if(tasks.length)>You have pending tasks</span>
or
<span :if(tasks.length > 0)>You have pending tasks</span>

I have to write a computed method that does that in the class which is fine if that's by design but I wasn't sure.

Show directive does not work in case of for loop with object as item

Title

Show directive does not work in case of for loop with object as item

Description

consider this code -

---
name: faq.mahal
description:
dateCreated: September 26, 2022
---

<html>
<div>
	<div class="title">
		Frequently asked questions
	</div>
	<div>
		<div :for(item,index in list) class="mt-2">
			<b @click="showFAQ(index)" class="is-flex is-justify-content-space-between is-cursor-pointer">
				<div>{{item.question}}</div>
				<i class="fa fa-chevron-down"></i>
			</b>
			<div :show(item.show) :html(item.answer)></div>
		</div>
	</div>
</div>
</html>

<script>
import { Component } from "mahal";

export default class extends Component {
    list = [
        {
            question: "What is NFT ?",
            answer: "NFT stands for non fungible tokens. It represents digital record of different art on blockchain. <br><br> The people who buys NFT's - they own the digital record of that art. People buy NFT due to multiple reasons - showcase (as there is only one NFT in whole world), investment , support the artist etc .",
        },
        
    ];

    showFAQ(index) {
        this.list[index] = {
            ...this.list[index],
            show: true,
        } as any;
    }
}
</script>

<style scoped>
</style>

The issue is mostly because prop for the directive is empty and thus no reactiveness. Here is how the directive data looks like -

'{"value":[null],"props":[],"params":[null],"isComponent":false}'

Improving the UI of the Mahal.js Library Website

Summary

Hi Ujjwal ๐Ÿ‘‹,

First of all Congratulations on bringing out this awesome idea into reality. I would like to suggest to improvise the UI of the Website for the Mahal.js. Currently the UI is a generic one, I would like to work on the design improvements for your website using trending UI principles.

Basic example

I am quite good at improvising the pre-existing websites. Some of the examples of my work are as follows:

https://instagram-clone-react-70113.web.app/

Similarly I would like to improve component by component for your website as well.

Motivation

Since the concept is quite unique one, I really look forward to contribute to such a great idea ๐ŸŽ‰!

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.