websites.factorcode: first pass cleanup of website.

flac
John Benediktsson 2020-02-26 16:46:05 -08:00 committed by Steve Ayerhart
parent 5b0d28d055
commit 464659b772
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
7 changed files with 103 additions and 155 deletions

View File

@ -9,7 +9,7 @@ IN: webapps.mason.grids
: render-grid-cell ( cpu os quot -- xml ) : render-grid-cell ( cpu os quot -- xml )
call( cpu os -- url label ) call( cpu os -- url label )
2dup and 2dup and
[ link [XML <td class="supported"><div class="bigdiv"><-></div></td> XML] ] [ link [XML <td class="supported"><-></td> XML] ]
[ 2drop [XML <td class="doesnotexist" /> XML] ] [ 2drop [XML <td class="doesnotexist" /> XML] ]
if ; if ;
@ -27,11 +27,11 @@ CONSTANT: cpus
} }
: render-grid-header ( -- xml ) : render-grid-header ( -- xml )
oses values [ [XML <th align='center' scope='col'><-></th> XML] ] map ; oses values [ [XML <th scope='col'><-></th> XML] ] map ;
:: render-grid-row ( cpu quot -- xml ) :: render-grid-row ( cpu quot -- xml )
cpu second oses keys [| os | cpu os quot render-grid-cell ] map cpu second oses keys [| os | cpu os quot render-grid-cell ] map
[XML <tr><th align='center' scope='row'><-></th><-></tr> XML] ; [XML <tr><th scope='row'><-></th><-></tr> XML] ;
:: render-grid ( quot -- xml ) :: render-grid ( quot -- xml )
render-grid-header render-grid-header

View File

@ -14,7 +14,6 @@ http.client xml xml.data xml.traversal ;
---- ----
USING: accessors kernel math math.constants USING: accessors kernel math math.constants
math.functions prettyprint ; math.functions prettyprint ;
IN: shapes
TUPLE: circle radius ; TUPLE: circle radius ;
TUPLE: rectangle width height ; TUPLE: rectangle width height ;
@ -50,7 +49,8 @@ USING: sequences xml.syntax xml.writer ;
[XML <ul><-></ul> XML] [XML <ul><-></ul> XML]
pprint-xml pprint-xml
---- ----
USING: inspector io.files.info io.pathnames system tools.files ; USING: inspector io.files.info
io.pathnames system tools.files ;
home directory. home directory.
home file-system-info free-space>> . home file-system-info free-space>> .
@ -59,5 +59,6 @@ image-path file-info describe
USING: io kernel sequences ; USING: io kernel sequences ;
4 <iota> [ 4 <iota> [
"Happy Birthday " write 2 = "dear NAME" "to You" ? print "Happy Birthday " write
2 = "dear NAME" "to You" ? print
] each ] each

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,52 +1,54 @@
<% USING: namespaces http.client kernel io.files splitting random io io.encodings.utf8 sequences <%
webapps.mason.version.data webapps.mason.backend webapps.mason.grids webapps.mason.downloads
webapps.mason.utils html.elements html.streams accessors USING: accessors html.elements html.streams http.client io io.encodings.utf8
xml.writer xmode.highlight ; %> io.files kernel multiline namespaces random sequences splitting
webapps.mason.backend webapps.mason.downloads webapps.mason.grids
webapps.mason.utils webapps.mason.version.data xml.writer xmode.highlight ;
%>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<title>Factor programming language</title> <title>Factor programming language</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8" /> <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8" />
</head> </head>
<body> <body>
<center>
<div align="center">
<img src="logo.png" height="150" alt="Factor programming language" /> <img src="logo.png" height="150" alt="Factor programming language" />
</div>
<table border="0" width="100%"> <div class="page">
<h1>Why Factor</h1>
<p>The <b>Factor programming language</b> is a <a href="http://www.concatenative.org/">concatenative</a>, stack-based programming language with <a href="http://concatenative.org/wiki/view/Factor/Features/The%20language">high-level features</a> including dynamic types, extensible syntax, macros, and garbage collection. On a practical side, Factor has a <a href="http://docs.factorcode.org/content/article-vocab-index.html">full-featured library</a>, supports many different platforms, and has been extensively documented.</p>
<p>The implementation is <a href="http://concatenative.org/wiki/view/Factor/Optimizing%20compiler">fully compiled</a> for performance, while still supporting <a href="http://concatenative.org/wiki/view/Factor/Interactive%20development">interactive development</a>. Factor applications are portable between all common platforms. Factor can <a href="http://concatenative.org/wiki/view/Factor/Deployment">deploy stand-alone applications</a> on all platforms. Full <a href="https://github.com/factor/factor">source code</a> for the Factor project is available under a <a href="https://factorcode.org/license.txt">BSD license</a>.</p>
<table>
<tr> <tr>
<td width="50%" valign="top"> <td width="50%" valign="top">
<h1>Why Factor?</h1>
<p>The <big>Factor programming language</big> combines <a href="https://concatenative.org/wiki/view/Factor/Features/The%20language">powerful language features</a> with a <a href="https://docs.factorcode.org/content/article-vocab-index.html">full-featured library</a>. The implementation is <a href="https://concatenative.org/wiki/view/Factor/Optimizing%20compiler">fully compiled</a> for performance, while still supporting <a href="https://concatenative.org/wiki/view/Factor/Interactive development">interactive development</a>. Factor applications are portable between all common platforms. Factor can <a href="https://concatenative.org/wiki/view/Factor/Deployment">deploy stand-alone applications</a> on all platforms. Full source code for the Factor project is available under a <a href="https://factorcode.org/license.txt">BSD license</a>.</p>
<ul> <ul>
<li>Screenshots: <a href="https://factorcode.org/factor-macosx.png">Mac OS X</a>, <a href="https://factorcode.org/factor-windows7.png">Windows</a></li>
<li><a href="https://concatenative.org/wiki/view/Factor">Learn more about Factor</a></li> <li><a href="https://concatenative.org/wiki/view/Factor">Learn more about Factor</a></li>
<li><a href="https://concatenative.org/wiki/view/Factor/Learning">Get started programming with Factor</a></li> <li><a href="https://concatenative.org/wiki/view/Factor/Learning">Get started programming with Factor</a></li>
<li><a href="https://concatenative.org/wiki/view/Factor/FAQ">Get answers to frequently-asked questions</a></li> <li><a href="https://concatenative.org/wiki/view/Factor/FAQ">Get answers to frequently-asked questions</a></li>
<li><a href="https://docs.factorcode.org/">Read Factor reference documentation online</a></li> <li><a href="https://docs.factorcode.org/">Read Factor reference documentation online</a></li>
<li><a href="https://concatenative.org/wiki/view/Concatenative%20language">Learn more about concatenative programming</a></li> <li><a href="https://concatenative.org/wiki/view/Concatenative%20language">Learn more about concatenative programming</a></li>
<li><a href="https://concatenative.org/wiki/view/Factor/Examples">See some example programs</a></li>
<li><a href="https://github.com/factor/factor/issues">Report a bug</a></li> <li><a href="https://github.com/factor/factor/issues">Report a bug</a></li>
<li>Screenshots on <a href="https://factorcode.org/factor-macosx.png">Mac OS X</a>, <a href="https://factorcode.org/factor-windows7.png">Windows</a></li>
</ul> </ul>
<p>Most of the above links point to pages on the <a href="https://concatenative.org">concatenative.org wiki</a>.</p>
</td> </td>
<td width="50%" valign="top"> <td width="50%" valign="top">
<h1>Show me some code!</h1>
<p>Factor belongs to the family of <em><a href="https://concatenative.org/wiki/view/Concatenative%20language">concatenative languages</a></em>: this means that, at the lowest level, a Factor program is a series of words (functions) that manipulate a stack of references to dynamically-typed values. This gives the language a powerful foundation which allows many abstractions and paradigms to be built on top. Reload this page to see a random code example below.</p>
<pre><% <pre><%
"resource:extra/websites/factorcode/examples.txt" utf8 file-lines "resource:extra/websites/factorcode/examples.txt" utf8 file-lines
{ "----" } split random { "----" } split random
@ -54,23 +56,19 @@ xml.writer xmode.highlight ; %>
xml>string write-html xml>string write-html
%></pre> %></pre>
<p>See the <a href="https://concatenative.org/wiki/view/Factor/Examples">example programs</a> page on the wiki for more.</p>
</td> </td>
</tr> </tr>
</table> </table>
<h1>Downloads</h1> <h1>Downloads</h1>
<% [ %> <% [ %>
<p>To download a binary, follow the link corresponding to your computer's CPU/OS configuration. Binary packages are the recommended route for new users who wish to try Factor.</p> <p>To download a binary, follow the link for the desired OS / CPU configuration. Binary packages are the recommended route for new users who wish to try Factor.</p>
<h2>Stable release: <h2>Stable release:
<% latest-version <a [ announcement-url>> =href a> ] [ version>> write ] bi </a> %> <% latest-version <a [ announcement-url>> =href a> ] [ version>> write ] bi </a> %>
</h2> </h2>
<% release-grid write-xml %> <% release-grid write-xml %>
<p><b>Source code</b>: <p><b>Source code</b>:
@ -78,16 +76,15 @@ xml>string write-html
</p> </p>
<h2>Development release</h2> <h2>Development release</h2>
<% package-grid write-xml %> <% package-grid write-xml %>
<% ] with-mason-db %> <% ] with-mason-db %>
<p>Stable and development releases are built and uploaded by the <a href="https://concatenative.org/wiki/view/Factor/Build farm">build farm</a>. Follow <a href="https://twitter.com/FactorBuilds">@FactorBuilds</a> on Twitter to receive notifications. If you're curious, take a look at the <a href="https://builds.factorcode.org/dashboard">build farm dashboard</a>.</p> <p><b>Source code</b>: available via <a href="https://github.com/factor/factor/">github</a> or <a href="https://gitweb.factorcode.org/">gitweb</a>.</p>
<p><b>Source code</b> is stored in our <a href="https://concatenative.org/wiki/view/Factor/GIT repository">GIT repository</a>. Source can can be browsed online via <a href="https://github.com/factor/factor/">github</a> or <a href="https://gitweb.factorcode.org/">gitweb</a>.</p> <p>Stable and development releases are built and uploaded by the <a href="https://concatenative.org/wiki/view/Factor/Build farm">build farm</a>. Follow <a href="https://twitter.com/FactorBuilds">@FactorBuilds</a> on Twitter to receive notifications. If you're curious, take a look at the <a href="https://builds.factorcode.org/dashboard">build farm dashboard</a>. You can also <a href="https://concatenative.org/wiki/view/Factor/Building%20Factor">build Factor</a> on your own platform from source.</p>
<h1>More</h1> <h1>Community</h1>
<ul> <ul>
<li><a href="https://concatenative.org/wiki/view/Factor/Mailing list">Join the mailing list</a></li> <li><a href="https://concatenative.org/wiki/view/Factor/Mailing list">Join the mailing list</a></li>
@ -96,6 +93,7 @@ xml>string write-html
<li><a href="https://concatenative.org/wiki/view/Concatenative%20language/Publications">Academic publications</a></li> <li><a href="https://concatenative.org/wiki/view/Concatenative%20language/Publications">Academic publications</a></li>
<li><a href="https://paste.factorcode.org/">Factor community pastebin</a> - if you're in an IRC channel and want to share some code</li> <li><a href="https://paste.factorcode.org/">Factor community pastebin</a> - if you're in an IRC channel and want to share some code</li>
</ul> </ul>
</div>
</center>
</body> </body>
</html> </html>

