ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [1/2] incubator-ponymail-site git commit: add a pilcrow next to headers with a link
Date Wed, 01 Jun 2016 06:20:28 GMT
Repository: incubator-ponymail-site
Updated Branches:
  refs/heads/asf-site 44f3401f0 -> f1948e07a


add a pilcrow next to headers with a link


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/commit/5f2e46c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/tree/5f2e46c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/diff/5f2e46c5

Branch: refs/heads/asf-site
Commit: 5f2e46c528cd5ed3fee163720bcc23331382ffdd
Parents: 44f3401
Author: humbedooh <humbedooh@apache.org>
Authored: Wed Jun 1 08:19:54 2016 +0200
Committer: humbedooh <humbedooh@apache.org>
Committed: Wed Jun 1 08:19:54 2016 +0200

----------------------------------------------------------------------
 content/css/default.css | 4 +++-
 source/generate.py      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/blob/5f2e46c5/content/css/default.css
----------------------------------------------------------------------
diff --git a/content/css/default.css b/content/css/default.css
index 998ae5f..e455d1e 100644
--- a/content/css/default.css
+++ b/content/css/default.css
@@ -4500,7 +4500,9 @@ img {
         width: 100%
     }
 }
-
+h1:hover a, h2:hover a, h3:hover a, h4:hover a, h5:hover a, h6:hover a {
+    color: rgba(70,70,50,1) !important;
+}
 #menubar {
     font-size: 20pt;
     background: #4e413a;

http://git-wip-us.apache.org/repos/asf/incubator-ponymail-site/blob/5f2e46c5/source/generate.py
----------------------------------------------------------------------
diff --git a/source/generate.py b/source/generate.py
index 4de9c47..a8b097b 100644
--- a/source/generate.py
+++ b/source/generate.py
@@ -23,10 +23,12 @@ def runDir(path):
             text = re.sub(r"([A-Z/]+)\.md", lambda x: x.group(1).lower() + ".html", text,
flags =re.MULTILINE)
             html = markdown.markdown(text)
             # Convert h1-h6 into links
-            html = re.sub(r"<h([1-6])>(.+?)</h[1-6]>", lambda x: "<h%s id='%s'>%s</h%s>"
% (
+            html = re.sub(r"<h([1-6])>(.+?)</h[1-6]>", lambda x:
+                "<h%s id='%s'>%s<a href='#%s' style='color: rgba(0,0,0,0);'>&para;</a></h%s>"
% (
                 x.group(1),
                 re.sub(r"[^a-z0-9]+", "", x.group(2).lower()),
                 x.group(2),
+                re.sub(r"[^a-z0-9]+", "", x.group(2).lower()),
                 x.group(1)
                        )
                           , html)


Mime
View raw message