Merge branch 'feature/spells' into develop

# Conflicts:
#	css/style.css
#	index.html
#	js/language.js
#	lang/main-en.json
#	spells.html
This commit is contained in:
Lucas 2023-03-12 22:00:35 +01:00
commit f034968c51
31 changed files with 76873 additions and 102 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
*.psd
*.pdf

15
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://127.0.0.1:5500",
"webRoot": "${workspaceFolder}"
}
]
}

11
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,11 @@
{
"json.schemas": [
{
"fileMatch": [
"data/spells/*.json"
],
"url": "/./.vscode/spells-schemas.json"
}
],
}

306
.vscode/spells-schemas.json vendored Normal file
View file

@ -0,0 +1,306 @@
{
"$comment": "TODO: Subdivide the schema to have a common definition for each data (spells, books, creatures)",
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/object1678401116.json",
"title": "Root",
"type": "object",
"required": ["spell"],
"properties": {
"spell": {
"$id": "#root/spell",
"title": "Spell",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items",
"title": "Items",
"type": "object",
"required": [
"recid",
"name",
"source",
"page",
"srd",
"level",
"school",
"time",
"range",
"components",
"duration",
"desc"
],
"properties": {
"recid": {
"$id": "#root/spell/items/recid",
"title": "Recid",
"type": "integer",
"examples": [0],
"default": 0,
"description": "unique id for the spell, for localization purpose",
"uniqueItems": true,
"autoIncrement": true
},
"name": {
"$id": "#root/spell/items/name",
"title": "Name",
"type": "string",
"default": "",
"examples": ["Acid Arrow"],
"pattern": "^.*$"
},
"source": {
"$id": "#root/spell/items/source",
"title": "Source",
"description": "what's the source. Each enum is a book code",
"type": "string",
"default": "GRI01",
"enum": ["GRI01", "ENC01", "CRE01", "GRI02", "ENC02", "CRE02"],
"examples": ["GRI01"],
"pattern": "^.*$"
},
"page": {
"$id": "#root/spell/items/page",
"description": "in the book, page source",
"title": "Page",
"type": "integer",
"examples": [110],
"default": 0
},
"srd": {
"$id": "#root/spell/items/srd",
"description": "is srd or a creation",
"title": "Srd",
"type": "boolean",
"examples": [true],
"default": true
},
"level": {
"$id": "#root/spell/items/level",
"title": "Level",
"type": "integer",
"examples": [2],
"default": 0
},
"school": {
"$id": "#root/spell/items/school",
"description": " 'A' : Abjuration,'C' : Conjuration, 'D': Divination, 'E': Enchantment, 'N': Necromancy, 'T' : Transmutation, 'I' : Illusion, 'V' : Evocation",
"enum": ["A", "C", "D", "E", "I", "N", "T", "V"],
"title": "School",
"type": "string",
"examples": ["E"],
"pattern": "^.*$"
},
"time": {
"$id": "#root/spell/items/time",
"title": "Time",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/time/items",
"title": "Items",
"type": "object",
"required": ["number", "unit"],
"properties": {
"number": {
"$id": "#root/spell/items/time/items/number",
"title": "Number",
"type": "integer",
"examples": [1],
"default": 0
},
"unit": {
"$id": "#root/spell/items/time/items/unit",
"title": "Unit",
"type": "string",
"default": "",
"examples": ["action"],
"pattern": "^.*$"
}
},
"dependentRequired": {
"number": ["unit"]
}
}
},
"range": {
"$id": "#root/spell/items/range",
"title": "Range",
"type": "object",
"required": ["type", "distance"],
"properties": {
"type": {
"$id": "#root/spell/items/range/type",
"title": "Type",
"type": "string",
"default": "point",
"examples": ["point"],
"pattern": "^.*$",
"enum": ["point", "cone", "sphere", "cylinder", "special"],
"description": "point by default, but can be cone, sphere, cylinder, special "
},
"distance": {
"$id": "#root/spell/items/range/distance",
"title": "Distance",
"type": "object",
"required": ["type", "amount"],
"properties": {
"type": {
"$id": "#root/spell/items/range/distance/type",
"title": "Type",
"type": "string",
"default": "",
"examples": ["feet"],
"pattern": "^.*$"
},
"amount": {
"$id": "#root/spell/items/range/distance/amount",
"title": "Amount",
"type": "integer",
"examples": [90],
"default": 0
}
}
}
}
},
"components": {
"$id": "#root/spell/items/components",
"title": "Components",
"type": "object",
"properties": {
"v": {
"$id": "#root/spell/items/components/v",
"title": "V",
"type": "boolean",
"examples": [true],
"default": true
},
"s": {
"$id": "#root/spell/items/components/s",
"title": "S",
"type": "boolean",
"examples": [true],
"default": true
},
"m": {
"$id": "#root/spell/items/components/m",
"title": "M",
"type": "string",
"default": "",
"examples": ["powdered rhubarb leaf and an adders stomach"],
"pattern": "^.*$"
}
}
},
"duration": {
"$id": "#root/spell/items/duration",
"title": "Duration",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/duration/items",
"title": "Items",
"type": "object",
"required": ["type"],
"properties": {
"type": {
"$id": "#root/spell/items/duration/items/type",
"title": "Type",
"type": "string",
"enum": ["timed", "permanent", "special", "instant"],
"default": "",
"examples": ["instant"],
"pattern": "^.*$"
}
}
}
},
"concentration": {
"$id": "#root/spell/items/concentration",
"title": "Concentration",
"type": "boolean",
"default": false
},
"desc": {
"$id": "#root/spell/items/desc",
"title": "Desc",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/desc/items",
"title": "Items",
"type": "string",
"description": "A description for the entry. Do not copy-paste gameplay infos to prevent copyright",
"default": "",
"examples": [
"A shimmering green arrow streaks toward a target within range and bursts in a spray of acid."
],
"pattern": "^.*$"
}
},
"damageInflict": {
"$id": "#root/spell/items/damageInflict",
"title": "Damageinflict",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/damageInflict/items",
"title": "Items",
"type": "string",
"default": "",
"examples": ["acid"],
"pattern": "^.*$"
}
},
"savingThrow": {
"$id": "#root/spell/items/savingThrow",
"title": "Savingthrow",
"description": "array of saving Throw available",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/savingThrow/items",
"title": "Items",
"type": "string",
"default": "",
"enum": ["Dex", "Str", "Sag", "Cha", "Int", "Con"],
"examples": [""],
"pattern": "^.*$",
"minItems": 1,
"uniqueItems": true
}
},
"miscTags": {
"$id": "#root/spell/items/miscTags",
"title": "Misctags",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/miscTags/items",
"title": "Items",
"type": "string",
"default": "",
"examples": [""],
"pattern": "^.*$"
}
},
"areaTags": {
"$id": "#root/spell/items/areaTags",
"title": "Areatags",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/areaTags/items",
"title": "Items",
"type": "string",
"default": "",
"examples": [""],
"pattern": "^.*$"
}
}
}
}
}
}
}

