gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 4f2c1ec 3/3: Updated the manual webpage CSS


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 4f2c1ec 3/3: Updated the manual webpage CSS
Date: Sat, 24 Sep 2016 20:31:01 +0000 (UTC)

branch: master
commit 4f2c1ece27f6cd83f4c9efd7739d250a9040717e
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Updated the manual webpage CSS
    
    The manual's webpage CSS has been completely re-written to be much more
    responsive and easier to read. The OpenSans webfont was adopted, images,
    headers, footnotes, initial paragraph indentations and some other things
    were made to become more similar to printed documents (easier to read).
---
 .gitignore     |    3 +
 doc/fonts.css  |   59 +++++++++++
 doc/forwebpage |   21 ++--
 doc/style.css  |  308 +++++++++++++++++++++++++++++++++++++++++++-------------
 4 files changed, 311 insertions(+), 80 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2c5bade..4fe17ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -105,8 +105,11 @@ astarithmetic
 astnoisechisel
 astsubtractsky
 autom4te.cache
+lib/gnuastro.h
+lib/gnuastro.pc
 doc/gnuastro.cps
 doc/gnuastro.vrs
+lib/gnuastro/gnuastro.h
 
 
 
diff --git a/doc/fonts.css b/doc/fonts.css
new file mode 100644
index 0000000..c771ad6
--- /dev/null
+++ b/doc/fonts.css
@@ -0,0 +1,59 @@
+/* CSS stylesheet for webfonts in Gnuastro's manual webpage.
+
+Original author:
+    Mohammad Akhlaghi <address@hidden>
+Contributing author(s):
+Copyright (C) 2016 Free Software Foundation, Inc.
+
+This stylesheet is free software: you can redistribute it and/or
+modify it under the terms of the GNU General Public Licence as
+published by the Free software foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This stylesheet 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.
+
+A copy of the GNU General Public License is available at
+<http://www.gnu.org/licenses>.*/
+
+
+
address@hidden {
+    font-family: 'open_sanslight';
+    src: url('../OpenSans/light/OpenSans-Light-webfont.eot');
+    src: url('../OpenSans/light/OpenSans-Light-webfont.eot?#iefix')
+           format('embedded-opentype'),
+         url('../OpenSans/light/OpenSans-Light-webfont.woff')
+           format('woff'),
+         url('../OpenSans/light/OpenSans-Light-webfont.ttf')
+           format('truetype'),
+         url('../OpenSans/light/OpenSans-Light-webfont.svg#open_sanslight') 
format('svg');
+    font-weight: normal;
+    font-style: normal;
+}
+
address@hidden {
+    font-family: 'open_sanslight';
+    src: url('../OpenSans/light-italic/OpenSans-LightItalic-webfont.eot');
+    src: 
url('../OpenSans/light-italic/OpenSans-LightItalic-webfont.eot?#iefix') 
format('embedded-opentype'),
+         url('../OpenSans/light-italic/OpenSans-LightItalic-webfont.woff') 
format('woff'),
+         url('../OpenSans/light-italic/OpenSans-LightItalic-webfont.ttf') 
format('truetype'),
+         
url('../OpenSans/light-italic/OpenSans-LightItalic-webfont.svg#open_sanslight_italic')
 format('svg');
+    font-weight: normal;
+    font-style: italic;
+}
+
address@hidden {
+    font-family: 'open_sanslight';
+    src: url('../OpenSans/regular/OpenSans-Regular-webfont.eot');
+    src: url('../OpenSans/regular/OpenSans-Regular-webfont.eot?#iefix') 
format('embedded-opentype'),
+         url('../OpenSans/regular/OpenSans-Regular-webfont.woff')
+           format('woff'),
+         url('../OpenSans/regular/OpenSans-Regular-webfont.ttf')
+           format('truetype'),
+         
url('../OpenSans/regular/OpenSans-Regular-webfont.svg#open_sansregular') 
format('svg');
+    font-weight: bold;
+    font-style: normal;
+}
diff --git a/doc/forwebpage b/doc/forwebpage
index 10e7e67..5fa6d67 100755
--- a/doc/forwebpage
+++ b/doc/forwebpage
@@ -26,8 +26,8 @@
 # CVS to upload them there.
 #
 #
