# HG changeset patch # User Paul Boddie # Date 1543267084 -3600 # Node ID a414533ba44ac367e7b839fca8d19cecdc47a036 # Parent df715800fca4f10b4429be0635f6a8c5c97ae575 Added a theme inspired by the design of the Mercurial Web site. diff -r df715800fca4 -r a414533ba44a moinformat/themes/mercurial/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/moinformat/themes/mercurial/__init__.py Mon Nov 26 22:18:04 2018 +0100 @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +""" +A Mercurial-inspired theme. + +Copyright (C) 2018 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r df715800fca4 -r a414533ba44a moinformat/themes/mercurial/css/all.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/moinformat/themes/mercurial/css/all.css Mon Nov 26 22:18:04 2018 +0100 @@ -0,0 +1,80 @@ +html { + background-color: white; + color: black; + font-family: sans-serif; + font-size: 1em; +} + +body { + margin: 0 5em; + padding: 0; + border: 0; +} + +a, img { + border: 0; +} + +/* List formatting. */ + +dl, ol, ul { + padding: 0 1em; + margin: 0 0.5em; +} + +li p { + margin: 0.1em 0; +} + +dt { + margin-top: 0.25em; + font-weight: bold; +} + +dd { + margin-top: 0; + margin-bottom: 0; +} + +dd p { + margin: 0.1em 0; +} + +/* Table formatting. */ + +table { + margin: 0.5em 0 0 0.5em; + border-collapse: collapse; +} + +th, td { + padding: 0.25em 0.5em 0.25em 0.5em; + border: 1pt solid #ADB9CC; +} + +td p { + margin: 0; + padding: 0; +} + +/* Preformatted text. */ + +pre { + border: 1pt solid #AEBDCC; + background-color: #F3F5F7; + padding: 5pt; + font-family: courier, monospace; + white-space: pre; +} + +/* Monospace inline text frequently looks smaller than the surrounding text. */ + +tt { + font-size: 120%; +} + +/* Embedded objects. */ + +object { + margin: 1em 0; +} diff -r df715800fca4 -r a414533ba44a moinformat/themes/mercurial/css/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/moinformat/themes/mercurial/css/print.css Mon Nov 26 22:18:04 2018 +0100 @@ -0,0 +1,13 @@ +html { + font-family: Times, serif; + font-size: 12pt; +} + +body { + margin: 1.5cm; +} + +a, a:visited { + color: black; + text-decoration: none; +} diff -r df715800fca4 -r a414533ba44a moinformat/themes/mercurial/css/screen.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/moinformat/themes/mercurial/css/screen.css Mon Nov 26 22:18:04 2018 +0100 @@ -0,0 +1,12 @@ +body { + font-family: Helvetica, Verdana, Arial, sans-serif; + color: #111; +} + +a:link, a:visited { color: #00b5f1; text-decoration: none; } +a:link:hover, a:link:active, a:link:focus, +a:visited:hover, a:visited:active, a:visited:focus { text-decoration: underline; } + +h1 { font-size: 2em; } +h2 { font-size: 1.6em; } +h3 { font-size: 1.3em; } diff -r df715800fca4 -r a414533ba44a moinformat/themes/mercurial/html.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/moinformat/themes/mercurial/html.py Mon Nov 26 22:18:04 2018 +0100 @@ -0,0 +1,33 @@ +#!/usr/bin/env python + +""" +A Mercurial-inspired theme for HTML output. + +Copyright (C) 2018 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + +from moinformat.themes.html import HTMLTheme + +class MercurialHTMLTheme(HTMLTheme): + + "A Mercurial-inspired HTML theme." + + name = "html" + origin = __file__ + +theme = MercurialHTMLTheme + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r df715800fca4 -r a414533ba44a moinformat/themes/mercurial/template.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/moinformat/themes/mercurial/template.html Mon Nov 26 22:18:04 2018 +0100 @@ -0,0 +1,11 @@ + + + +%(title)s +%(links)s + + + +%(text)s + +