37
README
View file

@ -1,37 +0,0 @@
## Spells
### JSON structure
| field | type | value |
| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id | _number_ | unique id for the spell, for localization purpose |
| name | _string_ | spell's name |
| source | _number_ | where the spell is coming from |
| page | _number_ | page source |
| srd | _boolean_ | is this a srd or a creation |
| level | _number_ | spell's level |
| school | _string_ | spell school : "A" : Abjuration,"C" : Conjuration, "D": Divination, "E": Enchantment, "N": Necromancy, "T" : Transmutation, "I" : Illusion, "V" : Evocation |
| time | _array_ | incantation time |
| time.number | _number_ | |
| time.unit | _string_ | |
| range | _module_ | |
| range.type | _string_ | point by default, but can be cone, sphere, cylinder, special |
| range.distance | _module_ | |
| range.distance.type | _string_ | feet or meter or other unit measure |
| range.distance.amount | _number_ | amount of distance in `range.distance.type` |
| components | _module_ | |
| components.v | _boolean_ | verbal component |
| components.s | _boolean_ | somatic component |
| components.m | _string_ | materials components |
| duration | _array_ | |
| duration.type | _string_ | timed, permanent, special or instant |
| duration.duration | _module_ | |
| duration.duration.type | _string_ | minute or hours |
| duration.duration.amount | _number_ | amount of `duration.duration.type` |
| concentration | _boolena_ | does spell need concentration ? |
| desc | _array_ | markdown description of the spell |
| damageInflict | _string_ | |
| conditionInflict | _string_ | |
| savingThrow | _array_ | array of string of saving Throw available |
| miscTags | _array_ | |
| | | |

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# FateforgeTools
A suite of tools for Fateforge players and Masters.
### Lib
- bryntum-grid
- water.css
- data localize
- jquery
- w2ui

