Improvements.

This commit is contained in:
Niels Serup 2011-08-05 00:49:51 +02:00
parent 0cc9d8fdc5
commit 15b8bb5265
99 changed files with 1952 additions and 227 deletions

View File

@ -0,0 +1 @@
ErrorDocument 404 /index.php

View File

@ -0,0 +1,4 @@
<?php
$addr = $_SERVER['REQUEST_URI'];
header('Location: http://words.metanohi.name$addr');
?>

View File

@ -1,5 +1,4 @@
#!/bin/sh
ln -s ../../nohix .
ln -s ../../roptoligs .
ln -s ../../suum .

View File

@ -1,7 +1,7 @@
<VirtualHost *:80>
ServerName films.lcl
ServerAlias films.lcl
ServerName films.metanohi.name
ServerAlias www.films.metanohi.name films.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/films
@ -20,17 +20,13 @@
Allow from all
</Directory>
WSGIDaemonProcess films.lcl processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup films.lcl
WSGIDaemonProcess films.metanohi.name processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup films.metanohi.name
WSGIScriptAlias / /home/niels/www/meta/subsites/films/films.wsgi
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/films.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/films.metanohi.name-access.log combined
</VirtualHost>

View File

@ -1,13 +1,9 @@
<VirtualHost *:80>
ServerName hvy.lcl
ServerAlias hvy.lcl
ServerName hvy.metanohi.name
ServerAlias www.hvy.metanohi.name hvy.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/heavy
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/heavy/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +11,8 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/hvy.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/hvy.metanohi.name-access.log combined
</VirtualHost>

20
subsites/natur-apache Normal file
View File

@ -0,0 +1,20 @@
<VirtualHost *:80>
ServerName natur.metanohi.name
ServerAlias www.natur.metanohi.name nature.metanohi.name www.nature.metanohi.name natur.lcl
ServerAdmin ns@metanohi.org
Alias /vid /home/niels/www/meta/heavy/naturefilms
DocumentRoot /home/niels/www/meta/subsites/natur
<Directory /home/niels/www/meta/subsites/natur/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/natur.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/natur.metanohi.name-access.log combined
</VirtualHost>

1
subsites/natur/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
bak/

1
subsites/natur/.htaccess Normal file
View File

@ -0,0 +1 @@
ErrorDocument 404 /index.php

Binary file not shown.

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<!-- But modified by hand afterwards -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
width="1000"
height="450"
viewBox="0 0 1000 450"
preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient
id="lingrad"
x1="287.89722"
y1="176.25467"
x2="593.96271"
y2="843.16113"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6601697, 0, 0, 0.6969478, -85.846869, 35.45455)">
<stop
style="stop-color: #00e500; stop-opacity: 1"
offset="0" />
<stop
style="stop-color: #00e500; stop-opacity: 1"
offset="0.20826392" />
<stop
style="stop-color: #b0ff1a; stop-opacity: 1"
offset="0.47788519" />
<stop
style="stop-color: #16ff62; stop-opacity: 1"
offset="1" />
</linearGradient>
</defs>
<g transform="translate(0, -90)">
<path
d="M 0,296.49348 C 0,296.49348 48.902281,210.72162 373.54988,190.32466 C 714.61716,168.89608 995.35963,90.97403 995.35963,90.97403 L 1000,90 L 1000,328.63633 C 1000,328.63633 765.66126,327.66231 573.08584,432.85712 C 378.1531,539.33973 0,540 0,540 L 0,296.49348 z"
style="fill: url(#lingrad);
fill-opacity: 1;
fill-rule: evenodd;
stroke: none;
stroke-width: 1px;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-opacity: 1;" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
subsites/natur/img/ep1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
subsites/natur/img/ep2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
subsites/natur/img/ep3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
subsites/natur/img/eyes.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
subsites/natur/img/stop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

224
subsites/natur/img/stop.svg Normal file
View File

@ -0,0 +1,224 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="128"
height="128"
viewBox="0 0 128 128"
overflow="visible"
enable-background="new 0 0 128 128"
xml:space="preserve"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docname="stop.svg"
sodipodi:docbase="/home/alex/Desktop/icons/human-icon-theme-0.8/scalable/actions"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata76"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs74"><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 64 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="128 : 64 : 1"
inkscape:persp3d-origin="64 : 42.666667 : 1"
id="perspective44" /></defs><sodipodi:namedview
inkscape:window-height="974"
inkscape:window-width="1255"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:zoom="5.8828125"
inkscape:cx="64"
inkscape:cy="64"
inkscape:window-x="25"
inkscape:window-y="0"
inkscape:current-layer="svg2"
showgrid="false" />
<path
opacity="0.2"
d="M41.5,3c-1.077,0-2.36,0.531-3.121,1.293L5.293,37.379C4.532,38.14,4,39.423,4,40.5v47 c0,1.077,0.532,2.36,1.293,3.121l33.086,33.086C39.14,124.469,40.423,125,41.5,125h47c1.076,0,2.359-0.531,3.121-1.293 l33.086-33.086C125.469,89.86,126,88.577,126,87.5v-47c0-1.077-0.531-2.36-1.293-3.121L91.621,4.293C90.859,3.531,89.576,3,88.5,3 H41.5z"
id="path4" />
<path
opacity="0.2"
d="M41.5,4c-0.819,0-1.835,0.421-2.414,1L6,38.086c-0.58,0.579-1,1.595-1,2.414v47c0,0.819,0.42,1.835,1,2.414 L39.086,123c0.579,0.579,1.595,1,2.414,1h47c0.819,0,1.835-0.421,2.414-1L124,89.914c0.58-0.579,1-1.595,1-2.414v-47 c0-0.819-0.42-1.835-1-2.414L90.914,5c-0.579-0.579-1.595-1-2.414-1H41.5z"
id="path6" />
<linearGradient
id="XMLID_6_"
gradientUnits="userSpaceOnUse"
x1="65"
y1="4"
x2="65"
y2="126.3333">
<stop
offset="0"
style="stop-color:#A70000"
id="stop9" />
<stop
offset="1"
style="stop-color:#A70000"
id="stop11" />
</linearGradient>
<path
d="M41.5,3c-0.819,0-1.835,0.421-2.414,1L6,37.086c-0.58,0.579-1,1.595-1,2.414v47 c0,0.819,0.42,1.835,1,2.414L39.086,122c0.579,0.579,1.595,1,2.414,1h47c0.819,0,1.835-0.421,2.414-1L124,88.914 c0.58-0.579,1-1.595,1-2.414v-47c0-0.819-0.42-1.835-1-2.414L90.914,4c-0.579-0.579-1.595-1-2.414-1H41.5z"
id="path13"
fill="url(#XMLID_6_)" />
<linearGradient
id="XMLID_7_"
gradientUnits="userSpaceOnUse"
x1="62.4341"
y1="48.8359"
x2="75.4341"
y2="120.5859">
<stop
offset="0"
style="stop-color:#BD0000"
id="stop16" />
<stop
offset="0.3522"
style="stop-color:#C40000"
id="stop18" />
<stop
offset="0.8691"
style="stop-color:#D80000"
id="stop20" />
<stop
offset="1"
style="stop-color:#DE0000"
id="stop22" />
</linearGradient>
<path
d="M90.207,121.293C89.818,121.682,89.05,122,88.5,122h-47c-0.55,0-1.318-0.318-1.707-0.707 L6.707,88.207C6.318,87.818,6,87.05,6,86.5v-47c0-0.55,0.318-1.318,0.707-1.707L39.793,4.707C40.182,4.318,40.95,4,41.5,4h47 c0.55,0,1.318,0.318,1.707,0.707l33.086,33.086C123.682,38.182,124,38.95,124,39.5v47c0,0.55-0.318,1.318-0.707,1.707 L90.207,121.293z"
id="path24"
fill="url(#XMLID_7_)" />
<linearGradient
id="XMLID_8_"
gradientUnits="userSpaceOnUse"
x1="65"
y1="81.5"
x2="65"
y2="123.4998">
<stop
offset="0"
style="stop-color:#BD0000"
id="stop27" />
<stop
offset="0.0432"
style="stop-color:#C10606"
id="stop29" />
<stop
offset="0.2944"
style="stop-color:#D62424"
id="stop31" />
<stop
offset="0.5413"
style="stop-color:#E63A3A"
id="stop33" />
<stop
offset="0.7796"
style="stop-color:#EF4747"
id="stop35" />
<stop
offset="1"
style="stop-color:#F24B4B"
id="stop37" />
</linearGradient>
<path
fill="url(#XMLID_8_)"
d="M90.207,120.293C89.818,120.682,89.05,121,88.5,121h-47c-0.55,0-1.318-0.318-1.707-0.707 L6.707,87.207C6.318,86.818,6,86.05,6,85.5v1c0,0.55,0.318,1.318,0.707,1.707l33.086,33.086C40.182,121.682,40.95,122,41.5,122h47 c0.55,0,1.318-0.318,1.707-0.707l33.086-33.086C123.682,87.818,124,87.05,124,86.5v-1c0,0.55-0.318,1.318-0.707,1.707 L90.207,120.293z"
id="path39" />
<linearGradient
id="XMLID_9_"
gradientUnits="userSpaceOnUse"
x1="24.2324"
y1="6.876"
x2="79.9819"
y2="83.6252">
<stop
offset="0"
style="stop-color:#E05E5E"
id="stop42" />
<stop
offset="1"
style="stop-color:#D81818"
id="stop44" />
</linearGradient>
<path
d="M55.459,71.301C88,63.75,124,66.25,124,66.25V39.5c0-0.55-0.318-1.318-0.707-1.707L90.207,4.707 C89.818,4.318,89.05,4,88.5,4h-47c-0.55,0-1.318,0.318-1.707,0.707L6.707,37.793C6.318,38.182,6,38.95,6,39.5v47 c0,0.55,0.318,1.318,0.707,1.707l3.667,3.667C10.374,91.874,29.005,77.439,55.459,71.301z"
id="path46"
fill="url(#XMLID_9_)" />
<linearGradient
id="XMLID_10_"
gradientUnits="userSpaceOnUse"
x1="-1"
y1="22.2998"
x2="141.6667"
y2="22.2998">
<stop
offset="0"
style="stop-color:#E57373"
id="stop49" />
<stop
offset="0.118"
style="stop-color:#EC9393"
id="stop51" />
<stop
offset="0.2664"
style="stop-color:#F4B4B4"
id="stop53" />
<stop
offset="0.3897"
style="stop-color:#F9C9C9"
id="stop55" />
<stop
offset="0.4719"
style="stop-color:#FBD0D0"
id="stop57" />
<stop
offset="0.5484"
style="stop-color:#F9C8C8"
id="stop59" />
<stop
offset="0.6698"
style="stop-color:#F5B1B1"
id="stop61" />
<stop
offset="0.8208"
style="stop-color:#ED8B8B"
id="stop63" />
<stop
offset="0.9942"
style="stop-color:#E35858"
id="stop65" />
<stop
offset="1"
style="stop-color:#E35656"
id="stop67" />
</linearGradient>
<path
d="M123.293,37.793L90.207,4.707C89.818,4.318,89.05,4,88.5,4h-47c-0.55,0-1.318,0.318-1.707,0.707 L6.707,37.793C6.318,38.182,6,38.95,6,39.5v1.1c0-0.55,0.318-1.318,0.707-1.707L39.793,5.809C40.182,5.42,40.95,5.102,41.5,5.102 h47c0.55,0,1.318,0.318,1.707,0.707l33.086,33.084C123.682,39.281,124,40.05,124,40.6v-1.1 C124,38.95,123.682,38.182,123.293,37.793z"
id="path69"
fill="url(#XMLID_10_)" />
<g
id="g2914"><path
style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 43.781253,27.640625 L 29.656253,41.765625 L 50.875003,62.984375 L 29.656253,84.203125 L 43.781253,98.359375 L 65.000002,77.140625 L 86.218752,98.359375 L 100.34375,84.203125 L 79.125002,62.984375 L 100.34375,41.765625 L 86.218752,27.640625 L 65.000002,48.859375 L 43.781253,27.640625 z "
id="rect1944" /></g><path
fill="url(#XMLID_7_)"
id="path3193"
d="M90.207,121.293C89.818,121.682,89.05,122,88.5,122h-47c-0.55,0-1.318-0.318-1.707-0.707 L6.707,88.207C6.318,87.818,6,87.05,6,86.5v-47c0-0.55,0.318-1.318,0.707-1.707L39.793,4.707C40.182,4.318,40.95,4,41.5,4h47 c0.55,0,1.318,0.318,1.707,0.707l33.086,33.086C123.682,38.182,124,38.95,124,39.5v47c0,0.55-0.318,1.318-0.707,1.707 L90.207,121.293z"
style="fill:#00ff00;opacity:0.36016949" /></svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

