scms 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +3 -0
- data/assets/blank-template/_config.yml +5 -5
- data/assets/blank-template/_views/about/intro.html +2 -0
- data/assets/blank-template/_views/home/intro.md +6 -0
- data/assets/blank-template/_views/{home/main.html → reuse.erb} +3 -3
- data/lib/scms.rb +20 -3
- data/lib/scms/version.rb +1 -1
- metadata +4 -4
- data/assets/blank-template/_views/home/intro.html +0 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDgzOGM3ZWM3MTI5ZDVhMTE0NTk3YmNhMzI1ZWJkM2FiYzZkZmZmYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGQ0OTAzZjhiZjI5ZWNkNDY2NjZmM2VhZDcwZTg2MWI4Yzk2YzAyOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWYxZDA3MWZkODk4OGVhZWNlYzYyZjFmZmMxZDViZDkxNTNjM2FiODI3Yzcz
|
10
|
+
MGY1MDU1MTM2MzA3ZjI1M2E2MjIzNDdiNzRhYWZlMTQ3MDFiZjI0NmVmNWZm
|
11
|
+
NWQzYmRjZTUyOWZmMGQ0Y2NhNzRiNTRlOWI1NGY4ZGI2OWVmY2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWFhODAwMTYwNGIwNGVlMDNmNjY2YzEwZGFlYzNlMmY0MGRhYWI5MTg4ZmFj
|
14
|
+
YjRjNzE0M2VlZGQ4ZTg1M2JlMzVhOTVhMGEyNTRmMTUwZDZhY2E3MmQ2ODg2
|
15
|
+
ZDg1MzIxMGFhM2EzMGE0ZjFiODk4Yjg4NWU5NGVlNmVhN2RkMGI=
|
data/README.md
CHANGED
@@ -19,3 +19,6 @@ Further Reading
|
|
19
19
|
* Homepage: http://cprobert.github.io/Static-CMS
|
20
20
|
* WYSIWYG editor: http://ipassexam.github.io/Air-Monkey/
|
21
21
|
* ERB template language: http://www.stuartellis.eu/articles/erb/
|
22
|
+
|
23
|
+
|
24
|
+
[![Gem Version](https://badge.fury.io/rb/scms.png)](http://badge.fury.io/rb/scms)
|
@@ -9,14 +9,14 @@ pages:
|
|
9
9
|
description: Meta description
|
10
10
|
keywords: "CMS, S3, Ruby"
|
11
11
|
views:
|
12
|
-
intro: _views/home/intro.
|
13
|
-
main: _views/
|
12
|
+
intro: _views/home/intro.md
|
13
|
+
main: "_views/reuse.erb?h1=Heading 1&h2=Heading 2&h3=Heading 3"
|
14
14
|
- about:
|
15
15
|
generate: about.html
|
16
16
|
navigation: About
|
17
17
|
views:
|
18
18
|
intro: _views/about/intro.html
|
19
|
-
main: _views/
|
19
|
+
main: "_views/reuse.erb?h1=Reuse 1&h2=Reuse 2&h3=Reuse 3"
|
20
20
|
- contact: #Pageless for nav only
|
21
21
|
navigation: contact
|
22
22
|
navigation_meta: contactform
|
@@ -25,12 +25,12 @@ pages:
|
|
25
25
|
# Define your bundles here (versioning is recomended if your caching assets)
|
26
26
|
bundles:
|
27
27
|
- script:
|
28
|
-
generate: js/
|
28
|
+
generate: js/script.bundle.min-v2.1.1.js
|
29
29
|
files:
|
30
30
|
- _source/scripts/bootstrap.js
|
31
31
|
- _source/scripts/script.js
|
32
32
|
- style:
|
33
|
-
generate: css/style-1.0.css
|
33
|
+
generate: css/style.bundle-1.0.css
|
34
34
|
files:
|
35
35
|
- _source/stylesheets/bootstrap.css
|
36
36
|
- _source/stylesheets/bootstrap-responsive.css
|
@@ -0,0 +1,6 @@
|
|
1
|
+
Hello, world!
|
2
|
+
=============
|
3
|
+
|
4
|
+
This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.
|
5
|
+
|
6
|
+
<a class="btn btn-primary btn-large">Learn more</a>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<div class="span4">
|
2
|
-
<h2
|
2
|
+
<h2><%= page.view[:model]["h1"] %></h2>
|
3
3
|
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
4
4
|
<p><a class="btn" href="#">View details »</a></p>
|
5
5
|
</div>
|
6
6
|
<div class="span4">
|
7
|
-
<h2
|
7
|
+
<h2><%= page.view[:model]["h2"] %></h2>
|
8
8
|
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
|
9
9
|
<p><a class="btn" href="#">View details »</a></p>
|
10
10
|
</div>
|
11
11
|
<div class="span4">
|
12
|
-
<h2
|
12
|
+
<h2><%= page.view[:model]["h3"] %></h2>
|
13
13
|
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
14
14
|
<p><a class="btn" href="#">View details »</a></p>
|
15
15
|
</div>
|
data/lib/scms.rb
CHANGED
@@ -130,7 +130,15 @@ module Scms
|
|
130
130
|
if pageconfig["views"] != nil
|
131
131
|
pageconfig["views"].each do |view|
|
132
132
|
views[view[0]] = ""
|
133
|
-
|
133
|
+
viewparts = view[1].split("?") # This allows views to have a query string in the config
|
134
|
+
viewname = viewparts[0]
|
135
|
+
viewqs = viewparts[1]
|
136
|
+
|
137
|
+
puts "viewname: #{viewname}, viewqs: #{viewqs}"
|
138
|
+
|
139
|
+
viewpath = File.join(@website, viewname)
|
140
|
+
|
141
|
+
|
134
142
|
if File.exists?(viewpath)
|
135
143
|
begin
|
136
144
|
htmlsnipet = File.read(viewpath)
|
@@ -143,6 +151,9 @@ module Scms
|
|
143
151
|
ScmsUtils.log("Empty view: #{view[1]}")
|
144
152
|
end
|
145
153
|
|
154
|
+
model = Hash.new
|
155
|
+
model = Hash[viewqs.split('&').map{ |q| q.split('=') }] if viewqs != nil
|
156
|
+
|
146
157
|
viewmodel = Hash.new
|
147
158
|
viewmodel = {
|
148
159
|
:name => pagename,
|
@@ -150,7 +161,11 @@ module Scms
|
|
150
161
|
:url => pageurl,
|
151
162
|
:data => pagedata,
|
152
163
|
:rootdir => @website,
|
153
|
-
:resource => resource
|
164
|
+
:resource => resource,
|
165
|
+
:view => {
|
166
|
+
:name => viewname,
|
167
|
+
:model => model
|
168
|
+
}
|
154
169
|
}
|
155
170
|
|
156
171
|
if hasHandler
|
@@ -199,7 +214,9 @@ module Scms
|
|
199
214
|
monkeyhook = "<script src='scripts/air-monkey-hook.js'></script>" if @mode == "cms"
|
200
215
|
|
201
216
|
livereload = ""
|
202
|
-
|
217
|
+
if @mode != "deploy"
|
218
|
+
livereload = "<script>document.write('<script src=\"http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1\"></' + 'script>')</script>" if @mode != "cms"
|
219
|
+
end
|
203
220
|
|
204
221
|
pagemodel = Hash.new
|
205
222
|
pagemodel = {
|
data/lib/scms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Courtenay Probert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cprobert-s3sync
|
@@ -162,8 +162,8 @@ files:
|
|
162
162
|
- assets/blank-template/_source/stylesheets/style.css
|
163
163
|
- assets/blank-template/_views/about/intro.html
|
164
164
|
- assets/blank-template/_views/about/main.html
|
165
|
-
- assets/blank-template/_views/home/intro.
|
166
|
-
- assets/blank-template/_views/
|
165
|
+
- assets/blank-template/_views/home/intro.md
|
166
|
+
- assets/blank-template/_views/reuse.erb
|
167
167
|
- assets/blank-template/images/glyphicons-halflings-white.png
|
168
168
|
- assets/blank-template/images/glyphicons-halflings.png
|
169
169
|
- assets/blank-template/js/jquery-1.8.2.min.js
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<h1>Hello, world!</h1>
|
2
|
-
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
|
3
|
-
<p><a class="btn btn-primary btn-large">Learn more »</a></p>
|