liquid_cms 0.3.0.1 → 0.3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/CHANGELOG.rdoc +5 -1
  2. data/Gemfile.lock +1 -1
  3. data/README.rdoc +5 -1
  4. data/app/helpers/cms/common_helper.rb +1 -0
  5. data/app/views/cms/pages/_page.html.erb +2 -1
  6. data/app/views/layouts/cms.html.erb +2 -1
  7. data/lib/generators/liquid_cms/templates/public/cms/codemirror/LICENSE +2 -2
  8. data/lib/generators/liquid_cms/templates/public/cms/codemirror/css/csscolors.css +12 -8
  9. data/lib/generators/liquid_cms/templates/public/cms/codemirror/css/docs.css +123 -29
  10. data/lib/generators/liquid_cms/templates/public/cms/codemirror/csstest.html +1 -1
  11. data/lib/generators/liquid_cms/templates/public/cms/codemirror/htmltest.html +1 -1
  12. data/lib/generators/liquid_cms/templates/public/cms/codemirror/index.html +232 -179
  13. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/codemirror.js +211 -65
  14. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/editor.js +360 -194
  15. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/mirrorframe.js +1 -1
  16. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/parsecss.js +11 -7
  17. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/parsejavascript.js +14 -5
  18. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/parsesparql.js +1 -1
  19. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/select.js +140 -87
  20. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/stringstream.js +5 -0
  21. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/tokenizejavascript.js +1 -1
  22. data/lib/generators/liquid_cms/templates/public/cms/codemirror/js/undo.js +7 -7
  23. data/lib/generators/liquid_cms/templates/public/cms/codemirror/manual.html +148 -52
  24. data/lib/generators/liquid_cms/templates/public/cms/codemirror/story.html +631 -614
  25. data/lib/generators/liquid_cms/templates/public/cms/stylesheets/styles.css +7 -7
  26. data/lib/liquid_cms/version.rb +1 -1
  27. metadata +4 -26
  28. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/LICENSE +0 -32
  29. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/css/luacolors.css +0 -63
  30. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/index.html +0 -68
  31. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/lua/js/parselua.js +0 -253
  32. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/LICENSE +0 -37
  33. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/css/phpcolors.css +0 -114
  34. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/index.html +0 -292
  35. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/parsephp.js +0 -371
  36. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/parsephphtmlmixed.js +0 -90
  37. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/php/js/tokenizephp.js +0 -1006
  38. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/LICENSE +0 -22
  39. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/css/plsqlcolors.css +0 -57
  40. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/index.html +0 -67
  41. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/plsql/js/parseplsql.js +0 -233
  42. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/LICENSE +0 -32
  43. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/css/pythoncolors.css +0 -58
  44. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/index.html +0 -141
  45. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/python/js/parsepython.js +0 -542
  46. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/LICENSE +0 -22
  47. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/css/sqlcolors.css +0 -57
  48. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/index.html +0 -56
  49. data/lib/generators/liquid_cms/templates/public/cms/codemirror/contrib/sql/js/parsesql.js +0 -211
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
- == 0.5.0
1
+ == 0.3.0.2
2
+
3
+ Updated codemirror to 0.9
4
+
5
+ == 0.3.0
2
6
 
3
7
  * First release
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- liquid_cms (0.3.0)
11
+ liquid_cms (0.3.0.1)
12
12
  bundler (>= 1.0.0)
13
13
  formatize
14
14
  paperclip (~> 2.3.1)
data/README.rdoc CHANGED
@@ -6,6 +6,8 @@ If you're using rails 2, use the 0.2.x series of this gem.
6
6
 
7
7
  If you're using rails 3, use the 0.3.x series of this gem.
8
8
 
