milk 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/milk.rb +64 -40
- data/lib/milk/application.rb +37 -16
- data/lib/milk/component.rb +23 -28
- data/lib/milk/field.rb +7 -18
- data/lib/milk/page.rb +19 -25
- data/lib/milk/tasks.rb +6 -7
- data/milk.gemspec +56 -45
- data/site_template/Rakefile +5 -0
- data/site_template/bootstrap.rb +71 -0
- data/site_template/config.ru +1 -3
- data/site_template/{config → data/global}/foot.yaml +0 -0
- data/site_template/{config → data/global}/head.yaml +4 -4
- data/site_template/{pages → data/pages}/About.yaml +3 -3
- data/site_template/{pages → data/pages}/Home.yaml +4 -3
- data/site_template/{pages → data/pages}/News.yaml +3 -3
- data/site_template/{pages → data/pages}/NotFound.yaml +3 -3
- data/site_template/{pages → data/pages}/Products.yaml +3 -3
- data/site_template/lib/components/body.rb +6 -0
- data/site_template/lib/components/button.rb +19 -0
- data/site_template/lib/components/foot.rb +6 -0
- data/site_template/lib/components/head.rb +6 -0
- data/site_template/lib/fields/checkbox_field.rb +4 -0
- data/{lib/milk → site_template/lib}/fields/component_array.rb +0 -0
- data/site_template/lib/fields/dropdown_field.rb +4 -0
- data/{lib/milk → site_template/lib}/fields/image_chooser.rb +0 -0
- data/{lib/milk → site_template/lib}/fields/markdown_field.rb +0 -0
- data/{lib/milk → site_template/lib}/fields/page_chooser.rb +1 -1
- data/{lib/milk → site_template/lib}/fields/sprite_chooser.rb +1 -1
- data/{lib/milk → site_template/lib}/fields/text_field.rb +0 -0
- data/site_template/public/js/edit.js +121 -0
- data/site_template/public/js/form_validate.js +51 -0
- data/site_template/public/js/login.js +9 -0
- data/site_template/public/style/960.css +96 -0
- data/site_template/public/style/edit.css +29 -0
- data/site_template/public/style/login.css +12 -0
- data/site_template/public/style/reset.css +33 -0
- data/site_template/public/style/text.css +25 -0
- data/site_template/public/style/view.css +10 -0
- data/site_template/{design → templates}/960.sass +0 -0
- data/site_template/{design → templates/components}/body.haml +0 -0
- data/site_template/{design → templates/components}/button.haml +0 -0
- data/site_template/{design → templates/components}/foot.haml +0 -0
- data/site_template/{design → templates/components}/head.haml +0 -0
- data/site_template/templates/dependencies.haml +8 -0
- data/{lib/milk/fields/component.haml → site_template/templates/edit.component.haml} +0 -0
- data/site_template/templates/edit.haml +38 -0
- data/site_template/templates/edit.sass +91 -0
- data/site_template/templates/fields/checkbox_field.haml +1 -0
- data/{lib/milk → site_template/templates}/fields/component_array.haml +0 -0
- data/site_template/templates/fields/dropdown_field.haml +3 -0
- data/{lib/milk → site_template/templates}/fields/image_chooser.haml +0 -0
- data/{lib/milk → site_template/templates}/fields/markdown_field.haml +0 -0
- data/site_template/templates/fields/page_chooser.haml +3 -0
- data/{lib/milk → site_template/templates}/fields/sprite_chooser.haml +0 -0
- data/{lib/milk → site_template/templates}/fields/text_field.haml +0 -0
- data/site_template/templates/login.haml +37 -0
- data/site_template/templates/login.sass +35 -0
- data/site_template/{design/0-reset.sass → templates/reset.sass} +0 -0
- data/site_template/{design/1-text.sass → templates/text.sass} +0 -0
- data/site_template/{design/xhtml.haml → templates/view.haml} +2 -3
- data/site_template/{design/page.haml → templates/view.page.haml} +0 -0
- data/site_template/{design/head.sass → templates/view.sass} +10 -0
- metadata +56 -45
- data/lib/milk/fields/login.haml +0 -90
- data/lib/milk/fields/page_chooser.haml +0 -3
- data/lib/milk/fields/xhtml.haml +0 -253
- data/lib/milk/haxe.rb +0 -139
- data/site_template/config/config.yaml +0 -31
- data/site_template/config/users.yaml +0 -18
- data/site_template/design/body.rb +0 -4
- data/site_template/design/button.rb +0 -16
- data/site_template/design/foot.rb +0 -4
- data/site_template/design/foot.sass +0 -3
- data/site_template/design/head.rb +0 -4
- data/site_template/design/page.sass +0 -7
- data/site_template/design/sprites.sass +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
module Milk::Fields
|
2
2
|
class PageChooser < Milk::Field
|
3
3
|
@@pages = []
|
4
|
-
Dir.glob(Milk::
|
4
|
+
Dir.glob(Milk::DATA_DIR + "/pages/*.yaml").each do |page|
|
5
5
|
pagename = File.basename(page, '.yaml').rpartition('/').last.gsub('.','/')
|
6
6
|
@@pages << {
|
7
7
|
file: page,
|
File without changes
|
@@ -0,0 +1,121 @@
|
|
1
|
+
function on_click_sprite(e)
|
2
|
+
{
|
3
|
+
// Look up some useful variables
|
4
|
+
var current = e.currentTarget;
|
5
|
+
var sprite_select = $(current.parentNode);
|
6
|
+
var peers = $(".sprite-option", sprite_select);
|
7
|
+
var hidden_input = $('input', sprite_select)[0];
|
8
|
+
var inner_span = $('span', current)[0];
|
9
|
+
|
10
|
+
// Set the value on the hidden input
|
11
|
+
hidden_input.value = inner_span.title;
|
12
|
+
|
13
|
+
// Move the highlight
|
14
|
+
peers.removeClass('ui-state-highlight');
|
15
|
+
$(current).addClass('ui-state-highlight');
|
16
|
+
update_preview(50);
|
17
|
+
}
|
18
|
+
|
19
|
+
function jsonify(form)
|
20
|
+
{
|
21
|
+
var data = {}
|
22
|
+
$("input, textarea, select", form).each(function (i, field){
|
23
|
+
var parts = field.name.split(':');
|
24
|
+
var root = data;
|
25
|
+
var part = parts[0];
|
26
|
+
var numeric_regexp = /[0-9]+/;
|
27
|
+
for(i=0;i<parts.length-1;i++)
|
28
|
+
{
|
29
|
+
if (!root[part])
|
30
|
+
{
|
31
|
+
if (numeric_regexp.test(part))
|
32
|
+
root[part]={};
|
33
|
+
else
|
34
|
+
root[part]=[];
|
35
|
+
}
|
36
|
+
root = root[part];
|
37
|
+
part = parts[i + 1];
|
38
|
+
}
|
39
|
+
value = field.value
|
40
|
+
if (field.type == 'checkbox')
|
41
|
+
{
|
42
|
+
value = field.checked;
|
43
|
+
}
|
44
|
+
root[part] = value;
|
45
|
+
});
|
46
|
+
console.log(data);
|
47
|
+
return $.toJSON(data);
|
48
|
+
}
|
49
|
+
|
50
|
+
function do_update_preview()
|
51
|
+
{
|
52
|
+
var preview = $("#preview");
|
53
|
+
$("body").addClass("busy")
|
54
|
+
$.ajax({
|
55
|
+
type: "POST",
|
56
|
+
url: $("form")[0].action,
|
57
|
+
contentType: "application/json",
|
58
|
+
data: jsonify($("form")[0]),
|
59
|
+
success: function(msg){
|
60
|
+
preview.html(msg);
|
61
|
+
$("body").removeClass("busy")
|
62
|
+
}
|
63
|
+
});
|
64
|
+
}
|
65
|
+
|
66
|
+
function update_preview(timeout)
|
67
|
+
{
|
68
|
+
clearTimeout(window.preview_timeout);
|
69
|
+
window.preview_timeout = setTimeout(do_update_preview, timeout);
|
70
|
+
}
|
71
|
+
|
72
|
+
|
73
|
+
$(function() {
|
74
|
+
$("#left").resizable({handles: "e", resize: function(event, ui) {
|
75
|
+
$("#divider").css("left", ui.size.width);
|
76
|
+
$("#preview").css("left", ui.size.width+5);
|
77
|
+
}});
|
78
|
+
$(".sub-fields").accordion({
|
79
|
+
collapsible: true,
|
80
|
+
autoHeight: false,
|
81
|
+
active: false
|
82
|
+
});
|
83
|
+
var sections = $("#fields").accordion({
|
84
|
+
autoHeight: false
|
85
|
+
});
|
86
|
+
|
87
|
+
$(".sprite-option").click(on_click_sprite);
|
88
|
+
$(".toolitem, .sprite-option")
|
89
|
+
.addClass("ui-state-default ui-corner-all")
|
90
|
+
.hover(
|
91
|
+
function() { $(this).addClass('ui-state-hover'); },
|
92
|
+
function() { $(this).removeClass('ui-state-hover'); }
|
93
|
+
);
|
94
|
+
$("#fields select, #fields input, #fields textarea").change(function(){
|
95
|
+
update_preview(100);
|
96
|
+
});
|
97
|
+
$("#fields select, #fields input, #fields textarea").keyup(function(){
|
98
|
+
update_preview(1000);
|
99
|
+
});
|
100
|
+
$("#save_button").click(function(){
|
101
|
+
$.ajax({
|
102
|
+
type: "PUT",
|
103
|
+
url: $("form")[0].action,
|
104
|
+
contentType: "application/json",
|
105
|
+
data: jsonify($("form")[0]),
|
106
|
+
success: function(msg){
|
107
|
+
window.location = $("form")[0].action.replace('https://', 'http://');
|
108
|
+
}
|
109
|
+
});
|
110
|
+
});
|
111
|
+
|
112
|
+
$("#cancel_button").click(function(){
|
113
|
+
window.location = $("form")[0].action.replace('https://', 'http://');
|
114
|
+
});
|
115
|
+
$("#logout_button").click(function(){
|
116
|
+
window.location = "/logout?dest="+$("form")[0].action.replace('https://', 'http://');
|
117
|
+
});
|
118
|
+
|
119
|
+
});
|
120
|
+
|
121
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
function form_validate(form)
|
2
|
+
{
|
3
|
+
var good = true;
|
4
|
+
$(".form_field", form).each(function(i,tr){
|
5
|
+
var field = $("input,textarea,select", tr);
|
6
|
+
console.log(field);
|
7
|
+
var required = $(tr).hasClass('required');
|
8
|
+
var message = "";
|
9
|
+
var value = field[0].value;
|
10
|
+
if (value)
|
11
|
+
{
|
12
|
+
if (field.hasClass("email_field"))
|
13
|
+
{
|
14
|
+
console.log("Validating email");
|
15
|
+
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
16
|
+
if (!filter.test(value))
|
17
|
+
{
|
18
|
+
message = "Please enter a valid email address";
|
19
|
+
}
|
20
|
+
}
|
21
|
+
else if (field.hasClass("phone_field"))
|
22
|
+
{
|
23
|
+
console.log("Validating phone");
|
24
|
+
var stripped = value.replace(/[\s()+\-]|ext\.?/gi, "");
|
25
|
+
// 10 is the minimum number of numbers required
|
26
|
+
if (!(/\d{10,}/i).test(stripped))
|
27
|
+
{
|
28
|
+
message = "Please enter a valid phone number with area code";
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
else if (required)
|
33
|
+
{
|
34
|
+
message = "This is a required field";
|
35
|
+
}
|
36
|
+
var message_area = $(".error_message", tr);
|
37
|
+
message_area.html(message);
|
38
|
+
if (message === "")
|
39
|
+
{
|
40
|
+
message_area.hide();
|
41
|
+
}
|
42
|
+
else
|
43
|
+
{
|
44
|
+
good = false;
|
45
|
+
message_area.show();
|
46
|
+
}
|
47
|
+
});
|
48
|
+
console.log(good);
|
49
|
+
return false;
|
50
|
+
|
51
|
+
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
.container_12 { margin-left: auto; margin-right: auto; width: 960px; }
|
2
|
+
.container_12 .grid_3 { width: 220px; }
|
3
|
+
.container_12 .grid_6 { width: 460px; }
|
4
|
+
.container_12 .grid_9 { width: 700px; }
|
5
|
+
.container_12 .grid_12 { width: 940px; }
|
6
|
+
.container_12 .grid_1 { width: 60px; }
|
7
|
+
.container_12 .grid_2 { width: 140px; }
|
8
|
+
.container_12 .grid_4 { width: 300px; }
|
9
|
+
.container_12 .grid_5 { width: 380px; }
|
10
|
+
.container_12 .grid_7 { width: 540px; }
|
11
|
+
.container_12 .grid_8 { width: 620px; }
|
12
|
+
.container_12 .grid_10 { width: 780px; }
|
13
|
+
.container_12 .grid_11 { width: 860px; }
|
14
|
+
.container_12 .prefix_3 { padding-left: 240px; }
|
15
|
+
.container_12 .prefix_6 { padding-left: 480px; }
|
16
|
+
.container_12 .prefix_9 { padding-left: 720px; }
|
17
|
+
.container_12 .prefix_1 { padding-left: 80px; }
|
18
|
+
.container_12 .prefix_2 { padding-left: 160px; }
|
19
|
+
.container_12 .prefix_4 { padding-left: 320px; }
|
20
|
+
.container_12 .prefix_5 { padding-left: 400px; }
|
21
|
+
.container_12 .prefix_7 { padding-left: 560px; }
|
22
|
+
.container_12 .prefix_8 { padding-left: 640px; }
|
23
|
+
.container_12 .prefix_10 { padding-left: 800px; }
|
24
|
+
.container_12 .prefix_11 { padding-left: 880px; }
|
25
|
+
.container_12 .suffix_3 { padding-right: 240px; }
|
26
|
+
.container_12 .suffix_6 { padding-right: 480px; }
|
27
|
+
.container_12 .suffix_9 { padding-right: 720px; }
|
28
|
+
.container_12 .suffix_1 { padding-right: 80px; }
|
29
|
+
.container_12 .suffix_2 { padding-right: 160px; }
|
30
|
+
.container_12 .suffix_4 { padding-right: 320px; }
|
31
|
+
.container_12 .suffix_5 { padding-right: 400px; }
|
32
|
+
.container_12 .suffix_7 { padding-right: 560px; }
|
33
|
+
.container_12 .suffix_8 { padding-right: 640px; }
|
34
|
+
.container_12 .suffix_10 { padding-right: 800px; }
|
35
|
+
.container_12 .suffix_11 { padding-right: 880px; }
|
36
|
+
|
37
|
+
.container_16 { margin-left: auto; margin-right: auto; width: 960px; }
|
38
|
+
.container_16 .grid_4 { width: 220px; }
|
39
|
+
.container_16 .grid_8 { width: 460px; }
|
40
|
+
.container_16 .grid_12 { width: 700px; }
|
41
|
+
.container_16 .grid_16 { width: 940px; }
|
42
|
+
.container_16 .grid_1 { width: 40px; }
|
43
|
+
.container_16 .grid_2 { width: 100px; }
|
44
|
+
.container_16 .grid_3 { width: 160px; }
|
45
|
+
.container_16 .grid_5 { width: 280px; }
|
46
|
+
.container_16 .grid_6 { width: 340px; }
|
47
|
+
.container_16 .grid_7 { width: 400px; }
|
48
|
+
.container_16 .grid_9 { width: 520px; }
|
49
|
+
.container_16 .grid_10 { width: 580px; }
|
50
|
+
.container_16 .grid_11 { width: 640px; }
|
51
|
+
.container_16 .grid_13 { width: 760px; }
|
52
|
+
.container_16 .grid_14 { width: 820px; }
|
53
|
+
.container_16 .grid_15 { width: 880px; }
|
54
|
+
.container_16 .prefix_4 { padding-left: 240px; }
|
55
|
+
.container_16 .prefix_8 { padding-left: 480px; }
|
56
|
+
.container_16 .prefix_12 { padding-left: 720px; }
|
57
|
+
.container_16 .prefix_1 { padding-left: 60px; }
|
58
|
+
.container_16 .prefix_2 { padding-left: 120px; }
|
59
|
+
.container_16 .prefix_3 { padding-left: 180px; }
|
60
|
+
.container_16 .prefix_5 { padding-left: 300px; }
|
61
|
+
.container_16 .prefix_6 { padding-left: 360px; }
|
62
|
+
.container_16 .prefix_7 { padding-left: 420px; }
|
63
|
+
.container_16 .prefix_9 { padding-left: 540px; }
|
64
|
+
.container_16 .prefix_10 { padding-left: 600px; }
|
65
|
+
.container_16 .prefix_11 { padding-left: 660px; }
|
66
|
+
.container_16 .prefix_13 { padding-left: 780px; }
|
67
|
+
.container_16 .prefix_14 { padding-left: 840px; }
|
68
|
+
.container_16 .prefix_15 { padding-left: 900px; }
|
69
|
+
.container_16 .suffix_4 { padding-right: 240px; }
|
70
|
+
.container_16 .suffix_8 { padding-right: 480px; }
|
71
|
+
.container_16 .suffix_12 { padding-right: 720px; }
|
72
|
+
.container_16 .suffix_1 { padding-right: 60px; }
|
73
|
+
.container_16 .suffix_2 { padding-right: 120px; }
|
74
|
+
.container_16 .suffix_3 { padding-right: 180px; }
|
75
|
+
.container_16 .suffix_5 { padding-right: 300px; }
|
76
|
+
.container_16 .suffix_6 { padding-right: 360px; }
|
77
|
+
.container_16 .suffix_7 { padding-right: 420px; }
|
78
|
+
.container_16 .suffix_9 { padding-right: 540px; }
|
79
|
+
.container_16 .suffix_10 { padding-right: 600px; }
|
80
|
+
.container_16 .suffix_11 { padding-right: 660px; }
|
81
|
+
.container_16 .suffix_13 { padding-right: 780px; }
|
82
|
+
.container_16 .suffix_14 { padding-right: 840px; }
|
83
|
+
.container_16 .suffix_15 { padding-right: 900px; }
|
84
|
+
|
85
|
+
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16 { display: inline; float: left; margin-left: 10px; margin-right: 10px; }
|
86
|
+
|
87
|
+
.alpha { margin-left: 0; }
|
88
|
+
|
89
|
+
.omega { margin-right: 0; }
|
90
|
+
|
91
|
+
.clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; }
|
92
|
+
|
93
|
+
.clearfix { display: inline-block; display: block; }
|
94
|
+
.clearfix:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; }
|
95
|
+
|
96
|
+
* html .clearfix { height: 1%; }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
body, html { border: 0; margin: 0; padding: 0; }
|
2
|
+
|
3
|
+
body.busy { cursor: busy; }
|
4
|
+
|
5
|
+
div.component:hover { border: 10px solid #08f; }
|
6
|
+
|
7
|
+
#admin-title { position: absolute; margin: 0; top: 5px; left: 10px; line-height: 1em; font-size: 20px; font-family: monaco,monospace; }
|
8
|
+
|
9
|
+
#toolbar { position: absolute; left: 0; bottom: 0; right: 0; padding: 3px; }
|
10
|
+
#toolbar .toolitem { font-size: 12px; cursor: pointer; line-height: 1em; padding: 2px 5px 2px 2px; }
|
11
|
+
#toolbar .toolitem .ui-icon { float: left; line-height: 1em; }
|
12
|
+
|
13
|
+
#frame { position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; }
|
14
|
+
|
15
|
+
#left { font-size: 11px; position: absolute; top: 0px; left: 0px; width: 250px; bottom: 0px; }
|
16
|
+
#left h4 { font-size: 14px; }
|
17
|
+
#left h3 { font-size: 13px; }
|
18
|
+
|
19
|
+
#divider { position: absolute; top: 0px; left: 250px; width: 5px; bottom: 0px; }
|
20
|
+
|
21
|
+
#fields { position: absolute; top: 0px; bottom: 35px; overflow: auto; left: 0px; right: 0; }
|
22
|
+
#fields .ui-accordion-content { padding: 10px; }
|
23
|
+
#fields .ui-accordion-content h4 { margin: 0; }
|
24
|
+
#fields .ui-accordion-content .field-content { margin-bottom: 10px; }
|
25
|
+
#fields .ui-accordion-content .field-content input { width: 95%; padding: 2px; }
|
26
|
+
#fields .ui-accordion-content .field-content textarea { width: 100%; min-height: 330px; }
|
27
|
+
#fields .ui-accordion-content .field-content .sprite-select .sprite-option { padding: 4px; margin: 2px; float: left; cursor: pointer; }
|
28
|
+
|
29
|
+
#preview { position: absolute; top: 0px; left: 255px; right: 0; width: auto; bottom: 0px; overflow: auto; }
|
@@ -0,0 +1,12 @@
|
|
1
|
+
table, #shadow, .ui-widget-shadow { width: 400px; height: 160px; }
|
2
|
+
|
3
|
+
table#login, #shadow { font-size: 15px; position: absolute; top: 50%; left: 50%; margin-top: -80px; margin-left: -200px; }
|
4
|
+
|
5
|
+
table#login td, table#login th { vertical-align: middle; }
|
6
|
+
|
7
|
+
#login tr.ui-state-error { font-size: 12px; }
|
8
|
+
#login tr.ui-state-error td { padding: 5px 10px; }
|
9
|
+
#login tr.ui-state-error span { float: left; margin-right: 0.3em; }
|
10
|
+
#login .ui-widget-header { line-height: 2em; height: 2em; }
|
11
|
+
#login button { font-size: 12px; cursor: pointer; line-height: 1em; padding: 2px 5px 2px 2px; }
|
12
|
+
#login button .ui-icon { float: left; line-height: 1em; }
|
@@ -0,0 +1,33 @@
|
|
1
|
+
html { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
2
|
+
|
3
|
+
body { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; line-height: 1; }
|
4
|
+
|
5
|
+
div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
6
|
+
|
7
|
+
blockquote { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; quotes: none; }
|
8
|
+
blockquote:before, blockquote:after { content: ''; content: none; }
|
9
|
+
|
10
|
+
pre, a, abbr, acronym, address, big, cite, code { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
11
|
+
|
12
|
+
del { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: line-through; }
|
13
|
+
|
14
|
+
dfn, em, font, img { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
15
|
+
|
16
|
+
ins { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: none; }
|
17
|
+
|
18
|
+
kbd { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
19
|
+
|
20
|
+
q { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; quotes: none; }
|
21
|
+
q:before, q:after { content: ''; content: none; }
|
22
|
+
|
23
|
+
s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
24
|
+
|
25
|
+
ol, ul { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; list-style: none; }
|
26
|
+
|
27
|
+
li, fieldset, form, label, legend { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
28
|
+
|
29
|
+
table { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; border-collapse: collapse; border-spacing: 0; }
|
30
|
+
|
31
|
+
caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
|
32
|
+
|
33
|
+
html :focus { outline: 0; }
|
@@ -0,0 +1,25 @@
|
|
1
|
+
body { font: 13px/1.5 Helvetica,Arial,'Liberation Sans',FreeSans,sans-serif; }
|
2
|
+
|
3
|
+
a:focus { outline: 1px dotted invert; }
|
4
|
+
|
5
|
+
hr { border: 0 #ccc solid; border-top-width: 1px; clear: both; height: 0; margin-bottom: 20px; }
|
6
|
+
|
7
|
+
h1 { font-size: 25px; margin-bottom: 20px; }
|
8
|
+
|
9
|
+
h2 { font-size: 23px; margin-bottom: 20px; }
|
10
|
+
|
11
|
+
h3 { font-size: 21px; margin-bottom: 20px; }
|
12
|
+
|
13
|
+
h4 { font-size: 19px; margin-bottom: 20px; }
|
14
|
+
|
15
|
+
h5 { font-size: 17px; margin-bottom: 20px; }
|
16
|
+
|
17
|
+
h6 { font-size: 15px; margin-bottom: 20px; }
|
18
|
+
|
19
|
+
ol { list-style: decimal; margin-bottom: 20px; }
|
20
|
+
|
21
|
+
ul { list-style: disc; margin-bottom: 20px; }
|
22
|
+
|
23
|
+
li { margin-left: 30px; }
|
24
|
+
|
25
|
+
p, dl, pre, table, address, fieldset { margin-bottom: 20px; }
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#admin { color: #999; text-align: right; }
|
2
|
+
#admin a, #admin a:visited, #admin a:active, #admin a:link { color: #08f; }
|
3
|
+
|
4
|
+
#head { margin-top: 20px; margin-bottom: 20px; }
|
5
|
+
#head li { list-style-type: none; margin: 0; }
|
6
|
+
#head li a { color: #08f; text-decoration: none; border: 1px solid #999; text-align: center; font-weight: bold; background-color: #222; float: left; margin: 0 13px 0 0; padding: 8px 15px; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }
|
7
|
+
#head li a:hover { background-color: #8af; color: #000; }
|
8
|
+
#head li a.active { background-color: #8fa; color: #000; }
|
9
|
+
|
10
|
+
#foot { font-size: 90%; color: #888; }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
- list.each do |resource|
|
2
|
+
- case resource.rpartition('.').last.to_sym
|
3
|
+
- when :js
|
4
|
+
%script{:src=>resource, :type=>"text/javascript"}
|
5
|
+
- when :css
|
6
|
+
%link{:href=>resource, :media=>"screen", :rel=>"stylesheet", :type=>"text/css"}/
|
7
|
+
- when :ico
|
8
|
+
%link{:href=>resource, :rel=>'shortcut icon', :type=>'image/x-icon'}
|
File without changes
|
@@ -0,0 +1,38 @@
|
|
1
|
+
!!! xml
|
2
|
+
!!! 1.1
|
3
|
+
%html{:xmlns =>"http://www.w3.org/1999/xhtml"}
|
4
|
+
%head
|
5
|
+
%title&= "Editing \"#{@pagename}\""
|
6
|
+
= render_dependencies
|
7
|
+
%body
|
8
|
+
#frame
|
9
|
+
#left
|
10
|
+
.ui-widget-overlay
|
11
|
+
%form#fields{:method => "post", :action => "/"+@pagename}
|
12
|
+
%h3
|
13
|
+
%a{:href => "#"} Page Settings
|
14
|
+
%div
|
15
|
+
%input{:type=>"hidden", :name=>"class", :value=>self.class.to_s}
|
16
|
+
-to_yaml_properties.each do |name|
|
17
|
+
- next if name == :@components
|
18
|
+
- fieldname = name.to_s.sub('@','')
|
19
|
+
.field
|
20
|
+
%h4= fieldname.capitalize + ":"
|
21
|
+
.field-content
|
22
|
+
%input{:type=>"text", :name=>fieldname, :value=>instance_variable_get(name)}
|
23
|
+
-@components.each_with_index do |component, i|
|
24
|
+
= component.edit("components:#{i}")
|
25
|
+
#toolbar{:class=>'ui-widget ui-widget-header'}
|
26
|
+
%button#save_button.toolitem{:title=>'Save changes and go to live page.'}
|
27
|
+
%span{:class=>'ui-icon ui-icon-disk'}
|
28
|
+
Save
|
29
|
+
%button#cancel_button.toolitem{:title=>'Cancel changes and go to live page.'}
|
30
|
+
%span{:class=>'ui-icon ui-icon-cancel'}
|
31
|
+
Cancel
|
32
|
+
%button#logout_button.toolitem{:title=>'Cancel changes and logout and go to live page.'}
|
33
|
+
%span{:class=>'ui-icon ui-icon-locked'}
|
34
|
+
Logout
|
35
|
+
#preview
|
36
|
+
= preview
|
37
|
+
#divider.ui-widget-header
|
38
|
+
|