Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 74 additions & 22 deletions app/assets/css/extra.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
:root {
/* Limestone brand colors (names mirror Limestone's modifier classes) */
--color-wildcat-blue: #0033a0;
--color-blue-gray: #eff4fd;
--color-cool-neutral: #dcddde;
}

.fa-request.fa-requestable-toc {
display: block;
margin: 0 auto;
Expand All @@ -19,6 +26,10 @@
display: none;
}

.breadcrumbs ul li.fa-hidden {
display: none;
}

.fa-request-form {
overflow: auto;
background: #FDFDF6;
Expand All @@ -33,7 +44,6 @@
overflow-x: hidden;
overflow-y: scroll;
margin: 1em;
height: 10em;
}

.fa-options {
Expand Down Expand Up @@ -73,29 +83,48 @@ label {
float: right;
}

.container-fluid {
width: 80% !important;
background-color: #ffffff !important;


.fa-section {
margin-bottom: 2rem;
}

.panel-heading[data-toggle="collapse"] .panel-title:after {
font-family: "Glyphicons Halflings";
color: #666;
float: right;
content: "\e114";
.editorial .fa-section h3 {
font-size: 1.5rem;
}

.panel-heading[data-toggle="collapse"].collapsed .panel-title:after {
content: "\e080";
/* .fa-component { */
/* background-color: #eff4fd; */
/* padding: 1rem; */
/* margin-bottom: 0.5rem; */
/* } */

.editorial .fa-component h4 {
font-size: 1.15rem;
font-weight: 400;
}

.panel-title a {
color: #337ab7 !important;
.fa-component .list-unstyled {
list-style: none;
padding-left: 0;
}

.toplink {
padding: 1em;
float: right;
.fa-component .list-unstyled li {
font-size: 0.9rem;
color: #555;
padding: 0.5rem 0.75rem;
margin-bottom: 0.25rem;
}

.fa-component img {
max-width: 150px;
max-height: 150px;
}

.fa-component .fa-request.fa-requestable-contents {
font-size: 0.75rem;
padding: 0.15rem 0.5rem;
margin-left: 0.5rem;
}

.click-to-load-images, .image-overflow {
Expand Down Expand Up @@ -137,6 +166,20 @@ label {
color: #246024;
}

.fa-request-summary {
background-color: var(--color-blue-gray);
padding: 1rem 1.5rem;
}
.fa-request-summary .heading--display span {
background-color: var(--color-blue-gray);
}
.fa-request-summary .accordion__header,
.fa-request-summary .accordion__header:hover,
.fa-request-summary .accordion__header:focus,
.fa-request-summary .accordion__header:active {
background-color: var(--color-blue-gray);
}

/* UK LIMESTONE STYLES */
/* styling to match Limestone's Underline Link */
a.underline-link {
Expand All @@ -153,13 +196,13 @@ a.underline-link {
}

a:hover.underline-link {
color:#0033A0;
color: var(--color-wildcat-blue);
background-position: 0 0, 1000px 2px;
}

/* styling to match central webcom's in-page alert*/
.in-page-alert {
background-color: #EFF4FD;
background-color: var(--color-blue-gray);
border-left: 7px solid #1E8AFF;
padding: 1rem;
align-items: center;
Expand All @@ -170,7 +213,7 @@ a:hover.underline-link {
font-size: 1.75rem;
font-weight: 900;
margin-top: 0;
color: #0033A0;
color: var(--color-wildcat-blue);
line-height: 1.2;
}
.in-page-alert h3 {
Expand All @@ -179,7 +222,16 @@ a:hover.underline-link {
font-weight: 500;
margin-bottom: 5px;
margin-top: 10px;
color: #0033A0;
color: var(--color-wildcat-blue);
line-height: 1.2;

}
}

.heading-section {
margin: 1rem 0;
}

@scope(.heading-section){
.heading--display {
margin: 2rem 0;
}
}
2 changes: 0 additions & 2 deletions app/assets/js/manifest.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# List required files in the desired order
mousetrap.min.js
jquery.min.js
jquery-ui.min.js
bootstrap.min.js
lity.min.js
jquery.unveil.js
reveal.js
Expand Down
18 changes: 11 additions & 7 deletions app/assets/js/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@ var requests = (function() {

function update_count() {
var count = model.get_count();
$('.fa-request-count').text(count);
if (count > 0) {
if (count == 1) {
$('.fa-request-summary-note').html('You are requesting 1 item.');
$('.fa-request-announce').text('1 item selected');
}
else {
$('.fa-request-summary-note').html('You are requesting ' + count + ' items.');
$('.fa-request-announce').text(count + ' items selected');
}
$('.fa-request-options').removeClass('fa-request-hidden');
$('.fa-extra-options').removeClass('fa-request-hidden');
$('#fa-request-submit').removeClass('fa-request-hidden');
}
else {
$('.fa-request-summary-note').html('No items have been requested.');
$('.fa-request-announce').text('No items selected');
$('.fa-request-options').addClass('fa-request-hidden');
$('.fa-extra-options').addClass('fa-request-hidden');
$('#fa-request-submit').addClass('fa-request-hidden');
Expand Down Expand Up @@ -71,8 +75,8 @@ var requests = (function() {
}
else {
request_type = model.get_request_type();
$('button.fa-request-option').addClass('btn-default').removeClass('btn-primary');
$('button[data-option="' + request_type + '"]').addClass('btn-primary').removeClass('btn-default');
$('button.fa-request-option').addClass('button--ghost').removeClass('button--wildcat-blue');
$('button[data-option="' + request_type + '"]').addClass('button--wildcat-blue').removeClass('button--ghost');
$('div.fa-request-option').addClass('fa-request-hidden');
if (model.get_count() > 0) {
$('[data-option="' + request_type + '"]').removeClass('fa-request-hidden');
Expand All @@ -91,7 +95,7 @@ var requests = (function() {
if (model.has(id)) {
item = model.remove(id);
jid = '#' + id;
$(jid).addClass('btn-warning').removeClass('btn-success').html($(jid).attr('data-inactive'));
$(jid).addClass('button--ghost').removeClass('button--wildcat-blue').html($(jid).attr('data-inactive'));
target = $(jid).attr('data-target') + '-remove';

/* Remove hidden inputs */
Expand Down Expand Up @@ -123,7 +127,7 @@ var requests = (function() {
pos = model.add(item);
if (pos !== false) {
count = model.get_count();
$(jid).addClass('btn-success').removeClass('btn-warning').html($(jid).attr('data-active'));
$(jid).addClass('button--wildcat-blue').removeClass('button--ghost').html($(jid).attr('data-active'));

/* Display selected item and add toggle control */
removable_element = requests_view.render({
Expand Down Expand Up @@ -564,7 +568,7 @@ var requests = (function() {
pieces.push('<li id="' + item["id"] + '">');
pieces.push('<p class="fa-summary-item">');
if (("removable" in item) && item["removable"]) {
pieces.push(' <a href="#" class="fa-request-delete" data-target="' + item["target"] + '"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> ');
pieces.push(' <a href="#" class="fa-request-delete" data-target="' + item["target"] + '" aria-label="Remove ' + item["label"] + '"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> ');
}
pieces.push(item["label"]);
pieces.push('</p></li>');
Expand Down Expand Up @@ -701,7 +705,7 @@ var requests = (function() {
var id = $(this).attr('id');
if ($(this).hasClass('fa-toc')) {
$(this).after([
'<button type="button" class="btn btn-warning fa-request fa-requestable-toc" data-status="inactive" data-active="',
'<button type="button" class="button button--ghost fa-request fa-requestable-toc" data-status="inactive" data-active="',
button_toc_active,
'" data-inactive="',
button_toc_inactive,
Expand All @@ -716,7 +720,7 @@ var requests = (function() {
}
else {
$(this).after([
'<button type="button" class="btn btn-warning fa-request fa-requestable-contents" data-status="inactive" data-active="',
'<button type="button" class="button button--ghost fa-request fa-requestable-contents" data-status="inactive" data-active="',
button_active,
'" data-inactive="',
button_inactive,
Expand Down
17 changes: 13 additions & 4 deletions app/assets/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
var lity_open = false;
var lightbox = lity();
$(document).ready(function () {
$('.toplink').click(function (e) {
$('.fa-long').animate({ scrollTop: 0 }, 'fast');
});
$('.click-to-play-audio').click(function () {
$('.click-to-play-audio').click(function () {
var href_id = $(this).attr('data-id');
var href = $(this).attr('data-href');
$(this).after('<audio id="' + href_id + '" src="' + href + '" style="display:block, width: 305px; height: 30px;" width="305" height="30"></audio>');
Expand Down Expand Up @@ -110,5 +107,17 @@
$('.viewer-next').on('click', function () {
next_image();
});
(function () {
if (!document.referrer) return;
var refUrl;
try { refUrl = new URL(document.referrer); } catch (e) { return; }
if (refUrl.origin !== window.location.origin) return;
if (refUrl.pathname !== '/catalog/' || !refUrl.search) return;
var li = document.querySelector('.breadcrumbs .back-to-search');
var a = li && li.querySelector('[data-back-to-search]');
if (!li || !a) return;
a.href = refUrl.href;
li.classList.remove('fa-hidden');
})();
});
})();
10 changes: 4 additions & 6 deletions app/config/config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

class Config
{
private $config = [];
Expand Down Expand Up @@ -29,8 +30,7 @@ public function get($key)
{
if (array_key_exists($key, $this->config)) {
return $this->config[$key];
}
else {
} else {
return null;
}
}
Expand All @@ -39,8 +39,7 @@ public function get_repo($key)
{
if (array_key_exists($key, $this->repo)) {
return $this->repo[$key];
}
else {
} else {
return $this->repo['default'];
}
}
Expand All @@ -59,8 +58,7 @@ public function get_nonuk($key)
}
if (array_key_exists($key, $this->nonuk)) {
return $this->nonuk[$key];
}
else {
} else {
return false;
}
}
Expand Down
1 change: 1 addition & 0 deletions app/controllers/component.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

class Component extends Controller
{
public function __construct($params = [])
Expand Down
Loading
Loading