Browse Source

* styles & scripts

master
Alex 'AdUser' Z 8 years ago
parent
commit
223531e3cc
  1. 10
      templates/layouts/default.html.ep
  2. 2
      templates/zerobin/view.html.ep

10
templates/layouts/default.html.ep

@ -7,13 +7,9 @@
<link rel="shortcut icon" href="/theme/img/favicon.png" />
<link rel="stylesheet" href="/theme/css/default.css" type="text/css" />
<title><%= title %> - Linux во Владивостоке</title>
% my @styles = qw(default);
% my @styles = qw();
% push @styles, split(/\s+/, stash('styles') || '');
%
% my @scripts = qw(jquery);
% push @scripts, split(/\s+/, stash('scripts') || '');
% push @scripts, 'main';
%
% foreach my $style (@styles) {
<%= stylesheet "/theme/css/$style.css" %>
% }
@ -42,6 +38,10 @@
%= content
</div>
% my @scripts = qw(jquery);
% push @scripts, split(/\s+/, stash('scripts') || '');
% push @scripts, 'main';
%
% foreach my $script (@scripts) {
<%= javascript "/theme/js/$script.js" %>
% }

2
templates/zerobin/view.html.ep

@ -1,6 +1,6 @@
% layout 'default';
% title 'Zerobin -- View';
% stash 'styles' => 'hljs zerobin';
% stash 'styles' => 'hljs';
% stash 'scripts' => 'highlight';
% my $paste = (stash 'paste') || {};
<h1><%= l('View paste') %></h1>

Loading…
Cancel
Save