Skip to content

Commit f7815c2

Browse files
committed
updating viewer template stl link
1 parent abf1fd5 commit f7815c2

File tree

5 files changed

+14
-43
lines changed

5 files changed

+14
-43
lines changed

dist/assets/scad.viewer.njk

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,18 @@
106106
</head>
107107

108108
<body>
109-
<!-- Details & Code / Left Side -->
109+
{# Details & Code / Left Side #}
110110
<div id="info">
111111
<h1>{{ title }}</h1>
112-
<table>
113-
<tr>
114-
<td>
115-
<strong>SCAD</strong>
116-
</td>
117-
<td>{{ page.inputPath }}</td>
118-
</tr>
119-
<tr>
120-
<td>
121-
<strong>STL</strong>
122-
</td>
123-
<td>
124-
<a href="{{ stlFileUrl }}">{{ stlFile }}</a>
125-
</td>
126-
</tr>
127-
</table>
128-
<h4>File Content</h4>
112+
<h3><a href="./{{ stlFile }}">Download {{ stlFile }}</a></h3>
113+
<h2>File Content</h2>
129114
<pre>{{ content | safe }}</pre>
130115
</div>
131116

132-
<!-- Container for STL / Right Side -->
117+
{# Container for STL / Right Side #}
133118
<div id="viewer"></div>
134119

135-
<!-- Three.js Renderer -->
120+
{# Three.js Renderer #}
136121
<script type="module">
137122
import * as THREE from "three"
138123
import { OrbitControls } from "three/addons/controls/OrbitControls.js"

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ function EleventyPluginOpenSCAD(eleventyConfig, options) {
591591
return async (data) => {
592592
try {
593593
if (noSTL) {
594-
_log(`${cyan("Would write")} ${data.stlFile} ${gray(`from ${inputPath}`)}`);
594+
_log(`${gray("Skipping write of")} ${reset(data.stlFile)} ${gray(`from ${inputPath}`)}`);
595595
return inputContent;
596596
}
597597
const elevenDirs = data.eleventy.directories;

src/assets/scad.viewer.njk

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,18 @@
106106
</head>
107107

108108
<body>
109-
<!-- Details & Code / Left Side -->
109+
{# Details & Code / Left Side #}
110110
<div id="info">
111111
<h1>{{ title }}</h1>
112-
<table>
113-
<tr>
114-
<td>
115-
<strong>SCAD</strong>
116-
</td>
117-
<td>{{ page.inputPath }}</td>
118-
</tr>
119-
<tr>
120-
<td>
121-
<strong>STL</strong>
122-
</td>
123-
<td>
124-
<a href="{{ stlFileUrl }}">{{ stlFile }}</a>
125-
</td>
126-
</tr>
127-
</table>
128-
<h4>File Content</h4>
112+
<h3><a href="./{{ stlFile }}">Download {{ stlFile }}</a></h3>
113+
<h2>File Content</h2>
129114
<pre>{{ content | safe }}</pre>
130115
</div>
131116

132-
<!-- Container for STL / Right Side -->
117+
{# Container for STL / Right Side #}
133118
<div id="viewer"></div>
134119

135-
<!-- Three.js Renderer -->
120+
{# Three.js Renderer #}
136121
<script type="module">
137122
import * as THREE from "three"
138123
import { OrbitControls } from "three/addons/controls/OrbitControls.js"

src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export function EleventyPluginOpenSCAD(
160160
try {
161161
if (noSTL) {
162162
_log(
163-
`${cyan("Would write")} ${data.stlFile} ${gray(`from ${inputPath}`)}`,
163+
`${gray("Skipping write of")} ${reset(data.stlFile)} ${gray(`from ${inputPath}`)}`,
164164
);
165165
return inputContent;
166166
}

test/_11ty/test.eleventy-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default function (eleventyConfig) {
1414

1515
addOpenSCADPlugin(eleventyConfig, {
1616
launchPath: "docker",
17-
verbose: true,
17+
noSTL: true,
18+
// verbose: true,
1819
});
1920
}

0 commit comments

Comments
 (0)