Initial page, based on the version on feuforeve.fr

This commit is contained in:
Feufochmar 2016-04-17 20:41:02 +02:00
commit 76f05b9386
3 changed files with 4270 additions and 0 deletions

50
beleth.css Normal file
View File

@ -0,0 +1,50 @@
body {
background-color: hsla(330, 80%, 45%, 1.0);
margin-left: 5%;
margin-right: 5%;
color: hsla(330, 10%, 15%, 1.0);
border-color: hsla(330, 10%, 95%, 1.0);
}
h1 {
margin: 1px;
padding: 1px;
color: hsla(330, 10%, 95%, 1.0);
}
h2 {
margin: 1px;
padding: 1px;
}
article {
background-color: #E9C6EB;
border-style: solid;
border-width: thin;
border-radius: 5px;
margin: 2px;
padding: 10px;
text-align: center;
}
section {
margin-left: 5px;
}
p {
margin-left: 7px;
}
a:link {
color: hsla(330, 80%, 45%, 1.0);
text-decoration: none;
}
a:visited {
color: hsla(330, 40%, 25%, 1.0);
text-decoration: none;
}
a:hover {
color: hsla(330, 90%, 90%, 1.0);
text-shadow: 1px 0px 2px hsla(330, 80%, 45%, 1.0), -1px 0px 2px hsla(330, 80%, 45%, 1.0), 0px 1px 2px hsla(330, 80%, 45%, 1.0), 0px -1px 2px hsla(330, 80%, 45%, 1.0), 0px 0px 0.2em hsla(330, 80%, 45%, 1.0)
}

79
index.html Normal file
View File

@ -0,0 +1,79 @@
<!DOCTYPE html>
<html>
<head>
<title>Toy Cat Creator</title>
<meta charset="UTF-8" />
<link href="beleth.css" rel="stylesheet" type="text/css" media="all" />
<script>
function utf8_to_b64(str) {
return window.btoa(unescape(encodeURIComponent(str)));
}
function b64_to_utf8(str) {
return decodeURIComponent(escape(window.atob(str)));
}
function updateLink(h) {
/* h is an array of integers - convert it to a string */
console.log("UpdateLink: " + h);
var strBuffer = "";
for (var i = 0; i < h.length; ++i) {
strBuffer += String.fromCharCode(h[i]);
}
/* Convert the string into a base64 string */
var encoded = utf8_to_b64(strBuffer);
document.getElementById('preset.link').innerHTML='<a href="#' + encoded + '">Link to current selection</a>';
}
function hashToIntegers(h) {
/* Convert back to an array of integers */
var arr = [];
if (h) {
var encoded = h.substr(1);
var strBuffer = b64_to_utf8(encoded);
if (strBuffer) {
for (var i = 0; i < strBuffer.length; ++i) {
arr.push(strBuffer.charCodeAt(i));
}
}
}
return arr;
}
function initToyCatCreator() {
console.log("initToyCatCreator");
var svgDoc = document.getElementById('toy.cat.creator').getSVGDocument();
console.log(svgDoc);
var svgWin = svgDoc.defaultView;
console.log(svgWin);
console.log(svgWin.imageColors);
console.log(svgWin.addChangeStateCallback);
console.log(svgWin.notifiers);
console.log(svgWin.notifiers.push(updateLink));
console.log(svgWin.notifiers);
svgWin.addChangeStateCallback(updateLink);
svgWin.initFromState(hashToIntegers(location.hash));
console.log(svgWin.notifiers);
}
</script>
</head>
<body onload="initToyCatCreator();">
<article>
<section>
<p id="preset.link"><a href="#">Link to current selection</a></p>
</section>
<section>
<p><object id="toy.cat.creator" data="toy-cat-creator.svg" type="image/svg+xml"> </object></p>
</section>
<section>
<h2>About</h2>
<p>The Toy Cat Creator is a small dress up game made by <a href="http://feufochmar.fr">Feufochmar</a> starring the toy cat demon <a href="http://floraverse.com/comic/references/289-character-profile-commander-beleth/">Beleth</a> from <a href="http://floraverse.com">Floraverse</a>. <br/>
The game is contained inside an SVG image and is made under Inkscape. <br/>
The image is released under the <a href="https://creativecommons.org/licenses/by-sa/3.0/fr/">Creative Commons Attribution Share-Alike CC BY-SA</a>. </p>
<p><a href="toy-cat-creator.svg">Direct link</a> to SVG image. </p>
</section>
</article>
</body>
</html>

4141
toy-cat-creator.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 288 KiB