Skip to content

Commit

Permalink
Reintegration of Basic Effects Templates
Browse files Browse the repository at this point in the history
Fix #146  through the completion of #152
  • Loading branch information
Gulix committed Jan 31, 2017
1 parent 238d47c commit b83f3c3
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
55 changes: 55 additions & 0 deletions src/js/templates/basic-effects.json
@@ -0,0 +1,55 @@
{
"styles": [
{
"key": "default",
"name": "Default Style",
"description": "Basic Template for a card of various effect (for any type of game)",
"canvasBackground": "#EEEEEE",
"canvasWidth": 340,
"canvasHeight": 495,
"fields": [
{ "name": "name", "label": "Name", "default": "Some Basic Effects" },
{ "name": "description", "type": "multiline", "label": "Description", "default": "Here comes some short description of the effect" },
{ "name": "effect", "type": "richtext", "label": "Effect", "default": "<p>The full description of the effect, with possibilities to set <strong>bold</strong> and <i>italic</i> text.</p>" },
{ "name": "displayTag", "label": "Display Tags ?", "type": "checkbox", "default": false },
{ "name": "tag", "label": "Tags", "default": "Tag" },
{ "name": "displayImage", "label": "Display Image ?", "type": "checkbox", "default": true },
{ "name": "image", "type": "image", "label": "Image", "ratio": 1.5619 }
],
"canvasFields": [
{ "type": "image", "left": 6, "width": 328, "top": 40, "height": 210, "src": "$image", "visible": "?displayImage" },
{ "type": "textbox", "text": "$name$", "fontSize": 32, "fontFamily": "FrederickatheGreat", "width": 340, "top": 10, "textAlign": "center" },
{ "type": "textbox", "text": "$description$", "fontSize": 14, "fontFamily": "JosefinSlab", "fontStyle": "italic", "width": 320, "left": 10, "top": "{{if (card[displayImage]) value = 260; else value = 50}}", "textAlign": "center" },
{ "type": "textbox", "text": "$effect$", "styles": "£effect", "fontSize": 16, "fontFamily": "JosefinSlab", "width": 330, "left": 5, "top": "{{if (card[displayImage]) value = 300; else value = 90}}", "textAlign": "left", "backgroundColor": "#DDDDDD" },
{ "type": "textbox", "text": "$tag$", "fontSize": 18, "fontFamily": "FrederickatheGreat", "width": 335, "top": 475, "textAlign": "right", "visible": "?displayTag" }
]
},
{
"key": "pictureless",
"basedOn": "default",
"name": "Default Style (without a picture)",
"description": "Basic Template for a card of various effect (for any type of game)",
"fields": [
{ "name": "displayImage", "ignored": true },
{ "name": "image", "ignored": true }
],
"canvasFields": [
{ "type": "image", "ignored": true },
{ "type": "textbox", "text": "$description$", "fontSize": 14, "fontFamily": "JosefinSlab", "fontStyle": "italic", "width": 320, "left": 10, "top": "50", "textAlign": "center" },
{ "type": "textbox", "text": "$effect$", "styles": "£effect", "fontSize": 16, "fontFamily": "JosefinSlab", "width": 330, "left": 5, "top": "90", "textAlign": "left", "backgroundColor": "#DDDDDD" },
{ "type": "textbox", "text": "$tag$", "fontSize": 18, "fontFamily": "FrederickatheGreat", "width": 335, "top": 475, "textAlign": "right", "visible": "?displayTag" }
]
}
],
"fonts": [
{ "fontFamily": "FrederickatheGreat", "src": "https://fonts.gstatic.com/s/frederickathegreat/v5/7Es8Lxoku-e5eOZWpxw18hsRj2C0BvLNQqKHRdEu66Y.woff2" },
{ "fontFamily": "JosefinSlab", "src": "https://fonts.gstatic.com/s/josefinslab/v6/46aYWdgz-1oFX11flmyEfegdm0LZdjqr5-oayXSOefg.woff2" },
{ "fontFamily": "JosefinSlab", "src": "https://fonts.gstatic.com/s/josefinslab/v6/etsUjZYO8lTLU85lDhZwUhMBlNeli-0RcAdOFWWLdxQ.woff2", "fontStyle": "italic" }
],
"description": {
"description": "Basic Template for a card of various effect (for any type of game)",
"title":"Basic - Effects",
"credits": "by Nicolas Ronvel",
"url": "https://github.com/Gulix/geckos/"
}
}
4 changes: 3 additions & 1 deletion src/js/templates/load-templates.js
@@ -1,12 +1,13 @@
define([
'json!templates/arabesque-event.json',
'json!templates/AuNomEmpereurCharacter.json',
'json!templates/basic-effects.json',
'json!templates/bloodbowl-starplayerv3.json',
'json!templates/pulpalley-charactercard.json',
'json!templates/pulpalley-fortunecard.json',
'json!templates/wquest-silvertower-herocard.json'],
function(
tpl1, tpl2, tpl3, tpl4, tpl5, tpl6)
tpl1, tpl2, tpl3, tpl4, tpl5, tpl6, tpl7)
{ return { load: function() {
var list = [ ];
list.push(tpl1);
Expand All @@ -15,6 +16,7 @@ list.push(tpl3);
list.push(tpl4);
list.push(tpl5);
list.push(tpl6);
list.push(tpl7);
return list;

} }; });

0 comments on commit b83f3c3

Please sign in to comment.