-# NOTE FOR FIRST TIME MAINTAINERS
-# -------------------------------
+# NOTE FOR FIRST TIME
+# -------------------
 #
 # The GNU webpage is version controlled by CVS and operates based on
 # it. CVS is no longer popular anymore, but the commands below should
@@ -181,13 +181,13 @@ make
 # Delete all the temporary files that gendocs.sh left behind
 rm -f gnuastro.aux gnuastro.cp gnuastro.cps gnuastro.fn gnuastro.ky \
    gnuastro.log gnuastro.pg gnuastro.toc gnuastro.tp gnuastro.vr    \
-   gnuastro.vrs
+   gnuastro.vrs gnuastro.fns gnuastro.tps
 
 
 
 
 # Copy the two necessary files in the manual directory:
-cp javascript.html style.css $tmpdir/
+cp javascript.html style.css fonts.css $tmpdir/
 
 
 
@@ -251,6 +251,7 @@ do
                 cssbase="../"
                 jsbase="../../"
             fi
+            echo "<link rel=\"stylesheet\" type=\"text/css\" 
href=\""$cssbase"fonts.css\">" >> tmp.html
             echo "<link rel=\"stylesheet\" type=\"text/css\" 
href=\""$cssbase"style.css\">" >> tmp.html
             if [ $hasjavascript = "yes" ]; then
                 echo "<script 
src=\""$jsbase"MathJax/MathJax.js?config=TeX-AMS_HTML\"></script>" >> tmp.html
@@ -278,14 +279,14 @@ do
                 echo "</noscript>" >> tmp.html
                 echo "" >> tmp.html
             fi
-            echo "<p><a 
href=\"http://www.gnu.org/software/gnuastro/manual\";>Read in other 
formats</a>." >> tmp.html
+            echo "<p class=\"bottom-links\"><a 
href=\"http://www.gnu.org/software/gnuastro/manual\";>Read in other 
formats</a>.</p>" >> tmp.html
             if [ $hasjavascript = "yes" ]; then
-                echo "<br><a 
href=\"http://www.gnu.org/software/gnuastro/manual/javascript.html\"; 
rel=\"jslicense\">JavaScript license information</a>" >> tmp.html
+                echo "<p class=\"bottom-links\"><a 
href=\"http://www.gnu.org/software/gnuastro/manual/javascript.html\"; 
rel=\"jslicense\">JavaScript license information</a></p>" >> tmp.html
             fi
             # Note that the htmldatecomment put after this line is later
             # used to ignore this line in the diffs (so the months on the
             # webpage don't change if this page hasn't changed).
-            echo "<br><a href=\"http://www.gnu.org/software/gnuastro\";>GNU 
Astronomy Utilities</a> manual, $thismonth.</p> $htmldatecomment" >> tmp.html
+            echo "<p class=\"bottom-links\"><a 
href=\"http://www.gnu.org/software/gnuastro\";>GNU Astronomy Utilities</a> 
manual, $thismonth.</p> $htmldatecomment" >> tmp.html
         fi
 
         #Do any modifications to the line:
@@ -303,7 +304,8 @@ do
 
             # Add a title.
             if [ $addtitle = "yes" ]; then
-            echo "<h2>$booktitle</h2>" >> tmp.html
+                echo "<h2>$booktitle</h2>" >> tmp.html
+                echo "<hr>" >> tmp.html
             fi
         fi
     done < "$file"
@@ -314,7 +316,7 @@ echo %%%%% DONE %%%%%
 
 
 
