foundation / foundation-rails Goto Github PK
View Code? Open in Web Editor NEWFoundation for Rails
Home Page: foundation.zurb.com
License: MIT License
Foundation for Rails
Home Page: foundation.zurb.com
License: MIT License
middleman server
/Users/z/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.2.1.1/lib/foundation/engine.rb:2:in `<module:Foundation>': uninitialized constant Rails::Engine (NameError)
from /Users/z/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.2.1.1/lib/foundation/engine.rb:1:in `<top (required)>'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.2.1.1/lib/zurb-foundation.rb:6:in `require'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.2.1.1/lib/zurb-foundation.rb:6:in `<module:Foundation>'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.2.1.1/lib/zurb-foundation.rb:5:in `<top (required)>'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
from /Users/z/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/gems/middleman-core-3.0.0.beta.2/lib/middleman-core/extensions.rb:141:in `load_extensions_in_path'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/gems/middleman-core- 3.0.0.beta.2/bin/middleman:50:in `<top (required)>'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/bin/middleman:19:in `load'
from /Users/z/.rvm/gems/ruby-1.9.2-p290/bin/middleman:19:in `<main>'
Hey guys,
everything works fine until, i attempt to deploy to heroku.
I've followed the cedar deploy instructions http://devcenter.heroku.com/articles/rails31_heroku_cedar
but for some reason the 'foundation' assets won't precompile (i.e., new asset pipeline). Please advise.
Will provide screenshots/demo later today. Same behavior is not observed using the packaged foundation download.
Some items don't use the $primary-color
assigned in the settings. They required a explicit $foundation-palette
.
Adding
$foundation-palette: (
primary: $primary-color,
secondary: $secondary-color,
success: $success-color,
warning: $warning-color,
alert: $alert-color
);
at the bottom 1. Global fixed issues for me.
zurb-foundation (= 3.0.0) ruby depends on
sass (= 3.2.0.alpha.244) ruby
I don't think zurb-foundation really needs that specific a version.
in foundation_and_overrides.scss I had to use
@import 'motion-ui/motion-ui';
instead of
@import 'motion-ui';
error message was:
File to import not found or unreadable: motion-ui.
Hello,
Thanks for upgrading this gem to Foundation 6. I'm excited to implement this in my project. When trying to replace the @include foundation-grid
with @include foundation-flex-grid
in my foundation_and_overrides.scss
file I get this error:
Showing /home/nick/stealth/web/app/views/layouts/application.haml where line #7 raised:
Undefined variable: "$gutter"
Is there an "official" way to include the flex grid instead of the regular one?!
Getting the following error after running bundle update; bundle install
and restarting my local Rails dev server
Invalid CSS after " input": expected ")", was "[type=submit].b..." (in /Users/sjungling/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.2.0.0/vendor/assets/stylesheets/foundation/ui.css.scss)
I made a brand new rails project to test it out and its still not working as it is when I open the index page in the foundation source folder.
And here run from foundations source folder
I've already removed turbolinks from the project so that should not be the issue.
There are errors during "rails g foundation:install" when app/assets/stylesheets/application.css is renamed to application.css.scss
$ rails g foundation:install
insert app/assets/javascripts/application.js
/Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/file_binary_read.rb:5:in initialize': No such file or directory - /Users/cisco/Sites/found/app/assets/javascripts/application.js (Errno::ENOENT) from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/file_binary_read.rb:5:in
open'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/file_binary_read.rb:5:in binread' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:99:in
replace!'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:60:in invoke!' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/actions.rb:95:in
action'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/actions/inject_into_file.rb:31:in insert_into_file' from /Library/Ruby/Gems/1.8/gems/zurb-foundation-2.1.0/lib/foundation/generators/install_generator.rb:9:in
add_assets'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in send' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:22:in
run'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
invoke_all'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/shell.rb:14:in map' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:73:in
each'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in map' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
invoke_all'
from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/group.rb:226:in dispatch' from /Library/Ruby/Gems/1.8/gems/thor-0.14.6/lib/thor/base.rb:389:in
start'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.3/lib/rails/generators.rb:168:in invoke' from /Library/Ruby/Gems/1.8/gems/railties-3.1.3/lib/rails/commands/generate.rb:12 from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in
require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in
load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in
load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in require' from /Library/Ruby/Gems/1.8/gems/railties-3.1.3/lib/rails/commands.rb:28 from script/rails:6:in
require'
from script/rails:6
When rotating from landscape to portrait, the width adapts.
However, the other way around, the user is left with a page that is too wide for the screen and the user must pinch to see full width.
This answer may help?
http://stackoverflow.com/questions/1230019/how-to-set-viewport-meta-for-iphone-that-handles-rotation-properly
I'm trying foundation with Rails 3.1.0 and Ruby 1.9.3-p0.
Given new Rails application generated with the following command line:
rails new testing_foundation -T -G -S -J
And Gemfile file contains the following gem:
gem "zurb-foundation", :group => :assets
When I run bundle install
Then I should see "Your bundle is complete!"
When I run rails g foundation:install
Then I should see the following error:
/Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.1/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `context_class' for nil:NilClass (NoMethodError)
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/sass-rails-3.1.4/lib/sass/rails/railtie.rb:61:in `block in <class:Railtie>'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/zedtux/Developments/testing_foundation/config/environment.rb:5:in `<top (required)>'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/application.rb:83:in `require'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'
from /Users/zedtux/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.1/lib/rails/commands.rb:22:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Same scenario without -S
work like a charm.
Using zurb-foundation version 2.1.5.1
All else equal, deploying a Rails app (updated from 3.1.2 to 3.2.1) to Heroku fails with the following error:
ActionView::Template::Error (couldn't find file 'foundation'
2012-01-27T15:38:11+00:00 app[web.1]: 16:
2012-01-27T15:38:11+00:00 app[web.1]: 17: <meta name="apple-mobile-web-app-status-bar-style" content="black">
2012-01-27T15:38:11+00:00 app[web.1]: 18:
2012-01-27T15:38:11+00:00 app[web.1]: 19: <%= stylesheet_link_tag "application" %>
2012-01-27T15:38:11+00:00 app[web.1]: 20: <%= javascript_include_tag "application" %>
2012-01-27T15:38:11+00:00 app[web.1]: 21: <%= csrf_meta_tags %>
2012-01-27T15:38:11+00:00 app[web.1]: (in /app/app/assets/stylesheets/application.css:6)):
It works without a problem in development mode on my machine. Perhaps there's an issue with stylesheets being compiled? In my application.css file I've tried both *= require "foundation"
and *= require foundation
. Everything worked fine before the update to Rails 3.2.1. Note: Heroku also throws the following (possibly unrelated) error:
2012-01-27T15:37:51+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
I have nothing in my vendor/plugins folder.
Using the bundler, I get the following error when installing Foundation using rails 3.2.0 and jquery-rails 2.0.0
Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
zurb-foundation (>= 0) ruby depends on
jquery-rails (~> 1.0) ruby
Bundler could not find compatible versions for gem "rails":
In Gemfile:
zurb-foundation (>= 0) ruby depends on
rails (~> 3.1.0) ruby
The gemspec has this:
s.add_runtime_dependency "rails", "~> 3.1"
s.add_runtime_dependency "jquery-rails", "~> 1.0"
Shouldn't it be this?
s.add_runtime_dependency "rails", ">= 3.1"
s.add_runtime_dependency "jquery-rails", ">= 1.0"
Resizing the browser window on Firefox 7.01 results in the content dropping down the page, leaving the top of the page empty.
Page http://foundation.zurb.com/
Screenshot http://imgur.com/4MXBN
I really like how I can switch between a drilldown and a dropdown with http://foundation.zurb.com/sites/docs/responsive-navigation.html, but is there a way to make the li
elements toggle between horizontal
and vertical
with this? Or should I stick with visibility classes?
thank you,
Hello,
i recently migrate to foundation 6 but i have some issues. For exemple, i have an offcanvas inside another offcanvas. when i click on my menu-icon button to toggle the first offcanvas left menu it also triggers the left menu on the other offcanvas. both get opened.
The problem is caused by using tabs with href's like "/foobar", which don't work as jQuery expressions!
Fixed in this commit:
https://github.com/davidw/foundation-rails/commit/f6d35a9a1883c4607e2f35b66f562647c26c135e
^^^^^ title say it all
Take care,
Michael
When @include foundation-forms
is present (and only foundation-forms
) in the foundation_and_override.scss
file, the following error occurs:
Started GET "/interview-requests/new" for ::1 at 2016-02-04 14:14:12 -0800
Processing by InterviewRequestsController#new as HTML
Rendered interview_requests/new.html.erb within layouts/application (25.7ms)
Completed 500 Internal Server Error in 1618ms (ActiveRecord: 0.0ms)
ActionView::Template::Error (Undefined operation: "rem-calc(16) times 1.5".):
6:
7: <title><%= content_for?(:title) ? yield(:title) : "Untitled" %></title>
8:
9: <%= stylesheet_link_tag "application" %>
10: <%= javascript_include_tag "application", 'data-turbolinks-track' => true %>
11: <%= csrf_meta_tags %>
12: </head>
app/assets/stylesheets/foundation_and_overrides.scss:16
app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__127427935090308134_70243877749960'
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/_source.erb (14.1ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (8.5ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (42.8ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/_markup.html.erb (0.4ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.9ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.4ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.5ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/console.js.erb within layouts/javascript (24.2ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/main.js.erb within layouts/javascript (0.3ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.4ms)
Rendered /Users/alanjosephwilliams/.rvm/gems/ruby-2.1.5/gems/web-console-2.2.1/lib/web_console/templates/index.html.erb (45.8ms)
When@import foundation-forms
is uncommented, things work just fine.
I'm using Rails 4.2.5 and Ruby 2.1.5. Any thoughts or recommendations for how to resolve this issue? The is form heavy and I would like to use these styles.
Im using foundation 6.
After rails g foundation:install
:
sylar$ rails g foundation:install
insert app/assets/javascripts/application.coffee
/Users/sylar/.rvm/gems/ruby-2.2.3/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in `binread': No such file or directory @ rb_sysopen - /Users/sylar/Sites/rails/rails5/demo/app/assets/javascripts/application.coffee (Errno::ENOENT)
Hi,
I'm not yet 100% sure what is causing this, but it's been traced, in our code, to this:
- zurb-foundation (2.0.3.2)
+ zurb-foundation (2.1.4.1)
I am going to start tracking it down now, but I thought I'd post before I start. The issue is that in a chunk of code we have, with various nested ul elements, they no longer indent to the right.
i follow your instruction from Installation section to Motion UI section i add gem 'foundation_rails' line in my gemfile and then run bundle install and after install i run rails g foundation:install and
its show to override
i select Y (yes) to override then its create 2 files in app folder
1 app/assets/stylesheets/_settings.scss
2 app\assets\stylesheets\foundation_and_overrides.scss
and then i look in to javascript folder app/assets/javascript their is only one file application.js and in application.js two line added automatically
1 //= require foundation
2
and in application.html.erb file its change some lines which use to call stylesheet and javascript files.
its show again to override
then i select n (no) to override then its again create same files as create in Method 1
but the problem remain same.
i try both Methods but every time localhost:3000 page shows some error's
what should i do kindly solve my problem asap.
I have an element that I've given the class hide-on-desktop. I use a 13" macbook pro, the screen resolution is 1280, when I open my webpage that contains the hide-on-desktop layout layout, and maximize the window to use the whole screen - the element is showing. If I expand or shrink the image by a few pixels one way or another the element is hidden as expected. But at exactly 1280 pixels as measured with xscope and viewed on firefox, the element is shown.
sorry for the spam, but I can't seem to quite get the close-button working.
application.js
//= require foundation
//= require turbolinks
$document.on('page:load ready', function() {
$(document).foundation();
})
haml file for rending a flash message as a callout
- if notice
.success.callout{ data: { closable: '' } }
= notice
%button.close-button{ aria: { label: 'Dismiss alert' }, data: { close: '' }, type: 'button' }
%span{'aria-hidden' => 'true'} ×
- if alert
.alert.callout{ data: { closable: '' } }
= alert
%button.close-button{ aria: { label: 'Dismiss alert' }, data: { close: '' }, type: 'button' }
%span{'aria-hidden' => 'true'} ×
I got the navbar working so I don't think it's a JS issue, but perhaps I'm missing something? Any advice would be appreciated.
Thank you,
Getting console error on GET javascripts/vendor/modernizr.js
When an app running on heroku is being deployed via a git push, the precompile is crashing with "stack level too deep"
Installing zurb-foundation (2.2.1.1)
.
.
.
.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
stack level too deep
(in /tmp/build_35sh7b7916w2r/vendor/bundle/ruby/1.9.1/gems/zurb-foundation-2.2.1.1/vendor/assets/stylesheets/foundation/globals.css.scss)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
Precompiling assets failed, enabling runtime asset compilation
Injecting rails31_enable_runtime_asset_compilation
Please see this article for troubleshooting help:
http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
Let's bundle the Motion UI Sass with the Foundation Sass. @arthurzurb we can talk about this next week.
Hi,
I have tried to update Foundation 5 to 6 in my rails project, however, I'm getting this error:
Sprockets::ContentTypeMismatch at / foundation.util.box is 'application/vnd.previewsystems.box', not 'application/javascript' (in /home/seba/.rvm/gems/ruby-2.2.0-preview1/gems/foundation-rails-6.1.1.1/vendor/assets/js/foundation.js:21)
Is it a problem with the gem or did I misconfigure something ?
I have run the rails g foundation:install
command and then just copied the changes to appropriate places.
Foundation for sites mentions some more Js plugins (http://foundation.zurb.com/sites/docs/javascript.html) - should I require them separately or are they already included with foundation.js ?
This is the content of my application.js:
//= require jquery
//= require jquery.turbolinks
//= require jquery_ujs
//= require foundation
//= require turbolinks
$(function(){ $(document).foundation(); });
If I disable the foundation.js (by not adding the //= require foundation
in my application.js) then the website will work, but obviously there will be no Foundation JS plugins.
Let me know if you need any more details :)
I'm struggling with getting work reveal using your gem. While has all the same code, on documentations page of foundation itself reveal works fine, but not on my rails page. I gave the following code in my html.slim:
.reveal#exampleModal1 data-reveal='data-reveal'
h1 Awesome. I Have It.
p.lead Your couch. It is mine.
p I'm a cool paragraph that lives inside of an even cooler modal. Wins!
button.close-button data-close="data-close" aria-label="Close modal" type="button"
span aria-hidden="true"×
and the link itself:
a.add-reveal data-open="exampleModal1" Open reveal
When I click the link, reveal is opened, but styles are not correct - the reveal is too wide.
The if I try to close the window with close button, it does't work. I click outside of the reveal and window closes. If I open it again, the second time without reloading the page, I can see correct width of the reveal, but close button still doesn't work.
Whatever I do, close button still doesn't work. As stated here, I've added motion-ui through @import. Rails doesn't tell me that it's not found, so I come to conclusion - it's installed.
Probably it's not the issue with the gem itself, but I can't guess the root of the issue, so starting here.. Thanks
in reveal-modal it set up background as "background: #EEE image-url("foundation/misc/modal-gloss.png") no-repeat -200px -80px;" which my browser doesnt understand.
image-url => url????
(app works well on local machine, but on heroku it doesn't show pictures)
I am having an issue with the foundation images not be served correctly through the CSS assets.
The assets pipeline helper -- image-url
-- is not generating the right url. The Rails guide says that this helper should generate the proper asset url: http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets
I am getting warnings from sprockets when I run a local rails server, via rails s
:
Started GET "/images/foundation/misc/button-gloss.png" for 127.0.0.1 at 2011-12-21 20:33:25 -0600
ActionController::RoutingError (No route matches [GET] "/images/foundation/misc/button-gloss.png"):
The gem source has the image-url
helper:
.button.nice {
background: #00a6fc image-url("foundation/misc/button-gloss.png") repeat-x 0 -34px;
However, if I open up the generated /assets/application.css file, I can see the generated css:
.button.nice {
background: #00a6fc url('/images/foundation/misc/button-gloss.png') repeat-x 0 -34px;
It does not have proper "/assets/foundation/misc/button-gloss.png" Am I missing something obvious?
rails g foundation:install
command.Hi,
I came across this project, and the grid system looks really neat. I'd like to try it out, but I don't want to use Foundation for all styling.
Would it be possible for you to separate the single SCSS file into several ones (e.g. grid, mobile, etc.) ? Basically, I'd like to be able to include only the Foundation elements I want (e.g. grid system) but without the parts I don't want (e.g. forms). Downloading the files when installing the gem isn't an issue, but I wouldn't want to serve unused files to users...
Ideally, it'd be great if you could do something like https://github.com/anjlab/bootstrap-rails (see the "stylesheets" section in the readme). It allows users to include the entire CSS with a single request, but also allows users to create a file an including only the required CSS styles.
Or should I simply manually copy and include the original CSS files from https://github.com/zurb/foundation ?
Any thoughts ?
Just ran bundle update, which installed 2.0.3 and getting this error. No changes on my end since 2.0.2 and that worked fine.
Trace from Bundler.require(:default, :assets, Rails.env)
and after. Let me know if there's anything else I can provide to help, or if you think I've misconfigured something.
~/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.0.3/lib/foundation/generators/layout_generator.rb:5:in `<module:Generators>'
~/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.0.3/lib/foundation/generators/layout_generator.rb:4:in `<module:Foundation>'
~/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.0.3/lib/foundation/generators/layout_generator.rb:3:in `<top (required)>'
~/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.0.3/lib/zurb-foundation.rb:2:in `require'
~/.rvm/gems/ruby-1.9.2-p290/gems/zurb-foundation-2.0.3/lib/zurb-foundation.rb:2:in `<top (required)>'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
~/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
TABS loaded in a partial by AJAX don't work
What might be the reason?
I thought the reason might be [click()] -> [live("click",], but it seems that you already changed files on this github account.
But I checked the previous version that I've dounloaded about two month ago, and it says. Maybe that's the reason?:
$('dl.tabs').each(function () {
//Get all tabs
var tabs = $(this).children('dd').children('a');
tabs.click(function (e) {
activateTab($(this));
});
});
I am not able to give captions with orbit here is my code:-
<div id = "featured">
<%@preferred.each do |destination|%>
<%destination.destination_photos.each do |photo|%>
<div id="htmlCaption">
<%=image_tag(photo.picture.thumb_large.url)%>
</div>
<%end%>
<%end%>
</div>
<span class="orbit-caption" id="htmlCaption">
<h2> Caption</h2>
</span>
Thanks,
Akram
I am using Rails 3.1 + Devise,
I have a sign out link that uses DELETE (as specified in devise)
<%= link_to('Logout', destroy_user_session_path, {:method=>'delete', :class => "small round white button"} ) %>
After including //= require foundation in my application.js, that link has stopped to work properly giving
I believe that jquery_ujs.js (also included in application.js) is responsible of "transforming" the request in a DELETE request, so I guess that foundation.js is not letting it make its work...
I am using foundation-rails on rails 3.1, everything looks nice out of the box so far except one part.
the datetime inputs are getting line breaked for every element, making a single datetime input into 6 lines.
It recreated on a new project so I don't think its caused by any prior css.
confirmed in Firefox7 and Safari 5
I got this when running rails g foundation:install
insert app/assets/javascripts/application.js
/Users/brian/.rvm/gems/ruby-1.9.3-p0@denim/gems/zurb-foundation-2.2.1.0/lib/foundation/generators/install_generator.rb:10:in add_assets': undefined method
[]' for nil:NilClass (NoMethodError)
Hello,
i upgraded to foundation 6. i can't set the default position of offcanvas to open. Can anyone help? please
thanks in advance
What is the reason for using pure css files when there is a sass port of foundation that you maintain that would work with rails?
Please, update this gem to 3.0 and add a bit Readme. I'm going to use it in my project.
I have a select year in the top bar with a hidden submit button.
$(document).on 'ready page:load', ->
$(".hide_and_submit input[type='submit']").hide()
$('.hide_and_submit').change ->
$(this).closest('form').submit()
return
When the responsive-menu toggles to small and the menu icon appears this CoffeeScript breaks and shows the hidden submit button only in the top bar. This CoffeeScript works fine for other hide_and_submit forms in my app.
I have setup a fresh application to play with foundation within Rails app but the javascript doesn't seem to be working:
http://outofhours.herokuapp.com/#overview
I have temporarily pushed the repo to GitHub so you can see the code and file structure:
https://github.com/dannymcc/Out-of-Hours
I am trying to get the simple tabs to work, but as you can see the tabs just stack up.
Hi all,
Are there any plans to support Foundation Apps as well?
http://foundation.zurb.com/apps.html
Thanks!
Hi,
Not sure if this is related to sassc library or not but when I use foundation 6 gem into my rails project, I got this compiling error:
Error: media query expression must begin with '('
on line 138 of .rvm/gems/ruby-2.2.2/gems/foundation-rails 6.1.1.3/vendor/assets/scss/util/_breakpoint.scss
I'm using a modal as a full screen menu.
<div class="full reveal text-center" id="modal-nav" data-reveal data-show-delay="500" data-hide-delay="500">
<h1>menu</h1>
<%= link_to "Home", root_path %>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">close</span>
</button>
</div>
with the following link:
<section class="home-menu">
<div class="row align-middle">
<p><a data-toggle="modal-nav">Modal test</a></p>
</div>
</section>
Everything works fine until I click on the "Home" link in the modal. When I get back to the home screen, the modal no longer works. I've tried disabling turbolinks but that wasn't the source of the problem. Any recommendations?
Thanks
With Rails 3.1, would it not be better to add foundation stylesheets and javascripts something like this?
@import ZURB/foundation
//= require_tree ZURB/javascripts/.
Try as I might, copying all of your examples on the documentation, I cannot get the <div class="alert-box">...</div>
variations to work with the Rails gem. I tried updating and reinstalling the gem, too. Is it possible that this isn't included in the gem? I get some minimal styling when I use <div class="alert">...</div>
or <div class="notice">...</div>
, but they don't resemble the alert boxes on the documentation page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.