Browse Source

Implements #36, version bump to 0.13

Adds permalink anchor inside all header HTML tags. Themes are adjusted
to have a 'headerlink' css class to deal with this anchor: it's visible
only when hovered.
tags/0.13
Frans Bouma 9 years ago
parent
commit
16d68a8954
4 changed files with 75 additions and 2 deletions
  1. +32
    -0
      Themes/Default/Destination/css/theme.css
  2. +32
    -0
      Themes/LLBLGenPro/Destination/css/theme.css
  3. +2
    -2
      src/DocNet/Properties/AssemblyInfo.cs
  4. +9
    -0
      src/MarkdownDeep/Block.cs

+ 32
- 0
Themes/Default/Destination/css/theme.css View File

@@ -136,6 +136,14 @@ a:hover, a:active {
outline: 0;
}

a.headerlink {
display: inline;
text-decoration: none;
visibility: hidden;
font-size: smaller;
margin-left: 3px;
}

abbr[title] {
border-bottom: 1px dotted;
}
@@ -303,6 +311,30 @@ h6 {
margin-bottom: 7px;
}

h1:hover a.headerlink {
visibility: visible;
}

h2:hover a.headerlink {
visibility: visible;
}

h3:hover a.headerlink {
visibility: visible;
}

h4:hover a.headerlink {
visibility: visible;
}

h5:hover a.headerlink {
visibility: visible;
}

h6:hover a.headerlink {
visibility: visible;
}

hr {
display: block;
height: 1px;


+ 32
- 0
Themes/LLBLGenPro/Destination/css/theme.css View File

@@ -136,6 +136,14 @@ a:hover, a:active {
outline: 0;
}

a.headerlink {
display: inline;
text-decoration: none;
visibility: hidden;
font-size: smaller;
margin-left: 3px;
}

abbr[title] {
border-bottom: 1px dotted;
}
@@ -303,6 +311,30 @@ h6 {
margin-bottom: 7px;
}

h1:hover a.headerlink {
visibility: visible;
}

h2:hover a.headerlink {
visibility: visible;
}

h3:hover a.headerlink {
visibility: visible;
}

h4:hover a.headerlink {
visibility: visible;
}

h5:hover a.headerlink {
visibility: visible;
}

h6:hover a.headerlink {
visibility: visible;
}

hr {
display: block;
height: 1px;


+ 2
- 2
src/DocNet/Properties/AssemblyInfo.cs View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.12.0.0")]
[assembly: AssemblyFileVersion("0.12.0")]
[assembly: AssemblyVersion("0.13.0.0")]
[assembly: AssemblyFileVersion("0.13.0")]

+ 9
- 0
src/MarkdownDeep/Block.cs View File

@@ -172,6 +172,7 @@ namespace MarkdownDeep
case BlockType.h5:
case BlockType.h6:
string id = string.Empty;
bool insertPermalink = false;
if (m.ExtraMode && !m.SafeMode)
{
b.Append("<" + BlockType.ToString());
@@ -181,6 +182,7 @@ namespace MarkdownDeep
b.Append(" id=\"");
b.Append(id);
b.Append("\">");
insertPermalink = true;
}
else
{
@@ -204,6 +206,13 @@ namespace MarkdownDeep
{
m.SpanFormatter.Format(b, Buf, ContentStart, ContentLen);
}
if(insertPermalink)
{
// append header permalink link
b.Append("<a class=\"headerlink\" href=\"#");
b.Append(id);
b.Append("\" title=\"Permalink to this headline\"><i class=\"fa fa-link\" aria-hidden=\"true\"></i></a>");
}
b.Append("</" + BlockType.ToString() + ">\n");
break;



Loading…
Cancel
Save