9
+ See the {wiki page}[http://github.com/redlinesoftware/liquid_cms/wiki] for additional documentation on usage and customizations... currently a work in progress.
10
+
9
11
  = Installation
10
12
 
11
13
  Add the gem to your Gemfile:
@@ -52,10 +54,12 @@ Once the engine is configured, you can view the CMS at the <b>/cms</b> path in y
52
54
 
53
55
  = Customization
54
56
 
57
+ All CMS templates and the layout can be overridden in the main application. Simply create the partial or template at the same path as the engine and your applications template will take priority.
58
+
55
59
  In order to expose data in your application in the templates, liquid filters, drops, tags and blocks specific to your application can be added to the <b>app/liquid</b> folder. Knowledge of liquid templates and the liquid library is required to do this. Examples of custom filters, drops, tags and blocks can be found in the liquid_cms gem files or in additional documentation on this website or related forums.
56
60
 
57
61
  A set of filters, drops and tags are provided in addition to the defaults provided by liquid. The documentation link accessible in the CMS provides additional details.
58
62
 
59
63
  = Contribution
60
64
 
61
- If you experience any issues with this CMS engine, please open a bug report. Contributionis to improve this engine is extremely welcome. A 1.0 release will be made when the engine has a bit more _polish_ on it.
65
+ If you experience any issues with this CMS engine, please open a bug report. Contributions to improve this engine are extremely welcome. A 1.0 release will be made when the engine has a bit more _polish_ on it.
@@ -38,6 +38,7 @@ module Cms::CommonHelper
38
38
  path: "/cms/codemirror/js/",
39
39
  textWrapping: false,
40
40
  height: '600px',
41
+ width: '89%',
41
42
  saveFunction: function() {
42
43
  var form = $$('#{form}').first();
43
44
  $('#{content_id}').setValue(editor.getCode());
@@ -6,11 +6,12 @@
6
6
  <%= delete_page_link page %>
7
7
  <% end %>
8
8
  <%= link_to truncate(page.to_s, :length => 24), edit_cms_page_path(page), :title => "Edit '#{page}'" %>
9
- <%= indicator dom_id(page, 'progress') %>
10
9
 
11
10
  <%= cms_icon 'house.png', :title => 'Root/Home Page' if page.root? %>
12
11
  <%= link_to cms_icon('magnifier.png', :title => 'View'), page.url, :class => 'external' if page.published? %>
13
12
 
13
+ <%= indicator dom_id(page, 'progress') %>
14
+
14
15
  <% unless page.content_pages.empty? %>
15
16
  <ul>
16
17
  <%= render :partial => 'cms/pages/page', :collection => page.content_pages %>
@@ -13,10 +13,11 @@
13
13
  <!--[if lte IE 8]>
14
14
  <%= stylesheet_link_tag '/cms/stylesheets/ie' %>
15
15
  <![endif]-->
16
+ <%= csrf_meta_tag %>
16
17
  </head>
17
18
  <body id="cms">
18
19
  <div id="header">
19
- <h1>Liquid CMS</h1>
20
+ <h1><%= link_to 'Liquid CMS', cms_root_path %></h1>
20
21
  </div>
21
22
 
22
23
  <div class="clearfix">
@@ -1,4 +1,4 @@
1
- Copyright (c) 2007-2009 Marijn Haverbeke
1
+ Copyright (c) 2007-2010 Marijn Haverbeke
2
2
 
3
3
  This software is provided 'as-is', without any express or implied
4
4
  warranty. In no event will the authors be held liable for any
@@ -20,4 +20,4 @@
20
20
  distribution.
21
21
 
22
22
  Marijn Haverbeke
23
- marijnh at gmail
23
+ marijnh@gmail.com
@@ -11,7 +11,7 @@ html {
11
11
  }
12
12
 
13
13
  pre.code, .editbox {
14
- color: #666666;
14
+ color: #666;
15
15
  }
16
16
 
17
17
  .editbox p {
@@ -19,33 +19,37 @@ pre.code, .editbox {
19
19
  }
20
20
 
21
21
  span.css-at {
22
- color: #770088;
22
+ color: #708;
23
23
  }
24
24
 
25
25
  span.css-unit {
26
- color: #228811;
26
+ color: #281;
27
27
  }
28
28
 
29
29
  span.css-value {
30
- color: #770088;
30
+ color: #708;
31
31
  }
32
32
 
33
33
  span.css-identifier {
34
34
  color: black;
35
35
  }
36
36
 
37
+ span.css-selector {
38
+ color: #11B;
39
+ }
40
+
37
41
  span.css-important {
38
- color: #0000FF;
42
+ color: #00F;
39
43
  }
40
44
 
41
45
  span.css-colorcode {
42
- color: #004499;
46
+ color: #299;
43
47
  }
44
48
 
45
49
  span.css-comment {
46
- color: #AA7700;
50
+ color: #A70;
47
51
  }
48
52
 
49
53
  span.css-string {
50
- color: #AA2222;
54
+ color: #A22;
51
55
  }
@@ -1,50 +1,144 @@
1
1
  body {
2
- margin: 0;
3
- padding: 3em 6em;
4
- color: black;
5
- max-width: 50em;
2
+ font-family: Droid Sans, Arial, sans-serif;
3
+ line-height: 1.5;
4
+ max-width: 64.3em;
5
+ margin: 3em auto;
6
+ padding: 0 1em;
6
7
  }
7
8
 
8
9
  h1 {
9
- font-size: 22pt;
10
- }
11
-
12
- .underline {
13
- border-bottom: 3px solid #C44;
10
+ letter-spacing: -3px;
11
+ font-size: 3.23em;
12
+ font-weight: bold;
13
+ margin: 0;
14
14
  }
15
15
 
16
16
  h2 {
17
- font-size: 14pt;
17
+ font-size: 1.23em;
18
+ font-weight: bold;
19
+ margin: .5em 0;
20
+ letter-spacing: -1px;
18
21
  }
19
22
 
20
23
  h3 {
21
- font-size: 12pt;
24
+ font-size: 1em;
25
+ font-weight: bold;
26
+ margin: .4em 0;
22
27
  }
23
28
 
24
- p.rel {
25
- padding-left: 2em;
26
- text-indent: -2em;
29
+ pre {
30
+ font-family: Droid Sans Mono, Courier New, monospaced;
31
+ background-color: #eee;
32
+ -moz-border-radius: 6px;
33
+ -webkit-border-radius: 6px;
34
+ border-radius: 6px;
35
+ padding: 1em;
27
36
  }
28
37
 
29
- div.border {
30
- border: 1px solid black;
31
- padding: 3px;
38
+ pre.code {
39
+ margin: 0 1em;
32
40
  }
33
41
 
34
- code {
35
- font-family: courier, monospace;
36
- font-size: 90%;
37
- color: #144;
42
+ .grey {
43
+ font-size: 2em;
44
+ padding: .5em 1em;
45
+ line-height: 1.2em;
46
+ margin-top: .5em;
38
47
  }
39
48
 
40
- pre.code {
41
- margin: 1.1em 12px;
42
- border: 1px solid #CCCCCC;
43
- color: black;
44
- padding: .4em;
45
- font-family: courier, monospace;
49
+ a:link, a:visited, .quasilink {
50
+ color: #df0019;
51
+ cursor: pointer;
52
+ text-decoration: none;
53
+ }
54
+
55
+ a:hover {
56
+ color: #800004;
57
+ }
58
+
59
+ ul {
60
+ margin: 0;
61
+ padding-left: 1.2em;
62
+ }
63
+
64
+ a.download {
65
+ color: white;
66
+ background-color: #df0019;
67
+ width: 100%;
68
+ display: block;
69
+ text-align: center;
70
+ font-size: 1.23em;
71
+ font-weight: bold;
72
+ text-decoration: none;
73
+ -moz-border-radius: 6px;
74
+ -webkit-border-radius: 6px;
75
+ border-radius: 6px;
76
+ padding: .5em 0;
77
+ margin-bottom: 1em;
78
+ }
79
+
80
+ a.download:hover {
81
+ background-color: #bb0010;
82
+ }
83
+
84
+ .rel {
85
+ margin-bottom: 0;
86
+ }
87
+
88
+ .rel-note {
89
+ color: #777;
90
+ font-size: .9em;
91
+ margin-top: .1em;
92
+ }
93
+
94
+ .logo-braces {
95
+ color: #df0019;
96
+ position: relative;
97
+ top: -4px;
98
+ }
99
+
100
+ .blk {
101
+ float: left;
102
+ }
103
+
104
+ .left {
105
+ width: 37em;
106
+ padding-right: 6.53em;
107
+ padding-bottom: 1em;
108
+ }
109
+
110
+ .left1 {
111
+ width: 15.24em;
112
+ padding-right: 6.45em;
113
+ }
114
+
115
+ .left2 {
116
+ width: 15.24em;
117
+ }
118
+
119
+ .right {
120
+ width: 20.68em;
121
+ }
122
+
123
+ .leftbig {
124
+ width: 42.44em;
125
+ padding-right: 6.53em;
126
+ }
127
+
128
+ .rightsmall {
129
+ width: 15.24em;
46
130
  }
47
131
 
48
- .warn {
49
- color: #C00;
132
+ .clear:after {
133
+ visibility: hidden;
134
+ display: block;
135
+ font-size: 0;
136
+ content: " ";
137
+ clear: both;
138
+ height: 0;
50
139
  }
140
+ .clear { display: inline-block; }
141
+ /* start commented backslash hack \*/
142
+ * html .clear { height: 1%; }
143
+ .clear { display: block; }
144
+ /* close commented backslash hack */
@@ -49,7 +49,7 @@ code {
49
49
 
50
50
  <script type="text/javascript">
51
51
  var editor = CodeMirror.fromTextArea('code', {
52
- height: "350px",
52
+ height: "dynamic",
53
53
  parserfile: "parsecss.js",
54
54
  stylesheet: "css/csscolors.css",
55
55
  path: "js/"
@@ -23,7 +23,7 @@ for <a href="index.html">CodeMirror</a>. The <a
23
23
  href="js/parsexml.js">javascript</a> file contains some comments with
24
24
  more information.</p>
25
25
 
26
- <div style="border: 1px solid black; padding: 0px;">
26
+ <div class="border">
27
27
  <textarea id="code" cols="120" rows="30">
28
28
  &lt;html style="color: green"&gt;
29
29
  &lt;!-- this is a comment --&gt;