ujjwalguptaofficial / mahal Goto Github PK
View Code? Open in Web Editor NEWSimple, modern web application framework for UI development.
Home Page: https://mahaljs.com/
Simple, modern web application framework for UI development.
Home Page: https://mahaljs.com/
"model" directive to be improved to include two-way data binding with different HTML elements such as checkbox, select, textarea.
Show directive does not work in case of for loop with object as item
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}'
Not able to use expressions in the if
directive
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.
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.
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.
Since the concept is quite unique one, I really look forward to contribute to such a great idea ๐!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.