Skip to content

Commit 9bf4c88

Browse files
committed
Add tutorial badges and improve layout in index.html; format import statements in tutorial HTML files
1 parent e340d22 commit 9bf4c88

File tree

4 files changed

+72
-44
lines changed

4 files changed

+72
-44
lines changed

FEAScript-website.css

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
/* ______ ______ _____ _ _
2-
| ____| ____| /\ / ____| (_) | |
3-
| |__ | |__ / \ | (___ ___ ____ _ ____ | |_
4-
| __| | __| / /\ \ \___ \ / __| __| | _ \| __|
5-
| | | |____ / ____ \ ____) | (__| | | | |_) | |
6-
|_| |______/_/ \_\_____/ \___|_| |_| __/| |
7-
| | | |
8-
|_| | |_
9-
Website: https://feascript.com/ \__| */
10-
111
* {
122
margin: 0;
133
padding: 0;
@@ -214,6 +204,17 @@ mjx-container {
214204
color: #555;
215205
}
216206

207+
.tutorials-list .badge {
208+
display: inline-block;
209+
background-color: #f7e7b7;
210+
color: #333;
211+
font-size: 90%;
212+
padding: 0.2em 0.8em;
213+
border-radius: 8px;
214+
margin-right: 0.5em;
215+
margin-top: 0.3em;
216+
}
217+
217218
/* Footer styles */
218219
footer {
219220
position: relative;
@@ -243,6 +244,12 @@ footer {
243244
li {
244245
max-width: 400px;
245246
}
247+
.tutorials-section {
248+
padding: 15px;
249+
}
250+
.tutorials-list li a {
251+
font-size: 100%;
252+
}
246253
}
247254

248255
/* Medium screens: 500px to 1000px */
@@ -268,6 +275,9 @@ footer {
268275
li {
269276
max-width: 900px;
270277
}
278+
.tutorials-section {
279+
padding: 15px;
280+
}
271281
}
272282

273283
/* Large screens: 1000px to 1300px */

index.html

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ <h2 id="gettingstarted"><a name="Getting Started"></a>Getting Started</h2>
160160
<p>There are two ways to create simulations with FEAScript:</p>
161161
<ul>
162162
<li>
163-
<strong>JavaScript API:</strong> For developers comfortable with coding, the JavaScript API provides
164-
full programmatic control. It runs in three environments: in the browser with a simple HTML page, via
165-
Node.js for server-side applications, or with online interactive notebooks.
163+
<strong>JavaScript API (FEAScript Core):</strong> For developers comfortable with coding, the
164+
JavaScript API provides full programmatic control. It runs in three environments: in the browser with
165+
a simple HTML page, via Node.js for server-side applications, or with online interactive notebooks.
166166
</li>
167167
<li>
168168
<strong>Visual Editor (FEAScript Platform):</strong> The
@@ -415,36 +415,51 @@ <h2 id="tutorials"><a name="Tutorials"></a>Tutorials</h2>
415415
into your own websites and applications - or how to use the FEAScript platform visual editor for a
416416
no-code experience.
417417
</p>
418-
<ul>
419-
<li>
420-
<strong>Heat Conduction Through a Wall</strong>:
421-
<a href="https://feascript.com/tutorials/HeatConduction1DWall.html">API (browser-based)</a>
422-
|
423-
<a href="https://feascript.com/tutorials/HeatConduction1DWallPlatform.html">FEAScript platform</a>
424-
</li>
425-
<li>
426-
<strong>Heat Conduction in a Two-Dimensional Fin</strong>:
427-
<a href="https://feascript.com/tutorials/HeatConduction2DFin.html">API (browser-based)</a>
428-
|
429-
<a href="https://feascript.com/tutorials/HeatConduction2DFinWorker.html"
430-
>API (browser-based with web worker)</a
431-
>
432-
|
433-
<a href="https://feascript.com/tutorials/HeatConduction2DFinGmsh.html"
434-
>API (browser-based with Gmsh mesh)</a
435-
>
436-
|
437-
<a href="https://feascript.com/tutorials/HeatConduction2DFinPlatform.html">FEAScript platform</a>
438-
</li>
439-
<li>
440-
<strong>Solidification Front Propagation in a Two-Dimensional Domain</strong>:
441-
<a href="https://feascript.com/tutorials/SolidificationFront2D.html">API (browser-based)</a>
442-
|
443-
<a href="https://feascript.com/tutorials/SolidificationFront2DWorker.html"
444-
>API (browser-based with web worker)</a
445-
>
446-
</li>
447-
</ul>
418+
<div class="tutorials-section">
419+
<ul class="tutorials-list">
420+
<li>
421+
<em>Heat Conduction Through a Wall&nbsp;</em>
422+
<span class="badge"
423+
><a href="https://feascript.com/tutorials/HeatConduction1DWall.html">Basic</a></span
424+
>
425+
<span class="badge"
426+
><a href="https://feascript.com/tutorials/HeatConduction1DWallPlatform.html"
427+
>Visual Editor</a
428+
></span
429+
>
430+
</li>
431+
<li>
432+
<em>Heat Conduction in a Two-Dimensional Fin&nbsp;</em>
433+
<span class="badge"
434+
><a href="https://feascript.com/tutorials/HeatConduction2DFin.html">Basic</a></span
435+
>
436+
<span class="badge"
437+
><a href="https://feascript.com/tutorials/HeatConduction2DFinWorker.html">Multi-threaded</a></span
438+
>
439+
<span class="badge"
440+
><a href="https://feascript.com/tutorials/HeatConduction2DFinGmsh.html"
441+
>Unstructured Gmsh mesh</a
442+
></span
443+
>
444+
<span class="badge"
445+
><a href="https://feascript.com/tutorials/HeatConduction2DFinPlatform.html"
446+
>Visual Editor</a
447+
></span
448+
>
449+
</li>
450+
<li>
451+
<em>Solidification Front Propagation in a 2D Domain&nbsp;</em>
452+
<span class="badge"
453+
><a href="https://feascript.com/tutorials/SolidificationFront2D.html">Basic</a></span
454+
>
455+
<span class="badge"
456+
><a href="https://feascript.com/tutorials/SolidificationFront2DWorker.html"
457+
>Multi-threaded</a
458+
></span
459+
>
460+
</li>
461+
</ul>
462+
</div>
448463
<p>
449464
Please report any feedback on the above tutorials to the GitHub
450465
<a href="https://github.com/orgs/FEAScript/discussions">Discussions</a> or

tutorials/HeatConduction2DFinWorker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ <h2 id="results"><a name="Results"></a>Results</h2>
195195
//import { FEAScriptWorker, plotSolution, printVersion } from "https://core.feascript.com/dist/feascript.esm.js";
196196

197197
//Import FEAScript library from a local directory
198-
//import { FEAScriptWorker, plotSolution, printVersion } from "../../FEAScript-core/src/index.js";
198+
// import { FEAScriptWorker, plotSolution, printVersion } from "../../FEAScript-core/src/index.js";
199199

200200
window.addEventListener("DOMContentLoaded", async () => {
201201
if (window.innerHeight > window.innerWidth) {

tutorials/SolidificationFront2DWorker.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ <h2 id="results"><a name="Results"></a>Results</h2>
196196
// Web Workers cannot be properly initialized when importing from the bundled file.
197197
//import { FEAScriptWorker, plotSolution, printVersion } from "https://core.feascript.com/dist/feascript.esm.js";
198198

199+
//Import FEAScript library from a local directory
200+
// import { FEAScriptWorker, plotSolution, printVersion } from "../../FEAScript-core/src/index.js";
201+
199202
window.addEventListener("DOMContentLoaded", async () => {
200203
if (window.innerHeight > window.innerWidth) {
201204
document.getElementById("orientation-message").style.display = "block";

0 commit comments

Comments
 (0)