85
subsites/natur/index.php Normal file
View File

@ -0,0 +1,85 @@
<?php
$u = $_SERVER['REQUEST_URI'];
if (substr($u, strlen($u)-1) == '/') {
$u = substr($u, 0, strlen($u)-1);
header("Location: $u");
}
$u = explode('/', $u);
$u = $u[sizeof($u)-1];
if (strpos($u, '?') === 0)
$u = substr($u, 1);
header('content-type: text/html; charset=UTF-8');
$TITLE = 'Niels\' nature';
$o = array(
'da' => 'Dansk',
'en' => 'English'
);
if ($u == '')
$special = 1;
elseif (array_key_exists($u, $o)) {
include("langs/$u.php");
$special = 0;
}
else
$special = 2;
if ($special)
$spestr = " style='display: none;'";
else
$spestr = '';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="<?=$LANG?>" lang="<?=$LANG?>">
<head>
<title><?=$TITLE?></title>
<link href='style.css' type='text/css' rel='stylesheet' />
<script type='text/javascript' src='subtitler.js'></script>
<script type='text/javascript' src='script.js'></script>
</head>
<body>
<object data='img/bgflow.svg' type='image/svg+xml' id='bgflow'></object>
<div id='text_wrapper'>
<div id='text_box'>
<a class='img' id='text_header' href='.'>
<div id='text_header_content'>
<?=$TITLE?>
</div>
</a>
<div id='text_header_space'></div>
<ul id='text_menu'<?=$spestr?>>
<li><a href='#start'><?=$MENU_START?></a></li>
<li><a href='#episodes'><?=$MENU_EPISODES?></a></li>
<li><a href='#details'><?=$MENU_DETAILS?></a></li>
<div class='end'></div>
</ul>
<div id='text_content'>
<div id='content_start'<?=$spestr?>><noscript><a name='start'></a></noscript><?=$CONTENT_START?></div>
<div id='content_episodes'<?=$spestr?>><noscript><a name='episodes'></a></noscript><?=$CONTENT_EPISODES?></div>
<div id='content_details'<?=$spestr?>><noscript><a name='details'></a></noscript><?=$CONTENT_DETAILS?></div>
<?php if ($special == 1) { ?>
<h1>Hej / Hi</h1>
<hr />
<?php
foreach ($o as $k=>$v)
echo "<p class='large'><a href='$k'>$v</a></p>\n"
?>
<div style='width: 513px; height: 291px;'></div>
<img src='img/forest-distorted.jpg' alt='Nature' title='Nature'
class='bottom-page' />
<?php } else if ($special == 2) { ?>
<h1>Oh no!</h1>
<hr />
<p>The language using the '<?=$u?>' code isn't supported yet!</p>
<p>If you like, <i>you</i> can be the one to translate "Niels' nature" into this language. Simply contact Niels at <a href='mailto:ns@metanohi.org'>ns@metanohi.org</a>.</p>
<?php } ?>
</div>
</div>
</div>
</body>
</html>

257
subsites/natur/langs/da.php Normal file
View File

