Skip to content

Commit

Permalink
Support a base URL for sourcing assets
Browse files Browse the repository at this point in the history
  • Loading branch information
R. Tyler Croy committed Dec 1, 2016
1 parent 215c0c5 commit 3664956
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 138 deletions.
2 changes: 1 addition & 1 deletion content/_config/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ asciidoctor:
notitle: ''
profiles:
rtyler:
base_url: https://rtyler.github.io/jenkins.io
base_url: https://rtyler.github.io/jenkins.io/
deploy:
host: github_pages
branch: gh-pages
217 changes: 90 additions & 127 deletions content/_layouts/frame.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,134 +7,97 @@
%meta{:'name' => 'description', :content => 'Jenkins is an open source automation server'}/
%link{:rel => 'shortcut icon', :href => '/sites/default/files/jenkins_favicon.ico', :type => 'image/x-icon'}/

- if legacy?
%link{:href => '/css/style.css', :rel => 'stylesheet', :media => 'screen'}/
- else
= partial('scriptlinks.html.haml')
= partial('scriptlinks.html.haml')
%body
- if legacy?
- # render this when generating the site in legacy mode
%a{:href => 'https://github.com/jenkinsci'}
%img{:style => 'position: absolute; top: 0; right: 0; border: 0;',
:src => 'https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png',
:alt => 'Fork us on GitHub'}/

%div#head{:class => 'clearfloat'}
%div.clearfloat
%div#logo
%a{:href => '/', :title => 'Jenkins'}
%img{:src => '/images/header_logo.png'}/
%div#tagline
An extendable open source automation server

= partial('legacy/navbar.html.haml')
= content
= partial('footer.html.haml')

%div#github
%a{:href => "https://github.com/jenkins-infra/jenkins.io/edit/master/content/#{page.relative_source_path}",
:title => "Edit #{page.relative_source_path} on GitHub"}
:escaped
[Improve this page]

:plain
 

%a{:href => "https://github.com/jenkins-infra/jenkins.io/commits/master/content/#{page.relative_source_path}",
:title => "View #{page.relative_source_path} history on GitHub"}
:escaped
[Page history]

- else
= content

%footer#footer

.container

.row

.links.col-lg-8.col-md-12.col-sm-12
%ul.major-areas
%li.area.solo.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Resources

%ul.resources
= content

%footer#footer

.container

.row

.links.col-lg-8.col-md-12.col-sm-12
%ul.major-areas
%li.area.solo.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Resources

%ul.resources
%li
%a{:href => '/content/event-calendar'}
Events
%li
%a{:href => '/doc'}
Documentation
%li
%a{:href => '/node'}
Blog

%li.area.multi.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Solutions

%ul
- site.solutions.keys.sort.each do |key|
- link = "/solutions/#{key}"
%li
%a{:href => '/content/event-calendar'}
Events
%li
%a{:href => '/doc'}
Documentation
%li
%a{:href => '/node'}
Blog

%li.area.multi.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Solutions

%ul
- site.solutions.keys.sort.each do |key|
- link = "/solutions/#{key}"
%li
%a{:href => link}
= site.solutions[key].usecase

%li.area.multi.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Project

%ul.project
%li
%a{:href => 'https://issues.jenkins-ci.org'}
Issue tracker
%li
%a{:href => 'https://wiki.jenkins-ci.org'}
Wiki
%li
%a{:href => 'https://github.com/jenkinsci'}
GitHub
%li
%a{:href => 'https://ci.jenkins.io'}
Jenkins on Jenkins

%li.area.multi.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Community

%ul.community
%li
%a{:href => 'https://groups.google.com/forum/#!forum/jenkinsci-users'}
Users mailing list
%li
%a{:href => 'https://groups.google.com/forum/#!forum/jenkinsci-dev'}
Developers mailing list
%li
%a{:href => 'https://twitter.com/jenkinsci'}
Twitter
%li
%a{:href => 'https://reddit.com/r/jenkinsci'}
Reddit

.col-lg-4.col-md-12.col-sm-12.col-xs-12.footer-left
%p.box
%a{:href => "https://github.com/jenkins-infra/jenkins.io/edit/master/content/#{page.relative_source_path}",
:title => "Edit #{page.relative_source_path} on GitHub"}
Improve this page
|
%a{:href => "https://github.com/jenkins-infra/jenkins.io/commits/master/content/#{page.relative_source_path}",
:title => "View #{page.relative_source_path} history on GitHub"}
Page history

