# HG changeset patch # User Constantine Linnick # Date 1369062179 -25200 # Node ID af6d0c8414f2d7840d81c705b88fe2efc22ec53f # Parent 68c3007cd59dc5ef8d9883f1f69005d5f6c518db# Parent 4d384cd08fc84aa1451ccf384acfd5f5fe5d29cf Merged celdredge/hgext.markdown into default diff -r 68c3007cd59d -r af6d0c8414f2 __init__.py --- a/__init__.py Tue May 14 11:44:47 2013 +0700 +++ b/__init__.py Mon May 20 22:02:59 2013 +0700 @@ -2,7 +2,7 @@ import sys # If using TortoiseHg, obtain Python-Markdown and tell Python where to find it: -sys.path.append("c:/Program Files (x86)/MSBuild/The Motley Fool/Fool.Build/Resources/hgext.markdown/markdown-2.2.0-py2.7.egg") +#sys.path.append("c:/python27/Lib/site-packages/markdown-2.2.0-py2.7.egg") import logging, markdown, mimetypes, codecs from mercurial import extensions, encoding, util @@ -64,7 +64,11 @@ def file_markdown(orig, web, req, tmpl): f = req.form.get('file', [''])[0] parts = os.path.splitext(f) - + + + if 'file' not in req.form: + return webcommands.manifest(web, req, tmpl) + if not parts[-1] == '.markdown' and not parts[-1] == '.md': return orig(web, req, tmpl) @@ -72,7 +76,7 @@ fctx = webutil.filectx(web.repo, req) changeid = fctx.hex()[0:12] text = fctx.data().decode("utf-8") - except ErrorResponse, inst: + except LookupError, inst: try: return webcommands.manifest(web, req, tmpl) except ErrorResponse: diff -r 68c3007cd59d -r af6d0c8414f2 templates/markdown/summary.tmpl --- a/templates/markdown/summary.tmpl Tue May 14 11:44:47 2013 +0700 +++ b/templates/markdown/summary.tmpl Mon May 20 22:02:59 2013 +0700 @@ -8,7 +8,7 @@
TMF Hg
diff -r 68c3007cd59d -r af6d0c8414f2 templates/static/markdown.css --- a/templates/static/markdown.css Tue May 14 11:44:47 2013 +0700 +++ b/templates/static/markdown.css Mon May 20 22:02:59 2013 +0700 @@ -264,6 +264,12 @@ font-size: 1.2em; font-family: monospace; } +div.source pre { + padding: 0; + margin: 0; + background-color: inherit; + border: 0; +} div.source div.parity0, div.source div.parity1 { padding: 1px; @@ -282,6 +288,12 @@ .linenr { color: #999; text-align: right; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .lineno { text-align: right; diff -r 68c3007cd59d -r af6d0c8414f2 templates/static/tmf.css --- a/templates/static/tmf.css Tue May 14 11:44:47 2013 +0700 +++ b/templates/static/tmf.css Mon May 20 22:02:59 2013 +0700 @@ -7,26 +7,32 @@ body { background: #f6f6f6; background: url("/static/absurd.png"); - margin-top: 0; - margin-bottom: 0; + margin: 0; + padding: 0; } a { color: #4183C4; } -div#top { - background: linear-gradient(center top , #1C4871 1%, #0E365C 100%) repeat scroll 0 0 transparent; - background: -moz-linear-gradient(center top , #1C4871 1%, #0E365C 100%) repeat scroll 0 0 transparent; - background: -webkit-linear-gradient(center top , #1C4871 1%, #0E365C 100%) repeat scroll 0 0 transparent; - +div#top { + background: #1c4871; /* Old browsers */ + background: -moz-linear-gradient(top, #1c4871 0%, #1c4871 0%, #0e365c 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1c4871), color-stop(0%,#1c4871), color-stop(100%,#0e365c)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #1c4871 0%,#1c4871 0%,#0e365c 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #1c4871 0%,#1c4871 0%,#0e365c 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #1c4871 0%,#1c4871 0%,#0e365c 100%); /* IE10+ */ + background: linear-gradient(to bottom, #1c4871 0%,#1c4871 0%,#0e365c 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1c4871', endColorstr='#0e365c',GradientType=0 ); /* IE6-9 */ + box-shadow: 0 0 10px #555555; -moz-box-shadow: 0 0 10px #555555; -webkit-box-shadow: 0 0 10px #555555; line-height: 45px; - padding: 0 50px; - margin: 0 -50px 10px -50px; + padding: 0 40px; + margin: 0; + margin-bottom: 10px; } div#top span { @@ -42,12 +48,12 @@ width: 40px; text-align: center; border: 1px solid #fff; - text-shadow: 0 1px 1px #444 + text-shadow: 1px 1px 1px #444 } div#container { background: transparent; - padding-bottom: 0; + padding: 0 40px; } div.page-header { @@ -70,9 +76,14 @@ } div.page-header .filename { + color: #1c4871; display: block; - font-size: 24px; + font-size: 32px; font-weight: bold; + line-height: 1em; + margin: 0; + margin-bottom: 10px; + padding: 0; } div.page-header .repo { @@ -129,6 +140,8 @@ text-align: center; text-decoration: none; text-shadow: 0 1px 0 white; + + min-width: 80px; } ul.page-nav li a:hover { @@ -194,6 +207,13 @@ border: none; } +h2#readmefilename { + background: transparent; + font-size: 38px; + line-height: 38px; + padding: 25px; +} + table.short-log-entries tr.parity0 { background: #fcfcfc; } @@ -239,22 +259,30 @@ background: #4183C4; border: 1px solid #4183C4; color: #fff; - text-shadow: 0 1px 0 #444; + text-shadow: 1px 1px 1px #444; } span.logtags span.tagtag { background: #FCFCE2; border: 1px solid #FFEE00; color: #666; - text-shadow: 0 1px 0 white; + text-shadow: 1px 1px 1px white; } span.logtags span.inbranchtag { background: #D5DDE6; border: 1px solid #babef2; color: #444; - text-shadow: 0 1px 0 white; + text-shadow: 1px 1px 1px white; } div#readme { border: none; margin: 0; +} + +div#readme article{ + padding: 0 25px; +} + +div#readme article h1{ + margin-bottom: 10px; } \ No newline at end of file