Initial page, based on the version on feuforeve.fr
This commit is contained in:
commit
76f05b9386
|
@ -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)
|
||||
}
|
|
@ -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>
|
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 288 KiB |
Loading…
Reference in New Issue