[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgit
Subject:    Missing horizontal rule items on 'about' pages
From:       Pete Beardmore <pete.beardmore () msn ! com>
Date:       2018-01-24 15:12:18
Message-ID: DB6PR04MB3271FF657EEAF6E3F8C628DC8AE20 () DB6PR04MB3271 ! eurprd04 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I've just looked into a new project's missing horizontal rule items on its =
'about' page, and found that the markdown is parsed correctly and indeed pu=
shed, but that it's 'styled out'. The offending code is in 'md2html' where =
there's a reference to a missing png. On looking at server logs, this is in=
deed being screamed about.

I found and copied the missing 'dirty-shade.png' to cgit root, but it looke=
d so bad that I preferred removal in favour of a simpler 2px #ccc.

The addition to cgit.css in the attached probably isn't necessary, but it m=
ight guard against (once third party?!) md2html updates/bulk changes going =
forward.

Cheers,
Pete.

[Attachment #5 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} \
--></style> </head>
<body dir="ltr">
<div id="divtagdefaultwrapper" \
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" \
dir="ltr"> <div>Hi,<br>
<br>
I've just looked into a new project's missing horizontal rule items on its 'about' \
page, and found that the markdown is parsed correctly and indeed pushed, but that \
it's 'styled out'. The offending code is in 'md2html' where there's a reference to a \
missing  png. On looking at server logs, this is indeed being screamed about.<br>
<br>
I found and copied the missing 'dirty-shade.png' to cgit root, but it looked so bad \
that I preferred removal in favour of a simpler 2px #ccc.<br> <br>
The addition to cgit.css in the attached probably isn't necessary, but it might guard \
against (once third party?!) md2html updates/bulk changes going forward.<br> <br>
Cheers,<br>
Pete.</div>
</div>
</body>
</html>


["0001-fix-horizontal-rule-style.patch" (application/octet-stream)]

From 45f79da2b2d796f72bf651ca22f5c64a5816b8cb Mon Sep 17 00:00:00 2001
From: Pete Beardmore <pete.beardmore@msn.com>
Date: Wed, 24 Jan 2018 11:55:15 +0000
Subject: [PATCH] fix horizontal rule style

---
 cgit.css                        | 5 +++++
 filters/html-converters/md2html | 7 ++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cgit.css b/cgit.css
index 217a05a..86c70d8 100644
--- a/cgit.css
+++ b/cgit.css
@@ -8,6 +8,11 @@ div#cgit {
 	padding: 4px;
 }
 
+div#cgit hr {
+  background: #ccc;
+  height: 2px;
+}
+
 div#cgit a {
 	color: blue;
 	text-decoration: none;
diff --git a/filters/html-converters/md2html b/filters/html-converters/md2html
index ebf3856..0a25f14 100755
--- a/filters/html-converters/md2html
+++ b/filters/html-converters/md2html
@@ -81,11 +81,8 @@ sys.stdout.write('''
     margin: 15px 0;
 }
 .markdown-body hr {
-    background: transparent url("/dirty-shade.png") repeat-x 0 0;
-    border: 0 none;
-    color: #ccc;
-    height: 4px;
-    padding: 0;
+    background: #ccc;
+    height: 2px;
 }
 .markdown-body>h2:first-child, .markdown-body>h1:first-child, \
.markdown-body>h1:first-child+h2, .markdown-body>h3:first-child, \
.markdown-body>h4:first-child, .markdown-body>h5:first-child, \
.markdown-body>h6:first-child {  margin-top: 0;
-- 
2.14.2



_______________________________________________
CGit mailing list
CGit@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/cgit


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic