In confluence, when I export a page/space I would like a dynamically made title page to be created. What is the best way to go about this?
So far I have tried going to the look and feel under spaces and adding code to the PDF layout and stylesheet.
Ideally I would like a full page image with title text(from the page/solution) for the cover, and on the next page, table of contents. The code I have below kinda of does this, but simple tradtional CSS attributes like changing the 'color' of the title do not work. Forget about trying to do a gradient, which is a feature I would like implemented in future releases. Addtionally , debuging the code is painstankly slow, eg making style sheet changes, saving them, navigating to a page, exporting to a pdf, generating the pdf, downloading the pdf, ect , to see the changes is a 3-4 minute process each time.
Is there anymore documentation, debugging, or solutions that you can reccomend? The only other idea I can come up with is going in confluence source and adding in a custom method call that will do exactly what I want, but this has the downside of a deployment cost and lacks support for future releases.
Code for Layout:
- <div class="fsTitlePage" style="margin-left:auto;margin-right:auto; page-break-after:always; height:800px; width:500px; ">
- <img style="position:absolute; left:0;top:0;" src="http://d2l72tm4ce9ozj.cloudfront.net/confluence_template/cover.jpeg" />
- </div>
Code for Stylesheet:
- .fsTitlePage
- {
- position:relative;
- color:white;
-
- }
- .fsTitle
- {
- font-size: 42px;
- font-weight: bold;
- margin: 72px 0 4px 0;
- text-align:center;
- color:white !important;
- }
-
- /* Turn off the default section numbering for this TOC item */
- .toclvl0:before
- {
- display:none;
- counter-reset: chapter 0;
- }
-
- /* Hide the default page numbering for this TOC item */
- .toclvl0 .tocnum
- {
- display: none;
- color:white !important;
- }
-
- /* Move and style this TOC item */
- .toclvl0
- {
- position:absolute;
- top:450px;
- left:100px;
- font-size: 38px;
- font-weight: bold;
- margin: 125px 0 4px 0;
- text-align:center;
- color:white !important;
- }
-
- @page
- {
- margin-top: 2.54cm;
- margin-bottom: 2.54cm;
- margin-left: 1.27cm;
- margin-right: 1.27cm;
- @bottom-left
- {
- content: "Copyright © 2013, OpenPeak Inc.";
- font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
- font-size: 8pt;
- color:grey;
- }
- @bottom-right
- {
- content: "OpenPeak Confidential and Proprietary";
- font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
- font-size: 8pt;
- color: grey;
- margin-bottom:5px;
-
- }
- @top-right
- {
- content: "Page " counter(page);
- font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
- font-size: 8pt;
- color:grey;
- }
- /* Any other page-specific rules */
- }
-
- table.sectionMacro
- {
- table.sectionMacro
- {
- display: table;
- }
-
- table.sectionMacro>tbody
- {
- display: table;
- }
-
- table.sectionMacro>tbody>tr
- {
- display: table-row;
- }
-
- table.sectionMacro>tbody>tr>td
- {
- display: table-cell;
- }
- }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.