diff --git a/dotorgredirect/words/.htaccess b/dotorgredirect/words/.htaccess new file mode 100644 index 0000000..a83a189 --- /dev/null +++ b/dotorgredirect/words/.htaccess @@ -0,0 +1 @@ +ErrorDocument 404 /index.php diff --git a/dotorgredirect/words/index.php b/dotorgredirect/words/index.php new file mode 100644 index 0000000..3bf1834 --- /dev/null +++ b/dotorgredirect/words/index.php @@ -0,0 +1,4 @@ + diff --git a/subsites/addsymlinks.sh b/subsites/addsymlinks.sh index 83178b2..899b60a 100755 --- a/subsites/addsymlinks.sh +++ b/subsites/addsymlinks.sh @@ -1,5 +1,4 @@ #!/bin/sh -ln -s ../../nohix . ln -s ../../roptoligs . ln -s ../../suum . diff --git a/subsites/films-apache b/subsites/films-apache index ab48413..267b27c 100644 --- a/subsites/films-apache +++ b/subsites/films-apache @@ -1,7 +1,7 @@ - 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 - 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/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/films.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/films.metanohi.name-access.log combined \ No newline at end of file diff --git a/subsites/hvy-apache b/subsites/hvy-apache index 140d9af..931606f 100644 --- a/subsites/hvy-apache +++ b/subsites/hvy-apache @@ -1,13 +1,9 @@ - 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 - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +11,8 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/hvy.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/hvy.metanohi.name-access.log combined diff --git a/subsites/natur-apache b/subsites/natur-apache new file mode 100644 index 0000000..2dc5bf2 --- /dev/null +++ b/subsites/natur-apache @@ -0,0 +1,20 @@ + + 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 + + Options Indexes Includes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/natur.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/natur.metanohi.name-access.log combined + + diff --git a/subsites/natur/.gitignore b/subsites/natur/.gitignore new file mode 100644 index 0000000..20d30ef --- /dev/null +++ b/subsites/natur/.gitignore @@ -0,0 +1 @@ +bak/ \ No newline at end of file diff --git a/subsites/natur/.htaccess b/subsites/natur/.htaccess new file mode 100644 index 0000000..a83a189 --- /dev/null +++ b/subsites/natur/.htaccess @@ -0,0 +1 @@ +ErrorDocument 404 /index.php diff --git a/subsites/natur/Domestic_Manners.ttf b/subsites/natur/Domestic_Manners.ttf new file mode 100644 index 0000000..31bac14 Binary files /dev/null and b/subsites/natur/Domestic_Manners.ttf differ diff --git a/subsites/natur/img/bgflow.svg b/subsites/natur/img/bgflow.svg new file mode 100644 index 0000000..8d8c831 --- /dev/null +++ b/subsites/natur/img/bgflow.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + diff --git a/subsites/natur/img/ep1.jpg b/subsites/natur/img/ep1.jpg new file mode 100644 index 0000000..a81ad41 Binary files /dev/null and b/subsites/natur/img/ep1.jpg differ diff --git a/subsites/natur/img/ep2.jpg b/subsites/natur/img/ep2.jpg new file mode 100644 index 0000000..d4b5131 Binary files /dev/null and b/subsites/natur/img/ep2.jpg differ diff --git a/subsites/natur/img/ep3.jpg b/subsites/natur/img/ep3.jpg new file mode 100644 index 0000000..9dc0393 Binary files /dev/null and b/subsites/natur/img/ep3.jpg differ diff --git a/subsites/natur/img/eyes-art-less.png b/subsites/natur/img/eyes-art-less.png new file mode 100644 index 0000000..6f88965 Binary files /dev/null and b/subsites/natur/img/eyes-art-less.png differ diff --git a/subsites/natur/img/eyes-art.png b/subsites/natur/img/eyes-art.png new file mode 100644 index 0000000..6a95e91 Binary files /dev/null and b/subsites/natur/img/eyes-art.png differ diff --git a/subsites/natur/img/eyes-original.png b/subsites/natur/img/eyes-original.png new file mode 100644 index 0000000..387c585 Binary files /dev/null and b/subsites/natur/img/eyes-original.png differ diff --git a/subsites/natur/img/eyes.jpg b/subsites/natur/img/eyes.jpg new file mode 100644 index 0000000..1b710e0 Binary files /dev/null and b/subsites/natur/img/eyes.jpg differ diff --git a/subsites/natur/img/forest-distorted.jpg b/subsites/natur/img/forest-distorted.jpg new file mode 100644 index 0000000..c814263 Binary files /dev/null and b/subsites/natur/img/forest-distorted.jpg differ diff --git a/subsites/natur/img/forest-distorted.xcf b/subsites/natur/img/forest-distorted.xcf new file mode 100644 index 0000000..fd40620 Binary files /dev/null and b/subsites/natur/img/forest-distorted.xcf differ diff --git a/subsites/natur/img/playogg.png b/subsites/natur/img/playogg.png new file mode 100644 index 0000000..05b4b97 Binary files /dev/null and b/subsites/natur/img/playogg.png differ diff --git a/subsites/natur/img/stop.png b/subsites/natur/img/stop.png new file mode 100644 index 0000000..3715a1e Binary files /dev/null and b/subsites/natur/img/stop.png differ diff --git a/subsites/natur/img/stop.svg b/subsites/natur/img/stop.svg new file mode 100644 index 0000000..4af0913 --- /dev/null +++ b/subsites/natur/img/stop.svg @@ -0,0 +1,224 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/subsites/natur/index.php b/subsites/natur/index.php new file mode 100644 index 0000000..730d454 --- /dev/null +++ b/subsites/natur/index.php @@ -0,0 +1,85 @@ + '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 = ''; + +?> + + + <?=$TITLE?> + + + + + + + + +
+
+ +
+ +
+
+
+ +
+
>
+
>
+
>
+ +