View file

@ -25,7 +25,9 @@
Français
</button>
<h1>FateforgeTools</h1>
<a href="index.html">
<h1>FateforgeTools</h1>
</a>
<div class="gallery"></div>

View file

@ -123,4 +123,40 @@
}
.flickity-button {
background: #588597;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: stretch;
}
.list-col{
flex-grow: 2;
min-width: 600px;
}
.view-col {
flex-grow: 1;
}
@media screen and (min-width: 768px) {
.list-col {
margin-right: 1%;
}
.view-col {
max-width: 600px;
}
}
.w2ui-grid-data {
color: black;
word-wrap: normal;
}
.w2ui-grid .w2ui-grid-body table td.w2ui-grid-data > div {
overflow: visible;
white-space: break-spaces;
}
.w2ui-grid .w2ui-grid-body table {
}

1691
css/water.css Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
{
"spell": [
{
"id": 0,
"recid": 0,
"name": "Acid Arrow",
"source": "GRI",
"source": "GRI01",
"page": 110,
"srd": true,
"level": 2,
@ -35,14 +35,13 @@
"A shimmering green arrow streaks toward a target within range and bursts in a spray of acid."
],
"damageInflict": ["acid"],
"savingThrow": [""],
"miscTags": ["", ""],
"areaTags": ["", ""]
},
{
"id": 1,
"recid": 1,
"name": "Acid Blob",
"source": "GRI",
"source": "GRI01",
"page": 110,
"srd": false,
"level": 1,
@ -73,7 +72,44 @@
"A yellowish bubble shoots from your pointed finger toward a creature of your choice within range"
],
"damageInflict": ["acid"],
"savingThrow": [""],
"miscTags": ["", ""],
"areaTags": ["", ""]
},
{
"recid": 2,
"name": "Acid Splash",
"source": "GRI01",
"page": 126,
"srd": true,
"level": 1,
"school": "I",
"time": [
{
"number": 1,
"unit": "action"
}
],
"range": {
"type": "point",
"distance": {
"type": "feet",
"amount": 60
}
},
"components": {
"v": true,
"s": true
},
"duration": [
{
"type": "instant"
}
],
"desc": [
"You hurl a bubble of acid. "
],
"damageInflict": ["acid"],
"savingThrow": ["Dex"],
"miscTags": ["", ""],
"areaTags": ["", ""]
}

View file

@ -1,9 +1,9 @@
{
"spell": [
{
"id": 0,
"recid": 0,
"name": "Flèche Acide",
"source": "GRI",
"source": "GRI01",
"page": 188,
"srd": true,
"level": 2,
@ -40,9 +40,9 @@
"areaTags": ["", ""]
},
{
"id": 1,
"recid": 1,
"name": "Bille Acide",
"source": "GRI",
"source": "GRI01",
"page": 134,
"srd": false,
"level": 1,
@ -76,6 +76,44 @@
"savingThrow": ["Constitution"],
"miscTags": ["", ""],
"areaTags": ["", ""]
},
{
"recid": 2,
"name": "Aspersion acide",
"source": "GRI01",
"page": 126,
"srd": true,
"level": 1,
"school": "I",
"time": [
{
"number": 1,
"unit": "action"
}
],
"range": {
"type": "point",
"distance": {
"type": "m",
"amount": 18
}
},
"components": {
"v": true,
"s": true
},
"duration": [
{
"type": "instant"
}
],
"desc": [
"Vous lancez une bulle dacide. "
],
"damageInflict": ["acid"],
"savingThrow": ["Dexterity"],
"miscTags": ["", ""],
"areaTags": ["", ""]
}
]
}

25
footer.html Normal file
View file

