Fix resources path when not running on a dedicated vhost

master
Daniel Berteaud 11 years ago
parent 5d6fd83712
commit 45a418b9c6
  1. 2
      public/vroom.pl
  2. 4
      templates/default/header.html.ep
  3. 14
      templates/default/index.html.ep
  4. 10
      templates/default/join.html.ep
  5. 2
      templates/default/js_common.html.ep
  6. 2
      templates/default/js_room.html.ep
  7. 4
      templates/default/public_toolbar.html.ep

@ -541,7 +541,7 @@ post '/create' => sub {
# and redirect him on it.
else{
$self->session($name => {role => 'owner'});
$self->redirect_to($self->get_url('/') . $name);
$self->redirect_to($name);
}
};

@ -6,9 +6,9 @@
<%
foreach my $css (qw(bootstrap.min.css vroom.css)){
%>
<link href="/<%= $self->get_mtime("css/$css") %>/css/<%= $css %>" rel="stylesheet" type="text/css">
<link href="<%= $self->get_url('/') %><%= $self->get_mtime("css/$css") %>/css/<%= $css %>" rel="stylesheet" type="text/css">
<% } %>
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="icon" type="image/png" href="<%= $self->get_url('/') %>img/favicon.png" />
</head>
<body>
<div id="wrap">

@ -47,7 +47,7 @@
</ol>
<div id="carouselIndexContent" class="carousel-inner">
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/lock.png" alt="<%=l 'SECURE' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/lock.png" alt="<%=l 'SECURE' %>">
<p>
<%=l 'P2P_COMMUNICATION' %>
</p>
@ -58,7 +58,7 @@
</div>
</div>
<div class="item active carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/universal.png" alt="<%=l 'WORKS_EVERYWHERE' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/universal.png" alt="<%=l 'WORKS_EVERYWHERE' %>">
<p>
<%=l 'MODERN_BROWSERS' %>
</p>
@ -69,7 +69,7 @@
</div>
</div>
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/share.png" alt="<%=l 'MULTI_USER' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/share.png" alt="<%=l 'MULTI_USER' %>">
<p>
<%=l 'THE_LIMIT_IS_YOUR_PIPE' %>
</p>
@ -80,7 +80,7 @@
</div>
</div>
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/signin.png" alt="<%=l 'NO_SIGNIN' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/signin.png" alt="<%=l 'NO_SIGNIN' %>">
<p>
<%=l 'YOU_DONT_HAVE_TO_REGISTER' %>
</p>
@ -91,7 +91,7 @@
</div>
</div>
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/clock.png" alt="<%=l 'QUICK' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/clock.png" alt="<%=l 'QUICK' %>">
<p>
<%=l 'STOP_WASTING_TIME' %>
</p>
@ -102,7 +102,7 @@
</div>
</div>
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/screen.png" alt="<%=l 'SCREEN_SHARING' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/screen.png" alt="<%=l 'SCREEN_SHARING' %>">
<p>
<%=l 'SHARE_DESKTOP_OR_WINDOW' %>
</p>
@ -113,7 +113,7 @@
</div>
</div>
<div class="item carouselIndexItem col-xs-10 col-xs-offset-1">
<img class="img-responsive carouselLogo" src="/img/chat.png" alt="<%=l 'TEXT_CHAT' %>">
<img class="img-responsive carouselLogo" src="<%= $self->get_url('/') %>img/chat.png" alt="<%=l 'TEXT_CHAT' %>">
<p>
<%=l 'SECURED_TEXT_CHAT' %>
</p>

@ -272,21 +272,21 @@
<div class="col-sm-4">
<a href="http://www.mozilla.org/firefox/" target="_blank">
<center>
<img src="/img/firefox.png" alt="Mozilla Firefox"/>
<img src="<%= $self->get_url('/') %>img/firefox.png" alt="Mozilla Firefox"/>
</center>
</a>
</div>
<div class="col-sm-4">
<a href="http://www.google.com/chrome/" target="_blank">
<center>
<img src="/img/chrome.png" alt="Google Chrome"/>
<img src="<%= $self->get_url('/') %>img/chrome.png" alt="Google Chrome"/>
</center>
</a>
</div>
<div class="col-sm-4">
<a href="http://www.opera.com" target="_blank">
<center>
<img src="/img/opera.png" alt="Opera"/>
<img src="<%= $self->get_url('/') %>img/opera.png" alt="Opera"/>
</center>
</a>
</div>
@ -305,7 +305,7 @@
<div class="modal-body">
<p><%=l 'CANT_ACCESS_WEBCAM' %></p>
<center>
<img src="/img/webcam.png" alt="Webcam"/>
<img src="<%= $self->get_url('/') %>img/webcam.png" alt="Webcam"/>
</center>
</div>
</div>
@ -331,7 +331,7 @@
</div>
</form>
</div>
<audio id="mohPlayer" src="/snd/moh/<%= $moh %>" loop></audio>
<audio id="mohPlayer" src="<%= $self->get_url('/') %>snd/moh/<%= $moh %>" loop></audio>
<div id="view" class="view row-fluid">
<div id="webRTCVideo" class="col-xs-12 col-sm-4">
<div class="col-xs-6 col-sm-12 col-lg-6 previewContainer" id="videoLocalContainer">

@ -3,5 +3,5 @@
</script>
<% foreach my $js (qw(jquery-1.11.1.min.js bootstrap.min.js notify-combined.min.js vroom.js)){
%>
<script type="text/javascript" src="/<%= $self->get_mtime("js/$js") %>/js/<%= $js %>"></script>
<script type="text/javascript" src="<%= $self->get_url('/') %><%= $self->get_mtime("js/$js") %>/js/<%= $js %>"></script>
<% } %>

@ -1,5 +1,5 @@
<%
foreach my $js (qw(simplewebrtc.bundle.js jquery.browser.min.js sprintf.js FileSaver.js)){
%>
<script type="text/javascript" src="/<%= $self->get_mtime("js/$js") %>/js/<%= $js %>"></script>
<script type="text/javascript" src="<%= $self->get_url('/') %><%= $self->get_mtime("js/$js") %>/js/<%= $js %>"></script>
<% } %>

@ -1,6 +1,6 @@
<nav class="navbar navbar-default" role="navigation">
<a href="https://github.com/dani/vroom">
<img id="forkMeRibbon" src="/img/fork_me_on_gh.png" alt="Fork me on GitHub" class="hidden-xs"/>
<img id="forkMeRibbon" src="<%= $self->get_url('/') %>img/fork_me_on_gh.png" alt="Fork me on GitHub" class="hidden-xs"/>
</a>
<div class="container-fluid">
<div class="navbar-header">
@ -10,7 +10,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<img id="navBarLogo" src="/img/logo_vroom_alpha.png" class="hidden-xs"/>
<img id="navBarLogo" src="<%= $self->get_url('/') %>img/logo_vroom_alpha.png" class="hidden-xs"/>
</div>
<div class="collapse navbar-collapse" id="toolBar">
<ul class="nav navbar-nav navbar-right">

Loading…
Cancel
Save