Hej / Hi

+
+ $v) + echo "

$v

\n" + ?> +
+ Nature + +

Oh no!

+
+

The language using the '' code isn't supported yet!

+

If you like, you can be the one to translate "Niels' nature" into this language. Simply contact Niels at ns@metanohi.org.

+ +
+
+
+ + diff --git a/subsites/natur/langs/da.php b/subsites/natur/langs/da.php new file mode 100644 index 0000000..ffe627f --- /dev/null +++ b/subsites/natur/langs/da.php @@ -0,0 +1,257 @@ +Narh-tur or yeah-tur? +

Lad Niels forklare om naturen

+
+

Hvad er naturen? Hvordan endte verden med at blive, som den er i +dag? Hvorfor dukker alfer normalt ikke op foran mennesker?

+

Disse spørgsmål er svære at svare på. De, ligesom mange andre +naturrelaterede spørgsmål, kræver meget tænkning, teorigenerering og +hjernevask for at svare på. Selv de største filosoffer vil aldrig være +i stand til at komme med et definitivt svar på så komplekse +spørgsmål. Selv ikke Niels er i stand til at forklare +det.

+

Natur + Niels = sandheden

+

Så, hvem er denne Niels? Og hvad med det +der natur -- hvad er det egentligt? Tja, Niels er en +person, og naturen 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.

+

Så, helt basalt: "Niels' natur" er en tv-serie -- bortset fra, at +det er mere sandsynligt, at den bliver afspillet på en computer.

+
+

Se afsnittene

+EOD; + +$CONTENT_EPISODES = <<Afsnittene +

Niels har indtil videre produceret 3 afsnit, hvoraf kun den tredje +(altså den nyeste) er oppe. Dette vil blive ændret i fremtiden.. på et +eller andet tidspunkt.

+

I alle tre afsnit snakker Niels på sin tur i skoven. Han snakker om +træer, Bigfoots, lokal opvarmning og bambus.

+

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 på engelsk. Hvis +nogen vil undertekste et afsnit i et andet sprog, så vil Niels +glædeligt acceptere. Niels kan kontaktes +på ns@metanohi.org.

+

Alle 3 afsnit er licenserede under CC BY-SA, en fri +licens. Læs mere om dette +på Detaljer-siden.


+

Hvordan man kan se afsnittene

+

Hvis du kører en moderne webbrowser, er der en chance for, at du +bare kan klikke på et afsnits billede og så se afsnittet i din +browser. Hvis du ikke er i stand til at gøre det, eller hvis du bare +ikke har lyst, så kan du altid bare downloade et afsnit for at se det +offline -- bare klik på downloadlinksene.

+

Videoerne varer mellem 25 og 35 minutter hver og +bruger OGG-formatet +-- Theora for video +og Vorbis for lyd. Du kan +læse mere om dette på Detaljer-siden.

+
+ + +

Afsnit 3: Global opvarmning

+

Dette blev optaget i december 2009.

+ + Screenshot af afsnit 3: Global
+	     opvarmning + + +

Afspil i browser (uden undertekster) +(188MB)

+

Afspil i browser (med engelske undertekster) +(188MB)

+

