Skip to content

Commit

Permalink
Merge pull request #6 from korny/version-2
Browse files Browse the repository at this point in the history
Version 2
  • Loading branch information
korny committed Jan 14, 2015
2 parents 174c27c + 3530f5d commit f790205
Show file tree
Hide file tree
Showing 27 changed files with 347 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
@@ -1 +1 @@
ruby-2.1.0 ruby-2.1
3 changes: 3 additions & 0 deletions Capfile
Expand Up @@ -4,6 +4,9 @@ require 'capistrano/setup'
# Includes default deployment tasks # Includes default deployment tasks
require 'capistrano/deploy' require 'capistrano/deploy'


# RVM integration
require 'rvm1/capistrano3'

# Includes tasks from other gems included in your Gemfile # Includes tasks from other gems included in your Gemfile
# #
# For documentation on these, see for example: # For documentation on these, see for example:
Expand Down
9 changes: 5 additions & 4 deletions Gemfile
@@ -1,19 +1,19 @@
source 'https://rubygems.org' source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0' gem 'rails', '~> 4.1.9'


# Use MySQL as the database for Active Record # Use MySQL as the database for Active Record
gem 'mysql2' gem 'mysql2'


# Use Sass for stylesheets # Use Sass for stylesheets
gem 'sass-rails', :github => 'rails/sass-rails' gem 'sass-rails'


# Use Uglifier as compressor for JavaScript assets # Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '>= 1.3.0'


# Use CoffeeScript for .js.coffee assets and views # Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0' gem 'coffee-rails'


# See https://github.com/sstephenson/execjs#readme for more supported runtimes # See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby gem 'therubyracer', platforms: :ruby
Expand Down Expand Up @@ -48,10 +48,11 @@ gem 'paperclip'
gem 'haml' gem 'haml'


# Use kramdown for Markdown # Use kramdown for Markdown
gem 'kramdown' gem 'rdiscount'


# Use Capistrano for deployment # Use Capistrano for deployment
gem 'capistrano-rails', require: false, group: :development gem 'capistrano-rails', require: false, group: :development
gem 'rvm1-capistrano3', require: false


# Silence asset logging # Silence asset logging
gem 'quiet_assets', group: :development gem 'quiet_assets', group: :development
Expand Down
173 changes: 84 additions & 89 deletions Gemfile.lock
@@ -1,153 +1,147 @@
GIT
remote: git://github.com/rails/sass-rails.git
revision: 7138bbb401159b116dda4ec9dd4b375dc1d2e59a
specs:
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)

GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actionmailer (4.1.0) actionmailer (4.1.9)
actionpack (= 4.1.0) actionpack (= 4.1.9)
actionview (= 4.1.0) actionview (= 4.1.9)
mail (~> 2.5.4) mail (~> 2.5, >= 2.5.4)
actionpack (4.1.0) actionpack (4.1.9)
actionview (= 4.1.0) actionview (= 4.1.9)
activesupport (= 4.1.0) activesupport (= 4.1.9)
rack (~> 1.5.2) rack (~> 1.5.2)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
actionview (4.1.0) actionview (4.1.9)
activesupport (= 4.1.0) activesupport (= 4.1.9)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
activemodel (4.1.0) activemodel (4.1.9)
activesupport (= 4.1.0) activesupport (= 4.1.9)
builder (~> 3.1) builder (~> 3.1)
activerecord (4.1.0) activerecord (4.1.9)
activemodel (= 4.1.0) activemodel (= 4.1.9)
activesupport (= 4.1.0) activesupport (= 4.1.9)
arel (~> 5.0.0) arel (~> 5.0.0)
activesupport (4.1.0) activesupport (4.1.9)
i18n (~> 0.6, >= 0.6.9) i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
arel (5.0.1.20140414130214) arel (5.0.1.20140414130214)
bcrypt (3.1.7) bcrypt (3.1.9)
builder (3.2.2) builder (3.2.2)
capistrano (3.2.0) capistrano (3.3.5)
capistrano-stats (~> 1.1.0)
i18n i18n
rake (>= 10.0.0) rake (>= 10.0.0)
sshkit (~> 1.3) sshkit (~> 1.3)
capistrano-bundler (1.1.2) capistrano-bundler (1.1.3)
capistrano (~> 3.0) capistrano (~> 3.1)
sshkit (~> 1.2) sshkit (~> 1.2)
capistrano-rails (1.1.1) capistrano-rails (1.1.2)
capistrano (~> 3.1) capistrano (~> 3.1)
capistrano-bundler (~> 1.1) capistrano-bundler (~> 1.1)
capistrano-stats (1.1.1)
climate_control (0.0.3) climate_control (0.0.3)
activesupport (>= 3.0) activesupport (>= 3.0)
cocaine (0.5.4) cocaine (0.5.5)
climate_control (>= 0.0.3, < 1.0) climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.0.1) coffee-rails (4.1.0)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0) railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0) coffee-script (2.3.0)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.7.0) coffee-script-source (1.8.0)
colorize (0.7.5)
erubis (2.7.0) erubis (2.7.0)
execjs (2.0.2) execjs (2.2.2)
haml (4.0.5) haml (4.0.6)
tilt tilt
hike (1.2.3) hike (1.2.3)
i18n (0.6.9) i18n (0.7.0)
jquery-rails (3.1.0) jquery-rails (3.1.2)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-turbolinks (2.0.2) jquery-turbolinks (2.1.0)
railties (>= 3.1.0) railties (>= 3.1.0)
turbolinks turbolinks
jquery-ui-rails (4.2.1) jquery-ui-rails (5.0.3)
railties (>= 3.2.16) railties (>= 3.2.16)
json (1.8.1) json (1.8.2)
kramdown (1.3.3) libv8 (3.16.14.7)
libv8 (3.16.14.3) mail (2.6.3)
mail (2.5.4) mime-types (>= 1.16, < 3)
mime-types (~> 1.16) mime-types (2.4.3)
treetop (~> 1.4.8) minitest (5.5.1)
mime-types (1.25.1) multi_json (1.10.1)
minitest (5.3.3) mysql2 (0.3.17)
multi_json (1.9.2) net-scp (1.2.1)
mysql2 (0.3.15)
net-scp (1.2.0)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (2.8.0) net-ssh (2.9.2)
paperclip (4.1.1) paperclip (4.2.1)
activemodel (>= 3.0.0) activemodel (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
cocaine (~> 0.5.3) cocaine (~> 0.5.3)
mime-types mime-types
polyglot (0.3.4) quiet_assets (1.1.0)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0) railties (>= 3.1, < 5.0)
rack (1.5.2) rack (1.5.2)
rack-test (0.6.2) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.1.0) rails (4.1.9)
actionmailer (= 4.1.0) actionmailer (= 4.1.9)
actionpack (= 4.1.0) actionpack (= 4.1.9)
actionview (= 4.1.0) actionview (= 4.1.9)
activemodel (= 4.1.0) activemodel (= 4.1.9)
activerecord (= 4.1.0) activerecord (= 4.1.9)
activesupport (= 4.1.0) activesupport (= 4.1.9)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0) railties (= 4.1.9)
sprockets-rails (~> 2.0) sprockets-rails (~> 2.0)
railties (4.1.0) railties (4.1.9)
actionpack (= 4.1.0) actionpack (= 4.1.9)
activesupport (= 4.1.0) activesupport (= 4.1.9)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rake (10.3.1) rake (10.4.2)
rdiscount (2.1.7.1)
ref (1.0.5) ref (1.0.5)
sass (3.2.19) rvm1-capistrano3 (1.3.2.2)
spring (1.1.2) capistrano (~> 3.0)
sprockets (2.11.0) sshkit (>= 1.2)
sass (3.4.9)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
spring (1.2.0)
sprockets (2.12.3)
hike (~> 1.2) hike (~> 1.2)
multi_json (~> 1.0) multi_json (~> 1.0)
rack (~> 1.0) rack (~> 1.0)
tilt (~> 1.1, != 1.3.0) tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3) sprockets-rails (2.2.2)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (~> 2.8) sprockets (>= 2.8, < 4.0)
sshkit (1.4.0) sshkit (1.6.1)
colorize (>= 0.7.0)
net-scp (>= 1.1.2) net-scp (>= 1.1.2)
net-ssh (>= 2.8.0) net-ssh (>= 2.8.0)
term-ansicolor
term-ansicolor (1.3.0)
tins (~> 1.0)
therubyracer (0.12.1) therubyracer (0.12.1)
libv8 (~> 3.16.14.0) libv8 (~> 3.16.14.0)
ref ref
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.3) thread_safe (0.3.4)
tilt (1.4.1) tilt (1.4.1)
tins (1.1.0) turbolinks (2.5.3)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails coffee-rails
tzinfo (1.1.0) tzinfo (1.2.2)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (2.5.0) uglifier (2.7.0)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)


