This commit is contained in:
Joe Reeve
2015-11-07 14:39:44 +00:00
parent 1765a42699
commit 78b893b5f7
17 changed files with 64 additions and 62 deletions
-3
View File
@@ -1,3 +0,0 @@
Ractive.components.home = Ractive.extend({
template:'#home'
});
+3
View File
@@ -0,0 +1,3 @@
Ractive.components.student = Ractive.extend({
template:'#student'
});
+1 -1
View File
@@ -12,7 +12,7 @@
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
<script src='index.js'></script>
<script src='/index.js'></script>
</head>
<body>
+20
View File
@@ -0,0 +1,20 @@
$(document).ready(function(){
@@include('components.js')
$.getJSON('/data/'+location.pathname.split('/').slice(3).join('/'), function(res){
var ractive = new Ractive.components[location.pathname.split('/')[2]]({
el:'#load',
data:res
});
});
//Code below here
});
-24
View File
@@ -1,24 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>RCard</title>
<script src='http://cdn.ractivejs.org/latest/ractive.js'></script>
<script src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
<script src='index.js'></script>
</head>
<body>
@@include('components.html')
<div id='load'></div>
</body>
</html>
-20
View File
@@ -1,20 +0,0 @@
$(document).ready(function(){
@@include('components.js')
$.getJSON('/sample', function(res){
var ractive = new Ractive.components.home({
el:'#load',
data:res
});
});
//Code below here
});
View File
-20
View File
@@ -1,20 +0,0 @@
$(document).ready(function(){
@@include('components.js')
$.getJSON('/sample', function(res){
var ractive = new Ractive.components.home({
el:'#load',
data:res
});
});
//Code below here
});