Browse Source

Docs: cleanup old docs build script and template (no longer used)

provider
Christoph Ruegg 12 years ago
parent
commit
5b1385c363
  1. 42
      build/FSharp.Formatting/build.fsx
  2. 243
      build/FSharp.Formatting/content/style.css
  3. 46
      build/FSharp.Formatting/content/tips.js
  4. 56
      build/FSharp.Formatting/template.html

42
build/FSharp.Formatting/build.fsx

@ -1,42 +0,0 @@
#I "../../packages/FSharp.Formatting.1.0.15/lib/net40"
#load "../../packages/FSharp.Formatting.1.0.15/literate/literate.fsx"
open System
open System.IO
open FSharp.Literate
let (+/) l r = Path.GetFullPath(Path.Combine(l,r))
let source = __SOURCE_DIRECTORY__
let toolDir = source +/ "../../packages/FSharp.Formatting.1.0.15/lib/net40"
let libDir = source +/ "../../out/lib/Net40"
let templateDir = source
let inputDir = source +/ "../../src/FSharpExamples"
let outputDir = source +/ "../../out/docs"
let templateFile = "template.html"
let templateContent = ["content/style.css"; "content/tips.js"]
// Additional strings to be replaced in the HTML template
let projInfo =
[ "page-description", ""
"page-author", "Math.NET Team & Contributors; Christoph Ruegg"
"project-name", "Math.NET Numerics" ]
let compilerReferences =
[ toolDir +/ "FSharp.CompilerBinding.dll"
toolDir +/ "FSharp.CodeFormat.dll"
toolDir +/ "FSharp.Markdown.dll"
"System.Web.dll"
libDir +/ "MathNet.Numerics.dll"
libDir +/ "MathNet.Numerics.FSharp.dll" ]
// Compiler options (reference the two dll files and System.Web.dll)
let compilerOptions = (List.fold (fun s p -> s + sprintf """--reference:"%s" """ p) "" compilerReferences).Trim()
// Copy template content files (scripts, styles, images, ..)
List.iter (fun tc -> File.Copy(templateDir +/ tc, outputDir +/ tc, true)) templateContent
// Now we can process the samples directory (with some additional references)
// and then we clean up the files & directories we had to create earlier
Literate.ProcessDirectory(inputDir, templateDir +/ templateFile, outputDir, OutputKind.Html, replacements=projInfo, compilerOptions=compilerOptions)

243
build/FSharp.Formatting/content/style.css

