Improve www to look like other bsd.lv projects, remove function list.

This commit is contained in:
kristapsdz committed 2019-07-05 13:38:34 +00:00
1 parent d514565fb5
commit 76e217547c
7 files changed
+152 -230

No files matched your search

+3 -10
View File
@@ -89,8 +89,7 @@ HTMLS = man/kcgi.3.html \
man/kutil_openlog.3.html \
man/kutil_urlencode.3.html \
man/kvalid_string.3.html \
man/kfcgi.8.html \
functions.html
man/kfcgi.8.html
MAN3S = man/kcgi.3 \
man/kcgihtml.3 \
man/kcgijson.3 \
@@ -379,8 +378,7 @@ sample-cgi: sample-cgi.o
# that they're running in-house for releases.
index.html: index.xml versions.xml $(THTMLS)
sblg -t index.xml -s date -o- versions.xml $(THTMLS) | \
sed "s!@VERSION@!$(VERSION)!g" >$@
sblg -t index.xml -s date -o- versions.xml $(THTMLS) >$@
sample.c.html: sample.c
highlight -o $@ --inline-css --doc sample.c
@@ -389,8 +387,7 @@ samplepp.cc.html: samplepp.cc
highlight -o $@ --inline-css --doc samplepp.cc
archive.html: archive.xml versions.xml $(THTMLS)
sblg -t archive.xml -s date -o- versions.xml $(THTMLS) | \
sed "s!@VERSION@!$(VERSION)!g" >$@
sblg -t archive.xml -s date -o- versions.xml $(THTMLS) >$@
$(THTMLS): tutorial.xml versions.xml $(TXMLS)
@@ -407,10 +404,6 @@ extending01.html: extending01.xml tutorial.xml
.8.8.html:
mandoc -Thtml -Ostyle=mandoc.css $< >$@
functions.html: functions.xml genindex.sh
sh ./genindex.sh functions.xml | \
sed "s!@VERSION@!$(VERSION)!g" >$@
atom.xml: versions.xml
sblg -s date -a versions.xml >$@
+67 -66
View File
@@ -1,69 +1,70 @@
html, body { margin: 0;
padding: 0; }
body { color: #333;
font-family: "Alegreya sans", Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif;
font-weight: 400;
font-size: 14pt; }
a { text-decoration: none; }
strong, b { font-weight: 700; }
code, pre { font-size: 12pt; }
body > header { box-shadow: 0 1px 4px #888;
background-color: #333;
padding: 2em 20% 1ex 20%;
color: #fff; }
body > header a { color: #dd5; }
body > header a:hover { color: #ff0; }
body > header nav ul { margin: auto 0;
padding: 0;
list-style-type: none; }
body > header nav li { margin: 0; }
body > header nav li + li { margin-top: 0.5em; }
body > header nav { padding: 0.5ex 0 1ex 0; }
body > header nav .version { border-right: thin solid silver;
color: #abc;
padding-right: 1ex; }
h1 { font-size: 24pt;
margin: 0;
margin-bottom: 8pt;
font-weight: 400; }
.nm, .file { font-style: italic; }
h1 .nm { text-shadow: 1px 1px #666;
font-style: inherit; }
h1 .nd { text-shadow: 1px 1px #333; }
footer { margin-top: 1em;
text-align: center;
font-size: 12pt;
color: #666; }
footer a { color: #000; }
footer span { border-left: thin solid #ccc;
padding-left: 1ex; }
footer { padding: 1ex;
margin-top: 1em;
margin-bottom: 1em; }
.flag { font-weight: 500; }
#functions, #archive { width: 60%;
margin-left: auto;
margin-right: auto; }
#archive li + li { margin-top: 16pt; }
#archive div.content > div + div
{ margin-top: 8pt; }
#archive ul { list-style-type: none;
padding: 0;
margin: 2em 0; }
#archive .title { display: flex;
border-bottom: thin solid #eee;
margin-bottom: 0.25em; }
#archive .title > :first-child { font-weight: 500; }
#archive .title > :last-child { flex: 1;
font-size: 12pt;
text-align: right; }
#functions ul { margin-left: 0;
padding-left: 0; }
#functions dd + dt { margin-top: 12pt; }
html, body { margin: 0;
padding: 0; }
body { color: #333;
font-family: "Alegreya sans", sans-serif;
font-weight: 400;
line-height: 1.3em;
font-size: 14pt; }
a { text-decoration: none; }
strong, b { font-weight: 700; }
code, pre { font-size: 65%; }
body > header { background-color: #333;
padding: 2rem 0 0 0;
color: #fff; }
body > header > section { width: 66rem;
max-width: 98%;
margin: 0 auto; }
#header a { color: #dd5; }
#header a:hover { color: #ff0; }
#header nav { padding: 0.5rem 0;
font-size: 90%; }
#header nav .version { border-right: thin solid silver;
color: #abc;
margin-right: 0.5rem;
padding-right: 0.5rem; }
h1 { font-size: 175%;
margin: 0;
font-weight: 400; }
.nm, .file { font-style: italic; }
h1 .nm { text-shadow: 1px 1px #666;
font-style: inherit; }
h1 .nd { text-shadow: 1px 1px #333; }
footer { margin-top: 1em;
text-align: center;
font-size: 12pt;
color: #666; }
footer a { color: #000; }
footer span { border-left: thin solid #ccc;
padding-left: 1ex; }
footer { padding: 1ex;
margin-top: 1em;
margin-bottom: 1em; }
.flag { font-weight: 500; }
#functions, #archive { width: 66rem;
max-width: 98%;
margin-left: auto;
margin-right: auto; }
#archive .fa { font-size: 80%; }
#archive li:first-child { color: #000;
margin-bottom: 3rem; }
#archive li + li { margin-top: 2rem;
opacity: 0.6; }
#archive div.content > div + div
{ margin-top: 1rem; }
#archive ul { list-style-type: none;
padding: 0;
margin: 2em 0; }
#archive .title { display: flex;
border-bottom: thin solid #eee;
margin-bottom: 1rem; }
#archive .title > :last-child { flex: 1;
font-size: 12pt;
text-align: right; }
#functions ul { margin-left: 0;
padding-left: 0; }
#functions dd + dt { margin-top: 12pt; }
@media only screen and (max-width: 768px), only screen and (max-device-width: 768px) {
h1 { font-size: 15pt; }
pre { font-size: 8pt; }
#functions, #archive { width: 96%; }
body > header { padding: 1em 2% 1ex 2%; }
h1 { font-size: 125%;
line-height: 125%; }
}
+9 -4
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<title>kcgi | minimal CGI and FastCGI library for C</title>
<link rel="alternate" href="atom.xml" type="application/atom+xml" title="kcgi version feed" />
@@ -18,7 +18,12 @@
<span itemprop="description" class="nd">minimal CGI and FastCGI library for C/C++</span>
</h1>
<nav>
<span class="version">Version @VERSION@</span>
<span class="version">
Version
<nav data-sblg-nav="1" data-sblg-navtag="version" data-sblg-navsz="1" data-sblg-navxml="1">
${sblg-titletext}
</nav>
</span>
<a title="Source code" itemprop="downloadURL" href="snapshots/kcgi.tgz"><i class="fa fa-fw fa-gears"></i></a>
<a title="Source fingerprint" href="snapshots/kcgi.tgz.sha512"><i class="fa fa-fw fa-lock"></i></a>
<a title="Source archive" href="snapshots"><i class="fa fa-fw fa-archive"></i></a>
@@ -40,7 +45,7 @@
</article>
<footer>
<div>
&#169; 2014&#8211;2017
&#169; 2014&#8211;2019
<a rel="author" href="https://github.com/kristapsdz">Kristaps Dzonsons</a>
</div>
<div>
-53
View File
@@ -1,53 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta charset="utf-8" />
<title>kcgi | minimal CGI and FastCGI library for C</title>
<link rel="alternate" href="atom.xml" type="application/atom+xml" title="kcgi version feed" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Alegreya+Sans:400,400italic,500,700" />
<link rel="stylesheet" href="archive.css" />
</head>
<body itemscope="itemscope" itemtype="http://schema.org/SoftwareApplication">
<header>
<section id="header">
<h1>
<a itemprop="name" class="nm" href="index.html">kcgi</a>
&#8211;
<span itemprop="description" class="nd">minimal CGI and FastCGI library for C/C++</span>
</h1>
<nav>
<span class="version">Version @VERSION@</span>
<a title="Source code" itemprop="downloadURL" href="snapshots/kcgi.tgz"><i class="fa fa-fw fa-gears"></i></a>
<a title="Source fingerprint" href="snapshots/kcgi.tgz.sha512"><i class="fa fa-fw fa-lock"></i></a>
<a title="Source archive" href="snapshots"><i class="fa fa-fw fa-archive"></i></a>
<a title="Source repository" href="https://www.github.com/kristapsdz/kcgi"><i class="fa fa-fw fa-github"></i></a>
<a title="Version feed" href="atom.xml"><i class="fa fa-fw fa-rss"></i></a>
</nav>
</section>
</header>
<article id="functions">
<p>
The following is a list of all functions found in <span class="nm">kcgi</span> library and its bundled libraries.
The index is automatically generated.
</p>
<dl>
<!-- FUNCTIONS -->
</dl>
</article>
<footer>
<div>
&#169; 2014&#8211;2017
<a rel="author" href="https://github.com/kristapsdz">Kristaps Dzonsons</a>
</div>
<div>
<a href="snapshots/kcgi.tgz"><i class="fa fa-fw fa-gears"></i></a>
<a href="snapshots/kcgi.tgz.sha512"><i class="fa fa-fw fa-lock"></i></a>
<a href="snapshots"><i class="fa fa-fw fa-archive"></i></a>
<a href="https://www.github.com/kristapsdz/kcgi"><i class="fa fa-fw fa-github"></i></a>
<span>Built with <a href="https://kristaps.bsd.lv/sblg">sblg</a> on <a href="https://www.openbsd.org">OpenBSD</a></span>
</div>
</footer>
</body>
</html>
-31
View File
@@ -1,31 +0,0 @@
#! /bin/sh
sed '/<!-- FUNCTIONS -->/q' $1
for f in `ls man/*.3 | sort`
do
# Extract list of functions.
functions=`sed -n '/SYNOPSIS/,/DESCRIPTION/p' $f | grep -e '^\.Fo' -e '^\.Fn' | cut -d " " -f 2 | sort -u`
# If no functions, don't do anything here.
if [ -z "$functions" ]
then
continue
fi
desc=`grep -e '^\.Nd' $f | sed 's/^[^ ]* //'`
echo "<dt><a href=\"`basename $f`.html\">`basename $f .3`(3)</a>: $desc</dt>"
echo "<dd>"
echo "<ul>"
# Extract description of file.
for ff in $functions
do
echo "<li>$ff</li>"
done
echo "</ul>"
echo "</dd>"
done
sed '1,/<!-- FUNCTIONS -->/ d' $1
+34 -34
View File
@@ -4,46 +4,51 @@ body { color: #222;
font-family: "Alegreya sans", sans-serif;
font-weight: 400;
font-size: 14pt; }
code, pre { font-size: 11pt; }
code, pre { font-size: 65%; }
a { text-decoration: none;
color: blue; }
strong, b { font-weight: 700; }
body > header { box-shadow: 0 1px 4px #888;
background-color: #333;
padding: 5em 25% 1ex 25%;
body > header { background-color: #333;
padding: 5rem 0 0 0;
color: #fff; }
body > header > * { width: 66rem;
margin: 0 auto;
max-width: 98%; }
body > header a { color: #dd5; }
body > header a:hover { color: #ff0; }
body > header nav .version { border-right: thin solid silver;
color: #abc;
padding-right: 1ex; }
#version ul,
#header ul { margin: auto 0;
padding-right: 0.5rem;
margin-right: 0.5rem; }
#breadcrumbs { font-size: 90%; }
#version ul { margin: auto 0;
padding: 0;
list-style-type: none; }
#version nav li,
#header nav li { margin: 0; }
#version nav li { margin: 0; }
#usage nav ul { list-style-type: none;
padding: 0; }
#header { padding-top: 2em; }
#header nav { padding: 0.5ex 0 1ex 0; }
#version { background-color: #ddd; }
#header nav { padding: 0.5rem 0;
font-size: 90%; }
#header nav .fa { font-size: 80%; }
#version { background-color: #eee; }
#version a,
#version time,
#version span.version { font-style: normal; }
#version .content > div + div { margin-top: 0.5em; }
#version nav .title { font-weight: 500;
margin-bottom: 1em; }
h1 { font-size: 28pt;
#version .archive { text-align: center; }
h1 { font-size: 175%;
margin: 0;
line-height: 34pt;
font-weight: 400; }
#breadcrumbs { font-size: 14pt; }
p { line-height: 1.3em; }
.nm, .file { font-style: italic; }
h1 .nm { text-shadow: 1px 1px #666;
font-style: inherit; }
h1 .nd { text-shadow: 1px 1px #333; }
#intro { font-size: 16pt; }
#intro { font-size: 125%; }
#sample { margin: 3rem 0;
color: #666; }
#sample > input { display: none; }
@@ -57,6 +62,7 @@ h1 .nd { text-shadow: 1px 1px #333; }
#sample { text-align: left; }
#sample nav label { color: #44b; }
#sample nav { margin: 1ex 0; }
#sample .fa { font-size: 80%; }
#show-comments:checked ~ nav #label-nocomments,
#show-nocomments:checked ~ nav #label-comments,
#show-comments:checked ~ #comments,
@@ -71,22 +77,26 @@ footer a { color: #000; }
footer span { border-left: thin solid #ccc;
padding-left: 1ex; }
footer div + div { margin-top: 0.5em; }
body > section h2 { font-size: x-large;
body > section h2 { font-size: 120%;
font-weight: 500;
text-align: center;
font-variant: small-caps;
color: #333; }
body > section h3 { font-size: large;
font-weight: 500;
body > section h3 { font-size: inherit;
font-weight: inherit;
margin-bottom: 0.25ex;
color: #333; }
body > section { padding: 0.5em 25%;
margin: 0.5em 0; }
#version > div, body > section { width: 66rem;
max-width: 98%;
padding: 1rem 0;
margin: 0 auto; }
#version { width: 100%;
max-width: 100%; }
figure figcaption { margin: 0.5em 0.2em; }
figure { margin: 0;
text-align: center;
color: #444; }
dd { margin: 0 0 1em 0; }
body > header nav { overflow: hidden; }
body > header nav li + li { margin-top: 1.5em; }
pre.prettyprint { border: none;
line-height: 180%;
margin: 0;
@@ -98,23 +108,13 @@ footer { padding: 1ex;
margin-bottom: 1em; }
.flag { font-weight: 500; }
@media only screen and (max-width: 1280px), only screen and (max-device-width: 1280px) {
body > header,
body > section { padding-left: 10%;
padding-right: 10%; }
}
@media only screen and (max-width: 768px), only screen and (max-device-width: 768px) {
h1 { font-size: 15pt;
line-height: 18pt; }
pre { font-size: 8pt; }
h1 { font-size: 125%;
line-height: 125%; }
#intro { font-size: 100%; }
figure img { display: block;
max-width: 400px;
margin-left: auto;
margin-right: auto;
width: 100%; }
body > section { padding: 0.5em 2%;
margin: 0.5em 0; }
#header { padding-top: 1em; }
body > header { padding: 1em 2% 1ex 2%; }
}
+39 -32
View File
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<title>kcgi | minimal CGI and FastCGI library for C/C++</title>
<link rel="alternate" href="atom.xml" type="application/atom+xml" title="kcgi version feed" />
@@ -19,10 +19,10 @@
<body itemscope="itemscope" itemtype="http://schema.org/SoftwareApplication">
<header>
<section id="breadcrumbs">
BSD.lv tools for BCHS:
<a href="https://www.bsd.lv">BSD.lv</a> tools for <a href="https://learnbchs.org">BCHS</a>:
<a href="https://kristaps.bsd.lv/kcgi">kcgi</a>,
<a href="https://kristaps.bsd.lv/ksql">ksql</a>,
<a href="https://kristaps.bsd.lv/kwebapp">kwebapp</a>
<a href="https://kristaps.bsd.lv/openradtool">ort</a>
</section>
<section id="header">
<h1>
@@ -31,7 +31,12 @@
<span itemprop="description" class="nd">minimal CGI and FastCGI library for C/C++</span>
</h1>
<nav>
<span class="version">Version @VERSION@</span>
<span class="version">
Version
<nav data-sblg-nav="1" data-sblg-navtag="version" data-sblg-navsz="1" data-sblg-navxml="1">
${sblg-titletext}
</nav>
</span>
<a title="Source code" itemprop="downloadURL" href="snapshots/kcgi.tgz"><i class="fa fa-fw fa-gears"></i></a>
<a title="Source fingerprint" href="snapshots/kcgi.tgz.sha512"><i class="fa fa-fw fa-lock"></i></a>
<a title="Source archive" href="snapshots"><i class="fa fa-fw fa-archive"></i></a>
@@ -45,19 +50,19 @@
<span class="nm">kcgi</span> is an <a href="http://opensource.org/licenses/ISC" rel="license">open
source</a> CGI and FastCGI <span itemprop="applicationCategory">library for C/C++ web
applications</span>.
It is minimal, secure, and auditable&#8212;a useful addition to your <a
href="https://www.learnbchs.org">BCHS</a> application stack.
It is minimal, secure, and auditable.
</p>
<p>
To start, <a href="#install">install</a> the library then read the <a href="#usage">usage guide</a>.
Use the <a href="https://github.com/kristapsdz/kcgi">GitHub</a> tracker for questions or comments.
(Or find contact information there.)
<span class="nm">kcgi</span> is a <a href="https://www.bsd.lv">BSD.lv</a> project.
Use the <a href="https://github.com/kristapsdz/kcgi">GitHub</a> tracker for questions or comments,
or find contact information there for direct contact.
</p>
<figure id="sample">
<input type="radio" name="sample-show" value="0" id="show-nocomments" checked="checked" />
<input type="radio" name="sample-show" value="1" id="show-comments" />
<nav>
<label id="label-nocomments" for="show-nocomments">
<i class="fa fa-fw fa-comments"></i> Hide source comments
<i class="fa fa-fw fa-comments-o"></i> Hide source comments
</label>
<label id="label-comments" for="show-comments">
<i class="fa fa-fw fa-comments"></i> Show source comments
@@ -156,25 +161,27 @@ int main(void) {
</p>
</section>
<section id="version">
<h2>
Release notes
</h2>
<nav data-sblg-nav="1" data-sblg-navtag="version" data-sblg-navsz="1" data-sblg-navcontent="1">
<div>
<div class="title">
Version <span class="version">${sblg-title}</span>:
<time datetime="${sblg-date}">${sblg-date}</time>
<div>
<h2>
current release
</h2>
<nav data-sblg-nav="1" data-sblg-navtag="version" data-sblg-navsz="1" data-sblg-navcontent="1">
<div>
<div class="title">
Version <span class="version">${sblg-title}</span>:
<time datetime="${sblg-date}">${sblg-date}</time>
</div>
<div class="content">${sblg-aside}</div>
</div>
<div class="content">${sblg-aside}</div>
</div>
</nav>
<p>
<a href="archive.html">Version archive</a>
</p>
</nav>
<p class="archive">
(<a href="archive.html">release archive</a>)
</p>
</div>
</section>
<section id="install">
<h2>
Installation
installation
</h2>
<p>
First, check if <span class="nm">kcgi</span> isn't already packaged for your system, such as
@@ -227,12 +234,12 @@ int main(void) {
</section>
<section id="usage">
<h2>
Documentation
documentation
</h2>
<p>
The <span class="nm">kcgi</span> manpages, starting with <a href="kcgi.3.html">kcgi(3)</a>, are the
canonical source of documentation.
You can also <a href="functions.html">see all functions</a>; or if it's easier to start by example, you can use
If it's easier to start by example, you can use
<a href="https://github.com/kristapsdz/kcgi-framework">kcgi-framework</a> as an initial boilerplate to
start your project.
The following are introductory materials to the system.
@@ -281,7 +288,7 @@ int main(void) {
</section>
<section id="deploying">
<h2>
Deployment
deployment
</h2>
<p>
Applications using <span class="nm">kcgi</span> behave just like any other application.
@@ -311,7 +318,7 @@ int main(void) {
</section>
<section id="features">
<h2>
Implementation Details
implementation details
</h2>
<p>
The bulk of <span class="nm">kcgi</span>'s CGI handling lies in <a
@@ -391,7 +398,7 @@ int main(void) {
</section>
<section>
<h2 id="testing">
Testing
testing
</h2>
<p>
<span class="nm">kcgi</span> is shipped with a fully automated testing framework executed with
@@ -421,7 +428,7 @@ int main(void) {
</section>
<section>
<h2>
Performance
performance
</h2>
<p>
Security comes at a price&#8212;but not a stiff price.
@@ -452,7 +459,7 @@ int main(void) {
</section>
<footer>
<div>
&#169; 2014&#8211;2018
&#169; 2014&#8211;2019
<a rel="author" href="https://github.com/kristapsdz">Kristaps Dzonsons</a>
</div>
<div>