瀏覽代碼

Move print css styles into the main stylesheet

Saving a whole HTTP request
tags/v2.0.0
Adrian Short 6 年之前
父節點
當前提交
ea27763fb5
共有 3 個文件被更改,包括 16 次插入14 次删除
  1. +0
    -13
      public/print.css
  2. +16
    -0
      public/style.css
  3. +0
    -1
      views/layout.haml

+ 0
- 13
public/print.css 查看文件

@@ -1,13 +0,0 @@
.noprint, #footer, .nav, nav
{
display: none;
}

body
{
margin: 0 auto;
}

a, a:visited {
background-color: #fff;
}

+ 16
- 0
public/style.css 查看文件

@@ -293,3 +293,19 @@ nav
border: 1px solid green;
padding: 20px 20px;
}

@media print {
.noprint, #footer, .nav, nav
{
display: none;
}

body
{
margin: 0 auto;
}

a, a:visited {
background-color: #fff;
}
}

+ 0
- 1
views/layout.haml 查看文件

@@ -4,7 +4,6 @@
%title= @page_title ? @page_title + " - Sutton Elections" : "Sutton Elections - Your guide to voting and election results in the London Borough of Sutton"
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/style.css' }
%link{ :rel => 'stylesheet', :type => 'text/css', :href => '/print.css', :media => 'print' }
%meta{ :name => 'referrer', :content => 'no-referrer' }
%meta{ :name => 'viewport', :content => 'width=device-width, initial-scale=1' }
%body


Loading…
取消
儲存