Expand All @@ -157,17 +151,18 @@ PLATFORMS
DEPENDENCIES DEPENDENCIES
bcrypt (~> 3.1.7) bcrypt (~> 3.1.7)
capistrano-rails capistrano-rails
coffee-rails (~> 4.0.0) coffee-rails
haml haml
jquery-rails jquery-rails
jquery-turbolinks jquery-turbolinks
jquery-ui-rails jquery-ui-rails
kramdown
mysql2 mysql2
paperclip paperclip
quiet_assets quiet_assets
rails (= 4.1.0) rails (~> 4.1.9)
sass-rails! rdiscount
rvm1-capistrano3
sass-rails
spring spring
therubyracer therubyracer
turbolinks turbolinks
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Expand Up @@ -12,7 +12,7 @@
// //
//= require jquery //= require jquery
//= require jquery.turbolinks //= require jquery.turbolinks
//= require jquery.ui.sortable //= require jquery-ui/sortable
//= require jquery_ujs //= require jquery_ujs
//= require jquery.fancybox //= require jquery.fancybox
//= require jquery_ujs.prompt //= require jquery_ujs.prompt
Expand Down
30 changes: 26 additions & 4 deletions app/assets/javascripts/sidebar.js.coffee
@@ -1,7 +1,29 @@
# disabled for now $ ->
->
# reorder sections # reorder sections
$('.sidebar').sortable() if sortUpdateURL = $('.sidebar').data('sort-update-url')
$('.sidebar').sortable
axis: 'y'
update: ->
ids = $('> *', @).map -> $(@).data('id')
$.ajax
type: 'PATCH',
url: sortUpdateURL,
data: { ids: ids.get() }
null


$ ->
# reorder pages # reorder pages
$('.section ul').sortable() $('.section ul[data-sort-update-url]').each ->
sortUpdateURL = $(@).data('sort-update-url')
$(@).sortable
items: 'li[data-id]'
axis: 'y'
containment: 'parent'
tolerance: 'pointer'
update: ->
ids = $('> *', @).map -> $(@).data('id')
$.ajax
type: 'PATCH',
url: sortUpdateURL,
data: { ids: ids.get() }
null
3 changes: 3 additions & 0 deletions app/assets/stylesheets/login.css.sass
Expand Up @@ -5,6 +5,9 @@
top: 0 top: 0
margin: 5px margin: 5px


a.logout
color: #666

$login-transition: width 0.4s ease, border-color 0.4s ease, color 0.4s ease $login-transition: width 0.4s ease, border-color 0.4s ease, color 0.4s ease


.login input .login input
Expand Down
27 changes: 26 additions & 1 deletion app/assets/stylesheets/sidebar.css.sass
Expand Up @@ -12,13 +12,38 @@ ul.sidebar
background-color: white background-color: white


> li > li
margin-bottom: 12px padding-bottom: 12px


&, & ul &, & ul
list-style-type: none list-style-type: none
& ul & ul
padding-left: 0 padding-left: 0


.admin, .empty-section-title
display: none
li.page:hover .admin
display: inline
li.section:hover > .admin
display: inline
&:hover
.add-section, .empty-section-title
display: inline

.admin
color: gray
&:hover
color: black

.section-title
color: #666

.current
color: black
font-size: 20px

+ .content + .content
margin-left: $sidebar-width + 10px margin-left: $sidebar-width + 10px
margin-top: $sidebar-top + 5px margin-top: $sidebar-top + 5px

ul.ui-sortable > li[data-id]
cursor: move

0 comments on commit f790205

Please sign in to comment.