Skip to content

Commit 29e088e

Browse files
committed
Make static site pretty. Add railroad diagrams
1 parent 52e7460 commit 29e088e

File tree

8 files changed

+66
-55
lines changed

8 files changed

+66
-55
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ jobs:
5858
working-directory: ./dsl/dlang
5959
shell: bash
6060

61-
62-
6361
- name: Upload build artifacts
6462
uses: actions/upload-artifact@v2
6563
with:

dsl/dlang/langium-config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
},
1010
"monarch": {
1111
"out": "syntaxes/domain-lang.monarch.ts"
12+
},
13+
"railroad": {
14+
"out": "static/docs/syntax.html",
15+
"mode": "html"
1216
}
1317
}],
1418
"out": "src/language/generated"
File renamed without changes.

dsl/dlang/static/img/icon.png

16.3 KB
Loading

dsl/dlang/static/index.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html class="theme-light">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>DomainLang Playgound</title>
7+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css">
8+
<link href="styles.css" rel="stylesheet"/>
9+
</head>
10+
<body>
11+
<nav class="navbar is-black" role="navigation" aria-label="main navigation">
12+
<div class="navbar-brand">
13+
<a class="navbar-item" href="https://larsbaunwall.github.io/DomainLang">
14+
<img alt="DomainLang" src="img/icon.png" height="28" width="28"><span id="logo-text">DomainLang</span>
15+
</a>
16+
17+
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
18+
<span aria-hidden="true"></span>
19+
<span aria-hidden="true"></span>
20+
<span aria-hidden="true"></span>
21+
<span aria-hidden="true"></span>
22+
</a>
23+
</div>
24+
25+
<div id="navbarBasicExample" class="navbar-menu">
26+
<div class="navbar-start">
27+
<a class="navbar-item is-active" href="index.html">
28+
Playground
29+
</a>
30+
<a class="navbar-item" href="docs/syntax.html">
31+
Documentation
32+
</a>
33+
</div>
34+
</div>
35+
</nav>
36+
<section class="section">
37+
<div class="container">
38+
<h1 class="title">
39+
Try DomainLang in the playground!
40+
</h1>
41+
<div class="wrapper">
42+
<div id="monaco-editor-root"></div>
43+
</div>
44+
<script type="module">
45+
import { executeExtended } from './setupExtended.js';
46+
47+
// keep a reference to a promise for when the editor is finished starting, we'll use this to setup the canvas on load
48+
const startingPromise = executeExtended(document.getElementById('monaco-editor-root'));
49+
</script>
50+
</div>
51+
</section>
52+
</body>
53+
</html>

dsl/dlang/static/monacoExtended.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

dsl/dlang/static/setupExtended.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const setupConfigExtended = () => {
4545
}],
4646
userConfiguration: {
4747
json: JSON.stringify({
48-
'workbench.colorTheme': 'Default Dark Modern',
48+
'workbench.colorTheme': 'Default Light Modern',
4949
'editor.semanticHighlighting.enabled': true
5050
})
5151
}

dsl/dlang/static/styles.css

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,12 @@
1-
html,body {
2-
background: rgb(33,33,33);
3-
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
4-
color: white;
5-
margin: 0;
6-
}
7-
h1 {
8-
text-align: center;
9-
}
10-
footer {
11-
text-align: center;
12-
color: #444;
13-
font-size: 1.2rem;
14-
margin-bottom: 0.5rem;
15-
}
16-
a:link {
17-
color: gray;
18-
}
19-
a:visited {
20-
color: lightskyblue;
21-
}
221
/* for monaco */
23-
.wrapper {
24-
padding: 0 5%;
25-
}
262
#monaco-editor-root {
273
height: calc(100vh - 7.5rem - 70px);
4+
border: solid 1px lightgray;
285
}
6+
7+
#logo-text {
8+
font-weight: bold;
9+
color: white;
10+
padding-left: 15px;
11+
padding-right: 30px;
12+
}

0 commit comments

Comments
 (0)