app/views/layouts/application.html.haml
!!! 5
%html{:lang => "en"}
%head
%title= full_title(yield(:title))
%meta{name: 'Description', content: yield(:description)}
%meta{charset: 'utf-8'}
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
= stylesheet_link_tag 'application', 'data-turbolinks-track': true, media: 'none', onload: "if(media!='all')media='all'"
= javascript_include_tag 'application', 'data-turbolinks-track': true #'data-turbolinks-eval': false
= csrf_meta_tags
%meta{name:"google-site-verification", content:"r2pRTzxj91fBd9LQN4oiboo32gfV1c8PpalflcYY8XE"}
%body
%nav.navbar.fixed-top.navbar-expand-lg.navbar-dark
.container
.navbar-brand
.logo
= image_tag('logo.png', alt: "SuiteSparse Matrix Collection Logo")
%a{href: root_path}
%h1
SuiteSparse Matrix Collection
%small Formerly the University of Florida Sparse Matrix Collection
%button.navbar-toggler{type: 'button', 'data-bs-toggle': 'collapse', 'data-target': '#navbar', 'aria-controls': "navbarNav", 'aria-expanded': false, 'aria-label': "Toggle navigation"}
%span.navbar-toggler-icon
#navbar.collapse.navbar-collapse
%ul.ms-auto.navbar-nav.nav-pills
%li.nav-item
= link_to "Index", root_path, class: ["nav-link", ("active" if yield(:title) == 'Index')]
%li.nav-item
= link_to "About", about_path, class: ["nav-link", ("active" if yield(:title) == 'About')]
%li.nav-item
= link_to "Interfaces", interfaces_path, class: ["nav-link", ("active" if yield(:title) == 'Interfaces')]
%li.nav-item
= link_to "Submit Matrix", "/submit", class: ["nav-link", ("active" if yield(:title) == 'Submit Matrix')]
.container.theme-showcase.main{role: "main", id: "#{yield(:title).downcase.gsub(' ', '-')}-main"}
- if flash[:danger]
%div.alert.alert-danger
= flash[:danger]
- if flash[:success]
%div.alert.alert-success
= flash[:success]
= yield
%footer.text-center
.container
= link_to "Texas A&M University", "https://www.tamu.edu"
= " | "
= link_to "Computer Science & Engineering Department", "https://engineering.tamu.edu/cse/"
= " | "
= link_to "https://github.com/ScottKolo/suitesparse-matrix-collection-website" do
Code on GitHub
%span.fab.fa-github{'aria-hidden': "true"}
:javascript
WebFontConfig = {
google: { families: ['Cutive'] }
};
(function() {
var wf = document.createElement('script');
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();