public
Description: A Ruby web application framework
Homepage: http://www.mackframework.com
Clone URL: git://github.com/markbates/mack.git
Click here to lend your support to: mack and make a donation at www.pledgie.com !
Stylesheet link helper [#86 state:resolved]
dsutedja (author)
Tue Aug 12 09:50:37 -0700 2008
commit  39356ebcbe258364eb1119f81fda1206f333006d
tree    b474451259230b591b2aaf27e4f94a9d64a20810
parent  84de40b7f7dcd83a7705d0d24ca5482e40291efa
...
 
1
2
3
...
1
2
3
4
0
@@ -1,3 +1,4 @@
0
+* [#86] stylesheet link helper
0
 * [#85] Refactored out Mack::ViewHelpers::HtmlHelpers into Mack::ViewHelpers::HtmlHelpers, Mack::ViewHelpers::FormHelpers and
0
         Mack::ViewHelpers::linkHelpers
0
 * [#84] Added Mack::Distributed.lookup(url) to retrieve specific distributed services.
...
91
92
93
 
 
 
 
 
 
 
 
 
94
95
96
97
...
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
0
@@ -91,6 +91,15 @@ module Mack
0
         end
0
       end
0
       
0
+      def stylesheet(name)
0
+        path = ""
0
+        path = "#{app_config.mack.distributed_site_domain}" if app_config.mack.distributed_site_domain
0
+        file_name = "#{name}.css" if !name.ends_with?(".css")
0
+        
0
+        link = "<link href=\"#{path}/stylesheets/#{file_name}\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />"
0
+        return link
0
+      end
0
+      
0
     end # LinkHelpers
0
   end # ViewHelpers
0
 end # Mack
0
\ No newline at end of file

Comments