View File

@ -1,144 +1,93 @@
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
a:link { text-decoration: none; color: #104e8b; }
a:visited { text-decoration: none; color: #104e8b; }
a:active { text-decoration: none; color: #104e8b; }
a:hover { text-decoration: underline; color: #104e8b; }
body { body {
font:75%/1.6em "Lucida Grande", "Lucida Sans Unicode", verdana, geneva, sans-serif; font-size: 12pt;
font-family: sans-serif;
text-align: center;
}
.page {
max-width: 800px;
text-align: left;
line-height: 150%;
}
pre {
background-color: #f5f5f5;
border: 1px dashed #ccc;
margin-top: 10px;
padding: 10px;
font-size: smaller;
width: 400px;
} }
ul { ul {
margin: 10px 10px 10px 0; margin: 10px 10px 10px 0;
padding:0 0 0 15px; padding-left: 10px;
} }
li { li {
margin:0 0 0 10px; margin-left: 10px;
padding: 5px; padding: 5px;
} }
a {
color:#222;
border-bottom:1px solid #aaa;
text-decoration:none;
}
a:hover {
border-bottom:1px solid #ccc;
}
ol.subnav {
margin:-10px -10px 0 -5px;
padding:0;
}
ol.subnav li {
font:85%/0.9em "Lucida Grande", "Lucida Sans Unicode", verdana, geneva, sans-serif;
float:left;
list-style:none;
margin:0;
padding:0;
}
ol.subnav a {
font-weight:bold;
color:#555;
border-top:2px solid #fff;
display:block;
padding:5px;
text-decoration:none;
margin:0 5px 0 0;
border-bottom:none;
}
ol.subnav a:hover {
border-top:2px solid #943329;
color:#121212;
border-bottom:none;
}
#downloads { #downloads {
width: 520px; width: 520px;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
caption { #downloads th {
padding: 0 0 5px 0;
width: 520px;
font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}
th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72; color: #4f6b72;
border-right: 1px solid #C1DAD7; border: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7; border-left: none;
border-top: 1px solid #C1DAD7;
letter-spacing: 2px; letter-spacing: 2px;
text-transform: uppercase; text-transform: uppercase;
padding: 6px 6px 6px 6px; padding: 6px;
background: #CAE8EA url(bg_header.jpg) no-repeat; background: #CAE8EA url(bg_header.jpg) no-repeat;
text-align: center;
vertical-align: center;
} }
th.nobg { #downloads th.nobg {
border-top: 0; border: 0;
border-left: 0;
border-right: 1px solid #C1DAD7; border-right: 1px solid #C1DAD7;
background: none; background: none;
} }
pre { #downloads td {
border: 1px dashed #ccc; text-align: center;
background-color: #f5f5f5; vertical-align: center;
font-size: 120%;
} }
td.alt { #downloads td.alt {
background: #F5FAFA; background: #F5FAFA;
color: #797268; color: #797268;
} }
td.doesnotexist { #downloads td.doesnotexist {
background: #E5EAEA; background: #E5EAEA;
} }
#downloads td.unsupported {
td.unsupported {
background: #ffaaaa; background: #ffaaaa;
} }
#downloads td.supported {
td.supported {
background: #aaffaa; background: #aaffaa;
} }
td.supported :hover { background-color: #88ff88; } #downloads td.nobinary {
td.nobinary {
background: #eeee88; background: #eeee88;
} }
div.bigdiv {
width: 100px;
text-align: center;
color: #050;
}
th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
th.allbg {
border-top: 0;
border-left: 0;
border-right: 0;
background: none;
}