@ -1,243 +0,0 @@
@import url(http://fonts.googleapis.com/css?family=Ovo);
@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono);
/*--------------------------------------------------------------------------
Formatting for F# code snippets
/*--------------------------------------------------------------------------*/
/* identifier */
span.i { color:#000000; }
/* string */
span.s { color:#ce4415; }
/* keywords */
span.k { color:#0000fe; }
/* comment */
span.c { color:#008000; }
/* operators */
span.o { color:#800080; }
/* numbers */
span.n { color:#cd8300; }
/* line number */
span.l { color:#80b0b0; }
/* inactive code */
span.inactive { color:#808080; }
/* preprocessor */
span.prep { color:#800080; }
/* fsi output */
span.fsi { font-style:italic; color:#808080; }
/* omitted */
span.omitted {
color: #808080;
background: #fafafa;
border: solid 1px #d8d8d8;
border-radius: 5px;
padding: 0px 0px 1px 0px;
}
/* tool tip */
div.tip {
display: none;
font: 10pt Consolas, Calibri, sans-serif;
color: #d1d1d1;
background: #475b5f;
border: 1px solid #606060;
border-radius: 4px;
padding: 3px;
}
/* Optionally, also configure how the PRE element and TABLE.PRE look */
table.pre pre {
padding: 0;
margin: 0;
border-style: none;
border-radius:0;
width: 100%;
}
pre {
margin:10px 20px 20px 10px;
white-space:pre;
}
code {
font: 9pt "Droid Sans Mono", Consolas, sans-serif;
color: #7d0a26;
background-color: inherit;
border: 1px solid #e8e8e8;
padding: 1px 3px;
}
pre code {
width: 95%;
}
table.pre {
width: 95%;
margin:10px 20px 20px 10px;
padding: 10px;
}
table.pre, pre.fssnip, pre {
font: 9pt "Droid Sans Mono", Consolas, sans-serif;
color:#404040;
background: #f5f5f5;
border:1px solid #e0e0e0;
border-radius:5px;
border-collapse:separate;
line-height: 13pt;
margin:10px 20px 20px 10px;
padding:10px;
}
/*pre, table.pre td {
padding: 9.5px;
background: #f5f5f5;
border: solid 1px black;
border-radius: 4px;
border-color: rgba(0,0,0,0.15);
margin: 0 0 10px 0;
}*/
table.pre td {
padding: 0;
white-space: normal;
margin: 0;
}
table.pre td.lines {
width: 30px;
}
/*table.pre td.lines {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right-style: none;
padding-right: 0;
}
table.pre td.snippet {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border-left-style: none;
padding-left: 4px;
}*/
/*--------------------------------------------------------------------------
Formatting for page & standard document content
/*--------------------------------------------------------------------------*/
body {
font-family: Ovo, serif;
padding-top: 0;
padding-bottom: 40px;
}
a, a:visited {
color: #1BA1E2;
text-decoration: none;
}
a:hover {
color: white;
background: #1BA1E2;
}
.nav {
font-family: "Segoe UI", "Segoe WP", "Helvetica Neue", 'RobotoRegular', "Trebuchet MS", sans-serif;
}
.nav li a:hover {
color: white;
background: #1BA1E2;
}
/* Format the heading - nicer spacing etc. */
.masthead {
overflow: hidden;
}
.masthead ul, .masthead li {
margin-bottom: 0;
}
.masthead .nav li {
margin-top: 15px;
font-size: 110%;
}
.masthead h3 {
font-family: "Segoe UI", "Segoe WP", "Helvetica Neue", 'RobotoRegular', "Trebuchet MS", sans-serif;
font-weight: normal;
color: #1BA1E2;
margin-bottom: 5px;
font-size: 170%;
}
hr {
margin: 0 0 20px 0;
}
/* Format the right-side menu */
#menu {
margin-top: 50px;
font-size: 11pt;
padding-left: 20px;
}
#menu .nav-header {
font-size: 12pt;
color: #606060;
margin-top: 20px;
}
#menu li {
line-height: 25px;
}
/* Change font sizes for headings etc. */
#main h1 { font-size: 26pt; margin:10px 0 15px 0; }
#main h2 { font-size: 20pt; margin:20px 0 0 0; }
#main h3 { font-size: 14pt; margin:15px 0 0 0; }
#main p { font-size: 12pt; margin:5px 0 15px 0; }
#main ul { font-size: 12pt; margin-top:10px; }
#main li { font-size: 12pt; margin: 5px 0 5px 0; }
/*--------------------------------------------------------------------------
Additional formatting for the homepage
/*--------------------------------------------------------------------------*/
#nuget {
margin-top: 20px;
font-size: 11pt;
padding: 20px;
}
#nuget pre {
font-size: 11pt;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
background: #404040;
border-style: none;
color: #e0e0e0;
margin-top: 15px;
}
#hp-snippet td.lines {
display: none;
}
#hp-snippet .table {
width: 80%;
margin-left: 30px;
}
#hp-snippet thead, #hp-snippet .title {
font-weight: bold;
}
#menu li.generatedBy {
margin-top: 40px;
font-size: 0.8em;
line-height: normal;
color: #808080;
}

46
build/FSharp.Formatting/content/tips.js

@ -1,46 +0,0 @@
var currentTip = null;
var currentTipElement = null;
function hideTip(evt, name, unique) {
var el = document.getElementById(name);
el.style.display = "none";
currentTip = null;
}
function findPos(obj) {
// no idea why, but it behaves differently in webbrowser component
if (window.location.search == "?inapp")
return [obj.offsetLeft + 10, obj.offsetTop + 30];
var curleft = 0;
var curtop = obj.offsetHeight;
while (obj) {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
obj = obj.offsetParent;
};
return [curleft, curtop];
}
function hideUsingEsc(e) {
if (!e) { e = event; }
hideTip(e, currentTipElement, currentTip);
}
function showTip(evt, name, unique, owner) {
document.onkeydown = hideUsingEsc;
if (currentTip == unique) return;
currentTip = unique;
currentTipElement = name;
var pos = findPos(owner ? owner : (evt.srcElement ? evt.srcElement : evt.target));
var posx = pos[0];
var posy = pos[1];
var el = document.getElementById(name);
var parent = (document.documentElement == null) ? document.body : document.documentElement;
el.style.position = "absolute";
el.style.left = posx + "px";
el.style.top = posy + "px";
el.style.display = "block";
}

56
build/FSharp.Formatting/template.html

@ -1,56 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{page-title}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{page-description}">
<meta name="author" content="{page-author}">
<script src="http://code.jquery.com/jquery-1.8.0.js"></script>
<script src="http://code.jquery.com/ui/1.8.23/jquery-ui.js"></script>
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="content/style.css" />
<script src="content/tips.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><a href="http://www.mathdotnet.com">Math.NET Project</a></li>
<li><a href="http://numerics.mathdotnet.com">Math.NET Numerics</a></li>
<li><a href="https://github.com/mathnet/mathnet-numerics">GitHub</a></li>
<li><a href="https://mathnetnumerics.codeplex.com/">CodePlex</a></li>
</ul>
<h3>Math.NET Numerics</h3>
</div>
<hr />
<div class="row">
<div class="span9" id="main">
{document}
{tooltips}
</div>
<div class="span3">
<ul class="nav nav-list" id="menu">
<li class="nav-header">Math.NET Numerics</li>
<li><a href="http://numerics.mathdotnet.com">Home page</a></li>
<li><a href="http://numerics.mathdotnet.com/api/">API Reference</a></li>
<li class="nav-header">User Guide</li>
<li><a href="index.html">Random & Distributions</a></li>
<li class="generatedBy"><span>
<em>You</em> can edit this page <a href="https://github.com/mathnet/mathnet-numerics/tree/master/src/FSharpExamples">here</a>.<br />
Generated using <a href="http://tpetricek.github.io/FSharp.Formatting/">FSharp.Literate</a>.
</span></li>
</ul>
</div>
</div>
</div>
</body>
</html>
Loading…
Cancel
Save