@ -0,0 +1,257 @@
<?php
$LANG = 'da';
$TITLE = 'Niels\' natur';
$MENU_START = 'Start';
$MENU_EPISODES = 'Afsnit';
$MENU_DETAILS = 'Detaljer';
$CONTENT_START = <<<EOD
<h1><i>Narh</i>-tur or <i>yeah</i>-tur?</h1>
<h3>Lad <em>Niels</em> forklare om naturen</h3>
<hr />
<p>Hvad er naturen? Hvordan endte verden med at blive, som den er i
dag? Hvorfor dukker alfer normalt ikke op foran mennesker?</p>
<p>Disse spørgsmål er svære at svare . De, ligesom mange andre
naturrelaterede spørgsmål, kræver meget tænkning, teorigenerering og
hjernevask for at svare . Selv de største filosoffer vil aldrig være
i stand til at komme med et definitivt svar komplekse
spørgsmål. Selv ikke <em>Niels</em> er i stand til at forklare
det.</p>
<h2>Natur + Niels = sandheden</h2>
<p>, hvem er denne <em>Niels</em>? Og hvad med det
der <em>natur</em> -- hvad er det egentligt? Tja, <em>Niels</em> er en
person, og <em>naturen</em> er det sted Niels optager sine film --
sine film om naturen. Indtil videre har han optaget tre film i
naturen, hvert med et specifikt og ret relevant tema.</p>
<p>, helt basalt: "Niels' natur" er en tv-serie -- bortset fra, at
det er mere sandsynligt, at den bliver afspillet en computer.</p>
<hr />
<p class='large center'><a href='#episodes'>Se afsnittene</a></p>
EOD;
$CONTENT_EPISODES = <<<EOD
<h1>Afsnittene</h1>
<p>Niels har indtil videre produceret 3 afsnit, hvoraf kun den tredje
(altså den nyeste) er oppe. Dette vil blive ændret i fremtiden.. et
eller andet tidspunkt.</p>
<p>I alle tre afsnit snakker Niels sin tur i skoven. Han snakker om
træer, Bigfoots, lokal opvarmning og bambus.</p>
<p>For at tillade folk, der ikke kan forstå dansk, at se "Niels'
natur", sørger Niels for at undertekste sine afsnit. Indtil videre er
kun det tredje afsnit blevet undertekstet, og det kun engelsk. Hvis
nogen vil undertekste et afsnit i et andet sprog, vil Niels
glædeligt acceptere. Niels kan kontaktes
<a href='mailto:ns@metanohi.org'>ns@metanohi.org</a>.</p>
<p>Alle 3 afsnit er licenserede under CC BY-SA, en <em>fri</em>
licens. Læs mere om dette
<a href='#details'>Detaljer</a>-siden.</p> <hr />
<h3>Hvordan man kan se afsnittene</h3>
<p>Hvis du kører en moderne webbrowser, er der en chance for, at du
bare kan klikke et afsnits billede og se afsnittet i din
browser. Hvis du ikke er i stand til at gøre det, eller hvis du bare
ikke har lyst, kan du altid bare downloade et afsnit for at se det
offline -- bare klik downloadlinksene.</p>
<p>Videoerne varer mellem 25 og 35 minutter hver og
bruger <a href='http://www.xiph.org/'>OGG</a>-formatet
-- <a href='http://www.theora.org/'>Theora</a> for video
og <a href='http://www.vorbis.com/setup/'>Vorbis</a> for lyd. Du kan
læse mere om dette <a href='#details'>Detaljer</a>-siden.</p>
<hr />
<h2>Afsnit 3: Global opvarmning</h2>
<p>Dette blev optaget i december 2009.</p>
<a class='shotimg' href='#play3'>
<img src='img/ep3.jpg' alt='Screenshot af afsnit 3: Global
opvarmning' />
</a>
<p><a href='#play3'>Afspil i browser (uden undertekster)
(188MB)</a></p>
<p><a href='#play3.en'>Afspil i browser (med engelske undertekster)
(188MB)</a></p>
<p><a href='vid/niels-natur3-small.ogv'>Download (ingen undertekster
inkluderet) (188MB)</a></p>
<p><a href='vid/niels-natur3-en.srt'>Download engelske
undertekster</a></p>
<h2>Afsnit 2: Bigfoot</h2>
<p>Dette blev optaget i april 2009.</p>
<img src='img/ep2.jpg' alt='Screenshot af afsnit 2: Bigfoot'
style='width: 513px; height: 282px;' />
<p><span class='error'>Video ikke oppe endnu.</span></p>
<h2>Afsnit 1: Naturen omkring os</h2>
<p>Dette blev optaget i december 2008.</p>
<img src='img/ep1.jpg' alt='Screenshot af afsnit 1: Naturen omkring os'
style='width: 513px; height: 282px;' />
<p><span class='error'>Video ikke oppe endnu.</span></p>
EOD;
$CONTENT_DETAILS = <<<EOD
<h1>Hvordan/Hvorfor/Hvad..</h1>
<p>Det har ikke været nemt at komme langt som til her. Man skal
både filme, instruere, planlægge, tænke.. Alle ting meget svære. Denne
side vil forsøge at give detaljerede forklaringer af forskellige
halvkomplekse.. ting.</p>
<h2>Naturen</h2>
<p>Filmene foregår i naturen. Det' det.</p>
<h2>Licens, copyright</h2>
<p><i><b>Copyright</b></i> --
se <a href='http://da.wikipedia.org/wiki/Copyright'>Wikipedias
artikel</a> for en forklaring -- har nået et niveau, hvor kun
mennesker har den ret. Hvis man kigger en almindelig film, et
stykke musik eller endda et computerprogram, er det ofte ulovligt bare
at kopiere det. Hvis en person har brugt 5MB af sin harddisk et
stykke musik og derefter vælger at kopiere det, det fylder 5MB
en vens harddisk, er der en stor risiko for, at den person gør noget
ulovligt, fordi hvis musikken er dækket af en tung copyright (som en
masse film, musik, bøger, osv. er), er det kun de, der har retten til
at kopiere et værk, som kopiere det. Dette virker måske fint, når
copyrightejererne kun bruger deres magt i kommercielle sammenhænge,
men når de begynder at begrænse almindelige menneskers mulighed for at
dele kunst, er det gået for vidt.</p>
<p>..</p>
<p>"Niels' natur"-afsnit er <em>fri</em>, i det, at alle dele
dem. Som en bonus, er alle også tilladt at ændre afsnittene og dele
deres ændrede afsnit, endnu flere mennesker kan noget ud af
det. Alt dette er muligt
vha. <a href='http://creativecommons.org/licenses/by-sa/3.0/deed.da'
rel='license'>Creative Commons Navngivelse-Del samme vilkår 3.0
Unported</a> (også kaldet Attribution-ShareAlike). Wikipedia bruger
også denne licens. "Niels' natur" -- både filmene og teksten denne
hjemmeside -- er tilgængelige under den licens. For at licensen skal
virke, skal der være en copyrightejer. Dette er fordi det er
en <a href='http://en.wikipedia.org/wiki/Copyleft'>copyleft</a>
licens.</p> <hr />
<p class='noindent'>Copyright &copy; 2008, 2009, 2010 Niels Serup<br /> Al
tekst-, billed- (bortset fra <a href='img/stop.png'>'stop.svg' and
'stop.png'</a>, som er fælleseje i public domain) og filmmateriale
denne hjemmeside er tilgængeligt under Creative Commons
Navngivelse-Del samme vilkår 3.0 Unported.</p> <hr />
<p class='noindent'>Billedet 'stop.svg' er taget
fra <a href='http://tango.freedesktop.org/'>Tango Desktop Project</a>
og lidt ændret. Tangos standardikoner er i public domain, der er
ikke noget, der stopper mig fra at gøre dem tilgængelige under CC
BY-SA. Men jeg vil respektere projektets ideologi og lade være med at
gøre det.</p> <hr />
<p>For at kreditere mig, er et link til denne hjemmeside
('http://natur.metanohi.org/') samt mit navn ('Niels Serup') fint.</p>
<p>Forresten: Denne hjemmeside bruger en lille
smule <a href='http://en.wikipedia.org/wiki/Javascript'>JavaScript</a>-kode
til at gøre nogle ting lidt mere fancy. Du skal ikke kreditere mig,
hvis du genbruger noget af koden
eller <a href='http://en.wikipedia.org/wiki/HTML'>HTML</a>-formatteringen
fra denne hjemmeside. Jeg synes, at det er for trivielt til at behøve
en copyleft licens -- bare kopier og del som det passer dig.</p>
<h2>Kontakt</h2>
<p>Du kan kontakte mig
<a href='mailto:ns@metanohi.org'>ns@metanohi.org</a>.</p>
<h2>OGG</h2>
<a class='img' href='http://playogg.org/'><img class='left'
src='img/playogg.png' alt='Play OGG' /></a>
<p>Niels' natur'-afsnit er
i <a href='http://www.xiph.org/'>OGG</a>-formatet,
med <a href='http://www.theora.org/'>Theora</a> til video
og <a href='http://www.vorbis.com/setup/'>Vorbis</a> til lyd. OGG er
et frit multimediecontainerformat. Det er nemt at implementere OGG, da
specifikationen er frit tilgængelig for alle. Samtidig skal man ikke
betale royalties til nogen.</p>
<p>Du kan læse mere om OGG
i <a href="http://en.flossmanuals.net/TheoraCookbook/">manualen af
FLOSS Manuals</a>, enten online eller som en pdf.</p>
<h3>"Hvorfor ikke YouTube?"</h3>
<p>YouTube bruger stadig hovedsageligt H.264 til deres videoer. Det
kan godt være at det teknisk er et godt codec, men det er noget
rod med alle dets patentproblemer. Det er derfor godt at YouTube
begynder at bruge det nye format WebM med VP8, da det er et frit
format. Det er dog stadig mest almindeligt med Flash-baserede
afspillere (i stedet for HTML5-baserede), og da Flash kun til
fulde kan afspilles af det proprietære Adobe Flash-software, er
det et problem. Dog ser det ud til at den frie Flash-afspiller
Gnash bliver bedre og bedre til det. Men selv om Gnash kan køre
videoprogrammet, er videoprogrammet jo stadig ikke nødvendigvis
frit. Og eftersom det nok ikke ligefrem er trivielt, burde
Flash-kildekoden være fri. selv hvis Gnash bliver perfekt,
kræver det også at videoafspilleren er det.</p>
<p>Umiddelbart ser det ud til at YouTube bruger en del ikke-trivielt,
ikke-frit JavaScript, samtidig med at selve kernen i hele deres
system kun er tilgængelig via en API. Det er et problem. YouTube
har også reklamer, hvilket er irriterende. Ens brug af YouTube er
i typisk Google-facon nok ikke privat igen
(se <a href='http://www.youtube.com/t/privacy'>http://www.youtube.com/t/privacy</a>).</p>
<p>Læs mere om fri software, alternativet til proprietær software,
<a href='http://gnu.org/'>gnu.org</a>.</p>
<h2>Hvordan man kan afspille afsnittene</h2>
<p>Hvis du bruger en rimelig ny browser, burde det være muligt at
afspille afsnittene indeni din browser. De er sat ind
vha. HTML5s <a href='http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5'><code>&lt;video&gt;</code></a>-tag,
som virker i Firefox 3.5+ og også nogle andre browsere. Hvis det ikke
virker,
træder <a href='http://www.theora.org/cortado/'>Cortado</a>-afspilleren
i kræft. Undertekster virker nok ikke med Cortado, da det er et
applet.</p>
<p>Hvis du ikke kan eller vil afspille afsnittene direkte i din
browser, kan du bare downloade dem og se dem i din
favoritmedieafspiller.</p>
<h2>Denne hjemmeside</h2>
<p>Bortset fra, at denne side
bruger <code>&lt;video&gt;</code>-tagget, bruger hjemmesiden også
andre nye tilføjelser til HTML. I browsere der har support for det
(Firefox 3.5+, GNU IceCat 3.5+, etc.) er der i baggrunden et
SVG-billede (<a href='img/bgflow.svg'>bgflow.svg</a>). Også
gennemsigtighed sammen med andre ny fancy CSS-effekter bliver brugt
hist og her. Alt dette er bare pynt, og selv hvis det ikke vises,
virker hjemmesiden stadig. Den virker også fint uden
JavaScriptkoden. Om ikke andet virker den i hvert fald ok i Lynx.</p>
<p>Jeg bruger en speciel skrifttype kaldt "Domestic Manners" nogle
steder siden (det vises ikke nødvendigvis i alle
browsere). <a href='http://www.fontspace.com/cheapskate-fonts/domestic-manners'>Her</a>
står der, at skrifttypen er tilgængelig
under <a href='http://www.gnu.org/licenses/gpl.html'>GPL</a>. Der står
dog ikke hvilken version af GPL.</p>
<h2>Niels</h2>
<p>Jeg hedder Niels Serup, og jeg lavede disse film. Jeg bor ved siden
af en skov. <a href='http://metanohi.org/aboutme/'>Læs mere om
mig.</a></p>
<h2>Redigering og encoding</h2>
<p>Det kan godt være ret svært at kreere en film, der ser flot ud,
især hvis man vil have, at den skal se profesionel ud. Det gør det
ikke nemmere, hvis man bruger en langsom, gammel computer. Det
lykkedes dog for mig.</p>
<h3>Redigering</h3>
<p>For mit tredje afsnit tænkte jeg, at det kunne være rart at klippe
lidt. Jeg fandt <a href='http://www.pitivi.org/'>PiTiVi</a>. Det er
måske stadig ret nyt, men det var meget nemt at arbejde med.</p>
<h3>Encoding</h3>
<p>PiTiVi kan også bruges til at "render" ens video, men mysterisk
vis blev det ved med at crashe og stoppe underlige tidspunkter
min computer. Mens jeg kiggede efter hjælp, lagde jeg mærke til,
at <a href='http://www.kinodv.org/'>Kino</a> ikke havde nogen
problemer med at lave en endelig videofil. For at Kino til at læse
min PiTivifil lavede jeg en converter. De to videoprogrammer bruger
forskellige formater, det var nødvendigt. Du kan hente min
converter <a href='http://metanohi.org/projects/various/pitivi-smil.tgz'>her</a>.</p>
<p>For at ændre mine film til OGG bruger
jeg <a href='http://en.flossmanuals.net/ffmpeg2theora'><code>ffmpeg2theora</code></a>. Min
kommando ser ud nogenlunde sådan her:</p>
<code>
ffmpeg2theora -o niels-naturX-small.ogv --deinterlace --optimize -v 4 -a 4 -x 448 -y 360 --aspect 16:9 --artist "Niels Serup" --title "Niels' nature X: Y" --date "2009-12-19" --location "Northern Denmark" --copyright "20XX Niels Serup" --license "CC BY-SA (http://creativecommons.org/licenses/by-sa/3.0/)" niels-naturX.dv
</code>
<br /><br />
<h1>HVORFOR???</h1>
<p>Hvorfor ikke?</p>
EOD;
?>

255
subsites/natur/langs/en.php Normal file
View File

@ -0,0 +1,255 @@
<?php
$LANG = 'en';
$TITLE = 'Niels\' nature';
$MENU_START = 'Start';
$MENU_EPISODES = 'Episodes';
$MENU_DETAILS = 'Details';
$CONTENT_START = <<<EOD
<h1><i>Nay</i>-ture or <i>yeah</i>-ture?</h1>
<h3>Let <em>Niels</em> explain nature</h3>
<hr />
<p>What is nature? How did the world end up being what it is today?
Why do elfs generally not appear before humans?</p>
<p>These questions are difficult to answer; they, like many other
nature-related questions, require much thinking, theorizing and
brainwashing to answer. Even the greatest philosophers will never be
able to come with a definite answer to such complex questions. Not
even <em>Niels</em> is able to explain it.</p>
<h2>Nature + Niels = Truth</h2>
<p>So, who is this <em>Niels</em>? And what about this <em>nature</em>
-- what is it really? Well, <em>Niels</em> is a person,
and <em>nature</em> is where Niels records his films -- his films
about nature. So far he has recorded three films in the nature, each
one with a specific and quite relevant theme.</p>
<p>So, basically, "Niels' nature" is a TV show -- except that it is
more likely to be played on a computer.</p> <hr />
<p class='large center'><a href='#episodes'>Watch the episodes</a></p>
EOD;
$CONTENT_EPISODES = <<<EOD
<h1>The eps</h1>
<p>Niels has currently produced 3 episodes, of which currently only
the third (i.e. the newest) is online. This will change at some point,
though it is unclear when.</p>
<p>In all of the three episodes Niels talks as he walks. He talks
about trees, Bigfeet, local warming and bamboos.</p>
<p>Niels speaks Danish, so these episodes are also in Danish. As
Danish isn't a widely understood language, Niels subtitles his
episodes. For now, only the third episode has been subbed, and it has
only been subbed in English. If someone volunteers to sub an episode
in another language, Niels will gladly accept. Niels can be contacted
at <a href='mailto:ns@metanohi.org'>ns@metanohi.org</a>.</p>
<p>Note that all of the episodes are licensed under CC BY-SA,
a <em>free</em> license. Read more about this on
the <a href='#details'>Details</a> page.</p> <hr />
<h3>How to watch</h3>
<p>If you're using a modern web browser, there's a chance you'll be
able to simply click on the image of an episode and then watch that
episode inside your browser. If you're unable to do that, or if you
don't want to do that, you can always just download an episode for
offline watching -- just click on the download links.</p>
<p>The videos last between 25 and 35 minutes each and are encoded into
the <a href='http://www.xiph.org/'>OGG</a> format,
using <a href='http://www.theora.org/'>Theora</a> for video
and <a href='http://www.vorbis.com/setup/'>Vorbis</a> for sound. You
can read more about this on the <a href='#details'>Details</a>
page.</p> <hr />
<h2>Episode 3: Global warming</h2>
<p>This was recorded in December 2009.</p>
<a class='shotimg' href='#play3.en'>
<img src='img/ep3.jpg' alt='Screenshot of episode 3: Global
warming' />
</a>
<p><a href='#play3'>Play in browser (without subtitles)
(188MB)</a></p>
<p><a href='#play3.en'>Play in browser (with English subtitles)
(188MB)</a></p>
<p><a href='vid/niels-natur3-small.ogv'>Download (no included
subtitles) (188MB)</a></p>
<p><a href='vid/niels-natur3-en.srt'>Download English
subtitles</a></p>
<h2>Episode 2: Bigfoot</h2>
<p>This was recorded in April 2009.</p>
<img src='img/ep2.jpg' alt='Screenshot of episode 2: Bigfoot'
style='width: 513px; height: 282px;' />
<p><span class='error'>Video not up yet.</span></p>
<h2>Episode 1: The nature around us</h2>
<p>This was recorded in December 2008.</p>
<img src='img/ep1.jpg' alt='Screenshot of episode 1: The nature around us'
style='width: 513px; height: 282px;' />
<p><span class='error'>Video not up yet.</span></p>
EOD;
$CONTENT_DETAILS = <<<EOD
<h1>How/why/what..</h1>
<p>It has not been a simple task to arrive at this point. Filming,
directing, encoding, planning, thinking.. All very difficult things to
do. This page will attempt to give detailed explanations of various
semicomplex.. things.</p>
<h2>Nature</h2>
<p>The films take place in the nature. That's it.</p>
<h2>License, copyright</h2>
<p><i><b>Copyright</b></i> --
see <a href='http://en.wikipedia.org/wiki/Copyright'>Wikipedia's
article</a> for an explanation -- has reached a level where only a few
people have that right. Looking at an ordinary film, a piece of music
or even a computer program, it it often <i>illegal</i> to simply copy
it. If a person has used up 5MB of their hard disk for a piece of
music and then chooses to copy it, so that it takes up 5MB on a
friend's hard disk, there's a high risk that person is doing something
illegal, because if the music is covered by a heavy copyright (like a
lot of films, music, books, etc. are), only the ones who reserve the
right to copy it may copy it. This might work okay when the copyright
holders only reinforce their right to copy a work in commercial
contexts, but when they start to restrict ordinary people from simply
sharing art, it's gone too far.</p>
<p>So..</p>
<p>"Niels' nature" episodes are <em>free</em>, in the sense that
everybody is allowed to share them. As a bonus, everybody is also
allowed to modify them and share their modifications, so that even
more people can benefit. All this is made possible by
the <a href='http://creativecommons.org/licenses/by-sa/3.0/'
rel='license'>Creative Commons Attribution-ShareAlike 3.0 Unported
license</a> (also used by Wikipedia). Niels' nature' -- both the films
and the textual content of the website -- is licensed under that
license. For the license to work, there must be a copyright
owner. This is because it's
a <a href='http://en.wikipedia.org/wiki/Copyleft'>copyleft</a>
license.</p> <hr />
<p class='noindent'>Copyright &copy; 2008, 2009 Niels Serup<br /> All
text, pictures (except <a href='img/stop.png'>'stop.svg' and
'stop.png'</a>, which are in the public domain) and films on this
website are available under the Creative Commons
Attribution-ShareAlike 3.0 Unported license.</p> <hr />
<p class='noindent'>The image 'stop.svg' is taken from
the <a href='http://tango.freedesktop.org/'>Tango Desktop Project</a>
and slightly modified. Tango base icons are in the public domain, so
nothing's stopping me from releasing my modified version under CC
BY-SA. But I'll respect the project's ideology and not do that.</p>
<hr />
<p>To attribute me, a link to this website
('http://nature.metanohi.org/') and a string with my name ('Niels
Serup') is enough.</p>
<p>Note that this website uses a small amount
of <a href='http://en.wikipedia.org/wiki/Javascript'>JavaScript</a>
code to make some things a bit fancier. You shouldn't attribute me
when reusing code
and <a href='http://en.wikipedia.org/wiki/HTML'>HTML</a> formatting
from this website. I find it too trivial to have it require a real
copyleft license; just copy it as you wish.</p>
<h2>Contact</h2>
<p>You can contact me
at <a href='mailto:ns@metanohi.org'>ns@metanohi.org</a>.</p>
<h2>OGG</h2>
<a class='img' href='http://playogg.org/'><img class='left'
src='img/playogg.png' alt='Play OGG' /></a>
<p>"Niels' nature" episodes are encoded into
the <a href='http://www.xiph.org/'>OGG</a> format,
using <a href='http://www.theora.org/'>Theora</a> for video
and <a href='http://www.vorbis.com/setup/'>Vorbis</a> for sound. OGG
is a free video/sound/subtitle container format. Implementing OGG is
easy, as its specification is freely available to everyone. It's also
royalty-free.</p>
<p>You can read more about OGG in
the <a href="http://en.flossmanuals.net/TheoraCookbook/">manual
published by FLOSS Manuals</a>, either online or as a pdf.</p>
<h3>"Why not just YouTube?"</h3>
<p>YouTube still mainly uses H.264 for their videos. It may be that it
is technically a good codec, but patent-wise it's a mess. That's
why it's a good thing that YouTube is beginning to use WebM with
VP8, as that is a free format. It is however still most common
with Flash-based video players (instead of HTML5-based), and
considering that Flash can only be perfectly run by the
proprietary Adobe Flash, it's a problem. Gnash, a free Flash
player, seems to be steadily solving this problem, but even if it
eventually becomes capable of running Flash programs perfectly,
the Flash programs may still not be free. And they should.</p>
<p>It seems that YouTube uses some non-trivial, non-free JavaScript as
well as a non-free core only partly available through an API. This
is a problem. YouTube also has ads, which is annoying. One's use
of YouTube is in typical Google-way probably not very private
(see <a href='http://www.youtube.com/t/privacy'>http://www.youtube.com/t/privacy</a>).</p>
<p>Read more about free software, the alternative to proprietary
software, on <a href='http://gnu.org/'>gnu.org</a>.</p>
<h2>How to play the episodes</h2>
<p>If you're using a fairly new browser, it should be possible to play
the episodes inside your browser. They are embedded using
the <a href='http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5'><code>&lt;video&gt;</code></a>
tag of HTML5, which is supported in Firefox 3.5+ as well as other
browsers. As a fallback,
the <a href='http://www.theora.org/cortado/'>Cortado</a> Java player
is used. Subtitles are unlikely to work with Cortado, because it's an
applet.</p>
<p>If playing the episodes directly in the browser doesn't work, or if
you simply don't want to do that, just download the episodes and watch
them in your favourite media player.</p>
<h2>This website</h2>
<p>Apart from using the <code>&lt;video&gt;</code> tag, this website
also uses other new additions to HTML. On browsers that support it
(Firefox 3.5+, GNU IceCat 3.5+, etc.), the background features an SVG
image (<a href='img/bgflow.svg'>bgflow.svg</a>) and transparency as
well as other new CSS things are used at various places. All of this
is nothing but eyecandy, and if it doesn't work because of a browser
that doesn't support it, fear not! The site should still work just
fine. It also works just fine without the JavaScript code. It seems to
work ok in Lynx, anyway.</p>
<p>I'm using a special font called "Domestic Manners" in some areas of
the website (it might not show on all browsers). According
to <a href='http://www.fontspace.com/cheapskate-fonts/domestic-manners'>this
site</a>, the font
is <a href='http://www.gnu.org/licenses/gpl.html'>GPL</a>'d, though it
doesn't state what version of the GPL it's under.</p>
<h2>Denmark</h2>
<p>Denmark is a small, cold country.</p>
<h2>Niels</h2>
<p>My name is Niels Serup, and I created these films. I live next to a
forest. <a href='http://metanohi.org/aboutme/'>Read more about
me.</a></p>
<h2>Editing and encoding</h2>
<p>Creating a nice-looking film can be difficult, especially if you
want to make it look professional. Using a slow, old computer doesn't
make things easier. I did manage it, however.</p>
<h3>Editing</h3>
<p>For my third episode I thought to myself that it could be nice to
do a bit of cutting. I
found <a href='http://www.pitivi.org/'>PiTiVi</a>. While still in
its early fases, I found it to be very easy to work with.</p>
<h3>Encoding</h3>
<p>PiTiVi can also be used to render one's video, but it mysteriously
kept crashing and stopping at odd times on my computer. While looking
for help, I noticed that <a href='http://www.kinodv.org/'>Kino</a>
didn't have any rendering problems. To make Kino render render my
PiTiVi file, I created a converter. The two programs use different
file formats for saving data, so it was necessary. You can download
it <a href='http://metanohi.org/projects/various/pitivi-smil.tgz'>here</a>.</p>
<p>To convert my films to OGG I
use <a href='http://en.flossmanuals.net/ffmpeg2theora'><code>ffmpeg2theora</code></a>. Something
like this:</p>
<code>
ffmpeg2theora -o niels-naturX-small.ogv --deinterlace --optimize -v 4 -a 4 -x 448 -y 360 --aspect 16:9 --artist "Niels Serup" --title "Niels' nature X: Y" --date "2009-12-19" --location "Northern Denmark" --copyright "20XX Niels Serup" --license "CC BY-SA (http://creativecommons.org/licenses/by-sa/3.0/)" niels-naturX.dv
</code>
<br /><br />
<h1>WHY???</h1>
<p>Why not?</p>
EOD;
?>

481
subsites/natur/script.js Normal file
View File

@ -0,0 +1,481 @@
/*
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/* I'm sorry I never got around to beautifying the code, but I was
* simply more focused on encoding and subbing my films.
*/
function empty(){}
HTMLElement.prototype.set_opacity = function(val) {
this.style.opacity = val
this.style.filter = 'alpha(opacity=' + val*100 + ')'
}
HTMLElement.prototype.fade = function(fade_in, increase, speed, afterfunc) {
if (increase == undefined || increase == -1)
var increase = 5
if (speed = undefined || speed == -1)
var speed = 50
if (afterfunc == undefined)
var afterfunc = empty
this.style.display = 'block'
if (fade_in) {
this.fade_opacity = 0
this.set_opacity(0)
}
else {
this.fade_opacity = 100
this.set_opacity(1)
}
this.fade_increase = increase
this.fade_afterfunc = afterfunc
this.fade_in = fade_in
this.fade_interval = setInterval(this.fade_run, speed, this)
}
HTMLElement.prototype.fade_in = function(increase, speed, afterfunc) {
this.fade(true, increase, speed, afterfunc)
}
HTMLElement.prototype.fade_out = function(increase, speed, afterfunc) {
this.fade(false, increase, speed, afterfunc)
}
HTMLElement.prototype.fade_run = function(obj) {
var end
if (obj.fade_in) {
obj.fade_opacity += obj.fade_increase
end = obj.fade_opacity >= 100
}
else {
obj.fade_opacity -= obj.fade_increase
end = obj.fade_opacity <= 0
}
if (!end)
obj.set_opacity(obj.fade_opacity/100)
else
obj.fade_end()
}
HTMLElement.prototype.fade_end = function() {
clearInterval(this.fade_interval)
if (this.fade_in)
this.set_opacity(1)
else {
this.set_opacity(0)
this.style.display = 'none'
}
delete this.fade_interval
delete this.fade_opacity
delete this.fade_increase
delete this.fade_in
var func = this.fade_afterfunc
delete this.fade_afterfunc
func()
}
function get_window_size() {
if (window.innerWidth) {
w = window.innerWidth
h = window.innerHeight
}
else if (document.body.clientWidth) {
w = document.body.clientWidth
h = document.body.clientHeight
}
}
function update_csssvg() {
get_window_size()
try {
// More logical resize
if (h < w * 0.45)
svg.setAttribute('preserveAspectRatio', 'xMidYMid slice')
else
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet')
} catch (error) {}
// Just for looks
text_box.style.minHeight = h - 101 + 'px'
text_content.style.minHeight = h - 215 - menu_height + 'px'
}
function in_list(obj, lst) {
for (var x in lst) {
if (lst[x] == obj)
return x
}
return -1
}
function set_title_based_on_page(num) {
if (pages_titles[num])
document.title = root_title + ' :: ' + pages_titles[num]
}
function pagescroll_start() {
if (page_scrolling)
return false
var newelem = pages_elems[new_num]
var oldelem = pages_elems[old_num]
newelem.style.position = 'absolute'
newelem.style.top = '6px'
newelem.style.marginLeft = '525px'
newelem.className = 'focus'
if (newelem.scrollHeight > oldelem.scrollHeight) {
newelem.style.position = ''
newelem.style.marginLeft = '525px'
oldelem.style.position = 'absolute'
oldelem.style.top = '6px'
}
page_moved = 0
increase = 10
page_change_increase = 400
page_scrolling = true
pagescroll()
}
function pagescroll() {
var tmp_increase = increase + 15
if (page_moved + tmp_increase < page_change_increase)
increase = tmp_increase
else
increase -= 25
mv = page_moved + increase
if (mv < PAGE_WIDTH) {
page_moved = mv
text_content.style.left = -mv + 'px'
setTimeout("pagescroll()", 50)
}
else
pagescroll_end()
}
function pagescroll_end() {
var newelem = pages_elems[new_num]
var oldelem = pages_elems[old_num]
current_page = pages_refs[new_num]
set_title_based_on_page(new_num)
text_content.removeAttribute('style')
newelem.removeAttribute('style')
oldelem.removeAttribute('style')
oldelem.className = 'hidden'
text_content.style.left = '0'
newelem.style.left = '0'
oldelem.style.left = '0'
pages_menu_elems[old_num].className = ''
pages_menu_elems[new_num].className = 'focus'
page_scrolling = false
}
function cinema_start(num, subs_lang) {
if (video_playing) {
if (num != video_playing) {
video_playing = num
cininf.fade_out(10, -1, function() {cinema_set_description(); cininf.fade_in(10)})
cinema_play()
}
return
}
if (subs_lang) {
var ok = false
for (var x in subtitles) {
if (subtitles[x][0] == num) {
ok = true
subtitles[x][1].resume()
break
}
}
if (!ok)
subtitles.push([num, new subtitle(cinvid, 'vid/niels-natur'+num+'-'+subs_lang+'.srt', cinelm)])
}
video_playing = num
cinema_set_description()
cinelm.fade_in(7, -1, cinema_start_continue)
}
function cinema_set_description() {
cininf.innerHTML = root_title + ' ' + video_playing
}
function cinema_start_continue() {
cininf.fade_in(10)
cinelm_close.fade_in(10)
text_wrapper.style.display = 'none'
bgflow.style.display = 'none'
cinema_play()
}
function cinema_play() {
var url = 'vid/niels-natur' + video_playing + '-small.ogv'
if (cinvid.currentTime != undefined) {
cinvid.src = url
cinvid.play()
}
else {
add_cortado(url)
}
}
function cinema_end() {
text_wrapper.style.display = ''
bgflow.style.display = ''
if (cinvid.currentTime != undefined) {
cinvid.pause()
}
else {
remove_cortado()
}
for (var x in subtitles) {
if (subtitles[x][0] == video_playing) {
subtitles[x][1].stop()
break
}
}
video_playing = 0
cininf.fade_out(7)
cinelm_close.fade_out()
cinelm.fade_out(-1, -1, function(){})
}
function do_action(href) {
var action, x
action = href.substr(href.indexOf('#')+1)
if (!page_scrolling && action != current_page && in_list(action, pages_refs) != -1) {
// It is a hidden page (to be shown)
var name, elem, menu_elem, parent
for (x in pages_refs) {
name = pages_refs[x]
elem = pages_elems[x]
menu_elem = pages_menu_elems[x]
if (name == action) {
// Put element after other elements
parent = elem.parentNode
parent.removeChild(elem)
parent.appendChild(elem)
new_num = x
}
else if (name == current_page) {
old_num = x
}
}
pagescroll_start()
}
else if (action.indexOf('play') == 0) {
var play = action.substr(4)
var dot = play.indexOf('.')
var subs
if (dot != -1) {
subs = play.substr(dot+1)
play = play.substr(0, dot)
}
else
subs = false
play = play*1
if (play) {
do_action(pages_refs[1])
cinema_start(play, subs)
}
}
}
function remove_cortado(url) {
cinvid.removeChild(cinapp)
delete cinapp
}
function add_cortado(url) {
cinapp = document.createElement('applet')
cinapp.setAttribute('code', 'com.fluendo.player.Cortado.class')
cinapp.setAttribute('archive', 'http://theora.org/cortado.jar')
cinapp.width = '640'
cinapp.height = '360'
namval = {
'url': url,
'local': 'false',
'duration': '',
'bufferSize': '200',
'autoPlay': 'true',
'statusHeight': '16'
}
for (x in namval) {
elem = document.createElement('param')
elem.setAttribute('name', x)
elem.setAttribute('value', namval[x])
if (x == 'url')
cinapp_url = elem
cinapp.appendChild(elem)
}
cinvid.appendChild(cinapp)
}
window.onload = function() {
// Get elements
bgflow = document.getElementById('bgflow')
text_wrapper = document.getElementById('text_wrapper')
text_box = document.getElementById('text_box')
text_menu = document.getElementById('text_menu')
text_content = document.getElementById('text_content')
PAGE_WIDTH = 525
HALF_PAGE = Math.round(PAGE_WIDTH / 2) + 10 // With a little extra
// Set default values (also for debugging)
w = -1
h = -1
old_num = -1
new_num = -1
page_scrolling = false
video_playing = 0
// Get menu height if menu exists
try {
menu_height = text_menu.offsetHeight
} catch(err) {
menu_height = 0
}
// Get root element of background SVG
try {
svg = bgflow.getSVGDocument().rootElement
} catch (error) {}
root_title = document.title
var elems, elem, x, y, name, urlhash, hash_in_list, elem_num, menu_elem
var elems2, elem2
urlhash = window.location.hash.substr(1)
pages_refs = new Array()
pages_elems = new Array()
pages_menu_elems = new Array()
pages_titles = new Array()
elems = text_menu.childNodes
for (x in elems) {
elem = elems[x]
if (elem.nodeName && elem.nodeName.toLowerCase() == 'li') {
pages_menu_elems.push(elem)
elem = elem.childNodes[0]
pages_titles.push(elem.innerHTML)
pages_refs.push(elem.href.substr(elem.href.indexOf('#')+1))
}
}
hash_in_list = in_list(urlhash, pages_refs)
if (hash_in_list != -1) {
current_page = urlhash
elem_num = hash_in_list
}
else {
current_page = pages_refs[0]
elem_num = 0
}
// Hide non-current pages
for (x in pages_refs) {
name = pages_refs[x]
elem = document.getElementById('content_' + name)
menu_elem = pages_menu_elems[x]
pages_elems.push(elem)
if (name == current_page) {
elem.className = 'focus'
menu_elem.className = 'focus'
}
else {
elem.className = 'hidden'
menu_elem.className = ''
}
}
set_title_based_on_page(elem_num)
// Set up alternate handling of '#' links and prepare video shots
elems = document.getElementsByTagName('a')
for (x in elems) {
elem = elems[x]
if (elem.href != undefined && elem.href.indexOf('#') != -1)
elem.onclick = function() {do_action(this.href)}
}
// Prepare page for viewing video
cinelm = document.createElement('div')
cinelm.id = 'cinema'
cinelm_close = document.createElement('div')
cinelm_close.id = 'cinema-close'
cinelm_close.onclick = function() {cinema_end()}
cinelm.appendChild(cinelm_close)
cinvid = document.createElement('video')
cinvid.id = 'cinema-film'
cinvid.width = '640'
cinvid.height = '360'
cinvid.setAttribute('controls', 'controls')
cinvid.addEventListener('ended', function() {cinema_end()}, true)
cinelm.appendChild(cinvid)
cininf = document.createElement('div')
cininf.id = 'cinema-info'
cinelm.appendChild(cininf)
document.body.appendChild(cinelm)
// Prepare for loading of subtitles
subtitles = new Array()
// Do whatever the hash tells you to do
do_action(urlhash)
// Prepare to update css and svg (and do it)
window.onresize = function() {update_csssvg()}
update_csssvg()
}

309
subsites/natur/style.css Normal file
View File

@ -0,0 +1,309 @@
@font-face {
font-family: 'Hand';
font-weight: normal;
src: local("Domestic Manners"),
url("Domestic_Manners.ttf") format("truetype");
}
* {
margin: 0;
padding: 0;
}
body {
font-family: 'DejaVu Serif', 'Bitstream Vera Serif', 'Liberation Serif',
'Times New Roman', 'serif', 'sans';
font-size: 14px;
color: #dbf6d0;
background-color: #00e500;
overflow: hidden;
}
object#bgflow {
position: fixed;
overflow: hidden;
width: 100%;
height: 100%;
background: #8c0000;
}
div#text_wrapper {
position: absolute;
width: 100%;
height: 100%;
overflow-y: scroll;
overflow-x: auto;
}
div#text_box {
width: 525px;
margin: 48px auto;
min-height: 50%;
background: rgba(0, 0, 0, 0.7) url(img/eyes.jpg) no-repeat;
border-width: 2px;
border-style: solid;
border-color: rgba(125, 75, 25, 0.7);
overflow: hidden;
}
a#text_header {
display: block;
position: absolute;
width: 525px;
height: 100px;
cursor: pointer;
}
div#text_header_content {
position: absolute;
bottom: 3px;
left: 7px;
color: #8ec813;
font-family: Hand, 'Domestic Manners';
font-size: 30px;
text-shadow: #000 1px -1px 1px;
}
div#text_header_space {
margin-top: 100px;
height: 2px;
background: #000;
}
ul#text_menu {
display: block;
width: 513px;
background: #000;
padding: 4px 6px 6px 6px;
color: #fff;
}
ul#text_menu li {
list-style: none;
float: left;
width: 167px;
margin-left: 6px;
font-weight: bold;
font-size: 18px;
text-align: center;
position: relative;
}
ul#text_menu li:first-child {
margin-left: 0;
}
ul#text_menu a {
display: block;
width: 100%;
height: 100%;
padding: 4px 0;
}
ul#text_menu a:link, ul#text_menu a:visited {
text-decoration: none;
color: #ccc;
background-color: #222;
}
ul#text_menu a:hover {
color: #222;
background-color: #ccc;
}
ul#text_menu li.focus a {
color: #111;
background-color: #eee;
}
div#text_content {
width: 513px;
padding: 6px;
position: relative;
}
div#text_content > div {
width: 513px;
overflow: hidden;
margin-bottom: 20px;
}
div#text_content > div.focus, div#text_content > div:last-child {
margin-bottom: 0;
}
div#text_content > div.hidden {
display: none;
}
h1 {
font-weight: normal;
font-size: 28px;
}
h2 {
margin-top: 10px;
font-weight: normal;
font-size: 24px;
}
h3 {
font-weight: normal;
font-size: 20px;
}
p {
text-indent: 6px;
}
img {
border: 0;
padding: 0;
}
img.left {
float: left;
margin: 2px 6px 3px 2px;
}
.bottom-page {
position: absolute;
bottom: 0;
left: 0;
width: 525px;
height: 289px;
border-top: 2px solid #333;
}
.large {
font-size: 20px;
}
.error {
color: #440000;
background-color: rgba(255, 155, 55, 0.5);
padding: 0 3px;
}
.center {
text-align: center;
}
.noindent {
text-indent: 0;
}
hr {
border: 1px dashed #8f97e8;
margin: 5px 0;
}
a:link, a:visited {
color: #a2ecff;
padding: 0 3px;
background-color: rgba(223, 251, 212, 0.2);
text-decoration: none;
}
a:hover {
color: #44f6c5;
background-color: rgba(123, 251, 212, 0.2);
}
a.img:link, a.img:visited, a.img:hover {
padding: 0;
background-color: transparent;
display: block;
}
a.shotimg:link, a.shotimg:visited, a.shotimg:hover {
padding: 0;
background-color: transparent;
display: block;
width: 513px;
height: 282px;
margin-bottom: 4px;
}
a.shotimg img {
width: 100%;
height: 100%;
opacity:.8;
-moz-opacity:.8;
-khtml-opacity: .8;
//-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
//filter:alpha(opacity=80);
}
a.shotimg:hover img {
opacity:1;
-moz-opacity:1;
-khtml-opacity: 1;
//-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
//filter:alpha(opacity=100);
}
div.end {
clear: both;
}
#cinema {
position: fixed;
left: 50%;
top: 50%;
width: 650px;
height: 440px;
margin-left: -325px;
margin-top: -250px;
background-color: #000;
display: none;
z-index: 2;
}
#cinema-close {
position: absolute;
right: 10px;
bottom: 10px;
width: 50px;
height: 50px;
background: url(img/stop.png) no-repeat;
cursor: pointer;
display: none;
}
#cinema-close:hover {
background-position: 0 -50px;
}
#cinema-film {
position: absolute;
left: 5px;
top: 5px;
width: 640px;
height: 360px;
}
#cinema-info {
position: absolute;
left: 20px;
bottom: 10px;
font-family: Hand, 'Domestic Manners';
font-size: 30px;
color: #f9dfdf;
display: none;
}
#subtitle {
position: absolute;
bottom: 0;
left: 50%;
width: 400px;
margin-left: -200px;
text-align: center;
padding: 3px;
background-color: rgba(0, 0, 0, 0.5);
font-family:Dejavu Sans, Arial, sans;
color: #fff;
}

View File

@ -0,0 +1,42 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml">
<head>
<title>Test</title>
<style type='text/css'>
#subtitle {
position: absolute;
bottom: 0;
left: 50%;
width: 400px;
margin-left: -200px;
text-align: center;
padding: 3px;
background-color: rgba(0, 0, 0, 0.5);
font: 14px Dejavu Sans;
color: #fff;
}
</style>
<script type='text/javascript' src='subtitler.js'></script>
<script type='text/javascript'>
window.onload = function() {
var videlm = document.getElementsByTagName('video')[0]
a = new subtitle(videlm, 'vid/niels-natur3-en.srt')
}
</script>
</head>
<body>
<video src="vid/niels-natur3-small.ogv" controls="controls" height="360" width="640"
style='position: fixed;'>
<applet code="com.fluendo.player.Cortado.class"
archive="http://theora.org/cortado.jar"
height="360" width="640">
<param url="vid/niels-natur3-small.ogv" />
<param local="false" />
<param duration="" />
<param buffersize="200" />
<param autoplay="false" />
<param statusheight="16" />
</applet>
</video>
</body>
</html>

156
subsites/natur/subtitler.js Normal file
View File

@ -0,0 +1,156 @@
/*
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/* It's very simple and not perfect. I'm not going to develop more on this code.
*/
function subtitle(vid, subs_url, alt) {
this.videoElement = vid
this.subtitles = null
if (alt != undefined)
this.rootElement = alt
else
this.rootElement = document.body
this.fetchSubtitles(subs_url)
}
subtitle.prototype.fetchSubtitles = function(subs_url) {
var req = new XMLHttpRequest()
req.open('GET', subs_url, true)
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status == 200)
this.subtitleObject.extractSubtitles(req.responseText)
else
this.subtitleObject.err()
}
}
req.subtitleObject = this
req.send(null)
}
subtitle.prototype.extractSubtitles = function(subs) {
var subs = subs
while (subs.indexOf('\n') == 0)
subs = subs.substr(1)
while (subs.substr(subs.length-1) == '\n')
subs = subs.substr(0, subs.length-1)
subs = subs.split('\n\n')
var subs_arr = new Array()
var x, i, txt, times, start, end, msg
for (x in subs) {
txt = subs[x].split('\n')
times = txt[1].split(' --> ')
start = this.toSeconds(times[0])
end = this.toSeconds(times[1])
msg = ''
for (i = 2; i < txt.length; i++)
msg += '\n' + txt[i]
msg = msg.substr(1)
subs_arr.push([start, end, msg])
}
this.start(subs_arr)
}
subtitle.prototype.toSeconds = function(time_str) {
var t = 0
t += time_str.substr(0, 2) * 3600
t += time_str.substr(3, 2) * 60
t += time_str.substr(6, 2) * 1
t += time_str.substr(9, 3) * 0.001
return t
}
subtitle.prototype.err = function() {
this.start([[0, 4000, 'It wasn\t possible to load the subtitles.']])
}
/**********************/
subtitle.prototype.start = function(subs_arr) {
this.subtitles = subs_arr
this.textLength = this.subtitles.length
this.currentSubtitle = 0
this.currentSubtitleOn = false
var elem = document.createElement('div')
elem.style.position = 'absolute'
var subelem = document.createElement('div')
subelem.id = 'subtitle'
elem.appendChild(subelem)
this.rootElement.appendChild(elem)
this.subtitleElement = elem
this.subtitleTextElement = subelem
this.updateSubtitleElement()
this.videoElement.subtitlesObject = this
this.videoElement.onmouseover = function() {
this.subtitlesObject.subtitleElement.style.display = 'none'
}
this.videoElement.onmouseout = function() {
this.subtitlesObject.subtitleElement.style.display = ''
}
this.resume()
}
subtitle.prototype.resume = function() {
this.videoElement.addEventListener('timeupdate', this.check, true)
}
subtitle.prototype.stop = function() {
this.removeCurrentSubtitle()
this.videoElement.removeEventListener('timeupdate', this.check, true)
}
subtitle.prototype.updateSubtitleElement = function() {
var x = this.videoElement.offsetLeft
var y = this.videoElement.offsetTop
var w = this.videoElement.width
var h = this.videoElement.height
this.subtitleElement.style.left = x + 10 + 'px'
this.subtitleElement.style.width = w - 20 + 'px'
this.subtitleElement.style.top = y + h - 50 + 'px'
this.subtitleElement.style.height = '40px'
}
subtitle.prototype.check = function(event) {
var self = event.target.subtitlesObject
var time = event.target.currentTime
var csub = self.subtitles[self.currentSubtitle]
if (time >= csub[0] && time <= csub[1]) {
if (!self.currentSubtitleOn)
self.updateSubtitle()
}
else {
self.removeCurrentSubtitle()
if (time < csub[0] && self.currentSubtitle > 0)
self.currentSubtitle -= 1
else if (time > csub[1] && self.currentSubtitle < self.textLength)
self.currentSubtitle += 1
}
}
subtitle.prototype.updateSubtitle = function() {
this.subtitleTextElement.innerHTML = this.subtitles[this.currentSubtitle][2]
this.subtitleTextElement.style.display = ''
this.currentSubtitleOn = true
}
subtitle.prototype.removeCurrentSubtitle = function() {
this.subtitleTextElement.style.display = 'none'
this.subtitleTextElement.innerHTML = ''
this.currentSubtitleOn = false
}

View File

@ -1,13 +1,9 @@
<VirtualHost *:80>
ServerName nohix.lcl
ServerAlias nohix.lcl
ServerName nohix.metanohi.name
ServerAlias www.nohix.metanohi.name nohix.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/nohix
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/subsites/nohix/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +11,8 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/nohix.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/nohix.metanohi.name-access.log combined
</VirtualHost>

View File

@ -142,7 +142,7 @@
<li><p><em>Niels</em> is not that fond of JavaScript, but he can't help but play with it. He thinks it's a disease.</p></li>
<li><p>The logo (<a href="media/nohix-logo.svg">also available in SVG<a/>) is licensed under the <a href="http://creativecommons.org/licenses/by-sa/3.0/">Attribution-Share Alike 3.0 Unported license</a>. Niels is the author.</p></li>
<li><p>The PHP source code is available <a href="http://metanohi.org/:nohix/index.php">here<a/>.</p></li>
<li><p>You might not also want to check out <a href="http://metanohi.org/projects/x/">this<a/>, which was the inspiration for nohiX.</p></li>
<li><p>You might not also want to check out <a href="http://projects.metanohi.name/x/">this<a/>, which was the inspiration for nohiX.</p></li>
</ul>
<div>

View File

@ -1,13 +1,9 @@
<VirtualHost *:80>
ServerName old.projects.lcl
ServerAlias old.projects.lcl
ServerName old.projects.metanohi.name
ServerAlias www.old.projects.metanohi.name old.projects.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/oldsites
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/subsites/oldsites/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +11,9 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/old.projects.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/old.projects.metanohi.name-access.log combined
</VirtualHost>

