Skip to content

Commit

Permalink
Basic site.
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Mar 22, 2010
0 parents commit ce4634b
Show file tree
Hide file tree
Showing 22 changed files with 4,640 additions and 0 deletions.
50 changes: 50 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
TARGET = site
TEMPLATE = template

ALL = \
home \
download \
download/distributions \
download/source-repository \
download/installation \
news \

TODO = \
download/installation \
specification \
specification/python \
specification/perl \
specification/ruby \
specification/javascript \
documentation \
documentation/overview \
documentation/faq \
examples \
examples/hello-world \
community \
community/contribute \
community/wiki \
community/mailing-list \
community/chat-room \
community/authors \

ALL_TARGETS = $(ALL:%=$(TARGET)/%/index.html)
ALL_DIRS = $(ALL:%=$(TARGET)/%/)
CSS = $(TARGET)/style.css

all: $(ALL_TARGETS) $(CSS)

$(CSS): $(TEMPLATE)/style.css Makefile config.yaml
tt-render --path=$(TEMPLATE) --data=config.yaml style.css > $@

$(ALL_TARGETS): $(ALL_DIRS) $(TEMPLATE)/* config.yaml Makefile
tt-render --path=$(TEMPLATE) --data=config.yaml $(@:$(TARGET)/%/index.html=%.html) > $@

%.html: %.st
bin/render $< > $@

$(ALL_DIRS):
mkdir -p $@

clean:
rm -fr $(ALL_DIRS) $(CSS)
30 changes: 30 additions & 0 deletions bin/render
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env perl

use strict;
use warnings;
use WikiText::Socialtext::Parser;
use WikiText::HTML::Emitter;

my $html_already = 0;

my $input = do { local $/; <> };
$input =~ s/\r//g;
my $html = '';

$html = WikiText::Socialtext::Parser->new(
receiver => WikiText::HTML::Emitter->new(
callbacks => {
wikilink => sub {
my $node = shift;
my $target = $node->{attributes}{target};
return "$target/index.html";
},
},
),
)->parse($input);

print <<"...";
[% WRAPPER wrapper.html %]
$html
[% END %]
...
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
base_url: ''
1 change: 1 addition & 0 deletions htdocs
Binary file added site/images/chris-dent.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/images/favicon.ico
Binary file not shown.
Binary file added site/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/images/tile.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/index.html
10 changes: 10 additions & 0 deletions site/js/cdent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$(function() {
$("li")
.mouseenter(function() {
$(this).find('ul').show();
})
.mouseleave(function() {
$(this).find('ul').hide();
});
});

Loading

0 comments on commit ce4634b

Please sign in to comment.