artifact 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,27 @@
1
+ <form class="hidden" id="upload-form" method="post" action="<%= url('/uploads') %>" enctype="multipart/form-data">
2
+ <input name="file" type="file" multiple />
3
+ <button class="btn btn-primary" type="submit">Upload</button>
4
+ </form>
5
+
6
+ <div class="dropzone-previews"></div>
7
+
8
+ <link rel="stylesheet" href="<%= url('/css/dropzone.css') %>" type="text/css" media="screen" charset="utf-8" />
9
+ <script src="<%= url('/js/dropzone.js') %>"></script>
10
+ <script>
11
+
12
+ new Dropzone(document.body, {
13
+ previewsContainer: ".dropzone-previews",
14
+ clickable: false,
15
+ url: "<%= url('/uploads') %>",
16
+ init: function() {
17
+ this.on("addedfile", function(file) {
18
+ setTimeout(function() {
19
+ $('.dropzone-previews').fadeOut();
20
+ $('#uploads-bar').hide();
21
+ toggle_uploads();
22
+ }, 1000);
23
+ });
24
+ },
25
+ })
26
+
27
+ </script>
@@ -0,0 +1,17 @@
1
+ <ul class="container">
2
+ <% @uploads.each do |file| %>
3
+ <li>
4
+ <a href="<%= view_upload_path(file) %>">
5
+ <% if is_image?(file.path) %>
6
+ <a class="insert-image"
7
+ href="#"
8
+ data-name="<%= file.slug %>"
9
+ data-url="<%= upload_relative_path(file) %>">Insert</a>
10
+ <img src="<%= view_upload_path(file) %>" />
11
+ <% else %>
12
+ <%= file.filename %>
13
+ <% end %>
14
+ </a>
15
+ </li>
16
+ <% end %>
17
+ </ul>
metadata ADDED
@@ -0,0 +1,207 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: artifact
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Tomás Pollak
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rugged
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: sinatra
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sinatra-contrib
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rack-flash3
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: Frontend UI for git blogging.
140
+ email:
141
+ - tomas@forkhq.com
142
+ executables:
143
+ - artifact
144
+ extensions: []
145
+ extra_rdoc_files: []
146
+ files:
147
+ - ".gitignore"
148
+ - Gemfile
149
+ - LICENSE.txt
150
+ - README.md
151
+ - Rakefile
152
+ - artifact.gemspec
153
+ - bin/artifact
154
+ - lib/artifact.rb
155
+ - lib/artifact/app.rb
156
+ - lib/artifact/files.rb
157
+ - lib/artifact/helpers.rb
158
+ - lib/artifact/middleman.rb
159
+ - lib/artifact/public/css/dropzone.css
160
+ - lib/artifact/public/css/main.css
161
+ - lib/artifact/public/css/pagoda.css
162
+ - lib/artifact/public/js/app.js
163
+ - lib/artifact/public/js/dropzone.js
164
+ - lib/artifact/static.rb
165
+ - lib/artifact/version.rb
166
+ - lib/artifact/views/errors/404.erb
167
+ - lib/artifact/views/errors/500.erb
168
+ - lib/artifact/views/files/edit.erb
169
+ - lib/artifact/views/files/index.erb
170
+ - lib/artifact/views/files/new.erb
171
+ - lib/artifact/views/layout.erb
172
+ - lib/artifact/views/posts/_list.erb
173
+ - lib/artifact/views/posts/_meta.erb
174
+ - lib/artifact/views/posts/_navbar.erb
175
+ - lib/artifact/views/posts/_table.erb
176
+ - lib/artifact/views/posts/edit.erb
177
+ - lib/artifact/views/posts/index.erb
178
+ - lib/artifact/views/posts/new.erb
179
+ - lib/artifact/views/shared/_menu.erb
180
+ - lib/artifact/views/uploads/_form.erb
181
+ - lib/artifact/views/uploads/_list.erb
182
+ homepage: ''
183
+ licenses:
184
+ - MIT
185
+ metadata: {}
186
+ post_install_message:
187
+ rdoc_options: []
188
+ require_paths:
189
+ - lib
190
+ required_ruby_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ required_rubygems_version: !ruby/object:Gem::Requirement
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: '0'
200
+ requirements: []
201
+ rubyforge_project:
202
+ rubygems_version: 2.2.0
203
+ signing_key:
204
+ specification_version: 4
205
+ summary: Frontend UI for git blogging.
206
+ test_files: []
207
+ has_rdoc: