Permalink
Browse files

Added print style

Added a stylesheet to allow printing the doc.
  • Loading branch information...
1 parent 5086370 commit 57a0b31976294a098138c88b7717ae9592ca7e44 zittix committed Jul 13, 2011
@@ -145,6 +145,7 @@ - (NSDictionary *)variablesForDocument:(GBDocumentData *)object withStore:(id)st
NSMutableDictionary *page = [NSMutableDictionary dictionary];
[page setObject:[self pageTitleForDocument:object] forKey:@"title"];
[page setObject:[path stringByAppendingPathComponent:@"css/styles.css"] forKey:@"cssPath"];
+ [page setObject:[path stringByAppendingPathComponent:@"css/stylesPrint.css"] forKey:@"cssPrintPath"];
[self addFooterVarsToDictionary:page];
NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setObject:page forKey:@"page"];
@@ -0,0 +1,22 @@
+
+header {
+ display: none;
+}
+
+div.main-navigation, div.navigation-top {
+ display: none;
+}
+
+div#overview_contents, div#contents.isShowingTOC, div#contents {
+ overflow: visible;
+ position: relative;
+ top: 0px;
+ border: none;
+ left: 0;
+}
+#tocContainer.isShowingTOC {
+ display: none;
+}
+nav {
+ display: none;
+}
@@ -5,7 +5,8 @@
<title>{{page/title}}</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
- <link rel="stylesheet" type="text/css" href="{{page/cssPath}}" />
+ <link rel="stylesheet" type="text/css" href="{{page/cssPath}}" media="all" />
+ <link rel="stylesheet" type="text/css" media="print" href="{{page/cssPrintPath}}" />
{{#strings/appledocData}}<meta name="generator" content="{{tool}} {{version}} (build {{build}})" />{{/strings/appledocData}}
</head>
<body>
@@ -3,7 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{page/title}}</title>
- <link rel="stylesheet" type="text/css" href="css/styles.css" />
+ <link rel="stylesheet" type="text/css" href="css/styles.css" media="all" />
+ <link rel="stylesheet" type="text/css" media="print" href="css/stylesPrint.css" />
{{#strings/appledocData}}<meta name="generator" content="{{tool}} {{version}} (build {{build}})" />{{/strings/appledocData}}
</head>
<body>
@@ -3,7 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{page/title}}</title>
- <link rel="stylesheet" type="text/css" href="css/styles.css" />
+ <link rel="stylesheet" type="text/css" href="css/styles.css" media="all" />
+ <link rel="stylesheet" type="text/css" media="print" href="css/stylesPrint.css" />
{{#strings/appledocData}}<meta name="generator" content="{{tool}} {{version}} (build {{build}})" />{{/strings/appledocData}}
</head>
<body>
@@ -5,7 +5,8 @@
<title>{{page/title}}</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
- <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+ <link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
+ <link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
{{#strings/appledocData}}<meta name="generator" content="{{tool}} {{version}} (build {{build}})" />{{/strings/appledocData}}
</head>
<body>

0 comments on commit 57a0b31

Please sign in to comment.