-# Copy the gnuastro-top.html page into index.html (by only if it actually
+# Copy the gnuastro-top.html page into index.html (but only if it actually
 # differs from it.
 if ! diff gnuastro-top.html $topwebcheckout/gnuastro/index.html; then
     cp gnuastro-top.html $topwebcheckout/gnuastro/index.html
@@ -323,7 +325,6 @@ fi
 
 
 
-
 # Copy the generated files to the proper directory. Note that the majority
 # of the HTML files in `html_node' have not changed, so CVS doesn't check
 # for the file contents, and so will update everything that is copied,
diff --git a/doc/style.css b/doc/style.css
index 92e4244..acc8a16 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -1,70 +1,238 @@
-body
-{
-    padding:1em;
-    display: block;
-    font-family:verdana,helvetica,arial,sans-serif;
-}
-
-
-
-
-img
-{
-    width:90%;
-    display: block;
-    margin-left: auto;
-    margin-right: auto;
-}
-
-
-
-
-code,
-samp
-    {
-        color:#000000;
-        font-size: 90%;
-        border-width: 1px;
-        border-radius:2px;
-        border-style: solid;
-        border-color: #B0B0B0;
-        font-family:"courier new";
-    }
-
-div.example
-{
-    width:auto;
-    color:#000000;
-    font-size: 125%;
-    padding-left: 1em;
-    margin:0 4em 0 2em;
-    border:1px solid #d4d4d4;
-    background-color:#f1f1f1;
-    font-family:"courier new";
-}
-
-table.cartouche
-{
-    margin:10px;
-    border:solid;
-    border-width:1px;
-    padding-left:1em;
-    padding-right:1em;
-    border-radius:10px;
-    background-color:#EE9A49;
-}
-
-
-a:link,
-a:visited,
-a:hover,
-a:active
-      {
-          text-decoration:none;
-          font-weight:bold;
-          color:#B13E0F;
-      }
-a:hover
-      {
-          color:#FF9F00;
-      }
+/* CSS stylesheet for webfonts in Gnuastro's manual webpage.
+
+Original author:
+    Mohammad Akhlaghi <address@hidden>
+Contributing author(s):
+Copyright (C) 2016 Free Software Foundation, Inc.
+
+This stylesheet is free software: you can redistribute it and/or
+modify it under the terms of the GNU General Public Licence as
+published by the Free software foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This stylesheet 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.
+
+A copy of the GNU General Public License is available at
+<http://www.gnu.org/licenses>.*/
+
+
+/* Layout
+
+   The CSS Style rules categorized as "Layout" here are to do with the
+   general layout of the final page, not to with the text in it. */
+
+/* These are HTML5 elements that will not be recognized by older
+   versions, by setting their "display" to "block" we are telling the
+   browser's that don't support HTML5 to put them on their own
+   starting line link <p>. */
+article,
+figure,
+footer,
+header,
+main,
+nav,
+copyright,
+section{
+    display: block;
+}
+
+
+
+
+
+/* This clearfix class will make the size of the container of several
+   boxes equal to the larger of the two (mainly important for the
+   height). So when the div container class contains a sidebar and
+   main, its the hight of the container containing the two will be
+   equal to the largest of the two. This is taken from the "HTML and
+   CSS Visual Quickstart Guide" eighth edition. */
+.clearfix:before,
+.clearfix:after{
+    content: " ";
+    display: table;
+}
+.clearfix:after{
+    clear: both;
+}
+.clearfix{
+    *zoom: 1;
+}
+
+
+
+
+
+
+
+
+
+
+/* Text and figure layouts. */
+
+/* All the elements: We want the width value to contain the padding
+   and border values too. */
+*{
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+/* In a narrow screen it is much easier to read fonts that are
+   slightly larger than the standard size. */
+body{
+    font-size: 110%;           /* Default browser size.           */
+    font-weight: 100;          /* Thin fonts for all pages.       */
+    padding-left: 0.5em;
+    padding-right: 0.5em;
+    font-family: open_sanslight, sans-serif;
+}
+
+
+/* Paragraphs
+
+   By default all the paragraphs are indented, except for those that
+   are immediately following a header, their indentation is set to
+   zero. */
+p{
+    margin-top: 0;
+    text-indent: 1em;
+    line-height: 1.3;
+    margin-bottom: 0.2em;
+}
+
+em {
+    font-weight: 100;
+    font-style: italic;
+}
+
+/* Header (and bottom) links to next and previous titles: */
+.header p {
+    text-indent: 0;
+    font-size: 85%;
+}
+
+/* Paragraphs that are immediately after a header or a header and an image,
+   or within dd structures, or have links before them (from the index) must
+   not have any indentation.*/
+p.bottom-links, dd p,
+h1+p, h1+img+p, h1+figure+p, h1+a+p, h1+a+a+p,
+h2+p, h2+img+p, h2+figure+p, h2+a+p, h2+a+a+p,
+h3+p, h3+img+p, h3+figure+p, h3+a+p, h3+a+a+p,
+h4+p, h4+img+p, h4+figure+p, h4+a+p, h4+a+a+p,
+h5+p, h5+img+p, h5+figure+p, h5+a+p, h5+a+a+p,
+h6+p, h6+img+p, h6+figure+p, h6+a+p, h6+a+a+p, {
+    text-indent: 0;
+}
+
+p.bottom-links {
+    font-size: 90%;
+}
+
+dd{
+    padding-bottom: 1em;
+}
+
+/* Headers
+
+   The default body font-weight is 100 (thin), so the default "bold"
+   weight of these headers will make them too thick. Therefore we set
+   these headings to have a font-weight or normal or 400.*/
+h1, h2, h3, h4, h5, h6{
+    font-weight: 400;
+    margin-bottom: 0.3em;
+}
+h1{
+    margin-top: 0;
+    font-size: 1.8em;
+}
+h2{ font-size: 1.5em; }
+h3{ font-size: 1.3em; }
+h4{ font-size: 1.2em; }
+h5{ font-size: 1.1em; }
+h6{ font-size: 1.0em; }
+
+
+/* Images */
+.float{
+    width: 80%;
+    margin: auto;
+    padding: 1em 0 1em 0;
+}
+.float img{
+    width: 100%;
+}
+.float-caption p {
+    font-size: 90%;
+    text-indent: 0;
+}
+
+
+/* Example code blocks */
+div.example {
+    width: 90%;
+    color: #000000;
+    font-size: 100%;
+    padding: 0 0 0 1em;
+    margin: 0.5em auto;
+    border: 1px solid #d4d4d4;
+    background-color: #f1f1f1;
+    font-family: "courier new";
+}
+code, samp {
+    background-color: #f9f9f9;
+}
+
+
+/* Links
+
+   The links are distinguished from the main text by being a brigher
+   shade of gray but bolder. When they are in focus, active or the
+   mouse is hovering over them, they become darker.*/
+a{
+    font-size: 95%;
+    font-weight: 400;
+    text-decoration: none;
+}
+a:link,
+a:visited{ color: #1a3b9f; }
+a:focus,
+a:active,
+a:hover{ color: #0099ff; }
+
+
+
+/* Sub and Super scripts
+
+   Leave line spacing unchanged when <sub> and <sup> are used. */
+sub,
+sup{
+    font-size: 75%;
+    line-height: 0;
+    position: relative;
+    vertical-align: baseline;
+}
+sup{ top: -0.5em; }
+sub{ bottom: -0.25em; }
+
+
+
+/* Footnotes: */
+.footnote h4 {
+    font-size: 90%;
+}
+.footnote h3 {
+    font-size: 80%;
+    display: inline;
+}
+.footnote p {
+    font-size: 80%;
+}
+
+
+/* MathJax: */
+.MathJax {
+    font-size: 3em;
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]