diff --git a/bin/markdown-to-html b/bin/markdown-to-html new file mode 100755 index 0000000..8566293 --- /dev/null +++ b/bin/markdown-to-html @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import markdown +from markdown.extensions.toc import TocExtension + +import os + +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +files = [ + ("templates/help/faq.md", "templates/help/faq.html"), +] + +for srcFile, dstFile in files: + srcFile = os.path.join(BASE_DIR, srcFile) + dstFile = os.path.join(BASE_DIR, dstFile) + markdown.markdownFromFile(open(srcFile, "rb"), open(dstFile, "wb"), extensions=[TocExtension(baselevel=1, permalink=True)]) + diff --git a/dnmgmt/urls.py b/dnmgmt/urls.py index 8ac828e..20ae44c 100644 --- a/dnmgmt/urls.py +++ b/dnmgmt/urls.py @@ -15,6 +15,7 @@ Including another URLconf """ from django.conf.urls import url, include from django.contrib import admin +from django.views.generic import TemplateView import dncore.urls import dncore.views @@ -34,4 +35,6 @@ urlpatterns = [ url(r'^rrequests/', include(rrequests.urls, namespace='rrequests')), url(r'^domains/', include(domains.urls, namespace='domains')), url(r'^api/', include(api.urls, namespace='api')), + + url(r'^help/$', TemplateView.as_view(template_name='help/help.html'), name='help'), ] diff --git a/static/style.css b/static/style.css index 61cee6b..d7019aa 100644 --- a/static/style.css +++ b/static/style.css @@ -34,3 +34,25 @@ body { .asteriskField { display: none; } + +.headerlink { + opacity: 0; + padding-left: 10px; + font-size: 0.8em; + -webkit-transition: opacity 200ms ease-in-out; + transition: opacity 200ms ease-in-out; +} + +.headerlink:hover { + opacity: 1; +} + + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink { + opacity: 1; +} diff --git a/templates/base.html b/templates/base.html index b29e771..573d3fd 100644 --- a/templates/base.html +++ b/templates/base.html @@ -58,6 +58,7 @@
  • Domains
  • + Help