-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #529 from ualbertalib/cds/add-bootstrap-5-layouts
Add Bootstrap 5 layouts
- Loading branch information
Showing
7 changed files
with
777 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<%= favicon_link_tag 'https://www.ualberta.ca/favicon.svg' %> | ||
<%= javascript_pack_tag '2020main-bootstrap-v5' %> | ||
<%= stylesheet_pack_tag '2020main-bootstrap-v5' %> | ||
<script src="https://kit.fontawesome.com/5dc7d61ac4.js" crossorigin="anonymous"></script> | ||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5QT07E47HT"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'G-5QT07E47HT'); | ||
</script> | ||
<%= stylesheet_link_tag comfy_cms_render_css_path(@cms_site.id, @cms_layout.identifier) %> | ||
<title> | ||
<% if content_for(:title) %> | ||
<%= yield(:title) %> - UofA Library | ||
<% elsif @cms_page %> | ||
<%= @cms_page.label %> - UofA Library | ||
<% else %> | ||
University of Alberta Library | ||
<% end %> | ||
</title> | ||
</head> | ||
<body class="d-flex flex-column"> | ||
|
||
<%= yield %> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Importing and adding jQuery which is required for our legacy js (pre-bootstrap 5 layouts), remove one fully migrated. | ||
import jquery from 'jquery' | ||
window.jQuery = jquery | ||
window.$ = jquery | ||
|
||
import '@popperjs/core' | ||
import 'bootstrap' | ||
import '../src/stylesheets/2020main-bootstrap-v5.css'; | ||
|
||
$(function() { | ||
$('[data-toggle-second="tooltip"]').tooltip(); | ||
$('[data-toggle-second="tooltip"]').on('click', function() { | ||
$(this).tooltip('hide') | ||
}) | ||
|
||
var mode = localStorage.getItem('mode'); | ||
if (mode == 'dark') { | ||
$('body').addClass('dark-mode'); | ||
$('#dark-mode-toggle').click(function() { | ||
$('body').toggleClass('dark-mode'); | ||
localStorage.setItem('mode', 'lite'); | ||
mode = localStorage.getItem('mode'); | ||
}); | ||
} else { | ||
$('#dark-mode-toggle').click(function() { | ||
$('body').toggleClass('dark-mode'); | ||
localStorage.setItem('mode', 'dark'); | ||
mode = localStorage.getItem('mode'); | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.