Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Made an attempt to fix the hardcoded CSS urls.
  • Loading branch information
broquaint committed Apr 2, 2010
1 parent 3e6d533 commit 884a56b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
8 changes: 8 additions & 0 deletions lib/Gitalist/Controller/Root.pm
Expand Up @@ -18,6 +18,14 @@ sub index : Chained('base') PathPart('') Args(0) {
$c->stash( search_text => $c->req->param('s') || '' ) # FIXME - XSS?
}

# XXX Fragile much?
sub css : Chained('/root') PathPart('core.css') Args(0) {
my ( $self, $c ) = @_;

$c->response->content_type('text/css');
$c->stash(template => 'static/css/core.css');
}

sub base : Chained('/root') PathPart('') CaptureArgs(0) {
my($self, $c) = @_;

Expand Down
38 changes: 19 additions & 19 deletions root/static/css/core.css
Expand Up @@ -42,16 +42,16 @@ a img{
}

#content_holder{
background:transparent url(/static/i/bg_content.png) repeat-y center center;
background:transparent url([% c.uri_for('/static/i/bg_content.png') %]) repeat-y center center;
}
#content{
min-height:200px;
padding:0 12px 40px 10px;
background:transparent url(/static/i/bg_bottom.png) no-repeat center bottom;
background:transparent url([% c.uri_for('/static/i/bg_bottom.png') %]) no-repeat center bottom;
}
#content_inner{
padding-bottom:30px;
background:transparent url(/static/i/bg_top.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/bg_top.png') %]) no-repeat;
}
#logo{
margin-left:-10px;
Expand Down Expand Up @@ -105,13 +105,13 @@ a img{
text-decoration:none;
}
a#log_short{
background:#666 url(/static/i/icons/shortlog.gif) no-repeat 15px center;
background:#666 url([% c.uri_for('/static/i/icons/shortlog.gif') %]) no-repeat 15px center;
}
a#log_full{
background:#666 url(/static/i/icons/fulllog.gif) no-repeat 15px center;
background:#666 url([% c.uri_for('/static/i/icons/fulllog.gif') %]) no-repeat 15px center;
}
a#tree{
background:#666 url(/static/i/icons/tree.gif) no-repeat 15px center;
background:#666 url([% c.uri_for('/static/i/icons/tree.gif') %]) no-repeat 15px center;
}
#nav_logs li a:hover{
text-decoration:underline;
Expand Down Expand Up @@ -192,48 +192,48 @@ a:hover{
outline:none;
}
a.commit{
background:transparent url(/static/i/icons/commit.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/commit.png') %]) no-repeat;
}
a.diff{
background:transparent url(/static/i/icons/diff.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/diff.png') %]) no-repeat;
}
a.diffcurrent{
background:transparent url(/static/i/icons/diffcurrent.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/diffcurrent.png') %]) no-repeat;
}
a.tree{
background:transparent url(/static/i/icons/tree.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/tree.png') %]) no-repeat;
}
a.shortlog{
background:transparent url(/static/i/icons/shortlog.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/shortlog.png') %]) no-repeat;
}
a.longlog{
background:transparent url(/static/i/icons/longlog.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/longlog.png') %]) no-repeat;
}
a.blob{
background:transparent url(/static/i/icons/blob.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/blob.png') %]) no-repeat;
}
a.blame{
background:transparent url(/static/i/icons/blame.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/blame.png') %]) no-repeat;
}
a.history{
background:transparent url(/static/i/icons/history.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/history.png') %]) no-repeat;
}
a.raw{
background:transparent url(/static/i/icons/raw.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/raw.png') %]) no-repeat;
}
.sha1_holder{
background:transparent url(/static/i/icons/button_sha1.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/button_sha1.png') %]) no-repeat;
}
.sha1_holder_invert{
background:transparent url(/static/i/icons/button_sha1_invert.png) no-repeat;
background:transparent url([% c.uri_for('/static/i/icons/button_sha1_invert.png') %]) no-repeat;
}
.sha1_label{
padding-top:2px;
float:left;
}
.msg{
padding:5px 10px 5px 35px;
background:#f0f0f0 url(/static/i/icons/attention.png) no-repeat 10px center;
background:#f0f0f0 url([% c.uri_for('/static/i/icons/attention.png') %]) no-repeat 10px center;
border:1px solid #ddd;
margin:30px 15px;
}
Expand Down
2 changes: 1 addition & 1 deletion root/wrapper.tt2
Expand Up @@ -19,7 +19,7 @@
-%] (Gitalist)</title>
[% INCLUDE '_header_feeds.tt2' %]

<link rel="stylesheet" type="text/css" href="[% c.uri_for('/static/css/core.css') %]" />
<link rel="stylesheet" type="text/css" href="[% c.uri_for('/core.css') %]" />
<link rel="shortcut icon" href="[% c.uri_for('/static/git-favicon.png') %]" type="image/png" />
</head>

Expand Down

0 comments on commit 884a56b

Please sign in to comment.