dvl-core 0.0.12 → 0.1.0
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.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/config/locales/en.yml +1 -0
- data/dvl-core.gemspec +4 -5
- data/lib/dvl/components/flashes.rb +2 -0
- data/lib/dvl/components/footer.rb +8 -2
- data/lib/dvl/components/modal.rb +2 -0
- data/lib/dvl/core/version.rb +1 -1
- data/script/preview +1 -1
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +14 -0
- data/spec/dummy/app/assets/stylesheets/application.css +14 -0
- data/spec/dummy/app/controllers/home_controller.rb +3 -0
- data/spec/dummy/app/views/base.rb +41 -0
- data/spec/dummy/app/views/home/flashes.rb +15 -0
- data/spec/dummy/app/views/home/footer.rb +7 -0
- data/spec/dummy/app/views/home/index.rb +204 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +37 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/routes.rb +7 -0
- data/spec/spec_helper.rb +6 -3
- data/vendor/assets/stylesheets/dvl/core/forms.scss +0 -5
- data/vendor/assets/stylesheets/dvl/core/includes.scss +26 -26
- data/vendor/assets/stylesheets/dvl/core/tooltips.scss +1 -1
- metadata +56 -35
- data/preview/app.rb +0 -331
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c777dbfd9ae3d27f2bf2e8da62b5af5700364bd
|
|
4
|
+
data.tar.gz: 7b7675b9abafbb00b3e80b524ff729af5218a53b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45231c013739045389fec1f970dece1779a178c22ae4a3a7ed8eb0bbb8d27a6629b7aca25eca286823d5f052241ed3780118023b3118c1f0b94d30ec8d6aca0a
|
|
7
|
+
data.tar.gz: 0a5308e5d0e8e5e97ef5d54fdb8d9d949a8951d85ec8ab9fe43b52c4688e0be2825a4a1354e87f6211f9f999d7d2af643a92b4a11cbee118c6071080fd4b526c
|
data/.gitignore
CHANGED
data/config/locales/en.yml
CHANGED
|
@@ -2,6 +2,7 @@ en:
|
|
|
2
2
|
dvl_core:
|
|
3
3
|
footer:
|
|
4
4
|
about: " is an application by <a href='http://www.dobt.co' target='_blank'>The Department of Better Technology</a>."
|
|
5
|
+
about_no_app: "Built by <a href='http://www.dobt.co' target='_blank'>The Department of Better Technology</a>."
|
|
5
6
|
status: Service Status
|
|
6
7
|
legal: Legal
|
|
7
8
|
help: Get Help
|
data/dvl-core.gemspec
CHANGED
|
@@ -21,11 +21,10 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
s.add_dependency 'erector-rails4'
|
|
22
22
|
s.add_dependency 'sass'
|
|
23
23
|
|
|
24
|
-
s.add_development_dependency '
|
|
24
|
+
s.add_development_dependency 'autoprefixer-rails', '4.0.2.2'
|
|
25
|
+
s.add_development_dependency 'capybara', '2.4.4'
|
|
25
26
|
s.add_development_dependency 'poltergeist', '1.5.1'
|
|
26
|
-
s.add_development_dependency '
|
|
27
|
-
s.add_development_dependency 'rspec', '3.1.0'
|
|
27
|
+
s.add_development_dependency 'rails', '4.2.0'
|
|
28
|
+
s.add_development_dependency 'rspec-rails', '3.1.0'
|
|
28
29
|
s.add_development_dependency 'rspec-html-matchers', '0.6.1'
|
|
29
|
-
s.add_development_dependency 'sinatra', '1.4.5'
|
|
30
|
-
s.add_development_dependency 'sinatra-assetpack', '0.3.3'
|
|
31
30
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'erector'
|
|
2
|
+
|
|
1
3
|
class Dvl::Components::Footer < Erector::Widget
|
|
2
4
|
needs :application_name
|
|
3
5
|
|
|
@@ -5,8 +7,12 @@ class Dvl::Components::Footer < Erector::Widget
|
|
|
5
7
|
footer.footer {
|
|
6
8
|
div.footer_inner {
|
|
7
9
|
span {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
if @application_name
|
|
11
|
+
text @application_name
|
|
12
|
+
rawtext t('dvl_core.footer.about')
|
|
13
|
+
else
|
|
14
|
+
rawtext t('dvl_core.footer.about_no_app')
|
|
15
|
+
end
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
ul {
|
data/lib/dvl/components/modal.rb
CHANGED
data/lib/dvl/core/version.rb
CHANGED
data/script/preview
CHANGED
data/spec/dummy/Rakefile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
+
// listed below.
|
|
3
|
+
//
|
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
|
6
|
+
//
|
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
+
// compiled file.
|
|
9
|
+
//
|
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
|
11
|
+
// about supported directives.
|
|
12
|
+
//
|
|
13
|
+
//= require dvl/core
|
|
14
|
+
//= require dvl/components/flashes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
|
10
|
+
*
|
|
11
|
+
*= require dvl/core
|
|
12
|
+
*= require dvl/components/flashes
|
|
13
|
+
*= require dvl/components/footer
|
|
14
|
+
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
class Views::Base < Erector::Widget
|
|
2
|
+
def content
|
|
3
|
+
rawtext '<!doctype html>'
|
|
4
|
+
html {
|
|
5
|
+
head {
|
|
6
|
+
link href: '//fonts.googleapis.com/css?family=Open+Sans:400,300,700,600', rel: 'stylesheet', type: 'text/css'
|
|
7
|
+
stylesheet_link_tag 'application', media: 'all'
|
|
8
|
+
style(type: 'text/css') {
|
|
9
|
+
rawtext %{
|
|
10
|
+
body {
|
|
11
|
+
padding: 0 1rem 1rem;
|
|
12
|
+
background: white;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.section_header {
|
|
16
|
+
font-size: 1.6rem;
|
|
17
|
+
padding: 1rem 0 0.25rem;
|
|
18
|
+
margin-bottom: 1rem;
|
|
19
|
+
border-bottom: 1px solid #eee;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
body {
|
|
25
|
+
main
|
|
26
|
+
script src: '//code.jquery.com/jquery-1.11.1.min.js'
|
|
27
|
+
javascript_include_tag 'application'
|
|
28
|
+
script %{
|
|
29
|
+
$('[data-toggle="tooltip"]').tooltip()
|
|
30
|
+
}.html_safe
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def docs(name, &block)
|
|
38
|
+
div.section_header name, id: name.downcase
|
|
39
|
+
yield
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class Views::Home::Flashes < Views::Base
|
|
2
|
+
def main
|
|
3
|
+
ul {
|
|
4
|
+
li {
|
|
5
|
+
a 'Success', href: 'javascript:DvlFlash("success", "You did it!")'
|
|
6
|
+
}
|
|
7
|
+
li {
|
|
8
|
+
a 'Info', href: 'javascript:DvlFlash("info", "An informational message...")'
|
|
9
|
+
}
|
|
10
|
+
li {
|
|
11
|
+
a 'Error', href: 'javascript:DvlFlash("error", "Oh no, an error occured!")'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
class Views::Home::Index < Views::Base
|
|
2
|
+
def main
|
|
3
|
+
docs 'Buttons' do
|
|
4
|
+
a.button 'Yo!'
|
|
5
|
+
text ' '
|
|
6
|
+
a.button.info 'Info'
|
|
7
|
+
text ' '
|
|
8
|
+
a.button.primary 'Primary'
|
|
9
|
+
text ' '
|
|
10
|
+
a.button.success 'Success'
|
|
11
|
+
text ' '
|
|
12
|
+
a.button.white 'White'
|
|
13
|
+
text ' '
|
|
14
|
+
a.button_uppercase 'Uppercase'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
docs 'Code' do
|
|
18
|
+
pre %{<p>This is some awesome code</p>}
|
|
19
|
+
p %{This is a paragraph with <code>code</code>.}.html_safe
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
docs 'Dropdowns' do
|
|
23
|
+
span.dropdown {
|
|
24
|
+
a.dropdown_toggle 'Click me',
|
|
25
|
+
'data-toggle' => 'dropdown'
|
|
26
|
+
div.dropdown_menu {
|
|
27
|
+
ul.dropdown_body {
|
|
28
|
+
li {
|
|
29
|
+
a 'Hey! This is some really long dropdown text, yo.'
|
|
30
|
+
}
|
|
31
|
+
li {
|
|
32
|
+
a 'No!'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
docs 'Forms' do
|
|
40
|
+
form {
|
|
41
|
+
input type: 'text'
|
|
42
|
+
label.checkbox {
|
|
43
|
+
input type: 'checkbox'
|
|
44
|
+
text 'Foo'
|
|
45
|
+
}
|
|
46
|
+
div.input_sub {
|
|
47
|
+
label.checkbox {
|
|
48
|
+
input type: 'checkbox'
|
|
49
|
+
text 'This is a sub-option of foo.'
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
div.form_actions {
|
|
53
|
+
button.button.primary 'Submit'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
docs 'Grid' do
|
|
59
|
+
div.grid {
|
|
60
|
+
div.item.six_columns 'six_columns'
|
|
61
|
+
div.item.six_columns 'six_columns'
|
|
62
|
+
}
|
|
63
|
+
div.grid.gutter_none {
|
|
64
|
+
div.item.three_columns 'three_columns (gutter_none)'
|
|
65
|
+
div.item.three_columns 'three_columns (gutter_none)'
|
|
66
|
+
div.item.three_columns 'three_columns (gutter_none)'
|
|
67
|
+
div.item.three_columns 'three_columns (gutter_none)'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
docs 'Labels' do
|
|
72
|
+
span.label.label_error 'Error'
|
|
73
|
+
text ' '
|
|
74
|
+
span.label.label_success 'Success'
|
|
75
|
+
text ' '
|
|
76
|
+
span.label.label_info 'Info'
|
|
77
|
+
text ' '
|
|
78
|
+
span.label.label_warning 'Warning'
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
docs 'Links' do
|
|
82
|
+
a.uppercase 'Uppercase'
|
|
83
|
+
text ' '
|
|
84
|
+
a.smallbold 'Smallbold'
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
docs 'Lists' do
|
|
88
|
+
ul {
|
|
89
|
+
li 'This'
|
|
90
|
+
li 'is a'
|
|
91
|
+
li 'list!'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
docs 'Modals' do
|
|
96
|
+
a 'Open modal', 'data-toggle' => 'modal', href: '#modal'
|
|
97
|
+
widget Dvl::Components::Modal.new(title: 'Awesome modal', id: 'modal') do
|
|
98
|
+
div.modal_body {
|
|
99
|
+
text 'This is the modal body!'
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
br
|
|
104
|
+
|
|
105
|
+
a 'Confirmation modal', 'data-toggle' => 'modal', href: '#confirmModal'
|
|
106
|
+
widget Dvl::Components::Modal.new(
|
|
107
|
+
title: 'Are you sure?',
|
|
108
|
+
id: 'confirmModal',
|
|
109
|
+
html_opts: { class: 'modal_confirm' }
|
|
110
|
+
) do
|
|
111
|
+
div.modal_body {
|
|
112
|
+
text 'Are you sure?'
|
|
113
|
+
}
|
|
114
|
+
div.modal_footer {
|
|
115
|
+
a.button.error 'OK'
|
|
116
|
+
}
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
docs 'Pagination' do
|
|
121
|
+
div(class: 'pagination-wrapper') {
|
|
122
|
+
ul {
|
|
123
|
+
li { a '‹' }
|
|
124
|
+
li { a '1' }
|
|
125
|
+
li { span '2' }
|
|
126
|
+
li { a '3' }
|
|
127
|
+
li { a '›' }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
docs 'Progress' do
|
|
133
|
+
div.progress {
|
|
134
|
+
div.progress_inner(style: "width: 30%") {
|
|
135
|
+
text '30%'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
docs 'Sidebar' do
|
|
141
|
+
div.sidebar_box {
|
|
142
|
+
ul.sidebar_data {
|
|
143
|
+
li {
|
|
144
|
+
div.sidebar_data_icon {
|
|
145
|
+
i '✓'
|
|
146
|
+
}
|
|
147
|
+
div.sidebar_data_text {
|
|
148
|
+
div.sidebar_data_label 'Label'
|
|
149
|
+
div.sidebar_data_value 'Value'
|
|
150
|
+
div.sidebar_data_details 'Details'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
docs 'Tables' do
|
|
158
|
+
table {
|
|
159
|
+
thead {
|
|
160
|
+
tr {
|
|
161
|
+
th 'ID'
|
|
162
|
+
th 'Name'
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
tbody {
|
|
166
|
+
tr {
|
|
167
|
+
td '1'
|
|
168
|
+
td 'Bob'
|
|
169
|
+
}
|
|
170
|
+
tr {
|
|
171
|
+
td '2'
|
|
172
|
+
td 'Job'
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
docs 'Tooltips' do
|
|
179
|
+
%w(top right bottom left).each do |x|
|
|
180
|
+
a x.capitalize,
|
|
181
|
+
'data-toggle' => 'tooltip',
|
|
182
|
+
'data-placement' => x,
|
|
183
|
+
'data-container' => 'body',
|
|
184
|
+
title: "Tooltip on the #{x}!"
|
|
185
|
+
text ' '
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
docs 'Typography' do
|
|
190
|
+
h1 'Heading 1'
|
|
191
|
+
h2 'Heading 2'
|
|
192
|
+
h3 'Heading 3'
|
|
193
|
+
h4 'Heading 4'
|
|
194
|
+
h5 'Heading 5'
|
|
195
|
+
h6 'Heading 6'
|
|
196
|
+
p 'Lorem ipsum.'
|
|
197
|
+
|
|
198
|
+
p.microcopy {
|
|
199
|
+
text 'This is some awesome .microcopy.'
|
|
200
|
+
a.microcopy_action 'Microcopy action'
|
|
201
|
+
}
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
data/spec/dummy/bin/rake
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require 'pathname'
|
|
3
|
+
|
|
4
|
+
# path to your application root.
|
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
6
|
+
|
|
7
|
+
Dir.chdir APP_ROOT do
|
|
8
|
+
# This script is a starting point to setup your application.
|
|
9
|
+
# Add necessary setup steps to this file:
|
|
10
|
+
|
|
11
|
+
puts "== Installing dependencies =="
|
|
12
|
+
system "gem install bundler --conservative"
|
|
13
|
+
system "bundle check || bundle install"
|
|
14
|
+
|
|
15
|
+
# puts "\n== Copying sample files =="
|
|
16
|
+
# unless File.exist?("config/database.yml")
|
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
|
18
|
+
# end
|
|
19
|
+
|
|
20
|
+
puts "\n== Preparing database =="
|
|
21
|
+
system "bin/rake db:setup"
|
|
22
|
+
|
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
|
24
|
+
system "rm -f log/*"
|
|
25
|
+
system "rm -rf tmp/cache"
|
|
26
|
+
|
|
27
|
+
puts "\n== Restarting application server =="
|
|
28
|
+
system "touch tmp/restart.txt"
|
|
29
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
require "rails"
|
|
4
|
+
|
|
5
|
+
%w(
|
|
6
|
+
action_controller
|
|
7
|
+
action_view
|
|
8
|
+
action_mailer
|
|
9
|
+
active_job
|
|
10
|
+
rails/test_unit
|
|
11
|
+
sprockets
|
|
12
|
+
).each do |framework|
|
|
13
|
+
begin
|
|
14
|
+
require "#{framework}/railtie"
|
|
15
|
+
rescue LoadError
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Bundler.require(*Rails.groups)
|
|
20
|
+
|
|
21
|
+
module Dummy
|
|
22
|
+
class Application < Rails::Application
|
|
23
|
+
# Settings in config/environments/* take precedence over those specified here.
|
|
24
|
+
# Application configuration should go into files in config/initializers
|
|
25
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
26
|
+
|
|
27
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
28
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
29
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
30
|
+
|
|
31
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
32
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
33
|
+
# config.i18n.default_locale = :de
|
|
34
|
+
config.secret_key_base = 'xxx'
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# The test environment is used exclusively to run your application's
|
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
|
8
|
+
config.cache_classes = true
|
|
9
|
+
|
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
|
13
|
+
config.eager_load = false
|
|
14
|
+
|
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
|
16
|
+
config.serve_static_files = true
|
|
17
|
+
config.static_cache_control = "public, max-age=3600"
|
|
18
|
+
|
|
19
|
+
# Show full error reports and disable caching.
|
|
20
|
+
config.consider_all_requests_local = true
|
|
21
|
+
config.action_controller.perform_caching = false
|
|
22
|
+
|
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
|
24
|
+
config.action_dispatch.show_exceptions = false
|
|
25
|
+
|
|
26
|
+
# Disable request forgery protection in test environment.
|
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
|
28
|
+
|
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
|
31
|
+
# ActionMailer::Base.deliveries array.
|
|
32
|
+
config.action_mailer.delivery_method = :test
|
|
33
|
+
|
|
34
|
+
# Print deprecation notices to the stderr.
|
|
35
|
+
config.active_support.deprecation = :stderr
|
|
36
|
+
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
|
2
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
|
3
|
+
|
|
4
|
+
Rails.backtrace_cleaner.remove_silencers!
|
|
5
|
+
|
|
6
|
+
require 'rspec/rails'
|
|
1
7
|
require 'capybara/rspec'
|
|
2
8
|
require 'capybara/poltergeist'
|
|
3
9
|
require 'rspec-html-matchers'
|
|
4
10
|
require 'active_support/all'
|
|
5
|
-
require 'erector'
|
|
6
11
|
require 'dvl/core'
|
|
7
|
-
require_relative '../preview/app'
|
|
8
12
|
|
|
9
|
-
Capybara.app = App
|
|
10
13
|
Capybara.javascript_driver = :poltergeist
|
|
11
14
|
|
|
12
15
|
def take_screenshot(path, name, opts = {})
|
|
@@ -104,14 +104,9 @@ input[type="radio"] {
|
|
|
104
104
|
padding: 0; /* 2 */
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
|
-
* 1. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
|
108
|
-
* (include `-moz` to future-proof)
|
|
109
107
|
* 2. Address `appearance` set to `searchfield` in Safari 5 and Chrome
|
|
110
108
|
*/
|
|
111
109
|
input[type="search"] {
|
|
112
|
-
-webkit-box-sizing: content-box; /* 1 */
|
|
113
|
-
-moz-box-sizing: content-box;
|
|
114
|
-
box-sizing: content-box;
|
|
115
110
|
-webkit-appearance: textfield; /* 2 */
|
|
116
111
|
}
|
|
117
112
|
/* Remove decoration & cancel button in Safari 5 and Chrome on OS X */
|
|
@@ -94,32 +94,32 @@ $fontSize: 14;
|
|
|
94
94
|
|
|
95
95
|
// Animation mixins
|
|
96
96
|
|
|
97
|
-
$
|
|
98
|
-
$
|
|
99
|
-
$
|
|
100
|
-
$
|
|
101
|
-
$
|
|
102
|
-
$
|
|
103
|
-
$
|
|
104
|
-
$
|
|
105
|
-
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
109
|
-
$
|
|
110
|
-
$
|
|
111
|
-
$
|
|
112
|
-
$
|
|
113
|
-
$
|
|
114
|
-
|
|
115
|
-
$
|
|
116
|
-
$
|
|
117
|
-
$
|
|
118
|
-
$
|
|
119
|
-
$
|
|
120
|
-
$
|
|
121
|
-
$
|
|
122
|
-
$
|
|
97
|
+
$easeInQuad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
|
98
|
+
$easeInCubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
|
99
|
+
$easeInQuart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
|
100
|
+
$easeInQuint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
|
101
|
+
$easeInSine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
|
102
|
+
$easeInExpo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
|
103
|
+
$easeInCirc: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
|
104
|
+
$easeInBack: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
|
105
|
+
|
|
106
|
+
$easeOutQuad: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
|
107
|
+
$easeOutCubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
108
|
+
$easeOutQuart: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
|
109
|
+
$easeOutQuint: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
|
110
|
+
$easeOutSine: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
|
111
|
+
$easeOutExpo: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
|
112
|
+
$easeOutCirc: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
|
113
|
+
$easeOutBack: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
|
114
|
+
|
|
115
|
+
$easeInOutQuad: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
|
116
|
+
$easeInOutCubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
|
117
|
+
$easeInOutQuart: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
|
118
|
+
$easeInOutQuint: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
|
119
|
+
$easeInOutSine: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
|
120
|
+
$easeInOutExpo: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
|
121
|
+
$easeInOutCirc: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
|
122
|
+
$easeInOutBack: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
@mixin cf() {
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dvl-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Becker
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-01-
|
|
11
|
+
date: 2015-01-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -67,103 +67,89 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: autoprefixer-rails
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - '='
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
75
|
+
version: 4.0.2.2
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - '='
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: poltergeist
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - '='
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: 1.5.1
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - '='
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: 1.5.1
|
|
82
|
+
version: 4.0.2.2
|
|
97
83
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
84
|
+
name: capybara
|
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
|
100
86
|
requirements:
|
|
101
87
|
- - '='
|
|
102
88
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
89
|
+
version: 2.4.4
|
|
104
90
|
type: :development
|
|
105
91
|
prerelease: false
|
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
93
|
requirements:
|
|
108
94
|
- - '='
|
|
109
95
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
96
|
+
version: 2.4.4
|
|
111
97
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
98
|
+
name: poltergeist
|
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
|
114
100
|
requirements:
|
|
115
101
|
- - '='
|
|
116
102
|
- !ruby/object:Gem::Version
|
|
117
|
-
version:
|
|
103
|
+
version: 1.5.1
|
|
118
104
|
type: :development
|
|
119
105
|
prerelease: false
|
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
107
|
requirements:
|
|
122
108
|
- - '='
|
|
123
109
|
- !ruby/object:Gem::Version
|
|
124
|
-
version:
|
|
110
|
+
version: 1.5.1
|
|
125
111
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
112
|
+
name: rails
|
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
|
128
114
|
requirements:
|
|
129
115
|
- - '='
|
|
130
116
|
- !ruby/object:Gem::Version
|
|
131
|
-
version:
|
|
117
|
+
version: 4.2.0
|
|
132
118
|
type: :development
|
|
133
119
|
prerelease: false
|
|
134
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
121
|
requirements:
|
|
136
122
|
- - '='
|
|
137
123
|
- !ruby/object:Gem::Version
|
|
138
|
-
version:
|
|
124
|
+
version: 4.2.0
|
|
139
125
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
126
|
+
name: rspec-rails
|
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
|
142
128
|
requirements:
|
|
143
129
|
- - '='
|
|
144
130
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: 1.
|
|
131
|
+
version: 3.1.0
|
|
146
132
|
type: :development
|
|
147
133
|
prerelease: false
|
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
135
|
requirements:
|
|
150
136
|
- - '='
|
|
151
137
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: 1.
|
|
138
|
+
version: 3.1.0
|
|
153
139
|
- !ruby/object:Gem::Dependency
|
|
154
|
-
name:
|
|
140
|
+
name: rspec-html-matchers
|
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
|
156
142
|
requirements:
|
|
157
143
|
- - '='
|
|
158
144
|
- !ruby/object:Gem::Version
|
|
159
|
-
version: 0.
|
|
145
|
+
version: 0.6.1
|
|
160
146
|
type: :development
|
|
161
147
|
prerelease: false
|
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
149
|
requirements:
|
|
164
150
|
- - '='
|
|
165
151
|
- !ruby/object:Gem::Version
|
|
166
|
-
version: 0.
|
|
152
|
+
version: 0.6.1
|
|
167
153
|
description:
|
|
168
154
|
email: adam@dobt.co
|
|
169
155
|
executables: []
|
|
@@ -182,11 +168,28 @@ files:
|
|
|
182
168
|
- lib/dvl/components/modal.rb
|
|
183
169
|
- lib/dvl/core.rb
|
|
184
170
|
- lib/dvl/core/version.rb
|
|
185
|
-
- preview/app.rb
|
|
186
171
|
- script/bootstrap
|
|
187
172
|
- script/cibuild
|
|
188
173
|
- script/preview
|
|
189
174
|
- script/release
|
|
175
|
+
- spec/dummy/Rakefile
|
|
176
|
+
- spec/dummy/app/assets/javascripts/application.js
|
|
177
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
|
178
|
+
- spec/dummy/app/controllers/home_controller.rb
|
|
179
|
+
- spec/dummy/app/views/base.rb
|
|
180
|
+
- spec/dummy/app/views/home/flashes.rb
|
|
181
|
+
- spec/dummy/app/views/home/footer.rb
|
|
182
|
+
- spec/dummy/app/views/home/index.rb
|
|
183
|
+
- spec/dummy/bin/bundle
|
|
184
|
+
- spec/dummy/bin/rails
|
|
185
|
+
- spec/dummy/bin/rake
|
|
186
|
+
- spec/dummy/bin/setup
|
|
187
|
+
- spec/dummy/config.ru
|
|
188
|
+
- spec/dummy/config/application.rb
|
|
189
|
+
- spec/dummy/config/boot.rb
|
|
190
|
+
- spec/dummy/config/environment.rb
|
|
191
|
+
- spec/dummy/config/environments/test.rb
|
|
192
|
+
- spec/dummy/config/routes.rb
|
|
190
193
|
- spec/dvl_flashes_spec.rb
|
|
191
194
|
- spec/main_spec.rb
|
|
192
195
|
- spec/spec_helper.rb
|
|
@@ -245,6 +248,24 @@ signing_key:
|
|
|
245
248
|
specification_version: 4
|
|
246
249
|
summary: Base styles for the DOBT View Layer.
|
|
247
250
|
test_files:
|
|
251
|
+
- spec/dummy/Rakefile
|
|
252
|
+
- spec/dummy/app/assets/javascripts/application.js
|
|
253
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
|
254
|
+
- spec/dummy/app/controllers/home_controller.rb
|
|
255
|
+
- spec/dummy/app/views/base.rb
|
|
256
|
+
- spec/dummy/app/views/home/flashes.rb
|
|
257
|
+
- spec/dummy/app/views/home/footer.rb
|
|
258
|
+
- spec/dummy/app/views/home/index.rb
|
|
259
|
+
- spec/dummy/bin/bundle
|
|
260
|
+
- spec/dummy/bin/rails
|
|
261
|
+
- spec/dummy/bin/rake
|
|
262
|
+
- spec/dummy/bin/setup
|
|
263
|
+
- spec/dummy/config.ru
|
|
264
|
+
- spec/dummy/config/application.rb
|
|
265
|
+
- spec/dummy/config/boot.rb
|
|
266
|
+
- spec/dummy/config/environment.rb
|
|
267
|
+
- spec/dummy/config/environments/test.rb
|
|
268
|
+
- spec/dummy/config/routes.rb
|
|
248
269
|
- spec/dvl_flashes_spec.rb
|
|
249
270
|
- spec/main_spec.rb
|
|
250
271
|
- spec/spec_helper.rb
|
data/preview/app.rb
DELETED
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
require 'sinatra/base'
|
|
2
|
-
require 'sinatra/assetpack'
|
|
3
|
-
require 'active_support/all'
|
|
4
|
-
require 'erector'
|
|
5
|
-
require 'dvl/core'
|
|
6
|
-
require 'yaml'
|
|
7
|
-
|
|
8
|
-
module AppHelpers
|
|
9
|
-
def docs(name, &block)
|
|
10
|
-
div.section_header name, id: name.downcase
|
|
11
|
-
yield
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def translations
|
|
15
|
-
@translations ||= YAML::load(File.read("#{File.dirname(__FILE__)}/../config/locales/en.yml"))['en']
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def t(key)
|
|
19
|
-
pieces = key.split('.')
|
|
20
|
-
found = translations.dup
|
|
21
|
-
|
|
22
|
-
while pieces.length > 0
|
|
23
|
-
found = found[pieces.shift] || {}
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
found
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
Erector::HTMLWidget.send(:include, AppHelpers)
|
|
31
|
-
|
|
32
|
-
module Views
|
|
33
|
-
class Base < Erector::Widget
|
|
34
|
-
def content
|
|
35
|
-
rawtext '<!doctype html>'
|
|
36
|
-
html {
|
|
37
|
-
head {
|
|
38
|
-
link href: '//fonts.googleapis.com/css?family=Open+Sans:400,300,700,600', rel: 'stylesheet', type: 'text/css'
|
|
39
|
-
|
|
40
|
-
link href: '/css/dvl/core.css', rel: 'stylesheet', type: 'text/css', media: 'all'
|
|
41
|
-
link href: '/css/dvl/components/flashes.css', rel: 'stylesheet', type: 'text/css', media: 'all'
|
|
42
|
-
link href: '/css/dvl/components/footer.css', rel: 'stylesheet', type: 'text/css', media: 'all'
|
|
43
|
-
style(type: 'text/css') {
|
|
44
|
-
rawtext %{
|
|
45
|
-
body {
|
|
46
|
-
padding: 0 1rem 1rem;
|
|
47
|
-
background: white;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.section_header {
|
|
51
|
-
font-size: 1.6rem;
|
|
52
|
-
padding: 1rem 0 0.25rem;
|
|
53
|
-
margin-bottom: 1rem;
|
|
54
|
-
border-bottom: 1px solid #eee;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
body {
|
|
60
|
-
main
|
|
61
|
-
|
|
62
|
-
script src: '//code.jquery.com/jquery-1.11.1.min.js'
|
|
63
|
-
script src: '/js/dvl/core/modals.js'
|
|
64
|
-
script src: '/js/dvl/core/dropdowns.js'
|
|
65
|
-
script src: '/js/dvl/core/tooltips.js'
|
|
66
|
-
script src: '/js/dvl/core/buttons.js'
|
|
67
|
-
script src: '/js/dvl/components/flashes.js'
|
|
68
|
-
script %{
|
|
69
|
-
$('[data-toggle="tooltip"]').tooltip()
|
|
70
|
-
}.html_safe
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
class Home < Base
|
|
77
|
-
def main
|
|
78
|
-
docs 'Buttons' do
|
|
79
|
-
a.button 'Yo!'
|
|
80
|
-
text ' '
|
|
81
|
-
a.button.info 'Info'
|
|
82
|
-
text ' '
|
|
83
|
-
a.button.primary 'Primary'
|
|
84
|
-
text ' '
|
|
85
|
-
a.button.success 'Success'
|
|
86
|
-
text ' '
|
|
87
|
-
a.button.white 'White'
|
|
88
|
-
text ' '
|
|
89
|
-
a.button_uppercase 'Uppercase'
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
docs 'Code' do
|
|
93
|
-
pre %{<p>This is some awesome code</p>}
|
|
94
|
-
p %{This is a paragraph with <code>code</code>.}.html_safe
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
docs 'Dropdowns' do
|
|
98
|
-
span.dropdown {
|
|
99
|
-
a.dropdown_toggle 'Click me',
|
|
100
|
-
'data-toggle' => 'dropdown'
|
|
101
|
-
div.dropdown_menu {
|
|
102
|
-
ul.dropdown_body {
|
|
103
|
-
li {
|
|
104
|
-
a 'Hey! This is some really long dropdown text, yo.'
|
|
105
|
-
}
|
|
106
|
-
li {
|
|
107
|
-
a 'No!'
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
docs 'Forms' do
|
|
115
|
-
form {
|
|
116
|
-
input type: 'text'
|
|
117
|
-
label.checkbox {
|
|
118
|
-
input type: 'checkbox'
|
|
119
|
-
text 'Foo'
|
|
120
|
-
}
|
|
121
|
-
div.input_sub {
|
|
122
|
-
label.checkbox {
|
|
123
|
-
input type: 'checkbox'
|
|
124
|
-
text 'This is a sub-option of foo.'
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
div.form_actions {
|
|
128
|
-
button.button.primary 'Submit'
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
docs 'Grid' do
|
|
134
|
-
div.grid {
|
|
135
|
-
div.item.six_columns 'six_columns'
|
|
136
|
-
div.item.six_columns 'six_columns'
|
|
137
|
-
}
|
|
138
|
-
div.grid.gutter_none {
|
|
139
|
-
div.item.three_columns 'three_columns (gutter_none)'
|
|
140
|
-
div.item.three_columns 'three_columns (gutter_none)'
|
|
141
|
-
div.item.three_columns 'three_columns (gutter_none)'
|
|
142
|
-
div.item.three_columns 'three_columns (gutter_none)'
|
|
143
|
-
}
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
docs 'Labels' do
|
|
147
|
-
span.label.label_error 'Error'
|
|
148
|
-
text ' '
|
|
149
|
-
span.label.label_success 'Success'
|
|
150
|
-
text ' '
|
|
151
|
-
span.label.label_info 'Info'
|
|
152
|
-
text ' '
|
|
153
|
-
span.label.label_warning 'Warning'
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
docs 'Links' do
|
|
157
|
-
a.uppercase 'Uppercase'
|
|
158
|
-
text ' '
|
|
159
|
-
a.smallbold 'Smallbold'
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
docs 'Lists' do
|
|
163
|
-
ul {
|
|
164
|
-
li 'This'
|
|
165
|
-
li 'is a'
|
|
166
|
-
li 'list!'
|
|
167
|
-
}
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
docs 'Modals' do
|
|
171
|
-
a 'Open modal', 'data-toggle' => 'modal', href: '#modal'
|
|
172
|
-
widget Dvl::Components::Modal.new(title: 'Awesome modal', id: 'modal') do
|
|
173
|
-
div.modal_body {
|
|
174
|
-
text 'This is the modal body!'
|
|
175
|
-
}
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
br
|
|
179
|
-
|
|
180
|
-
a 'Confirmation modal', 'data-toggle' => 'modal', href: '#confirmModal'
|
|
181
|
-
widget Dvl::Components::Modal.new(
|
|
182
|
-
title: 'Are you sure?',
|
|
183
|
-
id: 'confirmModal',
|
|
184
|
-
html_opts: { class: 'modal_confirm' }
|
|
185
|
-
) do
|
|
186
|
-
div.modal_body {
|
|
187
|
-
text 'Are you sure?'
|
|
188
|
-
}
|
|
189
|
-
div.modal_footer {
|
|
190
|
-
a.button.error 'OK'
|
|
191
|
-
}
|
|
192
|
-
end
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
docs 'Pagination' do
|
|
196
|
-
div(class: 'pagination-wrapper') {
|
|
197
|
-
ul {
|
|
198
|
-
li { a '‹' }
|
|
199
|
-
li { a '1' }
|
|
200
|
-
li { span '2' }
|
|
201
|
-
li { a '3' }
|
|
202
|
-
li { a '›' }
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
docs 'Progress' do
|
|
208
|
-
div.progress {
|
|
209
|
-
div.progress_inner(style: "width: 30%") {
|
|
210
|
-
text '30%'
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
docs 'Sidebar' do
|
|
216
|
-
div.sidebar_box {
|
|
217
|
-
ul.sidebar_data {
|
|
218
|
-
li {
|
|
219
|
-
div.sidebar_data_icon {
|
|
220
|
-
i '✓'
|
|
221
|
-
}
|
|
222
|
-
div.sidebar_data_text {
|
|
223
|
-
div.sidebar_data_label 'Label'
|
|
224
|
-
div.sidebar_data_value 'Value'
|
|
225
|
-
div.sidebar_data_details 'Details'
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
docs 'Tables' do
|
|
233
|
-
table {
|
|
234
|
-
thead {
|
|
235
|
-
tr {
|
|
236
|
-
th 'ID'
|
|
237
|
-
th 'Name'
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
tbody {
|
|
241
|
-
tr {
|
|
242
|
-
td '1'
|
|
243
|
-
td 'Bob'
|
|
244
|
-
}
|
|
245
|
-
tr {
|
|
246
|
-
td '2'
|
|
247
|
-
td 'Job'
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
docs 'Tooltips' do
|
|
254
|
-
%w(top right bottom left).each do |x|
|
|
255
|
-
a x.capitalize,
|
|
256
|
-
'data-toggle' => 'tooltip',
|
|
257
|
-
'data-placement' => x,
|
|
258
|
-
'data-container' => 'body',
|
|
259
|
-
title: "Tooltip on the #{x}!"
|
|
260
|
-
text ' '
|
|
261
|
-
end
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
docs 'Typography' do
|
|
265
|
-
h1 'Heading 1'
|
|
266
|
-
h2 'Heading 2'
|
|
267
|
-
h3 'Heading 3'
|
|
268
|
-
h4 'Heading 4'
|
|
269
|
-
h5 'Heading 5'
|
|
270
|
-
h6 'Heading 6'
|
|
271
|
-
p 'Lorem ipsum.'
|
|
272
|
-
|
|
273
|
-
p.microcopy {
|
|
274
|
-
text 'This is some awesome .microcopy.'
|
|
275
|
-
a.microcopy_action 'Microcopy action'
|
|
276
|
-
}
|
|
277
|
-
end
|
|
278
|
-
end
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
class Flashes < Base
|
|
282
|
-
def main
|
|
283
|
-
ul {
|
|
284
|
-
li {
|
|
285
|
-
a 'Success', href: 'javascript:DvlFlash("success", "You did it!")'
|
|
286
|
-
}
|
|
287
|
-
li {
|
|
288
|
-
a 'Info', href: 'javascript:DvlFlash("info", "An informational message...")'
|
|
289
|
-
}
|
|
290
|
-
li {
|
|
291
|
-
a 'Error', href: 'javascript:DvlFlash("error", "Oh no, an error occured!")'
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
end
|
|
295
|
-
end
|
|
296
|
-
|
|
297
|
-
class Footer < Base
|
|
298
|
-
def main
|
|
299
|
-
br
|
|
300
|
-
br
|
|
301
|
-
widget Dvl::Components::Footer.new(application_name: 'dvl-core')
|
|
302
|
-
end
|
|
303
|
-
end
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
class App < Sinatra::Base
|
|
307
|
-
|
|
308
|
-
set :root, File.dirname(__FILE__)
|
|
309
|
-
set :scss, { load_paths: [ "#{self.root}/../vendor/assets/stylesheets", "#{self.root}/../vendor/assets/stylesheets/dvl" ] }
|
|
310
|
-
|
|
311
|
-
register Sinatra::AssetPack
|
|
312
|
-
|
|
313
|
-
assets do
|
|
314
|
-
serve '/css', from: '../vendor/assets/stylesheets'
|
|
315
|
-
serve '/js', from: '../vendor/assets/javascripts'
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
get '/' do
|
|
319
|
-
Views::Home.new.to_html
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
get '/flashes' do
|
|
323
|
-
Views::Flashes.new.to_html
|
|
324
|
-
end
|
|
325
|
-
|
|
326
|
-
get '/footer' do
|
|
327
|
-
Views::Footer.new.to_html
|
|
328
|
-
end
|
|
329
|
-
|
|
330
|
-
run! if app_file == $0
|
|
331
|
-
end
|