Download (ingen undertekster +inkluderet) (188MB)

+

Download engelske +undertekster

+ + +

Afsnit 2: Bigfoot

+

Dette blev optaget i april 2009.

+Screenshot af afsnit 2: Bigfoot +

Video ikke oppe endnu.

+ + +

Afsnit 1: Naturen omkring os

+

Dette blev optaget i december 2008.

+Screenshot af afsnit 1: Naturen omkring os +

Video ikke oppe endnu.

+EOD; + +$CONTENT_DETAILS = <<Hvordan/Hvorfor/Hvad.. +

Det har ikke været nemt at komme så 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.

+ +

Naturen

+

Filmene foregår i naturen. Det' det.

+ +

Licens, copyright

+

Copyright -- +se Wikipedias +artikel for en forklaring -- har nået et niveau, hvor kun få +mennesker har den ret. Hvis man kigger på 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 på et +stykke musik og derefter vælger at kopiere det, så det fylder 5MB på +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 må 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, så er det gået for vidt.

+

Så..

+

"Niels' natur"-afsnit er fri, i det, at alle må dele +dem. Som en bonus, er alle også tilladt at ændre på afsnittene og dele +deres ændrede afsnit, så endnu flere mennesker kan få noget ud af +det. Alt dette er muligt +vha. Creative Commons Navngivelse-Del på samme vilkår 3.0 +Unported (også kaldet Attribution-ShareAlike). Wikipedia bruger +også denne licens. "Niels' natur" -- både filmene og teksten på 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 copyleft +licens.


+

Copyright © 2008, 2009, 2010 Niels Serup
Al +tekst-, billed- (bortset fra 'stop.svg' and +'stop.png', som er fælleseje i public domain) og filmmateriale på +denne hjemmeside er tilgængeligt under Creative Commons +Navngivelse-Del på samme vilkår 3.0 Unported.


+

Billedet 'stop.svg' er taget +fra Tango Desktop Project +og så lidt ændret. Tangos standardikoner er i public domain, så 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.


+

For at kreditere mig, er et link til denne hjemmeside +('http://natur.metanohi.org/') samt mit navn ('Niels Serup') fint.

+

Forresten: Denne hjemmeside bruger en lille +smule JavaScript-kode +til at gøre nogle ting lidt mere fancy. Du skal ikke kreditere mig, +hvis du genbruger noget af koden +eller HTML-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.

+ +

Kontakt

+

Du kan kontakte mig +på ns@metanohi.org.

+ +

OGG

+Play OGG +

Niels' natur'-afsnit er +i OGG-formatet, +med Theora til video +og Vorbis 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.

+

Du kan læse mere om OGG +i manualen af +FLOSS Manuals, enten online eller som en pdf.

+

"Hvorfor ikke YouTube?"

+

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. Så selv hvis Gnash bliver perfekt, + kræver det også at videoafspilleren er det.

