honey-cms 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ class Cms::PagesController < ApplicationController
2
+ def show
3
+ @page = params[:page]
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ .cms-page{class: "cms-#{@page}-page"}
2
+ = cms_page_area :"cms_#{@page}_page" do
3
+ %h1= @page.capitalize
@@ -0,0 +1,173 @@
1
+ .CodeMirror {
2
+ line-height: 1em;
3
+ font-family: monospace;
4
+
5
+ /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
6
+ position: relative;
7
+ /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
8
+ overflow: hidden;
9
+ }
10
+
11
+ .CodeMirror-scroll {
12
+ overflow: auto;
13
+ height: 300px;
14
+ /* This is needed to prevent an IE[67] bug where the scrolled content
15
+ is visible outside of the scrolling box. */
16
+ position: relative;
17
+ outline: none;
18
+ }
19
+
20
+ /* Vertical scrollbar */
21
+ .CodeMirror-scrollbar {
22
+ position: absolute;
23
+ right: 0; top: 0;
24
+ overflow-x: hidden;
25
+ overflow-y: scroll;
26
+ z-index: 5;
27
+ }
28
+ .CodeMirror-scrollbar-inner {
29
+ /* This needs to have a nonzero width in order for the scrollbar to appear
30
+ in Firefox and IE9. */
31
+ width: 1px;
32
+ }
33
+ .CodeMirror-scrollbar.cm-sb-overlap {
34
+ /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
35
+ rather than sitting to the right of it. */
36
+ position: absolute;
37
+ z-index: 1;
38
+ float: none;
39
+ right: 0;
40
+ min-width: 12px;
41
+ }
42
+ .CodeMirror-scrollbar.cm-sb-nonoverlap {
43
+ min-width: 12px;
44
+ }
45
+ .CodeMirror-scrollbar.cm-sb-ie7 {
46
+ min-width: 18px;
47
+ }
48
+
49
+ .CodeMirror-gutter {
50
+ position: absolute; left: 0; top: 0;
51
+ z-index: 10;
52
+ background-color: #f7f7f7;
53
+ border-right: 1px solid #eee;
54
+ min-width: 2em;
55
+ height: 100%;
56
+ }
57
+ .CodeMirror-gutter-text {
58
+ color: #aaa;
59
+ text-align: right;
60
+ padding: .4em .2em .4em .4em;
61
+ white-space: pre !important;
62
+ cursor: default;
63
+ }
64
+ .CodeMirror-lines {
65
+ padding: .4em;
66
+ white-space: pre;
67
+ cursor: text;
68
+ }
69
+
70
+ .CodeMirror pre {
71
+ -moz-border-radius: 0;
72
+ -webkit-border-radius: 0;
73
+ -o-border-radius: 0;
74
+ border-radius: 0;
75
+ border-width: 0; margin: 0; padding: 0; background: transparent;
76
+ font-family: inherit;
77
+ font-size: inherit;
78
+ padding: 0; margin: 0;
79
+ white-space: pre;
80
+ word-wrap: normal;
81
+ line-height: inherit;
82
+ color: inherit;
83
+ }
84
+
85
+ .CodeMirror-wrap pre {
86
+ word-wrap: break-word;
87
+ white-space: pre-wrap;
88
+ word-break: normal;
89
+ }
90
+ .CodeMirror-wrap .CodeMirror-scroll {
91
+ overflow-x: hidden;
92
+ }
93
+
94
+ .CodeMirror textarea {
95
+ outline: none !important;
96
+ }
97
+
98
+ .CodeMirror pre.CodeMirror-cursor {
99
+ z-index: 10;
100
+ position: absolute;
101
+ visibility: hidden;
102
+ border-left: 1px solid black;
103
+ border-right: none;
104
+ width: 0;
105
+ }
106
+ .cm-keymap-fat-cursor pre.CodeMirror-cursor {
107
+ width: auto;
108
+ border: 0;
109
+ background: transparent;
110
+ background: rgba(0, 200, 0, .4);
111
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
112
+ }
113
+ /* Kludge to turn off filter in ie9+, which also accepts rgba */
114
+ .cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
115
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
116
+ }
117
+ .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
118
+ .CodeMirror-focused pre.CodeMirror-cursor {
119
+ visibility: visible;
120
+ }
121
+
122
+ div.CodeMirror-selected { background: #d9d9d9; }
123
+ .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
124
+
125
+ .CodeMirror-searching {
126
+ background: #ffa;
127
+ background: rgba(255, 255, 0, .4);
128
+ }
129
+
130
+ /* Default theme */
131
+
132
+ .cm-s-default span.cm-keyword {color: #708;}
133
+ .cm-s-default span.cm-atom {color: #219;}
134
+ .cm-s-default span.cm-number {color: #164;}
135
+ .cm-s-default span.cm-def {color: #00f;}
136
+ .cm-s-default span.cm-variable {color: black;}
137
+ .cm-s-default span.cm-variable-2 {color: #05a;}
138
+ .cm-s-default span.cm-variable-3 {color: #085;}
139
+ .cm-s-default span.cm-property {color: black;}
140
+ .cm-s-default span.cm-operator {color: black;}
141
+ .cm-s-default span.cm-comment {color: #a50;}
142
+ .cm-s-default span.cm-string {color: #a11;}
143
+ .cm-s-default span.cm-string-2 {color: #f50;}
144
+ .cm-s-default span.cm-meta {color: #555;}
145
+ .cm-s-default span.cm-error {color: #f00;}
146
+ .cm-s-default span.cm-qualifier {color: #555;}
147
+ .cm-s-default span.cm-builtin {color: #30a;}
148
+ .cm-s-default span.cm-bracket {color: #cc7;}
149
+ .cm-s-default span.cm-tag {color: #170;}
150
+ .cm-s-default span.cm-attribute {color: #00c;}
151
+ .cm-s-default span.cm-header {color: blue;}
152
+ .cm-s-default span.cm-quote {color: #090;}
153
+ .cm-s-default span.cm-hr {color: #999;}
154
+ .cm-s-default span.cm-link {color: #00c;}
155
+
156
+ span.cm-header, span.cm-strong {font-weight: bold;}
157
+ span.cm-em {font-style: italic;}
158
+ span.cm-emstrong {font-style: italic; font-weight: bold;}
159
+ span.cm-link {text-decoration: underline;}
160
+
161
+ span.cm-invalidchar {color: #f00;}
162
+
163
+ div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
164
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
165
+
166
+ @media print {
167
+
168
+ /* Hide the cursor when printing */
169
+ .CodeMirror pre.CodeMirror-cursor {
170
+ visibility: hidden;
171
+ }
172
+
173
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honey-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -23,6 +23,7 @@ files:
23
23
  - vendor/assets/javascripts/codemirror.js
24
24
  - vendor/assets/stylesheets/cms.css.scss
25
25
  - vendor/assets/stylesheets/cms_ui.css.scss
26
+ - vendor/assets/stylesheets/codemirror.css
26
27
  - vendor/assets/stylesheets/html_editor.css.scss
27
28
  - lib/cms/attribute.rb
28
29
  - lib/cms/configuration.rb
@@ -53,6 +54,8 @@ files:
53
54
  - lib/generators/cms/templates/views/show.html.haml
54
55
  - lib/generators/cms/USAGE
55
56
  - lib/honey-cms.rb
57
+ - app/controllers/cms/pages_controller.rb
58
+ - app/views/cms/pages/show.html.haml
56
59
  homepage: https://github.com/honeyco/honey-cms
57
60
  licenses: []
58
61
  post_install_message: