Commit 08f71340 authored by Chris McCormick's avatar Chris McCormick

Changed the look of the website. Added a new logo design (source SVG...

Changed the look of the website. Added a new logo design (source SVG included). Fixed an issue with junkcode prefix not being set (broken links and images on current site). Removed /tmp/ccan in clean as it was preventing 'make webpages' running twice. Brought the HTML closer to standards compliance (doctype, encoding). Added meta tag for mobile device browsers to render nicely.
parent 1567e4bd
...@@ -77,6 +77,7 @@ ccan/%/info: ccan/%/_info ...@@ -77,6 +77,7 @@ ccan/%/info: ccan/%/_info
$(CC) $(CCAN_CFLAGS) -o $@ -x c $< $(CC) $(CCAN_CFLAGS) -o $@ -x c $<
clean: tools-clean clean: tools-clean
$(RM) /tmp/ccan
$(RM) `find * -name '*.o'` `find * -name '.depends'` `find * -name '*.a'` `find * -name info` `find * -name '*.d'` $(RM) `find * -name '*.o'` `find * -name '.depends'` `find * -name '*.a'` `find * -name info` `find * -name '*.d'`
$(RM) inter-depends lib-depends test-depends ccan/*-Makefile $(RM) inter-depends lib-depends test-depends ccan/*-Makefile
......
...@@ -20,7 +20,7 @@ modcheck: ...@@ -20,7 +20,7 @@ modcheck:
clean-tree: clean-tree:
! git status --porcelain | grep . ! git status --porcelain | grep .
webpages: modcheck clean-tree $(WEB_SUBDIRS) $(WEBDIR)/index.html $(WEBDIR)/upload.html $(WEBDIR)/uploader.php $(WEBDIR)/example-config.h $(WEBDIR)/ccan.jpg $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(WEBDIR)/Makefile-ccan $(ALL_PAGES) junkpages webpages: modcheck clean-tree $(WEB_SUBDIRS) $(WEBDIR)/index.html $(WEBDIR)/upload.html $(WEBDIR)/uploader.php $(WEBDIR)/example-config.h $(WEBDIR)/ccan.png $(WEBDIR)/ccan-bg.png $(WEBDIR)/ccan.css $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(WEBDIR)/Makefile-ccan $(ALL_PAGES) junkpages
junkpages: $(WEBDIR)/list.html $(WEBDIR)/junkcode $(JUNKPAGES) $(JUNKBALLS) junkpages: $(WEBDIR)/list.html $(WEBDIR)/junkcode $(JUNKPAGES) $(JUNKBALLS)
$(WEB_SUBDIRS): $(WEBDIR) $(WEB_SUBDIRS): $(WEBDIR)
...@@ -31,7 +31,7 @@ $(WEBDIR)/junkcode/%.tar.bz2: junkcode/% $(WEBDIR)/junkcode ...@@ -31,7 +31,7 @@ $(WEBDIR)/junkcode/%.tar.bz2: junkcode/% $(WEBDIR)/junkcode
$(WEBDIR)/junkcode/%.html: $(WEBDIR)/junkcode/%.tar.bz2 $(WEBDIR)/junkcode/%.html: $(WEBDIR)/junkcode/%.tar.bz2
cd $(WEBDIR) && tar xfj junkcode/$*.tar.bz2 cd $(WEBDIR) && tar xfj junkcode/$*.tar.bz2
php5 web/staticjunkcode.php junkcode/$* $* > $@ URLPREFIX=../ php5 web/staticjunkcode.php junkcode/$* $* > $@
# We want tarball to contain ccan/; we put junkcode in, but don't depend on it. # We want tarball to contain ccan/; we put junkcode in, but don't depend on it.
$(WEBDIR)/ccan.tar.bz2: config.h Makefile Makefile-ccan $(shell git ls-files ccan tools licenses) $(WEBDIR)/ccan.tar.bz2: config.h Makefile Makefile-ccan $(shell git ls-files ccan tools licenses)
...@@ -58,7 +58,13 @@ $(WEBDIR)/example-config.h: config.h ...@@ -58,7 +58,13 @@ $(WEBDIR)/example-config.h: config.h
$(WEBDIR)/Makefile-ccan: Makefile-ccan $(WEBDIR)/Makefile-ccan: Makefile-ccan
cp $< $@ cp $< $@
$(WEBDIR)/ccan.jpg: web/ccan.jpg $(WEBDIR)/ccan.png: web/ccan.png
cp $< $@
$(WEBDIR)/ccan-bg.png: web/ccan-bg.png
cp $< $@
$(WEBDIR)/ccan.css: web/ccan.css
cp $< $@ cp $< $@
$(WEBDIR)/info/%.html: $(WEBDIR)/tarballs/%.tar.bz2 $(WEBDIR)/tarballs/with-deps/%.tar.bz2 $(WEBDIR)/info/%.html: $(WEBDIR)/tarballs/%.tar.bz2 $(WEBDIR)/tarballs/with-deps/%.tar.bz2
......
* {
}
html {
border: 0px;
margin: 0px;
padding: 0px;
}
body {
background-color: transparent;
margin-left: auto;
margin-right: auto;
color: #333333;
}
.menulist {
border-radius: 5px;
margin-left: auto;
margin-right: auto;
background-image: url(ccan-bg.png);
background-position: initial initial;
background-repeat: initial initial;
font-family: FreeSans, Arial;
}
.menulist-inner {
max-width: 950px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
ul.menu {
float: left;
margin-top: 0.75em;
margin-left: 0;
padding-left: 0;
}
.menu li {
list-style-type: none;
margin-left: auto;
display: inline-block !important;
}
/* On phones the menu should display stacked */
@media screen and (max-width:420px) {
.menu li {
display: block !important;
padding: 0.5em;
}
ul.menu {
float: none;
}
.search {
text-align: center !important;
}
}
.menu a {
font-weight: bold;
text-decoration: none;
color: darkblue !important;
margin-left: 0.5em;
margin-right: 0.5em;
}
.menu a:hover {
color: #222222 !important;
}
.search {
text-align: right;
padding-top: 0.5em;
padding-right: 0.5em;
}
.search input {
margin-bottom: 1em;
}
table {
background: none;
}
table a {
}
table a:hover {
}
table a:visited {
}
tbody {
}
tr {
}
td {
}
th {
}
hr {
display: none;
}
a {
}
a:hover {
color: #222222;
}
a:visited {
color: #0044aa;
}
p {
margin-left: 1em;
}
h1 {
}
h2 {
}
input {
padding: 0.25em;
border-radius: 2px;
border: 1px solid #555555;
padding-left: 1em;
padding-right: 1em;
font-weight: bold;
font-family: FreeSans, Arial;
}
img {
}
.content {
padding: 1em;
max-width: 950px;
margin-left: auto;
margin-right: auto;
font-family: FreeSans, Arial;
}
.logo {
padding: 1em;
padding-top: 0.5em;
margin-bottom: 1em;
padding-bottom: 1em;
background-color: white;
min-height: 63px;
font-family: 'Raleway', sans-serif;
}
.logo img {
width: 250px;
float: left;
margin-bottom: 1em;
margin-right: 1em;
}
.logo h1 {
font-size: 1.5em;
font-weight: 300;
width: 100%;
text-align: right;
margin-top: 0;
}
This diff is collapsed.
...@@ -2,18 +2,17 @@ ...@@ -2,18 +2,17 @@
// Pages created in subdirs need ../ appended. // Pages created in subdirs need ../ appended.
$url_prefix = getenv("URLPREFIX"); $url_prefix = getenv("URLPREFIX");
?> ?>
<!doctype html>
<html> <html>
<head> <head>
<title>ccan</title> <meta charset="utf-8">
<title>ccan</title>
<link rel="stylesheet" type="text/css" href="<?=$url_prefix?>ccan.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Raleway:300' rel='stylesheet' type='text/css'>
<head> <head>
<body bgcolor="FFFFCC"> <body>
<table align="center" width="100%" bgcolor="FFFFFF"> <div class='logo'>
<tr> <a href='<?=$url_prefix?>'><img src="<?=$url_prefix?>ccan.png" border="0"/></a>
<th> <h1>Comprehensive C Archive Network</h1>
<img src="<?=$url_prefix?>ccan.jpg" width="250" height="80"> </div>
</th>
<th>
<h1>Comprehensive C Archive Network <h1>
</th>
</tr>
</table>
...@@ -2,24 +2,19 @@ ...@@ -2,24 +2,19 @@
// Pages created in subdirs need ../ appended. // Pages created in subdirs need ../ appended.
$url_prefix = getenv("URLPREFIX"); $url_prefix = getenv("URLPREFIX");
?> ?>
<table align="center" width="100%" cellpadding="4" cellspacing="1" border="0" bgcolor="lightblue"> <div class="menulist">
<tr align="left" bgcolor="CCFFCC" > <div class="menulist-inner">
<td align="center"> <ul class="menu">
<a href="<?=$url_prefix?>upload.html">Upload Code</a> <li><a href="<?=$url_prefix?>upload.html">Upload Code</a></li>
</td> <li><a href="<?=$url_prefix?>list.html">Download Code</a></li>
<td align="center"> <li><a href="<?=$url_prefix?>index.html">About</a></li>
<a href="<?=$url_prefix?>list.html">Download Code</a> </ul>
</td> <div class="search">
<td align="center"> <form method="get" action="http://www.google.com/search">
<a href="<?=$url_prefix?>index.html">About</a> <input type="text" name="q" size="25" maxlength="255" value="" />
</td> <input type="hidden" name="sitesearch" value="ccodearchive.net"/>
<td align="center"> <input type="submit" value="Search CCAN (Google)" />
<form method="get" action="http://www.google.com/search"> </form>
<input type="text" name="q" size="25" </div>
maxlength="255" value="" /> </div>
<input type="hidden" name="sitesearch" value="ccodearchive.net"/> </div>
<input type="submit" value="Search CCAN (Google)" />
</form>
</td>
</table>
<hr>
...@@ -6,7 +6,7 @@ include('static-configuration'); ...@@ -6,7 +6,7 @@ include('static-configuration');
$tarballsize=round((filesize($argv[3]."/ccan.tar.bz2") + 1023) / 1024); $tarballsize=round((filesize($argv[3]."/ccan.tar.bz2") + 1023) / 1024);
?> ?>
<div class='content'>
<h1> List of all CCAN modules: </h1> <h1> List of all CCAN modules: </h1>
<p> <p>
...@@ -70,5 +70,5 @@ foreach ($dirs as $dir) { ...@@ -70,5 +70,5 @@ foreach ($dirs as $dir) {
$d->close(); $d->close();
?> ?>
</table> </table>
<hr> </div>
</body></html> </body></html>
...@@ -4,7 +4,7 @@ include('logo.html'); ...@@ -4,7 +4,7 @@ include('logo.html');
include('menulist.html'); include('menulist.html');
include('static-configuration'); include('static-configuration');
?> ?>
<div class='content'>
<h2>The Idea</h2> <h2>The Idea</h2>
<p> <p>
...@@ -68,5 +68,5 @@ We also have an IRC channel: #ccan on <a href="http://freenode.net">Freenode</a> ...@@ -68,5 +68,5 @@ We also have an IRC channel: #ccan on <a href="http://freenode.net">Freenode</a>
<p> <p>
We also have a <a href="http://github.com/rustyrussell/ccan/wiki/">wiki</a>; feel free to enhance it. We also have a <a href="http://github.com/rustyrussell/ccan/wiki/">wiki</a>; feel free to enhance it.
</p> </p>
<hr> </div>
</body></html> </body></html>
...@@ -4,7 +4,7 @@ include('logo.html'); ...@@ -4,7 +4,7 @@ include('logo.html');
include('menulist.html'); include('menulist.html');
include('static-configuration'); include('static-configuration');
?> ?>
<div class='content'>
<h1> Contents of CCAN <?=$argv[1]?> </h1> <h1> Contents of CCAN <?=$argv[1]?> </h1>
<p> <p>
...@@ -30,5 +30,5 @@ foreach ($files as $file) { ...@@ -30,5 +30,5 @@ foreach ($files as $file) {
} }
?> ?>
</table> </table>
<hr> </div>
</body></html> </body></html>
...@@ -17,8 +17,9 @@ $licence=extract_field('licence',$module_path); ...@@ -17,8 +17,9 @@ $licence=extract_field('licence',$module_path);
$license=extract_field('license',$module_path); $license=extract_field('license',$module_path);
$url_prefix = getenv("URLPREFIX"); $url_prefix = getenv("URLPREFIX");
?> ?>
<table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1"> <div class='content'>
<tr align="center" bgcolor="FFFFCC"> <table align="center" width="70%" border="0" cellpadding="3" cellspacing="1">
<tr align="center">
<td> <td>
<a href="<?=$repo_base.$module?>">Browse Source</a> <a href="<?=$repo_base.$module?>">Browse Source</a>
</td> </td>
...@@ -31,19 +32,19 @@ $url_prefix = getenv("URLPREFIX"); ...@@ -31,19 +32,19 @@ $url_prefix = getenv("URLPREFIX");
<p> <p>
</p> </p>
<table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1"> <table align="center" width="70%" border="0" cellpadding="8" cellspacing="1">
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Module: </h3> <?=$module?> </td> <td><h3>Module: </h3> <?=$module?> </td>
</tr> </tr>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Summary: </h3> <?=$summary?></td> <td><h3>Summary: </h3> <?=$summary?></td>
</tr> </tr>
<?php <?php
if ($maintainer) { if ($maintainer) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Maintainer: </h3> <?=$maintainer?></td> <td><h3>Maintainer: </h3> <?=$maintainer?></td>
</tr> </tr>
<?php <?php
...@@ -51,7 +52,7 @@ if ($maintainer) { ...@@ -51,7 +52,7 @@ if ($maintainer) {
if ($author) { if ($author) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Author: </h3> <?=$author?></td> <td><h3>Author: </h3> <?=$author?></td>
</tr> </tr>
<?php <?php
...@@ -59,7 +60,7 @@ if ($author) { ...@@ -59,7 +60,7 @@ if ($author) {
if ($dependencies) { if ($dependencies) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Dependencies: </h3> <pre> <?php <td><h3>Dependencies: </h3> <pre> <?php
foreach (preg_split("/\s+/", $dependencies) as $dep) { foreach (preg_split("/\s+/", $dependencies) as $dep) {
echo '<a href="'.substr($dep, 5).'.html">'.$dep.'</a> '; echo '<a href="'.substr($dep, 5).'.html">'.$dep.'</a> ';
...@@ -71,7 +72,7 @@ if ($dependencies) { ...@@ -71,7 +72,7 @@ if ($dependencies) {
if ($extdepends) { if ($extdepends) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>External dependencies: </h3> <?php <td><h3>External dependencies: </h3> <?php
foreach (split("\n", $extdepends) as $dep) { foreach (split("\n", $extdepends) as $dep) {
$fields=preg_split("/\s+/", $dep); $fields=preg_split("/\s+/", $dep);
...@@ -85,14 +86,14 @@ if ($extdepends) { ...@@ -85,14 +86,14 @@ if ($extdepends) {
<?php <?php
} }
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Description: </h3> <?=$description;?> </td> <td><h3>Description: </h3> <?=$description;?> </td>
</tr> </tr>
<?php <?php
if ($see_also) { if ($see_also) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>See Also: </h3> <pre> <?php <td><h3>See Also: </h3> <pre> <?php
foreach (preg_split("/[\s,]+/", trim($see_also)) as $see) { foreach (preg_split("/[\s,]+/", trim($see_also)) as $see) {
echo '<a href="'.substr($see, 5).'.html">'.$see.'</a> '; echo '<a href="'.substr($see, 5).'.html">'.$see.'</a> ';
...@@ -104,7 +105,7 @@ if ($see_also) { ...@@ -104,7 +105,7 @@ if ($see_also) {
if ($example) { if ($example) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>Example: </h3> <pre><?=$example?></pre></td> <td><h3>Example: </h3> <pre><?=$example?></pre></td>
</tr> </tr>
<?php <?php
...@@ -112,7 +113,7 @@ if ($example) { ...@@ -112,7 +113,7 @@ if ($example) {
if ($licence) { if ($licence) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>License: </h3> <?=$licence?></td> <td><h3>License: </h3> <?=$licence?></td>
</tr> </tr>
<?php <?php
...@@ -120,11 +121,12 @@ if ($licence) { ...@@ -120,11 +121,12 @@ if ($licence) {
if ($license) { if ($license) {
?> ?>
<tr align="left" bgcolor="FFFFCC"> <tr align="left">
<td><h3>License: </h3> <?=$license?></td> <td><h3>License: </h3> <?=$license?></td>
</tr> </tr>
<?php <?php
} }
?> ?>
</table><hr> </table>
</div>
</body></html> </body></html>
...@@ -5,7 +5,7 @@ include('logo.html'); ...@@ -5,7 +5,7 @@ include('logo.html');
include('menulist.html'); include('menulist.html');
include('static-configuration'); include('static-configuration');
?> ?>
<html> <div class='content'>
<h3 align="center"> Upload Code</h3> <h3 align="center"> Upload Code</h3>
<table width="70%" align="center"> <table width="70%" align="center">
...@@ -50,5 +50,5 @@ people can browse and download it. ...@@ -50,5 +50,5 @@ people can browse and download it.
</tr> </tr>
</table> </table>
</form> </form>
<hr> </div>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment