bf4162b781be

Style the READMEs
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 17 Jan 2020 12:59:30 -0500
parents 4b3cb867d109
children 5b921c5536ca
branches/tags (none)
files .hgignore dev.conf templates/sjl/index.tmpl templates/sjl/navigation.tmpl templates/sjl/readme.tmpl templates/static/style-sjl.css

Changes

diff -r 4b3cb867d109 -r bf4162b781be .hgignore
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Fri Jan 17 12:59:30 2020 -0500
@@ -0,0 +1,2 @@
+dev-repos
+
diff -r 4b3cb867d109 -r bf4162b781be dev.conf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev.conf	Fri Jan 17 12:59:30 2020 -0500
@@ -0,0 +1,11 @@
+[paths]
+/ = /home/sjl/src/hg.stevelosh.com/dev-repos/*
+
+[web]
+style = sjl
+templates = /home/sjl/src/hg.stevelosh.com/templates/
+cache = False
+
+[extensions]
+hgext.readme = /home/sjl/src/hgext.readme
+
diff -r 4b3cb867d109 -r bf4162b781be templates/sjl/index.tmpl
--- a/templates/sjl/index.tmpl	Fri Jan 17 12:13:11 2020 -0500
+++ b/templates/sjl/index.tmpl	Fri Jan 17 12:59:30 2020 -0500
@@ -4,7 +4,7 @@
 <body>
 
 <div class="main">
-    <h2 class="breadcrumb"><a href="/">hg.stevelosh.com</a> {pathdef%breadcrumb}</h2>
+    <div class="breadcrumb"><a href="/">hg.stevelosh.com</a> {pathdef%breadcrumb}</div>
 
     <table class="bigtable repos">
         <tbody class="stripes2">
diff -r 4b3cb867d109 -r bf4162b781be templates/sjl/navigation.tmpl
--- a/templates/sjl/navigation.tmpl	Fri Jan 17 12:13:11 2020 -0500
+++ b/templates/sjl/navigation.tmpl	Fri Jan 17 12:59:30 2020 -0500
@@ -1,4 +1,4 @@
-<h2 class="breadcrumb"><a href="/">hg.stevelosh.com</a> {pathdef%breadcrumb}</h2>
+<div class="breadcrumb"><a href="/">hg.stevelosh.com</a> {pathdef%breadcrumb}</div>
 
 <div class="menu">
     <ul>
diff -r 4b3cb867d109 -r bf4162b781be templates/sjl/readme.tmpl
--- a/templates/sjl/readme.tmpl	Fri Jan 17 12:13:11 2020 -0500
+++ b/templates/sjl/readme.tmpl	Fri Jan 17 12:59:30 2020 -0500
@@ -3,11 +3,13 @@
 </head>
 <body>
 
-<div class="main">
+<div class="main page-readme">
 
 {navigation}
 
+<div class="readme-content">
 {readme_content}
+</div>
 
 </div>
 
diff -r 4b3cb867d109 -r bf4162b781be templates/static/style-sjl.css
--- a/templates/static/style-sjl.css	Fri Jan 17 12:13:11 2020 -0500
+++ b/templates/static/style-sjl.css	Fri Jan 17 12:59:30 2020 -0500
@@ -25,16 +25,17 @@
 h1 {
     font-size: 18px;
 }
-h2 {
-    font-size: 14px;
-    margin-bottom: 6px;
-}
-h3 {
-    font-size: 18px;
-    margin-bottom: 6px;
-}
+
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: black; }
+h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { color: #e50053; }
 
 /* Menu */
+.breadcrumb {
+    font-size: 18px;
+    font-weight: bold;
+    padding-bottom: 4px;
+    color: #666;
+}
 .menu ul {
     list-style-type: none;
     margin: 0 0 24px;
@@ -167,6 +168,34 @@
     white-space: nowrap;
 }
 
+.readme-content {
+    line-height: 20px;
+}
+.readme-content p code {
+    border: 1px solid #ffddfa;
+    border-radius: 2px;
+    background-color: #fff9fb;
+    padding: 0px 3px;
+}
+.readme-content pre {
+    border: 1px solid #ffddfa;
+    border-left: 8px solid #ffddfa;
+    border-radius: 2px;
+    background-color: #fffcfe;
+    margin-left: 24px;
+    padding: 10px 10px;
+}
+
+.readme-content h1 a { color: black; }
+.readme-content h1 a:hover { color: #e50053; }
+
+.readme-content h1 { font-size: 28px; line-height: 1.4; }
+.readme-content h2 { font-size: 23px; line-height: 1.4; }
+.readme-content h3 { font-size: 19px; line-height: 1.4; }
+.readme-content h4 { font-size: 16px; line-height: 1.4; }
+.readme-content h5 { font-size: 14px; line-height: 1.4; }
+.readme-content h6 { font-size: 14px; line-height: 1.4; }
+
 /* Commit */
 pre.commit-full-description {
     border: 1px solid #ccc;