View File

@ -1,3 +1,3 @@
<?php
header('Location: http://metanohi.org/projects/#old');
header('Location: http://metanohi.name/projects/#old');
?>

View File

@ -1,13 +1,9 @@
<VirtualHost *:80>
ServerName pictures.lcl
ServerAlias pictures.lcl
ServerName pictures.metanohi.name
ServerAlias www.pictures.metanohi.name pictures.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/pictures
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/subsites/pictures/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +11,8 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/pictures.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/pictures.metanohi.name-access.log combined
</VirtualHost>

View File

@ -1,13 +1,10 @@
<VirtualHost *:80>
ServerName projects.lcl
ServerAlias projects.lcl
ServerName projects.metanohi.name
ServerAlias www.projects.metanohi.name projects.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/projects
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/subsites/projects/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +12,8 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
ErrorLog ${APACHE_LOG_DIR}/projects.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/projects.metanohi.name-access.log combined
</VirtualHost>

View File

@ -1 +1 @@
ErrorDocument 404 /index.php
ErrorDocument 404 /.redirect.php

View File

@ -0,0 +1,3 @@
<?php
header('Location: http://metanohi.name/projects/');
?>

View File

@ -1,3 +0,0 @@
<?php
header('Location: http://metanohi.org/projects/');
?>

View File

@ -1,13 +1,9 @@
<VirtualHost *:80>
ServerName roptoligs.lcl
ServerName roptoligs.metanohi.name
ServerAlias roptoligs.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/roptoligs
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/subsites/roptoligs/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +11,8 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/roptoligs.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/roptoligs.metanohi.name-access.log combined
</VirtualHost>

View File

@ -1,13 +1,9 @@
<VirtualHost *:80>
ServerName suum.lcl
ServerName suum.metanohi.name
ServerAlias suum.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/suum
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/niels/www/meta/subsites/suum/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
@ -15,29 +11,8 @@
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/suum.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/suum.metanohi.name-access.log combined
</VirtualHost>

18
subsites/words-apache Normal file
View File

@ -0,0 +1,18 @@
<VirtualHost *:80>
ServerName words.metanohi.name
ServerAlias words.lcl
ServerAdmin ns@metanohi.org
DocumentRoot /home/niels/www/meta/subsites/words
<Directory /home/niels/www/meta/subsites/words/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/words.metanohi.name-error.log
CustomLog ${APACHE_LOG_DIR}/words.metanohi.name-access.log combined
</VirtualHost>