[PATCH 1 of 2 website] frontpage: remove autowidth class, wrap words in quick start example (RFC)

Anton Shestakov av6 at dwimlabs.net
Fri Jul 22 06:53:09 EDT 2016


# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1469184171 -28800
#      Fri Jul 22 18:42:51 2016 +0800
# Node ID 93cf6f0032429fa38d7bd072e9cb4a7229a587cf
# Parent  7b96d719f9a769522be33008380fb786d7f481e0
frontpage: remove autowidth class, wrap words in quick start example (RFC)

Right now this means that the first line (with the repo URL) will get
word-wrapped, and it doesn't look too good:

"""
$ hg clone
https://selenic.com/repo/hello
"""

The next patch will use a different URL for a different effect.

diff --git a/static/css/styles.css b/static/css/styles.css
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -96,7 +96,6 @@ blockquote, q { quotes: "" ""; }
 .big { float: left; width: 470px; }
 .quote { float: right; width: 740px; text-align: right; margin-right: 25px;   }
 .big h2 { margin-top: 20px; }
-.autowidth { width: auto; margin-right: 0; margin-left: 0; }
 
 /*
  * Logo
@@ -202,3 +201,7 @@ pre, .output {
 	font-size: .90em;
 	font-style: italic;
 }
+
+.wrap {
+    white-space: pre-wrap;
+}
diff --git a/templates/frontpage.html b/templates/frontpage.html
--- a/templates/frontpage.html
+++ b/templates/frontpage.html
@@ -35,11 +35,11 @@
             </li>
         </ol>
     </div>
-    <div class="col autowidth">
+    <div class="col">
         <h3>Quick Start</h3>
 
         <p><em>Clone a project and push changes</em>
-<pre>$ hg clone https://selenic.com/repo/hello
+<pre class="wrap">$ hg clone https://selenic.com/repo/hello
 $ cd hello
 $ (edit files)
 $ hg add (new files)
@@ -50,7 +50,7 @@
 </p>
 
 <p><em>Create a project and commit</em>
-<pre>$ hg init (project-directory)
+<pre class="wrap">$ hg init (project-directory)
 $ cd (project-directory)
 $ (add some files)
 $ hg add


More information about the Mercurial-devel mailing list