anchors for file names
authorChristian Weiske <cweiske@cweiske.de>
Mon, 26 Mar 2012 21:55:46 +0000 (23:55 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 26 Mar 2012 21:55:46 +0000 (23:55 +0200)
data/templates/base.htm
data/templates/display.htm
data/templates/exception.htm
www/phorkie.css [new file with mode: 0644]

index f406f00..d0c3cee 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
  <head>
-  <!--<link rel="stylesheet" href="phorkie.css" />-->
+  <link rel="stylesheet" href="phorkie.css" />
   <title>{% block title %}{% endblock %} - Phorkie</title>
  </head>
  <body>
index 6575617..afdc75c 100644 (file)
@@ -9,7 +9,7 @@
 </ul>
 {% for file in repo.getFiles %}
 <div>
- <h2>{{file.getFilename}}</h2>
+ <h2 id="{{file.getFilename}}">{{file.getFilename}}<a class="anchorlink" href="#{{file.getFilename}}"></a></h2>
  <p>
   <a href="{{file.getLink('raw')}}">raw</a>
  </p>
index 805342a..410c3c0 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
  <head>
-  <!--<link rel="stylesheet" href="phorkie.css" />-->
+  <link rel="stylesheet" href="phorkie.css" />
   <title>Error - Phorkie</title>
  </head>
  <body>
diff --git a/www/phorkie.css b/www/phorkie.css
new file mode 100644 (file)
index 0000000..d6d1173
--- /dev/null
@@ -0,0 +1,16 @@
+/* show IDs for anchors */
+h1[id]:hover a.anchorlink:before,
+h2[id]:hover a.anchorlink:before,
+h3[id]:hover a.anchorlink:before,
+h4[id]:hover a.anchorlink:before,
+h5[id]:hover a.anchorlink:before,
+h6[id]:hover a.anchorlink:before {
+    content: "\00B6";/* pilcrow */
+    color: #888;
+    font-size: smaller;
+}
+a.anchorlink {
+    text-decoration: none;
+    margin-left: 0.5em;
+    font-size: smaller;
+}