summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-30 00:27:16 -0400
committerpommicket <pommicket@gmail.com>2023-08-30 00:27:16 -0400
commit57db51a7c8837d970b5785e1e6ed5e81dbae6f12 (patch)
tree44bd5a5bb67fd5fdd990918e3a39337d7244ea5a
parenteaff50ee1fb64f236ba715d2099a3a3011280c08 (diff)
misc nonsense
-rw-r--r--.gitignore1
-rw-r--r--Makefile6
-rw-r--r--guide-src/development/index.html7
-rw-r--r--guide-src/make.py2
-rw-r--r--index.html3
-rw-r--r--pugl.js2
6 files changed, 17 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index cc42ca3..c647576 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ scratch
*~
node_modules
guide
+public
diff --git a/Makefile b/Makefile
index 4590fa2..10de838 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,8 @@
+public-target: guide-target
+ rm -rf public
+ mkdir public
+ cp -r guide public
+ cp index.html style.css pugl.js move.svg x.svg favicon.ico public/
+
guide-target:
python3 guide-src/make.py
diff --git a/guide-src/development/index.html b/guide-src/development/index.html
index 717ff6d..c9a75d2 100644
--- a/guide-src/development/index.html
+++ b/guide-src/development/index.html
@@ -18,10 +18,15 @@ the main files of interest are <code>index.html</code> and <code>pugl.js</code>,
the JavaScript for pugl (hopefully it doesn't become too unmanageable to have just one file).
</p>
+<p>
+you can run <code>make</code> to generate a <code>public/</code> directory which has just the files
+that should be hosted.
+</p>
+
<h3>contributing to the guide</h3>
<p>
the guide is automatically generated from the files in <code>guide-src/</code> by <code>guide-src/make.py</code>
(you can also just run <code>make</code> to generate it), which is a simple script whose main purpose is adding
-a sidebar to all of the guide pages. any PNG files are automatically copied from <code>guide-src/</code> to <code>guide/</code>.
+a sidebar to all of the guide pages. any PNG/JPG/SVG files are automatically copied from <code>guide-src/</code> to <code>guide/</code>.
when you add or remove pages from the guide, you'll need to edit <code>guide-src/outline.txt</code>.
</p>
diff --git a/guide-src/make.py b/guide-src/make.py
index 6f03513..69a0fd1 100644
--- a/guide-src/make.py
+++ b/guide-src/make.py
@@ -10,7 +10,7 @@ os.makedirs(OUTPUT_DIR, exist_ok=True)
try:
for f in os.listdir(INPUT_DIR):
- if f.endswith('.png'):
+ if f.endswith('.png') or f.endswith('.svg') or f.endswith('.jpg') or f.endswith('.jpeg'):
shutil.copyfile(INPUT_DIR + '/' + f, OUTPUT_DIR + '/' + f)
elif not '.' in f:
os.makedirs(OUTPUT_DIR + '/' + f, exist_ok=True)
diff --git a/index.html b/index.html
index be3525b..950d0e7 100644
--- a/index.html
+++ b/index.html
@@ -77,7 +77,8 @@
</div>
<div id="error">error</div>
<dialog id="about-dialog">
- <h2>about pugl</h2>
+ <h2>pugl</h2>
+ <i><b>p</b>ommicket's <b>u</b>tility for <b>gl</b> shaders</i>
<hr>
<p>
pugl is a tool that lets you create &amp; share shaders without writing any code.
diff --git a/pugl.js b/pugl.js
index c6b63f8..a45b995 100644
--- a/pugl.js
+++ b/pugl.js
@@ -2,7 +2,7 @@
/*
TODO:
-- guide
+- multiple creations
*/
const APP_ID = 'dh3YgVZQdX1Q';