From 02ce821673c906b64999600914ccb92187addb94 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Sat, 20 Nov 2010 18:52:54 -0800 Subject: Tweaking some styles --- pycco_resources/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pycco_resources/__init__.py') diff --git a/pycco_resources/__init__.py b/pycco_resources/__init__.py index 4f6af45..98ea841 100644 --- a/pycco_resources/__init__.py +++ b/pycco_resources/__init__.py @@ -19,8 +19,8 @@ p { h1, h2, h3, h4, h5, h6 { margin: 40px 0 15px 0; } - h3, h4, h5, h6 { - margin-top: 20px; +h2, h3, h4, h5, h6 { + margin-top: 0; } #container { position: relative; @@ -114,7 +114,7 @@ table td { border-left: 1px solid #e5e5ee; } pre, tt, code { - font-size: 12px; line-height: 18px; + line-height: 18px; font-family: Monaco, Consolas, "Lucida Console", monospace; margin: 0; padding: 0; } -- cgit v1.2.1 From 0df2a65cd297a696e53af449b28e3fff48428fc1 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Mon, 22 Nov 2010 00:19:32 -0800 Subject: Fixing bug with interaction with pystache and recursive rendering of context variables --- pycco_resources/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pycco_resources/__init__.py') diff --git a/pycco_resources/__init__.py b/pycco_resources/__init__.py index 98ea841..69700d7 100644 --- a/pycco_resources/__init__.py +++ b/pycco_resources/__init__.py @@ -113,6 +113,9 @@ table td { background: #f5f5ff; border-left: 1px solid #e5e5ee; } +.code pre, .docs p code { + font-size: 12px; +} pre, tt, code { line-height: 18px; font-family: Monaco, Consolas, "Lucida Console", monospace; -- cgit v1.2.1 From e2032e19b05c052b8fad276a1fb6aac1a5b552a8 Mon Sep 17 00:00:00 2001 From: Christopher Gateley Date: Fri, 10 Dec 2010 22:45:04 -0600 Subject: moved from table to pure css layout design --- pycco_resources/__init__.py | 164 ++++++++++++++------------------------------ 1 file changed, 53 insertions(+), 111 deletions(-) (limited to 'pycco_resources/__init__.py') diff --git a/pycco_resources/__init__.py b/pycco_resources/__init__.py index 69700d7..f9535f5 100644 --- a/pycco_resources/__init__.py +++ b/pycco_resources/__init__.py @@ -22,7 +22,7 @@ h1, h2, h3, h4, h5, h6 { h2, h3, h4, h5, h6 { margin-top: 0; } -#container { +#container, div.section { position: relative; } #background { @@ -32,95 +32,57 @@ h2, h3, h4, h5, h6 { border-left: 1px solid #e5e5ee; z-index: -1; } -#jump_to, #jump_page { - background: white; - -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; - -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; - font: 10px Arial; - text-transform: uppercase; - cursor: pointer; - text-align: right; +div.docs { + float: left; + max-width: 500px; + min-width: 500px; + min-height: 5px; + padding: 10px 25px 1px 50px; + vertical-align: top; + text-align: left; } -#jump_to, #jump_wrapper { - position: fixed; - right: 0; top: 0; - padding: 5px 10px; -} - #jump_wrapper { - padding: 0; - display: none; + .docs pre { + margin: 15px 0 15px; + padding-left: 15px; } - #jump_to:hover #jump_wrapper { - display: block; - } - #jump_page { - padding: 5px 0 3px; - margin: 0 0 25px 25px; - } - #jump_page .source { - display: block; - padding: 5px 10px; - text-decoration: none; - border-top: 1px solid #eee; - } - #jump_page .source:hover { - background: #f5f5ff; - } - #jump_page .source:first-child { - } -table td { - border: 0; - outline: 0; -} - td.docs, th.docs { - max-width: 500px; - min-width: 500px; - min-height: 5px; - padding: 10px 25px 1px 50px; - vertical-align: top; - text-align: left; + .docs p tt, .docs p code { + background: #f8f8ff; + border: 1px solid #dedede; + font-size: 12px; + padding: 0 0.2em; } - .docs pre { - margin: 15px 0 15px; - padding-left: 15px; - } - .docs p tt, .docs p code { - background: #f8f8ff; - border: 1px solid #dedede; - font-size: 12px; - padding: 0 0.2em; - } - .octowrap { - position: relative; + .octowrap { + position: relative; + } + .octothorpe { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + top: 3px; left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; } - .octothorpe { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; + div.docs:hover .octothorpe { + opacity: 1; } - td.docs:hover .octothorpe { - opacity: 1; - } - td.code, th.code { - padding: 14px 15px 16px 50px; - width: 100%; - vertical-align: top; - background: #f5f5ff; - border-left: 1px solid #e5e5ee; - } -.code pre, .docs p code { - font-size: 12px; +div.code { + margin-left: 580px; + padding: 14px 15px 16px 50px; + vertical-align: top; } + .code pre, .docs p code { + font-size: 12px; + } pre, tt, code { line-height: 18px; font-family: Monaco, Consolas, "Lucida Console", monospace; margin: 0; padding: 0; } +div.clearall { + clear: both; +} /*---------------------- Syntax Highlighting -----------------------------*/ @@ -198,42 +160,22 @@ html = """\ +
-
- {{#sources?}} -
- Jump To … -
-
- {{#sources}} - {{ basename }} - {{/sources}} + {{#sections}} +
+
+
+ #
+ {{{ docs_html }}} +
+
+ {{{ code_html }}}
- {{/sources?}} - - - - - - - - - {{#sections}} - - - - - {{/sections}} -

{{ title }}

-
- # -
- {{{ docs_html }}} -
-
{{{ code_html }}}
-
+
+ {{/sections}}
""" -- cgit v1.2.1 From d73743aa1d4b77f75f4eab207a87e84d77a6df01 Mon Sep 17 00:00:00 2001 From: Christopher Gateley Date: Fri, 10 Dec 2010 23:11:15 -0600 Subject: added back in unused 'jump-list' specific css and html --- pycco_resources/__init__.py | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'pycco_resources/__init__.py') diff --git a/pycco_resources/__init__.py b/pycco_resources/__init__.py index f9535f5..0f320c5 100644 --- a/pycco_resources/__init__.py +++ b/pycco_resources/__init__.py @@ -32,6 +32,42 @@ h2, h3, h4, h5, h6 { border-left: 1px solid #e5e5ee; z-index: -1; } +#jump_to, #jump_page { + background: white; + -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; + -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; + font: 10px Arial; + text-transform: uppercase; + cursor: pointer; + text-align: right; +} +#jump_to, #jump_wrapper { + position: fixed; + right: 0; top: 0; + padding: 5px 10px; +} + #jump_wrapper { + padding: 0; + display: none; + } + #jump_to:hover #jump_wrapper { + display: block; + } + #jump_page { + padding: 5px 0 3px; + margin: 0 0 25px 25px; + } + #jump_page .source { + display: block; + padding: 5px 10px; + text-decoration: none; + border-top: 1px solid #eee; + } + #jump_page .source:hover { + background: #f5f5ff; + } + #jump_page .source:first-child { + } div.docs { float: left; max-width: 500px; @@ -162,6 +198,21 @@ html = """\
+ {{#sources?}} +
+ Jump To … +
+
+ {{#sources}} + {{ basename }} + {{/sources}} +
+
+
+ {{/sources?}} +
+

{{ title }}

+
{{#sections}}
-- cgit v1.2.1 From bcb8f2c5f5a5adaee51eed9631e56ad7ebf557b5 Mon Sep 17 00:00:00 2001 From: Christopher Gateley Date: Fri, 10 Dec 2010 23:31:43 -0600 Subject: explicity disallow sections that have both empty 'doc' and empty 'code' sections --- pycco_resources/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pycco_resources/__init__.py') diff --git a/pycco_resources/__init__.py b/pycco_resources/__init__.py index 0f320c5..71456b1 100644 --- a/pycco_resources/__init__.py +++ b/pycco_resources/__init__.py @@ -213,8 +213,9 @@ html = """\

{{ title }}

+
{{#sections}} -
+
# -- cgit v1.2.1 From 459f92f4956c793650dd582a68243899b2fc4b1f Mon Sep 17 00:00:00 2001 From: Lucas Jenss Date: Thu, 5 Apr 2012 15:31:17 +0200 Subject: Fix background not staying behind the code when scrolling horizontally This commit fixes a bug introduced in e2032e19b05 which changed the previous table layout to a pure CSS-based layout. Because the new layout used a "position: fixed" background, the background would not scroll when code lines were more wide than the browser window. This has been fixed by making the background "position: absolute" and moving it into the container DIV. Because the container DIV does not expand if its content is wider than the browser window though, I had to set the body background color to the same color than the code background and the container background to white, so that the left (comment) part stays white. --- pycco_resources/__init__.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'pycco_resources/__init__.py') diff --git a/pycco_resources/__init__.py b/pycco_resources/__init__.py index 71456b1..a052967 100644 --- a/pycco_resources/__init__.py +++ b/pycco_resources/__init__.py @@ -6,6 +6,7 @@ body { line-height: 24px; color: #252519; margin: 0; padding: 0; + background: #f5f5ff; } a { color: #261a3b; @@ -22,15 +23,18 @@ h1, h2, h3, h4, h5, h6 { h2, h3, h4, h5, h6 { margin-top: 0; } +#container { + background: white; + } #container, div.section { position: relative; } #background { - position: fixed; + position: absolute; top: 0; left: 580px; right: 0; bottom: 0; background: #f5f5ff; border-left: 1px solid #e5e5ee; - z-index: -1; + z-index: 0; } #jump_to, #jump_page { background: white; @@ -196,8 +200,8 @@ html = """\ -
+
{{#sources?}}
Jump To … -- cgit v1.2.1