Hello, how to include CSS file with Haml? Every way I tried puts the href=... infos after the tag, not inside, like: <style>href="style.css" rel="stylesheet" type="text/css"</style> In reference I onlye read about JavaScript, not any word about CSS. But Javascript also didn''t worked, how should make include it? Thanks in advance, Zoltán -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Zoltan Gero wrote in post #964407:> Hello, > > how to include CSS file with Haml?Use Rails'' stylesheet_link_tag helper.> Every way I tried puts the href=... > infos > after the tag, not inside, like: > <style>href="style.css" rel="stylesheet" type="text/css"</style>You need to learn about how to do attributes in Haml (hint: braces are involved; read the docs).> > In reference I onlye read about JavaScript, not any word about CSS. But > Javascript also didn''t worked, how should make include it? >Same way.> Thanks in advance, > ZoltnBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry, "half-solved", this was the solution: %link(rel="stylesheet" type="text/css" href="style.css") Without space between link and ( and in Sinatra /public/ is not necessary, this is default, so it will find the CSS file there. Maybe others will have the same problem, so I shared. But JavaScript still doesn''t want to be included, please help. Thanks, Zoltán 2010/11/28 Gerő Zoltán <gezope@gmail.com>> Hello, > > how to include CSS file with Haml? Every way I tried puts the href=... > infos after the tag, not inside, like: > <style>href="style.css" rel="stylesheet" type="text/css"</style> > > In reference I onlye read about JavaScript, not any word about CSS. But > Javascript also didn''t worked, how should make include it? > > Thanks in advance, > Zoltán >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Please ask questions such as this only on rubyonrails-talk, not rubyonrails-core. Core is reserved for discussion such as patches or feature requests to the framework.Thank you. -- Ryan Bigg On Sunday, 28 November 2010 at 1:20 PM, Gerő Zoltán wrote: Sorry, "half-solved", this was the solution:%link(rel="stylesheet" type="text/css" href="style.css")Without space between link and ( and in Sinatra /public/ is not necessary, this is default, so it will find the CSS file there. Maybe others will have the same problem, so I shared. But JavaScript still doesn''t want to be included, please help.Thanks,Zoltán 2010/11/28 Gerő Zoltán <gezope@gmail.com>Hello, how to include CSS file with Haml? Every way I tried puts the href=... infos after the tag, not inside, like:<style>href="style.css" rel="stylesheet" type="text/css"</style> In reference I onlye read about JavaScript, not any word about CSS. But Javascript also didn''t worked, how should make include it? Thanks in advance, Zoltán -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Oh yes, your solution is better, thanks Marnen! On nov. 28, 02:13, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Zoltan Gero wrote in post #964407: > > > Hello, > > > how to include CSS file with Haml? > > Use Rails'' stylesheet_link_tag helper. > > > Every way I tried puts the href=... > > infos > > after the tag, not inside, like: > > <style>href="style.css" rel="stylesheet" type="text/css"</style> > > You need to learn about how to do attributes in Haml (hint: braces are > involved; read the docs). > > > > > In reference I onlye read about JavaScript, not any word about CSS. But > > Javascript also didn''t worked, how should make include it? > > Same way. > > > Thanks in advance, > > Zoltn > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.