Changeset 367


Ignore:
Timestamp:
Apr 1, 2016, 1:01:31 AM (3 years ago)
Author:
lars@…
Message:

Use relative_path_to instead of passing a custom "loc" variable around

Location:
www
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • www

    • Property svn:ignore
      •  

        old new  
        55output
        66tmp
        7 static
         7static/css/style.css
         8static/fonts/bootstrap/glyphicons-halflings-regular.eot
         9static/fonts/bootstrap/glyphicons-halflings-regular.svg
         10static/fonts/bootstrap/glyphicons-halflings-regular.ttf
         11static/fonts/bootstrap/glyphicons-halflings-regular.woff
         12static/fonts/bootstrap/glyphicons-halflings-regular.woff2
         13static/js/bootstrap.js
         14static/js/jquery.min.js
  • www/content/anrw/2016/cfp.haml

    r362 r367  
    172172
    173173%h2 Important Dates
    174 = render "/anrw/2016/dates_.*", :loc => "#{@item[:loc]}"
     174= render "/anrw/2016/dates_.*"
  • www/content/groups.haml

    r356 r367  
    77%p These #{$rgs.count} Research Groups are currently chartered:
    88
    9 = render "/rgtiles_.*", :loc => ""
     9= render "/rgtiles_.*"
    1010
    1111%h2 New Proposed Research Groups
     
    2222%p These #{$oldrgs.count} Research Groups were chartered in the past and have since concluded their activities:
    2323
    24 = render "/oldrgtiles_.*", :loc => ""
     24= render "/oldrgtiles_.*"
  • www/content/index.haml

    r358 r367  
    5454    %p These #{$rgs.count} Research Groups are currently chartered:
    5555
    56     = render "/rgtiles_.*", :loc => ""
     56    = render "/rgtiles_.*"
    5757
    5858
  • www/layouts/anrw.haml

    r362 r367  
    11- year = item.path.split("/")[2]
    2 - loc = @item.path =~ /^\/[^\/]*$/ ? "" : @item.path.gsub(/\w+\.\w+$/, "").gsub(/[^\/\.]+/, "..").gsub(/^\//, "")
    32
    43!!! 5
    54%html{ :lang => "en" }
    6   = render "/head_.*", :loc => "#{loc}"
     5  = render "/head_.*"
    76
    87  %body
     
    3534      = yield
    3635
    37     = render "/footer_.*", :loc => "#{loc}"
    38     = render "/scripts_.*", :loc => "#{loc}"
     36    = render "/footer_.*"
     37    = render "/scripts_.*"
  • www/layouts/anrw/2016/supporters_.haml

    r359 r367  
    1 - loc = @item.path =~ /^\/[^\/]*$/ ? "" : @item.path.gsub(/\w+\.\w+$/, "").gsub(/[^\/\.]+/, "..").gsub(/^\//, "")
    2 
    31%p
    42  The ANRW '16 receives financial support from these organizations:
     
    86    %span.valign-helper
    97    %a{ :href => "https://www.akamai.com/"}
    10       %img.valign{ :src => "#{loc}img/Akamai-Logo-RGB.png", :alt => "Akamai", :height => 75 }
     8      %img.valign{ :src => relative_path_to("/img/Akamai-Logo-RGB.png"), :alt => "Akamai", :height => 75 }
    119  .col-sm-4.logo
    1210    %span.valign-helper
    1311    %a{ :href => "https://ssiclops.eu/"}
    14       %img.valign{ :src => "#{loc}img/SSICLOPS_Logo_H_2c.png", :alt => "SSICLOPS Project", :height => 50 }
     12      %img.valign{ :src => relative_path_to("/img/SSICLOPS_Logo_H_2c.png"), :alt => "SSICLOPS Project", :height => 50 }
    1513  .col-sm-4.logo
    1614    %span.valign-helper
    1715    %a{ :href => "https://www.netapp.com/"}
    18       %img.valign{ :src => "#{loc}img/na_logo_hrz_2c_rgb.jpg", :alt => "NetApp", :height => 60 }
     16      %img.valign{ :src => relative_path_to("/img/na_logo_hrz_2c_rgb.jpg"), :alt => "NetApp", :height => 60 }
    1917
    2018%p
  • www/layouts/anrw/sponsors_.haml

    r359 r367  
    1 - loc = @item.path =~ /^\/[^\/]*$/ ? "" : @item.path.gsub(/\w+\.\w+$/, "").gsub(/[^\/\.]+/, "..").gsub(/^\//, "")
    2 
    31- if not @noblurb
    42  %p
     
    108    -# %p
    119    -#   %a{ :href => "http://www.acm.org/"}
    12     -#     %img{ :src => "#{loc}img/ACM-In-Cooperation_medium.jpg", :alt => "ACM", :height => 75 }
     10    -#     %img{ :src => relative_path_to("/img/ACM-In-Cooperation_medium.jpg"), :alt => "ACM", :height => 75 }
    1311    %a{ :href => "http://www.sigcomm.org/"}
    14       %img.valign{ :src => "#{loc}img/acm.png", :alt => "SIGCOMM", :height => 75 }
     12      %img.valign{ :src => relative_path_to("/img/acm.png"), :alt => "SIGCOMM", :height => 75 }
    1513  .col-sm-4.logo
    1614    %span.valign-helper
    17     %a{ :href => "#{loc}"}
    18       %img.valign{ :src => "#{loc}img/irtf.png", :alt => "IRTF", :height => 75 }
     15    %a{ :href => relative_path_to("/")}
     16      %img.valign{ :src => relative_path_to("/img/irtf.png"), :alt => "IRTF", :height => 75 }
    1917  .col-sm-4.logo
    2018    %span.valign-helper
    2119    %a{ :href => "https://www.internetsociety.org/"}
    22       %img.valign{ :src => "#{loc}img/isoc.png", :alt => "Internet Society", :height => 70 }
     20      %img.valign{ :src => relative_path_to("/img/isoc.png"), :alt => "Internet Society", :height => 70 }
  • www/layouts/default.haml

    r356 r367  
    22- title = @item[:title] ? @item[:title] : $rgs[id].name
    33- abbrev = @item[:title] ? "" :$rgs[id].acronym
    4 - loc = @item.path =~ /^\/[^\/]*$/ ? "" : @item.path.gsub(/\w+\.\w+$/, "").gsub(/[^\/\.]+/, "..").gsub(/^\//, "")
    54
    65-# encoding: utf-8
    76!!! 5
    87%html{ :lang => "en" }
    9   = render "/head_.*", :concluded => false, :loc => "#{loc}"
     8  = render "/head_.*", :concluded => false
    109
    1110  %body.irtf
    12     = render "/menu_.*", :loc => "#{loc}"
     11    = render "/menu_.*"
    1312    .container-fluid
    1413      .row
     
    2726          .col-sm-4.hidden-xs
    2827            %a{:href => "./"}
    29               %img.img-responsive.pull-right{:src => "#{loc}img/irtf.png",
     28              %img.img-responsive.pull-right{:src => relative_path_to("/img/irtf.png"),
    3029                   :alt => "Internet Research Task Force (IRTF)"}
    3130
     
    3534            = yield
    3635          .col-sm-4.rightbar
    37             = render "/rightbar_.*", :loc => "#{loc}"
     36            = render "/rightbar_.*"
    3837      - else
    3938        = yield
    4039
    41     = render "/footer_.*", :loc => "#{loc}", :irtf => true
    42     = render "/scripts_.*", :loc => "#{loc}"
     40    = render "/footer_.*", :irtf => true
     41    = render "/scripts_.*"
  • www/layouts/footer_.haml

    r319 r367  
    77        .col-xs-2.text-muted.small
    88          %a{ :href => "https://ietf.org/" }
    9             %img.img-responsive{ :src => @loc + "img/ietf.png", :width => 100,
     9            %img.img-responsive{ :src => relative_path_to("/img/ietf.png"), :width => 100,
    1010                  :alt => "Internet Engineering Task Force (IETF)" }
    1111        .col-xs-2.text-muted.small
    1212          %a{ :href => "https://www.internetsociety.org/" }
    13             %img.img-responsive{ :src => @loc + "img/isoc.png", :width => 100,
     13            %img.img-responsive{ :src => relative_path_to("/img/isoc.png"), :width => 100,
    1414                  :alt => "Internet Society (ISOC)" }
    1515      - else
  • www/layouts/head_.haml

    r309 r367  
    1717  %title= strip_html(title)
    1818
    19   %link{ :rel => "stylesheet", :href => @loc + "css/style.css" }
     19  %link{ :rel => "stylesheet", :href => relative_path_to("/css/style.css") }
  • www/layouts/historic.haml

    r314 r367  
    11- rg = $oldrgs[item.identifier.without_ext.sub("/concluded/", "").tr("/", "")]
    2 - loc = @item.path =~ /^\/[^\/]*$/ ? "" : @item.path.gsub(/\w+\.\w+$/, "").gsub(/[^\/\.]+/, "..").gsub(/^\//, "")
    32
    43-# encoding: utf-8
    54!!! 5
    65%html{ :lang => "en" }
    7   = render "/head_.*", :concluded => true, :loc => "#{loc}"
     6  = render "/head_.*", :concluded => true
    87
    98  %body.irtf
    10     = render "/menu_.*", :loc => "#{loc}"
     9    = render "/menu_.*"
    1110    .ribbon.hidden-xs
    1211      %p Concluded
     
    4342        -# For RGs that concluded since the web site redesign, we have the rightbar info.
    4443        - if rg.respond_to?("name")
    45           = render "/historicinfo_.*", :loc => "#{loc}"
     44          = render "/historicinfo_.*"
    4645
    47     = render "/footer_.*", :loc => "#{loc}", :irtf => true
    48     = render "/scripts_.*", :loc => "#{loc}"
     46    = render "/footer_.*", :irtf => true
     47    = render "/scripts_.*"
  • www/layouts/oldrgtiles_.haml

    r261 r367  
    22  - $oldrgs.keys.sort.each do |rg|
    33    .col-lg-2.col-md-3.col-sm-4.col-xs-6
    4       %a{ :href => @loc + "concluded/#{rg}" }
    5         .thumbnail
     4      %a{ :href => relative_path_to("/concluded/#{rg}") }
     5        .thumbnail.rg
    66          .text-center
    77            %b= rg.upcase
  • www/layouts/rgtiles_.haml

    r261 r367  
    22  - $rgs.values.sort.each do |rg|
    33    .col-lg-2.col-md-3.col-sm-4.col-xs-6
    4       %a{ :href => @loc + rg.acronym.downcase }
    5         .thumbnail
     4      %a{ :href => relative_path_to("/" + rg.acronym.downcase) }
     5        .thumbnail.rg
    66          .text-center
    77            %b= rg.acronym.upcase
  • www/layouts/scripts_.haml

    r295 r367  
    1 %script{ :src => @loc + "js/jquery.min.js" }
    2 %script{ :src => @loc + "js/bootstrap.js" }
     1%script{ :src => relative_path_to("/js/jquery.min.js") }
     2%script{ :src => relative_path_to("/js/bootstrap.js") }
    33
    44:javascript
    5   $.getJSON("#{@loc}ipv6.json", function(data) {
     5  $.getJSON("#{relative_path_to("/ipv6.json")}", function(data) {
    66    if (data.ipv6) {
    77      $("#ipv6").append("Thank you for using IPv6.");
Note: See TracChangeset for help on using the changeset viewer.