You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/06/03 14:31:27 UTC
svn commit: r1131012 - in /libcloud/site/trunk: content/other/ lib/path.pm
lib/view.pm templates/basic.html
Author: tomaz
Date: Fri Jun 3 12:31:27 2011
New Revision: 1131012
URL: http://svn.apache.org/viewvc?rev=1131012&view=rev
Log:
Remove diretory which is not needed anymore.
Removed:
libcloud/site/trunk/content/other/
Modified:
libcloud/site/trunk/lib/path.pm
libcloud/site/trunk/lib/view.pm
libcloud/site/trunk/templates/basic.html
Modified: libcloud/site/trunk/lib/path.pm
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/lib/path.pm?rev=1131012&r1=1131011&r2=1131012&view=diff
==============================================================================
--- libcloud/site/trunk/lib/path.pm (original)
+++ libcloud/site/trunk/lib/path.pm Fri Jun 3 12:31:27 2011
@@ -10,6 +10,7 @@ use warnings;
our @patterns = (
[ qr!index\.mdtext$!, basic => { template => "index.html" } ],
+ [ qr!supported_providers\.json$!, providers => { template => "providers.html" } ],
[ qr!\.mdtext$!, basic => { template => "basic.html" } ],
[ qr!/sitemap\.html$!, sitemap => { headers => { title => "Sitemap" }} ],
[ qr!/exports/index\.html$!, exports => {} ],
Modified: libcloud/site/trunk/lib/view.pm
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/lib/view.pm?rev=1131012&r1=1131011&r2=1131012&view=diff
==============================================================================
--- libcloud/site/trunk/lib/view.pm (original)
+++ libcloud/site/trunk/lib/view.pm Fri Jun 3 12:31:27 2011
@@ -29,12 +29,12 @@ management in path.pm.
=cut
-use strict;
use warnings;
use Carp;
use Dotiac::DTL;
use Dotiac::DTL::Addon::markup;
use ASF::Util qw( read_text_file );
+use JSON;
BEGIN { push @Dotiac::DTL::TEMPLATE_DIRS, "templates"; }
@@ -52,6 +52,22 @@ sub basic {
return ($rendered, 'html', \%args);
}
+sub providers {
+ my %args = @_;
+ my $template_path = "templates/$args{template}";
+
+ #$args{path} =~ s/\.mdtext$/\.html/;
+ my $filepath = "content$args{path}";
+
+ read_text_file($filepath, \%args);
+ my $json = new JSON;
+ my %parsed = %{$json->utf8->decode($args{content})};
+ $args{providers} = $parsed;
+
+ my $rendered = Dotiac::DTL->new($template_path)->render(\%parsed);
+ return ($rendered, 'html', \%args);
+}
+
# A view which generates a sitemap.
sub sitemap {
Modified: libcloud/site/trunk/templates/basic.html
URL: http://svn.apache.org/viewvc/libcloud/site/trunk/templates/basic.html?rev=1131012&r1=1131011&r2=1131012&view=diff
==============================================================================
--- libcloud/site/trunk/templates/basic.html (original)
+++ libcloud/site/trunk/templates/basic.html Fri Jun 3 12:31:27 2011
@@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
+ <script src="/js/jquery.boxy.js" type="text/javascript"></script>
<script src="js/libcloud.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/screen.css" type="text/css">
<link rel="stylesheet" href="css/libcloud.css" type="text/css">