@ -0,0 +1,25 @@
<small style="text-align: center;">
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/">
<a property="dct:title" rel="cc:attributionURL" href="http://fateforge.tool">fateforge.tool</a>
by <span property="cc:attributionName">Lucastucious</span> is licensed
under
<a href="http://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1" target="_blank"
rel="license noopener noreferrer" style="display: inline-block">CC BY-NC 4.0<img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" /></a>
</p>
<div class="CUVD">
<p data-localize="CUVD">CUVD
<p data-localize="link"></a>
</div>
</small>

View file

@ -1,36 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>fateforge-tools</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css" />
<link rel="stylesheet" href="css/water.css" />
<link href="css/all.min.css" rel="stylesheet" />
<link rel="icon" type="image/x-icon" href="/img/FateforgeTool_logo_80.png">
<link rel="icon" type="image/png" href="/img/FateforgeTool_logo_80.png">
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize-dev.js"></script>
</head>
<body>
<button onclick="changeLangEN()">🇺🇸 English</button>
<header>
<button onclick="changeLangEN()">English</button>
<button onclick="changeLangFR()">🇫🇷 Français</button>
<h1>FateforgeTools</h1>
<div data-localize="desc">
A suite of tools for Fateforge players and Masters.
</div>
<a href="index.html">
<h1>FateforgeTools</h1>
</a>
<div data-localize="desc">
A suite of tools for Fateforge players and Masters.
</div>
</header>
<br>
<div class="tools">
<button onclick="window.location.href='spells.html';">
<div><i class="fa-solid fa-wand-sparkles"></i></div>
<div data-localize="btn-spells">spells</div>
</button>
<button onclick="window.location.href='monsters.html';">
<button onclick="window.location.href='monsters.html';" disabled>
<div><i class="fa-solid fa-dragon"></i></div>
<div data-localize="btn-monsters">monsters</div>
</button>
<button onclick="window.location.href='items.html';">
<button onclick="window.location.href='items.html';" disabled>
<div><i class="fa-solid fa-hand-sparkles"></i></div>
<div data-localize="btn-items">items</div>
</button>
@ -40,35 +46,12 @@
</button>
</div>
<footer style="text-align: center;">
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/">
<a property="dct:title" rel="cc:attributionURL" href="http://fateforge.tool">fateforge.tool</a>
by <span property="cc:attributionName">Lucas Peter</span> is licensed
under
<a href="http://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1" target="_blank"
rel="license noopener noreferrer" style="display: inline-block">CC BY-NC 4.0<img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" /></a>
</p>
<div class="CUVD" > <p data-localize="CUVD">CUVD
<p data-localize="link"></a></div>
</footer>
<div id="footer"></div>
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize.js"></script>
<script type="text/javascript" src="js/language.js"></script>
<script type="text/javascript" src="js/footer.js"></script>
<script async type="text/javascript" src="js/language.js"></script>
<script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
<script rel="preload" src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
</body>

6
js/footer.js Normal file
View file

@ -0,0 +1,6 @@
$(function () {
$("#footer").load("footer.html",function (responseTxt, statusTxt, xhr) {
console.log("bla");
$("[data-localize]").localize("main", { pathPrefix: "lang" });
});
});

View file

