Code Monkey home page Code Monkey logo

mithril-by-examples's Introduction

Mithril.js by Examples

The missing addition to Mithril.js website with many up-to-date code examples that are often searched for and just work...

https://mithril-by-examples.js.org

What is this?

Mithril.js by Examples was created for new users including me to learn Mithril.js - a JavaScript framework for building brilliant applications.

This website itself is a simple wrapper for the wonderful Flems - a static browser code playground. It contains numerous Mithril.js code samples that can be seen, reviewed and run. Besides that all examples can be searched or can be listed by tags, contributes, or levels.

But the best thing is: The code snippets are up-to-date and just work!

Mithril.js Resources

Official

Community

  • Zulip Chat
  • Use #mithriljs on Twitter and other social media.

Getting started

The website is built using Eleventy, a simpler static site generator.

Clone this repository:

git clone https://github.com/tbreuss/mithril-by-examples.git

Navigate to the directory:

cd mithril-by-examples

Install dependencies:

npm install

Run local web server and watch for changes:

npx eleventy --serve --port=8081

Open http://localhost:8081 with your favorite browser.

More information about command line usage can be found on Eleventy's website.

Contributing

If you're interested in contributing to Mithril.js by Examples, please read our contributing guide.

mithril-by-examples's People

Contributors

darshanhirekurubar avatar dependabot[bot] avatar kannanjayachandran avatar namangirdhar16 avatar narayand16 avatar tbreuss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mithril-by-examples's Issues

Polish the design

I better layout would be nice.

  • Can be really simple
  • Must be responsive
  • Must include the Mithril logo
  • Must include syntax highlighting
  • Must include a footer with several links

同学,您这个项目引入了300个开源组件,存在1个漏洞,辛苦升级一下

检测到 tbreuss/mithril-by-examples 一共引入了300个开源组件,存在1个漏洞

漏洞标题:Socketio Engineio 资源管理错误漏洞
漏洞编号:CVE-2020-36048
漏洞描述:Socketio Engineio是Socketio社区的一个基于Javascript用于浏览器与设备进行双向通信的实时引擎。
Socketio Engine.IO before 4.0.0 存在安全漏洞,攻击者可利用该漏洞通过对长轮询传输的POST请求导致拒绝服务(资源消耗)。
影响范围:(∞, 4.0.0)
最小修复版本:4.0.0
缺陷组件引入路径:[email protected]>@11ty/[email protected]>[email protected]>[email protected]>[email protected]

另外还有几个漏洞,详细报告:https://mofeisec.com/jr?p=n50cc9

Add Favicon

I.e. the one from the official Mithril.js website.

Add mithril logo to layout

Add the mithril logo to the base layout.

The logo should be a svg as used by the mithril.js website itself.

Add how to contribute page

Add a "How to Contribute" page with all of the information a user needs to know in order to contribute to this repository.

Move button for Live Flems Example towards top of the page

Hey there 👋 great site, I think this is a great (and updated) alternative to the live examples on the official Mithril site.

One small suggestion I have is moving the Live Example buttons closer to the tops of their respective pages (see screenshot of an example). Not saying it should be under the description, but I definitely think it should be closer to the top of the page. My reasoning is three-fold:

  1. Many users (including me) may want to see what exactly the demo is before I see the code
  2. Flems examples already include the code!
  3. I love the site, but I often find myself scrolling alot just to get to the live example button on each demo

Thoughts welcome.

image

Add API endpoint GET /api/examples.json

Create API endpoint GET /api/examples.json adding a corresponding JSON file that includes certain front matter data from the files within the examples directory.

Instructions to do so can be found here: https://dev.to/mattwaler/creating-json-files-with-eleventy-13lk.

The API endpoint musst be:

  • GET /api/examples.json

The data from front matter must include:

  • title
  • date
  • tags
  • level
  • version
  • authors
  • credits
  • links
  • content without markup (if possible)

The goal is to have an API with several endpoints (in the end) starting with this one.

Edit example levels

Since we have some sort of automatically generated text blocks and the example level from front matter data is part if this, all levels of all examples must be edited accordingly.

Optimize search

Search is OR based at the moment, when using multiple terms.
We should switch to an AND based search.

Todo

  • Switch from OR to AND
  • Show number of search results
  • Store last search in local storage
  • Split input words with regex filtering multiple spaces

Implement a search page

Add a search page and implement a search functionality using Mithril.js, of course.

  • add a new page by name "search"
  • add this page to the above navigation before about
  • use the api endpoints like:
    • /api/examples.json
    • /api/tags.json
  • add a new layout template (if necessary)

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.