/usr/share/perl5/Mojolicious/templates/mojobar.html.ep is in libmojolicious-perl 2.98+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | %= javascript '/js/jquery.js'
<div id="mojobar">
%= stylesheet scoped => 'scoped', begin
#mojobar {
background-color: #1a1a1a;
background: -webkit-gradient(
linear,
0% 0%,
0% 100%,
color-stop(0%, #2a2a2a),
color-stop(100%, #000)
);
background: -moz-linear-gradient(
top,
#2a2a2a 0%,
#000 100%
);
background: linear-gradient(top, #2a2a2a 0%, #000 100%);
-moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6);
-webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6);
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.6);
height: 46px;
overflow: hidden;
position: absolute;
text-align: right;
vertical-align: middle;
width: 100%;
z-index: 1000;
}
#mojobar-logo {
float: left;
margin-left: 5em;
padding-top: 3px;
}
#mojobar-links {
display:table-cell;
float: right;
height: 60px;
margin-right: 5em;
margin-top: 1em;
}
#mojobar-links a {
color: #ccc;
font: 1em 'Helvetica Neue', Helvetica, sans-serif;
font-weight: 300;
margin-left: 0.5em;
padding-bottom: 1em;
padding-top: 1em;
text-decoration: none;
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}
#mojobar-links a:hover { color: #fff }
% end
<div id="mojobar-logo">
%= link_to 'http://mojolicio.us' => begin
%= image '/mojolicious-white.png', alt => 'Mojolicious logo'
% end
</div>
<div id="mojobar-links">
%= link_to Documentation => 'http://mojolicio.us/perldoc'
%= link_to Screencasts => 'http://mojocasts.com'
%= link_to Wiki => 'https://github.com/kraih/mojo/wiki'
%= link_to GitHub => 'https://github.com/kraih/mojo'
%= link_to CPAN => 'http://metacpan.org/release/Mojolicious/'
%= link_to MailingList => 'http://groups.google.com/group/mojolicious'
%= link_to Blog => 'http://blog.kraih.com'
%= link_to Twitter => 'http://twitter.com/kraih'
</div>
</div>
%= javascript begin
$(window).load(function () {
if (window.location.hash) {
var tweak = $(window.location.hash).offset().top - 50;
$('html, body').animate({scrollTop:tweak}, 1);
}
var mojobar = $('#mojobar');
var start = mojobar.offset().top;
var fixed;
$(window).scroll(function () {
if (!fixed && (mojobar.offset().top - $(window).scrollTop() < 0)) {
mojobar.css('top', 0);
mojobar.css('position', 'fixed');
fixed = true;
} else if (fixed && $(window).scrollTop() <= start) {
mojobar.css('position', 'absolute');
mojobar.css('top', start + 'px');
fixed = false;
}
});
});
$(document).ready(function(){
$(".mojoscroll").click(function(e){
e.preventDefault();
e.stopPropagation();
var parts = this.href.split("#");
var hash = "#" + parts[1];
var target = $(hash);
var top = target.offset().top - 50;
var old = target.attr('id');
target.attr('id', '');
location.hash = hash;
target.attr('id', old);
$('html, body').animate({scrollTop:top}, 500);
});
});
% end
|