DEV Community

artydev
artydev

Posted on • Updated on

DML code your site or web app intirely in Javascript

I wrote a previous on BEADS language, although promising, being not open sourced is a pity.

So I present you an alternative DML, which does not necessitate any compiler as it's pure Javascript.

The idea of writing all an app in pure Javascript attracts me a lot.

Give an eye on the official site, Eckehard, the creator is a very nice guy.

Teaser :


<html lang="de">

<head>
  <meta charset="utf-8">
  <title>title</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://efpage.de/DML/DML_homepage/lib/DML-min.js"></script>
</head>

<body>
 <h1>
   DML sample from Eckehard
  </h1>
 <h2>Clock around the clock tonight...</h2>
  <div id="clocks" style="border: 2px solid black; padding: 10px; display: box;"></div>

  <h2>Demo SelectBase </h2>

 <div id="box" style="text-align:center;border: 2px solid black; padding: 10px; display: box;margin-top:10px"></div>

  <script>
    selectBase(box)
      br(); /* some space on top */
      button("show").onclick= () => b.style.display = "inline-block"; 
      br(2);
      let b = idiv("","width:200px;"+_box); /* create a box */
      selectBase(b); /* <-- from here, create inside box */
        let h = h3("This is a Box");
        print("Test text ",5); br();
        button("hide").onclick=()=> b.style.display = "none";
        br(2);
      unselectBase(); /* --> finish, continue outside */
      br(1); p("Text after the box")
    unselectBase();

  </script>
</body>

</html>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)