.license-box
#creativecommons
%a{:href => 'https://creativecommons.org/licenses/by-sa/4.0/'}
%p
%img{:src => 'https://licensebuttons.net/l/by-sa/4.0/88x31.png'}/

%a{:href => link}
= site.solutions[key].usecase

%li.area.multi.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Project

%ul.project
%li
%a{:href => 'https://issues.jenkins-ci.org'}
Issue tracker
%li
%a{:href => 'https://wiki.jenkins-ci.org'}
Wiki
%li
%a{:href => 'https://github.com/jenkinsci'}
GitHub
%li
%a{:href => 'https://ci.jenkins.io'}
Jenkins on Jenkins

%li.area.multi.col-md-3.col-sm-6.col-xs-6
.div-mar
%h5 Community

%ul.community
%li
%a{:href => 'https://groups.google.com/forum/#!forum/jenkinsci-users'}
Users mailing list
%li
%a{:href => 'https://groups.google.com/forum/#!forum/jenkinsci-dev'}
Developers mailing list
%li
%a{:href => 'https://twitter.com/jenkinsci'}
Twitter
%li
%a{:href => 'https://reddit.com/r/jenkinsci'}
Reddit

.col-lg-4.col-md-12.col-sm-12.col-xs-12.footer-left
%p.box
%a{:href => "https://github.com/jenkins-infra/jenkins.io/edit/master/content/#{page.relative_source_path}",
:title => "Edit #{page.relative_source_path} on GitHub"}
Improve this page
|
%a{:href => "https://github.com/jenkins-infra/jenkins.io/commits/master/content/#{page.relative_source_path}",
:title => "View #{page.relative_source_path} history on GitHub"}
Page history

.license-box
#creativecommons
%a{:href => 'https://creativecommons.org/licenses/by-sa/4.0/'}
%p
The content driving this site is licensed under the Creative Commons Attribution-ShareAlike 4.0 license.
%img{:src => 'https://licensebuttons.net/l/by-sa/4.0/88x31.png'}/

%p
The content driving this site is licensed under the Creative Commons Attribution-ShareAlike 4.0 license.

= partial('footer.html.haml')
= partial('footer.html.haml')
20 changes: 10 additions & 10 deletions content/_partials/scriptlinks.html.haml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
%link{:href => '/css/font-awesome.min.css',
%link{:href => "#{site.base_url}/css/font-awesome.min.css",
:rel => 'stylesheet',
:media => 'screen'}/

%link{:href => '/assets/bower/bootstrap/css/bootstrap.min.css',
%link{:href => "#{site.base_url}/assets/bower/bootstrap/css/bootstrap.min.css",
:rel => 'stylesheet',
:media => 'screen'}/

%link{:href => '/assets/bower/ekko-lightbox/ekko-lightbox.min.css',
%link{:href => "#{site.base_url}/assets/bower/ekko-lightbox/ekko-lightbox.min.css",
:rel => 'stylesheet',
:media => 'screen'}/

%link{:href => '/assets/bower/tether/css/tether.min.css',
%link{:href => "#{site.base_url}/assets/bower/tether/css/tether.min.css",
:rel => 'stylesheet',
:media => 'screen'}/

%link{:href => '/css/font-icons.css', :rel => 'stylesheet', :media => 'screen'}/
%link{:href => '/css/jenkins.css', :rel => 'stylesheet', :media => 'screen'}/
%link{:href => "#{site.base_url}/css/font-icons.css", :rel => 'stylesheet', :media => 'screen'}/
%link{:href => "#{site.base_url}/css/jenkins.css", :rel => 'stylesheet', :media => 'screen'}/

%script{:src => '/assets/bower/jquery/jquery.min.js'}
%script{:src => '/assets/bower/tether/js/tether.min.js'}
%script{:src => '/assets/bower/bootstrap/js/bootstrap.min.js'}
%script{:src => '/assets/bower/ekko-lightbox/ekko-lightbox.min.js'}
%script{:src => "#{site.base_url}/assets/bower/jquery/jquery.min.js"}
%script{:src => "#{site.base_url}/assets/bower/tether/js/tether.min.js"}
%script{:src => "#{site.base_url}/assets/bower/bootstrap/js/bootstrap.min.js"}
%script{:src => "#{site.base_url}/assets/bower/ekko-lightbox/ekko-lightbox.min.js"}

0 comments on commit 3664956

Please sign in to comment.