为Refinery 使用Blueprint CSS (use Blueprint CSS for your Refinery CMS)
访问量: 3612
1. 下载 Blue print, 并压缩。 (Download the Blueprint CSS zipball, from : ) Blue print website
2. 解压缩,压缩后的文件夹中,有一个叫blueprint的目录,复制到 refinery 项目中。 (Unzip the file and then copy the related files to your refinery folder: )
2.1 把对应的CSS 和 image 文件COPY过去 (copy the css file and image file to the asses folder if you are using Rails3)
cp blueprint/ /apps/personal_site/app/assets/stylesheets/ -r
cp src/grid.png /apps/personal_site/app/assets/images/src/
3. 重点来了: 编译assets ( Now let's work on the assets : )
3.1 生成自定制的layout文件。 ( generate customized layout file )
$ bundle exec rake refinery:override view=layouts/application
3.2 编辑 application.html.erb ( edit this file)
# app/views/layouts/application.html.erb ...... <%= render '/refinery/head' %> ......
3.3 编辑 app/assets/stylesheets/application.css ( edit this file )
*= require_self *= require blueprint/screen.css *= require blueprint/print.css
3.4 编辑 print.css , 注释掉最后一行: ( comment out the last line of print.css)
/* a:link:after, a:visited:after {content:” (” attr(href) “)”;font-size:90%;} */
4. 编译assets: (compile the assets)
RAILS_ENV=production bundle exec rake assets:precompile
5. 重启Rails: (restart Rails )