]> gitweb.factorcode.org Git - factor.git/commitdiff
help.html: more css changes
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 28 Jun 2022 17:41:27 +0000 (10:41 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 28 Jun 2022 17:41:27 +0000 (10:41 -0700)
basis/help/html/html.factor
basis/help/html/stylesheet.css
extra/websites/factorcode/master.css

index 15cf6612680086b2d990335b0a282cd832664b74..6a022d6178b8f86b46777ea357cb2d2d2b251e78 100644 (file)
@@ -122,7 +122,7 @@ M: pathname url-of
 : fix-css-style ( style -- style' )
     R/ font-size: \d+pt;/ [
         "font-size: " ?head drop "pt;" ?tail drop
-        string>number
+        string>number 2 -
         "font-size: %dpt;" sprintf
     ] re-replace-with
 
@@ -136,16 +136,12 @@ M: pathname url-of
        drop ""
     ] re-replace-with
 
-    R/ background-color: #f3f2ea;/ [
-        drop "background-color: #f7f7f7;"
-    ] re-replace-with
-
     R/ font-family: monospace;/ [
         " white-space: pre-wrap; line-height: 125%;" append
     ] re-replace-with
 
     { "font-family: monospace;" "background-color:" } [ over subseq? ] all? [
-        " border: 1px solid #dbdbdb; border-radius: 5px; margin: 15px; width: calc(100% - 30px);" append
+        " border: 1px solid #e3e2db; border-radius: 5px; margin: 10px 0px;" append
     ] when ;
 
 : fix-help-header ( classes -- classes )
@@ -179,8 +175,7 @@ M: pathname url-of
                         { "#333333;" "#cccccc;" }
                         { "#373e48;" "#ffffff;" }
                         { "#8b4500;" "orange;" }
-                        { "#dbdbdb;" "#444444;" }
-                        { "#e3e2db;" "#666666;" }
+                        { "#e3e2db;" "#444444;" }
                         { "white;" "#202124;" }
                         { "black;" "white;" }
                     } ?at [
@@ -192,25 +187,10 @@ M: pathname url-of
         "{  }" over subseq? [ drop f ] when
     ] map harvest append "}" suffix ;
 
-: mobile-css ( classes -- classes' )
-    { "" "/* Mobile */" "@media screen and (max-width: 600px) {" }
-    swap [
-        R/ {[^}]+}/ [
-            "{" ?head drop "}" ?tail drop ";" split
-            [ [ blank? ] trim ] map harvest [ ";" append ] map
-            { "margin: 15px;" "width: calc(100% - 30px);" } intersect
-            { "margin: 15px;" } { "margin: 15px 0px;" } replace
-            { "width: calc(100% - 30px);" } { "width: 100%;" } replace
-            " " join "{ " " }" surround
-        ] re-replace-with "    " prepend
-        "{  }" over subseq? [ drop f ] when
-    ] map harvest append "}" suffix ;
-
 : css-classes ( classes -- stylesheet )
     [
         [ fix-css-style " { " "}" surround ] [ "." prepend ] bi* prepend
-    ] { } assoc>map fix-help-header dup
-    [ dark-mode-css ] [ mobile-css ] bi 3append join-lines ;
+    ] { } assoc>map fix-help-header dup dark-mode-css append join-lines ;
 
 :: css-styles-to-classes ( body -- stylesheet body )
     H{ } clone :> classes
index d72a5c05aebd09e5fa12edd87989ba668bb96eb9..bbe1af4cc819cdb23c62f65ca9f8e1d48ed6e331 100644 (file)
@@ -13,7 +13,7 @@ a:hover, .link:hover { text-decoration: underline; }
 body {
     margin: 0;
     font-family: sans-serif;
-    font-size: 14pt;
+    font-size: 12pt;
     line-height: 150%;
 }
 
@@ -47,9 +47,9 @@ tr:hover {
 }
 
 .navrow {
-    max-width: 900px;
+    max-width: 800px;
     position: relative;
-    left: calc(max(-450px,-50%) + 50%);
+    left: calc(max(-400px,-50%) + 50%);
     margin: 0;
     padding: 10px 15px 10px 15px;
 }
@@ -59,9 +59,9 @@ tr:hover {
 }
 
 .page {
-    max-width: 900px;
+    max-width: 800px;
     position: relative;
-    left: calc(max(-450px,-50%) + 50%);
+    left: calc(max(-400px,-50%) + 50%);
     padding: 15px;
 }
 
@@ -74,7 +74,7 @@ tr:hover {
     margin-top: 15px;
     border-top: 1px dashed #ccc;
     color: #666;
-    font-size: 12pt;
+    font-size: 10pt;
 }
 
 @media screen and (max-width: 480px) {
index 72e82222c8ab2d7830a7558c81f309c74999b022..d3476ef142ccdbc471d3018a58b6a4434f7bb50e 100644 (file)
@@ -11,13 +11,13 @@ a:link, a:visited, a:active { text-decoration: none; }
 a:hover { text-decoration: underline; }
 
 body {
-    font-size: 14pt;
+    font-size: 12pt;
     font-family: sans-serif;
     text-align: center;
 }
 
 .page {
-    max-width: 900px;
+    max-width: 800px;
     text-align: left;
     line-height: 150%;
     padding: 10px;