@ -17,6 +17,8 @@ function changeLangFR() {
});
currentLang = "fr";
}
// This code defines a function that sets the language to English.
function changeLangEN() {
$("[data-localize]")
.localize("main", {
@ -41,4 +43,4 @@ function refreshBooks() {
// Function to fill a data-localize attribute and update DOM
function setLocalizeDataAttr(className, dataValue) {
$("#" + className).data("localize", dataValue).attr("data-localize", dataValue);
}
}

View file

@ -0,0 +1,108 @@
// Get the spell json based on choosen language defaultLanguage
var jsonsource = "".concat(
"../data/spells/spells-grimoire-",
$.defaultLanguage.slice(0, 2),
".json"
);
var alldata;
// Fetch data from server
fetch(jsonsource)
.then((response) => response.json())
.then((data) => {
// load fetched data into grid
alldata = data.spell;
console.log(alldata);
//document.getElementById("spell-list")
var grid = $("#spell-list").w2grid({
name: "Spells",
box: "#spellgrid",
show: {
header: false,
toolbar: true,
footer: false,
selectColumn: true,
},
multiSelect: true,
liveSearch: true,
multiSearch: true,
fixedBody: false,
records: alldata,
columns: [
{
field: "name",
text: "Name",
sortable: true,
resizable: true,
searchable: { operator: "contains" },
},
{
field: "desc",
text: "Description",
size: "500%",
style: "test",
resizable: true,
searchable: { operator: "contains" },
render(record, extra) {
return (
'<a href="http://w2ui.com" target="_blank" title="Click Me!"><u>' +
extra.value +
"</u></a>"
);
},
},
{
field: "source",
text: "Source",
sortable: true,
tooltip: "Which book is this from ?",
searchable: { operator: "contains" },
},
{ field: "page", text: "Page", sortable: true },
{ field: "level", text: "Level", sortable: true, size: 65 },
{ field: "school", text: "School", sortable: true },
{
field: "components",
text: '<span data-localize="gridColumns.components">Components</span>',
render(record) {
var v = record.components.v
? '<span data-localize="verbal">V</span>'
: "";
var s = record.components.s ? '<span data-localize="somatic">S</span>' : "";
var m = record.components.m ? '<span data-localize="material">M</span>' : "";
//var m = record.components.m ? record.components.m : "";
var vs=v.concat(', ',s);
return vs.concat(', ',m);
if ((record.components.v = true)) {
console.log(record.components);
}
},
},
{ field: "duration", text: "Duration" },
],
async onSelect(event) {
await event.complete;
console.log("select", event.detail, this.getSelection());
},
onClick(event) {
let record = this.get(event.detail.recid);
//grid2.clear()
/*grid2.add([
{ recid: 0, name: 'ID:', value: record.recid },
{ recid: 1, name: 'First Name:', value: record.fname },
{ recid: 2, name: 'Last Name:', value: record.lname },
{ recid: 3, name: 'Email:', value: record.email },
{ recid: 4, name: 'Date:', value: record.sdate }
])*/
console.log(record);
},
async onRefresh(event) {
await event.complete;
console.log("Le tableau est généré et le DOM est modifié.");
$("[data-localize]").localize("main", { pathPrefix: "lang" }); // mettre votre script ici
}
})
});

View file

@ -9,5 +9,10 @@
"btn-items": "Magic Items",
"CUVD": "Unofficial site for Fateforge RPG. Uses copyrighted content © Agate RPG, courtesy of the publisher under the CUVD license.",
"link": "Join the community: <a href='https://fateforge.org/en'>https://fateforge.org/en</a>",
"verbal": "Verbal",
"somatic": "Somatic",
"gridColumns":{
"components": "Components"
},
"btn-books": "Books"
}

View file

@ -87,8 +87,11 @@ http://keith-wood.name/localisation.html
notifyDelegateLanguageLoaded(intermediateLangData);
return loadLanguage(pkg, lang, level + 1);
};
errorFunc = function () {
if (level === 2 && lang.indexOf("-") > -1) {
errorFunc = function (xhr, status, error) {
if (status === "error" && xhr.status === 404) {
// Le fichier n'existe pas
console.log("Le fichier " + file + " n'existe pas.");
} else if (level === 2 && lang.indexOf("-") > -1) {
return loadLanguage(pkg, lang, level + 1);
} else if (options.fallback && options.fallback !== lang) {
return loadLanguage(pkg, options.fallback);
@ -101,6 +104,11 @@ http://keith-wood.name/localisation.html
timeout: options.timeout != null ? options.timeout : 500,
success: successFunc,
error: errorFunc,
statusCode: {
404: function() {
console.log("Le fichier " + file + " n'existe pas.");
}
}
};
if (window.location.protocol === "file:") {
ajaxOptions.error = function (xhr) {

3720
lib/w2ui/w2ui-1.5.css Normal file

File diff suppressed because one or more lines are too long

21501
lib/w2ui/w2ui-1.5.js Normal file

File diff suppressed because it is too large Load diff

1
lib/w2ui/w2ui-1.5.js.map Normal file

File diff suppressed because one or more lines are too long

2
lib/w2ui/w2ui-1.5.min.css vendored Normal file

File diff suppressed because one or more lines are too long

2
lib/w2ui/w2ui-1.5.min.js vendored Normal file

File diff suppressed because one or more lines are too long

3714
lib/w2ui/w2ui.css Normal file

File diff suppressed because one or more lines are too long

22158
lib/w2ui/w2ui.es6.js Normal file

File diff suppressed because it is too large Load diff

486
lib/w2ui/w2ui.es6.min.js vendored Normal file

File diff suppressed because one or more lines are too long

22350
lib/w2ui/w2ui.js Normal file

File diff suppressed because it is too large Load diff

2
lib/w2ui/w2ui.min.css vendored Normal file

File diff suppressed because one or more lines are too long

486
lib/w2ui/w2ui.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,7 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -9,23 +10,69 @@
<title>Spells - fateforge.tools</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css" />
<link href="css/all.min.css" rel="stylesheet" />
<link href="css/water.css" rel="stylesheet" />
<link type="text/css" rel="stylesheet" href="lib/w2ui/w2ui.css" />
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="icon" type="image/x-icon" href="/img/FateforgeTool_logo_80.png">
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize-dev.js"></script>
</head>
<body>
<button onclick="changeLangEN()">English</button>
<button onclick="changeLangFR()">Français</button>
<h1>FateforgeTools</h1>
<h2 data-localize="btn-spells">Spells</h2>
<header>
<button onclick="changeLangEN()">English</button>
<button onclick="changeLangFR()">Français</button>
<a href="index.html">
<h1>FateforgeTools</h1>
</a>
</header>
<h2 data-localize="btn-spells">Spells</h2>
<!--<div class="container" style="display: flex;flex-direction: row;flex-wrap: wrap;">-->
<div class="container" ">
<div class=" list-col" id="spell-list">
<!-- FILL WITH JS-->
</div>
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize.js"></script>
<script type="text/javascript" src="js/language.js"></script>
<script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
<div class="view-col" id="content">
<table id="pagecontent" class="view" style="border:solid">
<td class="initial-message">Select a spell from the list to view it here</td>
</table>
</div>
</div>
<div id="footer"></div>
<script type="text/javascript" src="lib/w2ui/w2ui.js"></script>
<script type="text/javascript" src="lib/w2ui/w2ui.es6.js"></script>
<script type="module" src="js/spells.js"></script>
<script type="text/javascript" src="js/footer.js"></script>
<script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/language.js"></script>
</body>
</html>

57
test-w2ui.html Normal file
View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<title>W2UI Demo: grid/6</title>
<link rel="stylesheet" type="text/css" href="https://rawgit.com/vitmalina/w2ui/master/dist/w2ui.min.css">
</head>
<body>
<div id="grid" style="min-width: 300px;max-width:900px;height: 300px;"></div>
<br>
<script type="module">
import { w2grid } from 'https://rawgit.com/vitmalina/w2ui/master/dist/w2ui.es6.min.js'
let grid = new w2grid({
name: 'grid',
box: '#grid',
show: { selectColumn: true },
multiSelect: true,
columns: [
{ field: 'recid', text: 'ID', size: '50px' },
{ field: 'lname', text: 'Last Name', size: '30%' },
{ field: 'fname', text: 'First Name', size: '30%' },
{ field: 'email', text: 'Email', size: '40%' },
{ field: 'sdate', text: 'Start Date', size: '120px' }
],
records: [
{ recid: 1, fname: 'John', lname: 'Doe', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 3, fname: 'Jin', lname: 'Franson', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 4, fname: 'Susan', lname: 'Ottie', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 5, fname: 'Kelly', lname: 'Silver', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 6, fname: 'Francis', lname: 'Gatos', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 7, fname: 'Mark', lname: 'Welldo', email: 'jdoe@gmail.com', sdate: '4/3/2012' },
{ recid: 8, fname: 'Thomas', lname: 'Bahh', email: 'jdoe@gmail.com', sdate: '4/3/2012' }
],
async onSelect(event) {
await event.complete
console.log('select', event.detail, this.getSelection())
}
})
window.multi = function(el) {
grid.multiSelect = el.checked
grid.selectNone()
grid.refresh()
}
window.selColumn = function(flag) {
grid.show.selectColumn = flag
grid.refresh()
}
</script>
</body>
</html>