Browse Source

Add build support for the extra items

Getty Ritter 4 years ago
parent
commit
f7bc22da02
2 changed files with 26 additions and 8 deletions
  1. 3 1
      Makefile
  2. 23 7
      txt/template.mustache

+ 3 - 1
Makefile

@@ -7,11 +7,13 @@ build/icon-%.svg: diagrams/icon-%.svg
 	sed -i -e 's/height=[^>]*/height="1em"/g' $@
 	sed -i -e 's/width=[^>]*/width="1em"/g' $@
 
-build/payload.json: build/icon-heart.svg build/icon-relationship.svg
+build/payload.json: build/icon-heart.svg build/icon-relationship.svg build/icon-object.svg build/icon-stat.svg
 	bin/b64-payload \
 	  --raleway=/usr/share/fonts/TTF/Raleway-Medium.ttf \
 	  --trait-icon=build/icon-heart.svg \
 	  --relationship-icon=build/icon-relationship.svg \
+	  --object-icon=build/icon-object.svg \
+	  --stat-icon=build/icon-stat.svg \
 	  >build/payload.json
 
 build/template.html: txt/template.mustache build/payload.json

+ 23 - 7
txt/template.mustache

@@ -56,20 +56,36 @@
      }
      p { margin-left: 20pt; margin-right: 20pt; }
      a { text-decoration: none; color: #822; }
-     a[href="#background"]::after {
+     a[href="#backgrounds"]::after {
        content: "Background";
      }
-     a[href="#trait"]::before {
+
+     a[href="#traits"]::before {
        content: url(data:image/svg+xml;base64,{{trait-icon}});
      }
-     a[href="#trait"]::after {
-       content: " Trait";
+     a[href="#traits"]::after {
+       content: "Trait";
      }
-     a[href="#relationship"]::before {
+
+     a[href="#relationships"]::before {
        content: url(data:image/svg+xml;base64,{{relationship-icon}});
      }
-     a[href="#relationship"]::after {
-       content: " Relationship";
+     a[href="#relationships"]::after {
+       content: "Relationship";
+     }
+
+     a[href="#objects"]::before {
+       content: url(data:image/svg+xml;base64,{{object-icon}});
+     }
+     a[href="#objects"]::after {
+       content: "Object";
+     }
+
+     a[href="#stats"]::before {
+       content: url(data:image/svg+xml;base64,{{stat-icon}});
+     }
+     a[href="#stats"]::after {
+       content: "Stat";
      }
     </style>
   </head>