kinda update to foundation, depricate bootstrap 2

This commit is contained in:
2015-01-28 18:15:25 +01:00
parent 323e68bcad
commit e2f8459960
24 changed files with 1673 additions and 242 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ group :assets do
gem 'coffee-script'
#gem 'therubyracer', :platforms => :ruby
#gem 'less-rails'
gem 'bootstrap-sass', '~> 2.3'
gem 'foundation-rails'
end
gem 'couch_potato' , github: 'bterkuile/couch_potato'
+9 -8
View File
@@ -82,8 +82,6 @@ GEM
tzinfo (~> 1.1)
arel (6.0.0)
bcrypt (3.1.9)
bootstrap-sass (2.3.2.2)
sass (~> 3.2)
bourbon (4.1.1)
sass (~> 3.3)
thor
@@ -126,6 +124,9 @@ GEM
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
foundation-rails (5.5.0.0)
railties (>= 3.1.0)
sass (>= 3.2.0, < 3.4)
globalid (0.3.0)
activesupport (>= 4.1.0)
hike (1.2.3)
@@ -146,7 +147,7 @@ GEM
mini_portile (0.6.2)
minitest (5.5.1)
multi_json (1.10.1)
nokogiri (1.6.5)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
paperclip (4.2.1)
activemodel (>= 3.0.0)
@@ -189,8 +190,8 @@ GEM
rake (10.4.2)
rdoc (4.2.0)
json (~> 1.4)
responders (2.0.2)
railties (>= 4.2.0.alpha, < 5)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rest-client (1.6.8)
mime-types (~> 1.16)
rdoc (>= 2.4.2)
@@ -213,7 +214,7 @@ GEM
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
sass (3.4.9)
sass (3.3.14)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
@@ -235,7 +236,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.2)
sprockets-rails (2.2.4)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
@@ -264,7 +265,6 @@ PLATFORMS
DEPENDENCIES
actionpack-page_caching
bootstrap-sass (~> 2.3)
bourbon
cmtool!
coffee-script
@@ -273,6 +273,7 @@ DEPENDENCIES
devise_simply_stored!
email_validator
factory_girl_rails
foundation-rails
jquery-rails
jquery-ui-rails
orm_adapter!
@@ -1,18 +0,0 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require jquery-ui
//= require bootstrap
//= require tinymce-jquery
//= require_directory .
@@ -0,0 +1,10 @@
#= require jquery
#= require jquery_ujs
#= require jquery-ui
#= require foundation
#= require tinymce-jquery
#= require_directory .
#= require_self
$ ->
$(document).foundation()
@@ -1,14 +0,0 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
* require 'bootstrap-devise-rails'
*= require_directory .
*/
@@ -0,0 +1,5 @@
// require 'bootstrap-devise-rails'
// require_directory .
@import ./foundation_and_overrides
@import ./structure
@import ./components/*
@@ -1,14 +0,0 @@
@import "bootstrap"
body
padding-top: 60px
dl
&.dl-horizontal
dt
&:after
content: ' :'
dd
&:after
content: '\a0'
@import "bootstrap-responsive"
@@ -0,0 +1,12 @@
.to-index-button
+button($bg: $secondary-color)
.record-show-button
+button($bg: $info-color)
.record-new-button
+button
.record-edit-button
+button($bg: $warning-color)
.record-destroy-button
+button($bg: $alert-color)
.form-submit-button
+button
@@ -0,0 +1,45 @@
.form-row
+grid-row
.form-label
@media #{$small-only}
+grid-column($columns:10, $center:true)
@media #{$medium-only}
+grid-column($columns:4, $offset:1)
@media #{$large-up}
+grid-column(3)
&.half
+grid-column(6)
.form-field
@media #{$small-only}
+grid-column($columns:10, $center:true, $last-column:true)
@media #{$medium-only}
+grid-column($columns:4, $last-column:true)
@media #{$large-up}
+grid-column($columns: 3, $last-column:true)
&.full
@media #{$small-only}
+grid-column($columns:10, $center:true, $last-column:true)
@media #{$medium-only}
+grid-column($columns:6, $last-column:true)
@media #{$large-up}
+grid-column($columns: 9, $last-column:true)
&.half
+grid-column(6)
&.form-actions
padding-top: 12px
body
label
&.number
display: inline-block
padding: 4px 10px
input
&.number
width: 60px
display: inline-block
.apply-filter
+button($bg: $primary-color, $padding: $button-tny)
.error
input, textarea
border-color: $alert-color
input[type="number"]
text-align: right
File diff suppressed because it is too large Load Diff
@@ -1,57 +1,31 @@
@import 'bourbon'
html, body
background-color: #eee
font-family: $lucida-grande
.button
+button(#777)
a
color: #333
font-weight: bold
text-decoration: none
&:hover
text-decoration: underline
.clear
clear: both
.field
clear: left
&>label
width: 202px
float: left
&>.field_with_errors
float: left
label
width: 202px
#sub-navigation-container
margin-top: 20px
+panel()
+clearfix()
ul
list-style: none
margin: 0
padding: 0
li
float: left
color: red
input
border: 1px solid red
#page-wrapper
width: 972px
margin: 40px auto 10px auto
#sub-navigation-container
ul
list-style: none
margin: 0
padding: 0
li
float: left
margin-right: 10px
#title-container
+linear-gradient(#aaa, #fff)
margin-top: 12px
margin-right: 10px
#title-container
//+linear-gradient(#aaa, #fff)
margin-top: 12px
padding: 10px
border-top-left-radius: 15px
border-top-right-radius: 15px
box-shadow: 5px 5px 5px #555
h1
margin: 0
padding: 0
#content-container
background-color: white
border-bottom-left-radius: 15px
border-bottom-right-radius: 15px
box-shadow: 5px 5px 5px #555
#content
padding: 10px
border-top-left-radius: 15px
border-top-right-radius: 15px
box-shadow: 5px 5px 5px #555
h1
margin: 0
padding: 0
#content-container
background-color: white
border-bottom-left-radius: 15px
border-bottom-right-radius: 15px
box-shadow: 5px 5px 5px #555
#content
padding: 10px
+15 -19
View File
@@ -1,20 +1,16 @@
- if alert
.message.error.ui-state-error
.icon
.text
=raw flash[:alert]
- if notice
.message.notice.ui-state-highlight
.icon
.text
=raw flash[:notice]
- if flash[:alert].present?
.row: .small-12.columns.alert-box.alert data-alert=true
= flash[:alert]
a.close href="" &#215;
- if flash[:notice].present?
.row: .small-12.columns.alert-box.info data-alert=true
= flash[:notice]
a.close href="" &#215;
- if warnings.any?
.message.warning.ui-state-highlight
.icon
.text
ul
- for warning in warnings
- if warning.is_a?(Hash)
li.warning= t("cmtool.warnings.# warning.delete(:message) ", warning)
- else
li.warning= t("cmtool.warnings.# warning ")
.row: .small-12.columns.alert-box.warning data-alert=true
ul
- for warning in warnings
- if warning.is_a?(Hash)
li.warning= t("cmtool.warnings.#{warning.delete(:message)}", warning)
- else
li.warning= t("cmtool.warnings.#{warning}")
+30 -33
View File
@@ -1,34 +1,31 @@
.navbar.navbar-fixed-top
.navbar-inner
.container
a.btn.btn-navbar data-target=".nav-collapse" data-toggle="collapse"
span.icon-bar
span.icon-bar
span.icon-bar
a.brand href=cmtool.root_path = application_title
.nav-collapse
- if user_signed_in?
ul.nav
- Cmtool::Menu.items.each do |menu_item|
- if menu_item.group?
li.dropdown class=(menu_item.controller_names.include?(controller_name) ? 'active' : '')
a.dropdown-toggle href="#" data-toggle="dropdown"
span = menu_item.title
b.caret
ul.child-menu.dropdown-menu
- menu_item.items.compact.each do |child_item|
- if child_item.divider?
li.divider
- else
li[ class=(controller_name == child_item.controller_name ? 'active' : '') ] = link_to child_item.title, child_item.path
- elsif menu_item.resource_link?
li[ class=(menu_item.controller_name == controller_name ? 'active' : '')]= link_to menu_item.title, menu_item.path
- elsif menu_item.engine_link?
li= link_to menu_item.title, menu_item.path
.btn-group.pull-right
a.btn.dropdown-toggle[data-toggle="dropdown" href="#"]
i.icon-user
= current_user.email
span.caret
ul.dropdown-menu
.fixed
nav.top-bar data-topbar="" role="navigation"
ul.title-area
li.name
h1
a href=cmtool.root_path = application_title
li.toggle-topbar.menu-icon
a href="#"
span Menu
- if user_signed_in?
section.top-bar-section
ul.right
li.has-dropdown
a href="#" = current_user.email
ul.dropdown
li.log-out= link_to t('helpers.links.logout'), main_app.destroy_user_session_path, method: :delete
ul.left
- Cmtool::Menu.items.each do |menu_item|
- if menu_item.group?
li.has-dropdown class=(menu_item.controller_names.include?(controller_name) ? 'active' : '')
a href="#" = menu_item.title
ul.dropdown
- menu_item.items.compact.each do |child_item|
- if child_item.divider?
li.divider
- else
li class=(controller_name == child_item.controller_name ? 'active' : '') = link_to child_item.title, child_item.path
- elsif menu_item.resource_link?
li class=(menu_item.controller_name == controller_name ? 'active' : '') = link_to menu_item.title, menu_item.path
- elsif menu_item.engine_link?
li= link_to menu_item.title, menu_item.path
+5 -6
View File
@@ -1,8 +1,7 @@
= form_for [cmtool, @keyword] do |f|
= render 'error_messages', :target => @keyword
.field
= f.label :name
= f.text_field :name
.actions
= f.submit @submit || update_button_text(@keyword)
.form-row
.form-label= f.label :name
.form-field= f.text_field :name
.form-row: .form-actions
= f.submit @submit || update_button_text(@keyword), class: 'form-submit-button'
+3 -3
View File
@@ -1,7 +1,7 @@
- title :edit, Cmtool::Keyword
= render 'form', :submit => update_button_text(@keyword)
= render 'form', submit: update_button_text(@keyword)
- content_for :page_links do
ul
li= link_to link_to_show_content(@keyword), cmtool.keyword_path(@keyword), class: ['btn', 'btn-info']
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: [:btn]
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: 'to-index-button'
li= link_to link_to_show_content(@keyword), cmtool.keyword_path(@keyword), class: 'record-show-button'
+1 -1
View File
@@ -17,4 +17,4 @@
- content_for :page_links do
ul
li= link_to link_to_new_content(Cmtool::Keyword), cmtool.new_keyword_path, class: ['btn', 'btn-primary']
li= link_to link_to_new_content(Cmtool::Keyword), cmtool.new_keyword_path, class: 'record-new-button'
+1 -1
View File
@@ -4,4 +4,4 @@
- content_for :page_links do
ul
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: ['btn', 'btn-warning']
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: 'to-index-button'
+2 -2
View File
@@ -5,5 +5,5 @@
- content_for :page_links do
ul
li= link_to link_to_edit_content(@keyword), cmtool.edit_keyword_path(@keyword), class: ['btn', 'btn-warning']
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: [:btn]
li= link_to link_to_index_content(Cmtool::Keyword), cmtool.keywords_path, class: 'to-index-button'
li= link_to link_to_edit_content(@keyword), cmtool.edit_keyword_path(@keyword), class: 'record-edit-button'
+35 -34
View File
@@ -1,25 +1,26 @@
= form_for [cmtool, @page] do |f|
= render 'error_messages', :target => @page
.field
= f.label :name
= f.text_field :name
span Te zien in de url
- if @page.new_record?
a href="#" onclick="$.get('#{cmtool.generate_name_pages_path}', {name: $('#page_title').val()})" Genereer vanuit titel
- else
a href="#" onclick="$.get('#{cmtool.generate_name_page_path(@page)}', {name: $('#page_title').val()})" Genereer vanuit titel
.field
= f.label :menu_text
= f.text_field :menu_text
span Weergave in menu
.field
= f.label :title
= f.text_field :title
span Titel op de pagina
.field
= f.label :locale
= f.select :locale, Page.locales
.field
.form-row
.form-label= f.label :name
.form-field.full
.row
.small-12.medium-6.columns= f.text_field :name
.small-12.medium-6.columns
span Te zien in de url
- if @page.new_record?
a href="#" onclick="$.get('#{cmtool.generate_name_pages_path}', {name: $('#page_title').val()})" Genereer vanuit titel
- else
a href="#" onclick="$.get('#{cmtool.generate_name_page_path(@page)}', {name: $('#page_title').val()})" Genereer vanuit titel
.form-row
.form-label= f.label :menu_text
.form-field= f.text_field :menu_text
.form-row
.form-label= f.label :title
.form-field= f.text_field :title
.form-row
.form-label= f.label :locale
.form-field= f.select :locale, Page.locales
.form-row
= f.label :body
= f.text_area :body, :rows => 30, :cols => 80, :class => 'editor_full'
.field
@@ -28,20 +29,20 @@
.field
= f.label :sidebar
= f.text_area :sidebar, :rows => 15, :cols => 80, :class => 'editor_full'
.field
= f.label :parent_id
= f.select :parent_id, tree_options_for_select(Page.full_tree(@page.locale || Page.locales.first), exclude: @page.id, selected: @page.parent_id), include_blank: ' -- '
.field
= f.label :position
= f.select :position, (0..20).to_a
.field
= f.label :layout
= f.select :layout, Page.layouts
.field
= f.label :in_menu
= f.check_box :in_menu
.form-row
.form-label= f.label :parent_id
.form-field= f.select :parent_id, tree_options_for_select(Page.full_tree(@page.locale || Page.locales.first), exclude: @page.id, selected: @page.parent_id), include_blank: ' -- '
.form-row
.form-label= f.label :position
.form-field= f.select :position, (0..20).to_a
.form-row
.form-label= f.label :layout
.form-field= f.select :layout, Page.layouts
.form-row
.form-label= f.label :in_menu
.form-field= f.check_box :in_menu
.field
= render "cmtool/keywords/habtm", :subject => @page
.actions
= f.submit @submit || update_button_text(f.object)
.form-row: .form-actions
= f.submit @submit || update_button_text(f.object), class: 'button'
-#= button_tag 'Preview (unsupported)', onclick: %{$('form').attr('action', '/' + $('#page_name').val()).submit();}
+4 -4
View File
@@ -3,7 +3,7 @@
- content_for :page_links do
ul
li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn]
li= link_to link_to_show_content(@page), cmtool.page_path(@page), class: ['btn', 'btn-info']
li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page), class: ['btn', 'btn-warning']
li= link_to link_to_destroy_content(@page), cmtool.page_path(@page), :confirm => are_you_sure?(@page), :method => :delete, class: ['btn', 'btn-danger']
li= link_to link_to_index_content(Page), cmtool.pages_path, class: 'to-index-button'
li= link_to link_to_show_content(@page), cmtool.page_path(@page), class: 'record-show-button'
li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page), class: 'record-edit-button'
li= link_to link_to_destroy_content(@page), cmtool.page_path(@page), data: {confirm: are_you_sure?(@page)}, :method => :delete, class: 'record-destroy-button'
+1 -1
View File
@@ -16,4 +16,4 @@ table.index-table.table.table-striped.table-hover
- content_for :page_links do
ul
li= link_to link_to_new_content(Page), cmtool.new_page_path, class: ['btn', 'btn-primary']
li= link_to link_to_new_content(Page), cmtool.new_page_path, class: 'record-new-button'
+1 -1
View File
@@ -3,4 +3,4 @@
- content_for :page_links do
ul
li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn]
li= link_to link_to_index_content(Page), cmtool.pages_path, class: 'to-index-button'
+2 -2
View File
@@ -35,5 +35,5 @@
- content_for :page_links do
ul
li= link_to link_to_index_content(Page), cmtool.pages_path, class: [:btn]
li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page), class: ['btn', 'btn-warning']
li= link_to link_to_index_content(Page), cmtool.pages_path, class: 'to-index-button'
li= link_to link_to_edit_content(@page), cmtool.edit_page_path(@page), class: 'record-edit-button'
+18 -28
View File
@@ -14,41 +14,31 @@ html lang="en"
/[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
= stylesheet_link_tag "cmtool/application", :media => "all"
= javascript_include_tag 'vendor/modernizr'
= javascript_include_tag "cmtool/application"
= yield(:head)
javascript:
$(function(){
//Onload
#{yield(:onload_javascript)}
});
body
= render 'cmtool/application/menu'
.container
.content
- if flash[:alert].present?
.alert.alert-error
a.close data-dismiss="alert" &#215;
div= flash[:alert]
- if flash[:notice].present?
.alert.alert-success
a.close data-dismiss="alert" &#215;
div= flash[:notice]
.row
.span9
= content_for?(:content) ? yield(:content) : yield
- if content_for?(:page_links)
#sub-navigation-container.form-actions = yield(:page_links)
.span3
.well.sidebar-nav
h3= content_for?(:page_title) ? yield(:page_title) : application_title
ul.nav.nav-list
li.nav-header Links
li= link_to "Home", root_path
li= link_to 'Wiki', 'https://github.com/bterkuile/cmtool/wiki', target: :_blank
= yield :sidebar
footer
p &copy; Cmtool 2013
= yield :footer
= render 'cmtool/application/alerts'
.row
.small-12.large-9.columns
= content_for?(:content) ? yield(:content) : yield
- if content_for?(:page_links)
#sub-navigation-container= yield(:page_links)
.show-for-large-only.large-3.columns
.panel.sidebar-nav
h3= content_for?(:page_title) ? yield(:page_title) : application_title
ul.nav.nav-list
li.nav-header Links
li= link_to "Home", root_path
li= link_to 'Wiki', 'https://github.com/bterkuile/cmtool/wiki', target: :_blank
= yield :sidebar
footer
p &copy; Cmtool 2015
= yield :footer
#hidden-html.hide= yield :hidden_html