+

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 så privat igen + (se http://www.youtube.com/t/privacy).

+

Læs mere om fri software, alternativet til proprietær software, på + gnu.org.

+ +

Hvordan man kan afspille afsnittene

+

Hvis du bruger en rimelig ny browser, burde det være muligt at +afspille afsnittene indeni din browser. De er sat ind +vha. HTML5s <video>-tag, +som virker i Firefox 3.5+ og også nogle andre browsere. Hvis det ikke +virker, +træder Cortado-afspilleren +i kræft. Undertekster virker nok ikke med Cortado, da det er et +applet.

+

Hvis du ikke kan eller vil afspille afsnittene direkte i din +browser, så kan du bare downloade dem og se dem i din +favoritmedieafspiller.

+ +

Denne hjemmeside

+

Bortset fra, at denne side +bruger <video>-tagget, så 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 (bgflow.svg). 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, så +virker hjemmesiden stadig. Den virker også fint uden +JavaScriptkoden. Om ikke andet virker den i hvert fald ok i Lynx.

+

Jeg bruger en speciel skrifttype kaldt "Domestic Manners" nogle +steder på siden (det vises ikke nødvendigvis i alle +browsere). Her +står der, at skrifttypen er tilgængelig +under GPL. Der står +dog ikke hvilken version af GPL.

+ +

Niels

+

Jeg hedder Niels Serup, og jeg lavede disse film. Jeg bor ved siden +af en skov. Læs mere om +mig.

+ +

Redigering og encoding

+

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.

+

Redigering

+

For mit tredje afsnit tænkte jeg, at det kunne være rart at klippe +lidt. Jeg fandt PiTiVi. Det er +måske stadig ret nyt, men det var meget nemt at arbejde med.

+

Encoding

+

PiTiVi kan også bruges til at "render" ens video, men på mysterisk +vis blev det ved med at crashe og stoppe på underlige tidspunkter på +min computer. Mens jeg kiggede efter hjælp, lagde jeg mærke til, +at Kino ikke havde nogen +problemer med at lave en endelig videofil. For at på Kino til at læse +min PiTivifil lavede jeg en converter. De to videoprogrammer bruger +forskellige formater, så det var nødvendigt. Du kan hente min +converter her.

+

For at ændre mine film til OGG bruger +jeg ffmpeg2theora. Min +kommando ser ud nogenlunde sådan her:

+ +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 + + +

+

HVORFOR???

+

Hvorfor ikke?

+ +EOD; +?> diff --git a/subsites/natur/langs/en.php b/subsites/natur/langs/en.php new file mode 100644 index 0000000..58688c0 --- /dev/null +++ b/subsites/natur/langs/en.php @@ -0,0 +1,255 @@ +Nay-ture or yeah-ture? +

Let Niels explain nature

+
+

What is nature? How did the world end up being what it is today? +Why do elfs generally not appear before humans?

+

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 Niels is able to explain it.

+

Nature + Niels = Truth

+

So, who is this Niels? And what about this nature +-- what is it really? Well, Niels is a person, +and nature 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.

+

So, basically, "Niels' nature" is a TV show -- except that it is +more likely to be played on a computer.


+

Watch the episodes

+EOD; + +$CONTENT_EPISODES = <<The eps +

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.

+

In all of the three episodes Niels talks as he walks. He talks +about trees, Bigfeet, local warming and bamboos.

+

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 ns@metanohi.org.

+

Note that all of the episodes are licensed under CC BY-SA, +a free license. Read more about this on +the Details page.


+

How to watch

+

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.

+

The videos last between 25 and 35 minutes each and are encoded into +the OGG format, +using Theora for video +and Vorbis for sound. You +can read more about this on the Details +page.


+ + +

Episode 3: Global warming

+

This was recorded in December 2009.

+ + Screenshot of episode 3: Global
+	warming + + +

Play in browser (without subtitles) +(188MB)

+

Play in browser (with English subtitles) +(188MB)

+

Download (no included +subtitles) (188MB)

+

Download English +subtitles

+ + +

Episode 2: Bigfoot

+

This was recorded in April 2009.

+Screenshot of episode 2: Bigfoot +

Video not up yet.

+ + +

Episode 1: The nature around us

+

This was recorded in December 2008.

+Screenshot of episode 1: The nature around us +

Video not up yet.

+EOD; + +$CONTENT_DETAILS = <<How/why/what.. +

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.

+ +

Nature

+

The films take place in the nature. That's it.

+ +

License, copyright

+

Copyright -- +see Wikipedia's +article 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 illegal 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.

+

So..

+

"Niels' nature" episodes are free, 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 Creative Commons Attribution-ShareAlike 3.0 Unported +license (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 copyleft +license.


+

Copyright © 2008, 2009 Niels Serup
All +text, pictures (except 'stop.svg' and +'stop.png', which are in the public domain) and films on this +website are available under the Creative Commons +Attribution-ShareAlike 3.0 Unported license.


+

The image 'stop.svg' is taken from +the Tango Desktop Project +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.

+
+

To attribute me, a link to this website +('http://nature.metanohi.org/') and a string with my name ('Niels +Serup') is enough.

+

Note that this website uses a small amount +of JavaScript +code to make some things a bit fancier. You shouldn't attribute me +when reusing code +and HTML formatting +from this website. I find it too trivial to have it require a real +copyleft license; just copy it as you wish.

+ +

Contact

+

You can contact me +at ns@metanohi.org.

+ +

OGG

+Play OGG +

"Niels' nature" episodes are encoded into +the OGG format, +using Theora for video +and Vorbis 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.

+

You can read more about OGG in +the manual +published by FLOSS Manuals, either online or as a pdf.

+

"Why not just YouTube?"

+

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.

+

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 http://www.youtube.com/t/privacy).

+

Read more about free software, the alternative to proprietary + software, on gnu.org.

+ + +

How to play the episodes

+

If you're using a fairly new browser, it should be possible to play +the episodes inside your browser. They are embedded using +the <video> +tag of HTML5, which is supported in Firefox 3.5+ as well as other +browsers. As a fallback, +the Cortado Java player +is used. Subtitles are unlikely to work with Cortado, because it's an +applet.

+

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.

+ +

This website

+

Apart from using the <video> 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 (bgflow.svg) 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.

+

I'm using a special font called "Domestic Manners" in some areas of +the website (it might not show on all browsers). According +to this +site, the font +is GPL'd, though it +doesn't state what version of the GPL it's under.

+ +

Denmark

+

Denmark is a small, cold country.

+ +

Niels

+

My name is Niels Serup, and I created these films. I live next to a +forest. Read more about +me.

+ +

Editing and encoding

+

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.

+

Editing

+

For my third episode I thought to myself that it could be nice to + do a bit of cutting. I + found PiTiVi. While still in + its early fases, I found it to be very easy to work with.

+

Encoding

+

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 Kino +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 here.

+

To convert my films to OGG I +use ffmpeg2theora. Something +like this:

+ +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 + + +

+

WHY???

+

Why not?

+ +EOD; +?> diff --git a/subsites/natur/script.js b/subsites/natur/script.js new file mode 100644 index 0000000..0359160 --- /dev/null +++ b/subsites/natur/script.js @@ -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() +} diff --git a/subsites/natur/style.css b/subsites/natur/style.css new file mode 100644 index 0000000..255d012 --- /dev/null +++ b/subsites/natur/style.css @@ -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; +} diff --git a/subsites/natur/subtitler-test.htm b/subsites/natur/subtitler-test.htm new file mode 100644 index 0000000..ce0d1a3 --- /dev/null +++ b/subsites/natur/subtitler-test.htm @@ -0,0 +1,42 @@ + + + + Test + + + + + + + + diff --git a/subsites/natur/subtitler.js b/subsites/natur/subtitler.js new file mode 100644 index 0000000..f58eda2 --- /dev/null +++ b/subsites/natur/subtitler.js @@ -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 +} diff --git a/subsites/nohix-apache b/subsites/nohix-apache index 55cd4e0..ec24421 100644 --- a/subsites/nohix-apache +++ b/subsites/nohix-apache @@ -1,13 +1,9 @@ - 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 - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +11,8 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/nohix.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/nohix.metanohi.name-access.log combined + diff --git a/subsites/nohix/index.php b/subsites/nohix/index.php index 9cb45e7..6cce8f2 100644 --- a/subsites/nohix/index.php +++ b/subsites/nohix/index.php @@ -142,7 +142,7 @@
  • Niels is not that fond of JavaScript, but he can't help but play with it. He thinks it's a disease.

  • The logo (also available in SVG) is licensed under the Attribution-Share Alike 3.0 Unported license. Niels is the author.

  • The PHP source code is available here.

  • -
  • You might not also want to check out this, which was the inspiration for nohiX.

  • +
  • You might not also want to check out this, which was the inspiration for nohiX.

  • diff --git a/subsites/oldsites-apache b/subsites/oldsites-apache index 5c8abb5..0f1e39b 100644 --- a/subsites/oldsites-apache +++ b/subsites/oldsites-apache @@ -1,13 +1,9 @@ - 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 - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +11,9 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/old.projects.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/old.projects.metanohi.name-access.log combined + diff --git a/subsites/oldsites/index.php b/subsites/oldsites/index.php index 2909891..0456394 100644 --- a/subsites/oldsites/index.php +++ b/subsites/oldsites/index.php @@ -1,3 +1,3 @@ diff --git a/subsites/pictures-apache b/subsites/pictures-apache index 49d0d51..efe8962 100644 --- a/subsites/pictures-apache +++ b/subsites/pictures-apache @@ -1,13 +1,9 @@ - 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 - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +11,8 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/pictures.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/pictures.metanohi.name-access.log combined diff --git a/subsites/projects-apache b/subsites/projects-apache index 2391de2..d29d166 100644 --- a/subsites/projects-apache +++ b/subsites/projects-apache @@ -1,13 +1,10 @@ - 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 - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +12,8 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - + ErrorLog ${APACHE_LOG_DIR}/projects.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/projects.metanohi.name-access.log combined diff --git a/subsites/projects/.htaccess b/subsites/projects/.htaccess index a83a189..29a2a6a 100644 --- a/subsites/projects/.htaccess +++ b/subsites/projects/.htaccess @@ -1 +1 @@ -ErrorDocument 404 /index.php +ErrorDocument 404 /.redirect.php diff --git a/subsites/projects/.redirect.php b/subsites/projects/.redirect.php new file mode 100644 index 0000000..3682b5b --- /dev/null +++ b/subsites/projects/.redirect.php @@ -0,0 +1,3 @@ + diff --git a/subsites/projects/index.php b/subsites/projects/index.php deleted file mode 100644 index 30c0fae..0000000 --- a/subsites/projects/index.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/subsites/roptoligs-apache b/subsites/roptoligs-apache index 1186a0b..41f8caa 100644 --- a/subsites/roptoligs-apache +++ b/subsites/roptoligs-apache @@ -1,13 +1,9 @@ - ServerName roptoligs.lcl + ServerName roptoligs.metanohi.name ServerAlias roptoligs.lcl ServerAdmin ns@metanohi.org DocumentRoot /home/niels/www/meta/subsites/roptoligs - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +11,8 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/roptoligs.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/roptoligs.metanohi.name-access.log combined + diff --git a/subsites/suum-apache b/subsites/suum-apache index 22eec69..63742f2 100644 --- a/subsites/suum-apache +++ b/subsites/suum-apache @@ -1,13 +1,9 @@ - ServerName suum.lcl + ServerName suum.metanohi.name ServerAlias suum.lcl ServerAdmin ns@metanohi.org DocumentRoot /home/niels/www/meta/subsites/suum - - Options FollowSymLinks - AllowOverride None - Options Indexes Includes FollowSymLinks MultiViews AllowOverride All @@ -15,29 +11,8 @@ allow from all - ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ - - AllowOverride None - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - Order allow,deny - Allow from all - - - 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/" - - Options Indexes MultiViews FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all - Allow from 127.0.0.0/255.0.0.0 ::1/128 - + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/suum.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/suum.metanohi.name-access.log combined diff --git a/subsites/words-apache b/subsites/words-apache new file mode 100644 index 0000000..61c3d31 --- /dev/null +++ b/subsites/words-apache @@ -0,0 +1,18 @@ + + ServerName words.metanohi.name + ServerAlias words.lcl + ServerAdmin ns@metanohi.org + + DocumentRoot /home/niels/www/meta/subsites/words + + Options Indexes Includes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/words.metanohi.name-error.log + CustomLog ${APACHE_LOG_DIR}/words.metanohi.name-access.log combined + + diff --git a/subsites/projects/words/.htaccess b/subsites/words/.htaccess similarity index 100% rename from subsites/projects/words/.htaccess rename to subsites/words/.htaccess diff --git a/subsites/projects/words/data/1261236202 b/subsites/words/data/1261236202 similarity index 100% rename from subsites/projects/words/data/1261236202 rename to subsites/words/data/1261236202 diff --git a/subsites/projects/words/data/1261601736 b/subsites/words/data/1261601736 similarity index 100% rename from subsites/projects/words/data/1261601736 rename to subsites/words/data/1261601736 diff --git a/subsites/projects/words/data/1261601803 b/subsites/words/data/1261601803 similarity index 100% rename from subsites/projects/words/data/1261601803 rename to subsites/words/data/1261601803 diff --git a/subsites/projects/words/data/1261939098 b/subsites/words/data/1261939098 similarity index 100% rename from subsites/projects/words/data/1261939098 rename to subsites/words/data/1261939098 diff --git a/subsites/projects/words/data/1262258778 b/subsites/words/data/1262258778 similarity index 100% rename from subsites/projects/words/data/1262258778 rename to subsites/words/data/1262258778 diff --git a/subsites/projects/words/data/1262587110 b/subsites/words/data/1262587110 similarity index 100% rename from subsites/projects/words/data/1262587110 rename to subsites/words/data/1262587110 diff --git a/subsites/projects/words/data/1262867437 b/subsites/words/data/1262867437 similarity index 100% rename from subsites/projects/words/data/1262867437 rename to subsites/words/data/1262867437 diff --git a/subsites/projects/words/data/1262952166 b/subsites/words/data/1262952166 similarity index 100% rename from subsites/projects/words/data/1262952166 rename to subsites/words/data/1262952166 diff --git a/subsites/projects/words/data/1263133664 b/subsites/words/data/1263133664 similarity index 100% rename from subsites/projects/words/data/1263133664 rename to subsites/words/data/1263133664 diff --git a/subsites/projects/words/data/1263133929 b/subsites/words/data/1263133929 similarity index 100% rename from subsites/projects/words/data/1263133929 rename to subsites/words/data/1263133929 diff --git a/subsites/projects/words/data/1263815455 b/subsites/words/data/1263815455 similarity index 100% rename from subsites/projects/words/data/1263815455 rename to subsites/words/data/1263815455 diff --git a/subsites/projects/words/data/1264663488 b/subsites/words/data/1264663488 similarity index 100% rename from subsites/projects/words/data/1264663488 rename to subsites/words/data/1264663488 diff --git a/subsites/projects/words/data/1264664016 b/subsites/words/data/1264664016 similarity index 100% rename from subsites/projects/words/data/1264664016 rename to subsites/words/data/1264664016 diff --git a/subsites/projects/words/data/1264693156 b/subsites/words/data/1264693156 similarity index 100% rename from subsites/projects/words/data/1264693156 rename to subsites/words/data/1264693156 diff --git a/subsites/projects/words/data/1264851757 b/subsites/words/data/1264851757 similarity index 100% rename from subsites/projects/words/data/1264851757 rename to subsites/words/data/1264851757 diff --git a/subsites/projects/words/data/1264870454 b/subsites/words/data/1264870454 similarity index 100% rename from subsites/projects/words/data/1264870454 rename to subsites/words/data/1264870454 diff --git a/subsites/projects/words/data/1265315369 b/subsites/words/data/1265315369 similarity index 100% rename from subsites/projects/words/data/1265315369 rename to subsites/words/data/1265315369 diff --git a/subsites/projects/words/data/1265315436 b/subsites/words/data/1265315436 similarity index 100% rename from subsites/projects/words/data/1265315436 rename to subsites/words/data/1265315436 diff --git a/subsites/projects/words/data/1265376595 b/subsites/words/data/1265376595 similarity index 100% rename from subsites/projects/words/data/1265376595 rename to subsites/words/data/1265376595 diff --git a/subsites/projects/words/data/1267471342 b/subsites/words/data/1267471342 similarity index 100% rename from subsites/projects/words/data/1267471342 rename to subsites/words/data/1267471342 diff --git a/subsites/projects/words/data/1268722667 b/subsites/words/data/1268722667 similarity index 100% rename from subsites/projects/words/data/1268722667 rename to subsites/words/data/1268722667 diff --git a/subsites/projects/words/data/1269462121 b/subsites/words/data/1269462121 similarity index 100% rename from subsites/projects/words/data/1269462121 rename to subsites/words/data/1269462121 diff --git a/subsites/projects/words/data/1269719179 b/subsites/words/data/1269719179 similarity index 100% rename from subsites/projects/words/data/1269719179 rename to subsites/words/data/1269719179 diff --git a/subsites/projects/words/data/1269719193 b/subsites/words/data/1269719193 similarity index 100% rename from subsites/projects/words/data/1269719193 rename to subsites/words/data/1269719193 diff --git a/subsites/projects/words/data/1269719207 b/subsites/words/data/1269719207 similarity index 100% rename from subsites/projects/words/data/1269719207 rename to subsites/words/data/1269719207 diff --git a/subsites/projects/words/data/1269720734 b/subsites/words/data/1269720734 similarity index 100% rename from subsites/projects/words/data/1269720734 rename to subsites/words/data/1269720734 diff --git a/subsites/projects/words/data/1269727939 b/subsites/words/data/1269727939 similarity index 100% rename from subsites/projects/words/data/1269727939 rename to subsites/words/data/1269727939 diff --git a/subsites/projects/words/data/1269820763 b/subsites/words/data/1269820763 similarity index 100% rename from subsites/projects/words/data/1269820763 rename to subsites/words/data/1269820763 diff --git a/subsites/projects/words/data/1269820885 b/subsites/words/data/1269820885 similarity index 100% rename from subsites/projects/words/data/1269820885 rename to subsites/words/data/1269820885 diff --git a/subsites/projects/words/data/1269892094 b/subsites/words/data/1269892094 similarity index 100% rename from subsites/projects/words/data/1269892094 rename to subsites/words/data/1269892094 diff --git a/subsites/projects/words/data/1269901241 b/subsites/words/data/1269901241 similarity index 100% rename from subsites/projects/words/data/1269901241 rename to subsites/words/data/1269901241 diff --git a/subsites/projects/words/data/1270078531 b/subsites/words/data/1270078531 similarity index 100% rename from subsites/projects/words/data/1270078531 rename to subsites/words/data/1270078531 diff --git a/subsites/projects/words/data/1270173663 b/subsites/words/data/1270173663 similarity index 100% rename from subsites/projects/words/data/1270173663 rename to subsites/words/data/1270173663 diff --git a/subsites/projects/words/data/1270174114 b/subsites/words/data/1270174114 similarity index 100% rename from subsites/projects/words/data/1270174114 rename to subsites/words/data/1270174114 diff --git a/subsites/projects/words/data/1270219723 b/subsites/words/data/1270219723 similarity index 100% rename from subsites/projects/words/data/1270219723 rename to subsites/words/data/1270219723 diff --git a/subsites/projects/words/data/1270316742 b/subsites/words/data/1270316742 similarity index 100% rename from subsites/projects/words/data/1270316742 rename to subsites/words/data/1270316742 diff --git a/subsites/projects/words/data/1270316785 b/subsites/words/data/1270316785 similarity index 100% rename from subsites/projects/words/data/1270316785 rename to subsites/words/data/1270316785 diff --git a/subsites/projects/words/data/1270316798 b/subsites/words/data/1270316798 similarity index 100% rename from subsites/projects/words/data/1270316798 rename to subsites/words/data/1270316798 diff --git a/subsites/projects/words/data/1270417438 b/subsites/words/data/1270417438 similarity index 100% rename from subsites/projects/words/data/1270417438 rename to subsites/words/data/1270417438 diff --git a/subsites/projects/words/data/1270933129 b/subsites/words/data/1270933129 similarity index 100% rename from subsites/projects/words/data/1270933129 rename to subsites/words/data/1270933129 diff --git a/subsites/projects/words/data/1271840975 b/subsites/words/data/1271840975 similarity index 100% rename from subsites/projects/words/data/1271840975 rename to subsites/words/data/1271840975 diff --git a/subsites/projects/words/data/1273256987 b/subsites/words/data/1273256987 similarity index 100% rename from subsites/projects/words/data/1273256987 rename to subsites/words/data/1273256987 diff --git a/subsites/projects/words/data/1274476571 b/subsites/words/data/1274476571 similarity index 100% rename from subsites/projects/words/data/1274476571 rename to subsites/words/data/1274476571 diff --git a/subsites/projects/words/data/1279182016 b/subsites/words/data/1279182016 similarity index 100% rename from subsites/projects/words/data/1279182016 rename to subsites/words/data/1279182016 diff --git a/subsites/projects/words/data/1279182169 b/subsites/words/data/1279182169 similarity index 100% rename from subsites/projects/words/data/1279182169 rename to subsites/words/data/1279182169 diff --git a/subsites/projects/words/data/1280866754 b/subsites/words/data/1280866754 similarity index 100% rename from subsites/projects/words/data/1280866754 rename to subsites/words/data/1280866754 diff --git a/subsites/projects/words/data/1280866768 b/subsites/words/data/1280866768 similarity index 100% rename from subsites/projects/words/data/1280866768 rename to subsites/words/data/1280866768 diff --git a/subsites/projects/words/data/1281016498 b/subsites/words/data/1281016498 similarity index 100% rename from subsites/projects/words/data/1281016498 rename to subsites/words/data/1281016498 diff --git a/subsites/projects/words/data/1283533478 b/subsites/words/data/1283533478 similarity index 100% rename from subsites/projects/words/data/1283533478 rename to subsites/words/data/1283533478 diff --git a/subsites/projects/words/data/1284212663 b/subsites/words/data/1284212663 similarity index 100% rename from subsites/projects/words/data/1284212663 rename to subsites/words/data/1284212663 diff --git a/subsites/projects/words/data/1284932560 b/subsites/words/data/1284932560 similarity index 100% rename from subsites/projects/words/data/1284932560 rename to subsites/words/data/1284932560 diff --git a/subsites/projects/words/data/1287692197 b/subsites/words/data/1287692197 similarity index 100% rename from subsites/projects/words/data/1287692197 rename to subsites/words/data/1287692197 diff --git a/subsites/projects/words/data/1295193419 b/subsites/words/data/1295193419 similarity index 100% rename from subsites/projects/words/data/1295193419 rename to subsites/words/data/1295193419 diff --git a/subsites/projects/words/data/1296682829 b/subsites/words/data/1296682829 similarity index 100% rename from subsites/projects/words/data/1296682829 rename to subsites/words/data/1296682829 diff --git a/subsites/projects/words/index.php b/subsites/words/index.php similarity index 100% rename from subsites/projects/words/index.php rename to subsites/words/index.php diff --git a/subsites/projects/words/saved_crypt_pass.php b/subsites/words/saved_crypt_pass.php similarity index 100% rename from subsites/projects/words/saved_crypt_pass.php rename to subsites/words/saved_crypt_pass.php diff --git a/subsites/projects/words/upload.php b/subsites/words/upload.php similarity index 100% rename from subsites/projects/words/upload.php rename to subsites/words/upload.php