mirror of
https://github.com/jcreek/phldnhack.git
synced 2026-07-12 18:43:43 +00:00
test
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<script type="text/ractive" id="home"><div class="row">
|
||||
<script type="text/ractive" id="parent"><div class="row">
|
||||
<div class="col s12 m6 offset-m3">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
Ractive.components.home = Ractive.extend({
|
||||
template:'#home'
|
||||
Ractive.components.student = Ractive.extend({
|
||||
template:'#student'
|
||||
});
|
||||
|
||||
+2
-2
@@ -12,11 +12,11 @@
|
||||
<!-- 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>
|
||||
|
||||
<script type="text/ractive" id="home"><div class="row">
|
||||
<script type="text/ractive" id="parent"><div class="row">
|
||||
<div class="col s12 m6 offset-m3">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
Ractive.components.home = Ractive.extend({
|
||||
template:'#home'
|
||||
Ractive.components.student = Ractive.extend({
|
||||
template:'#student'
|
||||
});
|
||||
|
||||
|
||||
$.getJSON('/sample', function(res){
|
||||
$.getJSON('/data/'+location.pathname.split('/').slice(3).join('/'), function(res){
|
||||
|
||||
var ractive = new Ractive.components.home({
|
||||
var ractive = new Ractive.components[location.pathname.split('/')[2]]({
|
||||
el:'#load',
|
||||
data:res
|
||||
});
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
Ractive.components.home = Ractive.extend({
|
||||
template:'#home'
|
||||
});
|
||||
|
||||
|
||||
$.getJSON('/sample', function(res){
|
||||
|
||||
var ractive = new Ractive.components[location.pathname.split('/')[1]]({
|
||||
el:'#load',
|
||||
data:res
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
//Code below here
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
+1
-1
@@ -7,7 +7,7 @@ $(document).ready(function(){
|
||||
|
||||
$.getJSON('/sample', function(res){
|
||||
|
||||
var ractive = new Ractive.components.home({
|
||||
var ractive = new Ractive.components[location.pathname.split('/')[1]]({
|
||||
el:'#load',
|
||||
data:res
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user