Skip to content

Commit 6b99f04

Browse files
committed
added debug page to work locally with jsfiddles
1 parent b7996fa commit 6b99f04

File tree

4 files changed

+75
-1
lines changed

4 files changed

+75
-1
lines changed

config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# page "/path/to/file.html", :layout => false
2222
#
2323
# With alternative layout
24-
# page "/path/to/file.html", :layout => :otherlayout
24+
page "/debug.html", :layout => 'debug.haml'
2525
#
2626
# A path which all have the same layout
2727
# with_layout :admin do

source/debug.html.erb

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<style media="screen" type="text/css">
2+
.placeholder {
3+
background: #ccff00;
4+
padding: 30px 5px;
5+
clear: both;
6+
}
7+
8+
.layout {
9+
overflow: auto;
10+
}
11+
12+
.layout > .region:nth-child(1) {
13+
float: left;
14+
width: 50%;
15+
}
16+
17+
.layout > .region:nth-child(2) {
18+
float: right;
19+
width: 47%;
20+
}
21+
22+
.part {
23+
clear: both;
24+
background: #ccc;
25+
padding: 30px 5px;
26+
margin: 5px;
27+
}
28+
</style>
29+
30+
<div data-type="region" class="region" id="root">
31+
<div data-type="part" class="part">
32+
Part 1
33+
</div>
34+
<div data-type="layout" class="layout">
35+
<div data-type="region" class="region">
36+
<div data-type="part" class="part">
37+
Part 2
38+
</div>
39+
</div>
40+
<div data-type="region" class="region">
41+
<div data-type="part" class="part">
42+
Part 3
43+
</div>
44+
<div data-type="part" class="part">
45+
Part 4
46+
</div>
47+
</div>
48+
</div>
49+
<div data-type="part" class="part">
50+
Part 5
51+
</div>
52+
</div>

source/js/debug.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//= require "vendor/jquery"
2+
//= require "jquery-sortable"
3+
4+
$(function () {
5+
$('#root.region').sortable({
6+
group: 'nested',
7+
itemSelector: '.part, .layout',
8+
containerSelector: '.region',
9+
nested: true,
10+
placeholder: '<div class="placeholder">Drop here</div>',
11+
});
12+
})

source/layouts/debug.haml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
!!!
2+
%html
3+
%head
4+
%title jQuery Sortable
5+
%link(rel="stylesheet" href="css/vendor.css")
6+
%link(rel="stylesheet" href="css/application.css")
7+
%body
8+
.bootstrap-container
9+
= yield
10+
%script(src="js/debug.js")

0 commit comments

Comments
 (0)