-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rei Kitajima
authored and
Rei Kitajima
committed
Jul 4, 2020
1 parent
4a3435a
commit 795d169
Showing
4 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
Icon? | ||
*~ | ||
node_modules/ | ||
docs/ | ||
package-lock.json | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
var CalendarStyle = { | ||
calendar : ` | ||
* { box-sizing:border-box; margin:0; padding:0; } | ||
:host { | ||
} | ||
.root { | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 100%; | ||
background-color: #fff; | ||
} | ||
.header { width:350px; margin-top:22px; margin-left:auto; margin-right:auto; } | ||
.month { width:350px; margin-top:11px; margin-left:auto; margin-right:auto; } | ||
.navi { width:350px; margin-top: 11px; padding-bottom:22px; margin-left:auto; margin-right:auto; display:flex; } | ||
.prev { margin-left:15px; cursor:pointer; text-align:right; } | ||
.next { margin-right:15px; cursor:pointer; margin-left:auto; text-align:left; } | ||
`, | ||
month : ` | ||
* { box-sizing:border-box; margin:0; padding:0; } | ||
:host { | ||
width: 350px; | ||
} | ||
.root { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
width: 350px; | ||
} | ||
`, | ||
day : ` | ||
* { box-sizing:border-box; margin:0; padding:0; } | ||
:host { | ||
width: 50px; | ||
height: 50px; | ||
} | ||
.root { | ||
width: 50px; | ||
text-align: center; | ||
line-height: 50px; | ||
cursor: pointer; | ||
} | ||
.root:hover { | ||
background-color: yellowgreen; | ||
} | ||
.weekday0 { color: #f00; } | ||
.weekday1 { color: #555; } | ||
.weekday2 { color: #555; } | ||
.weekday3 { color: #555; } | ||
.weekday4 { color: #555; } | ||
.weekday5 { color: #555; } | ||
.weekday6 { color: #00f; } | ||
.prev_month { pointer-events: none; opacity: 0.5; } | ||
.this_month { pointer-events: all; } | ||
.next_month { pointer-events: none; opacity: 0.5; } | ||
.today { background-color: #0f0; } | ||
` | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, viewport-fit=cover"/> | ||
|
||
<title>CraftKit Playground</title> | ||
<style> | ||
* { margin:0; padding:0; } | ||
html,body { | ||
background-color: #fff; | ||
background-image: url('/logo.gif'); | ||
background-position: center center; | ||
background-repeat: no-repeat; | ||
background-attachment: fixed; | ||
font-family: "Meiryo" | ||
} | ||
</style> | ||
|
||
<script src="https://unpkg.com/@craftkit/craft-uikit/dist/craft-uikit.min.dev.js"></script> | ||
<script> | ||
window.load_module = function(url){ | ||
var http = new XMLHttpRequest(); | ||
http.onload = function(e){ | ||
let script = document.createElement('script'); | ||
script.type = 'text/javascript'; | ||
script.text = this.responseText; | ||
script.async = false; | ||
document.head.appendChild(script); | ||
console.log('loaded: '+url); | ||
}; | ||
http.onerror = function(e){ alert('cannot call api'); }; | ||
http.ontimeout = function(){ alert('timeout'); }; | ||
http.open('GET',url); | ||
http.send(); | ||
}; | ||
window.load_css = function(url){ | ||
let link = document.createElement('link'); | ||
link.rel = 'stylesheet'; | ||
link.href = url; | ||
document.head.appendChild(link); | ||
console.log('loaded: '+url); | ||
}; | ||
window.onload = function(){ | ||
console.log(" "); | ||
console.log("🛺 Welcome to CraftKit Playground"); | ||
console.log(" "); | ||
console.log(" Check:"); | ||
console.log(" https://github.com/craftkit/craftkit-playground"); | ||
console.log(" "); | ||
console.log(" Copy and paste tutorial snippet in here"); | ||
console.log(" Enjoy!"); | ||
console.log(" "); | ||
Craft.Core.Bootstrap.boot({ | ||
router : Craft.Core.HashRouter, | ||
didBootApplication : function(){ | ||
Craft.Core.Defaults.BASE_DIV_NAME = 'CraftRoot'; | ||
Craft.Core.Defaults.ALLOW_COMPONENT_SHORTCUT = true; | ||
} | ||
}); | ||
}; | ||
</script> | ||
</head> | ||
<body id="CraftRoot"> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.