*/
.carousel {
- width: 40%;
- margin: 0 auto;
+ width: 50%;
+ margin-left: 450px;
}
.carousel-title {
font-size: 150%;
margin: 0px 3px;
}
.carousel-entry {
- max-width: 150px;
+ max-width: 130px;
}
.carousel-entry-image {
- width: 100%;
- height: auto;
+ width: auto;
+ height: 160px;
+ border: 1px solid #999;
}
.carousel .glide__arrow {
color: [% css_colors.button_text %];
display: inline-block;
}
.carousel .glide__arrow--right {
- right: -8em;
+ right: -5em;
}
.carousel .glide__arrow--left {
- left: -8em;
+ left: -7em;
+}
+
+/* PINES Carousel customizations */
+#carousel_selector {
+ width: 300px;
+}
+
+.pines_carousel_selector {
+ float: left;
+ text-align: center;
+ height: 250px;
+ width: 350px;
+ margin-left: 0px;
+ margin-right: 40px;
+}
+
+.pines_carousel_selector_image {
+ height: 150px;
+}
+
+.pines_carousel_selector_text {
+ font-size: 125%;
+ font-weight: bold;
+ color: #006838;
+}
+
+@media only screen and (max-width: 1200px) {
+ .carousel {
+ margin-left: 430px;
+ width: 40%;
+ }
+ .carousel-entry-image {
+ width: auto;
+ height: 90px;
+ border: 1px solid #999;
+ }
+}
+
+@media only screen and (max-width: 1000px) {
+ .carousel {
+ margin: auto;
+ width: 80%;
+ }
+ .carousel-entry-image {
+ width: auto;
+ height: 100px;
+ border: 1px solid #999;
+ }
+ .pines_carousel_selector {
+ float: none;
+ text-align: center;
+ height: 80px;
+ width: 100%;
+ margin: auto;
+ margin-top: -50px;
+ margin-bottom: 40px;
+ }
+ .pines_carousel_selector_image {
+ display: none;
+ }
+ .pines_carousel_selector_text {
+ font-size: 125%;
+ font-weight: bold;
+ color: #006838;
+ }
}
.search-filter{
[%- END %]
</select>
[%- END %]
+
+[% # PINES Customization for Carousels
+ # Build org selector that refreshes page with carousel_loc set to control which carousels display
+
+BLOCK build_org_selector_carousel;
+ node_stack = [{org => org_unit || ctx.aouct_tree || ctx.aou_tree}];
+ inherited_vis = ctx.get_cgf('opac.org_unit.non_inherited_visibility').enabled == 'f';
+
+ IF !name;
+ name = loc_name;
+ END;
+ IF !value;
+ value = loc_value;
+ END;
+
+ # if the selected org unit is out of hiding scope,
+ # disable the ou-hide scoping altogether.
+ hiding_disabled = ctx.org_hiding_disabled(value);
+
+ -%]
+
+ <select id='carousel_selector'
+ title='[% arialabel || l("Select Library") %]'
+ class="org_selector_dropdown"
+ onchange="location = '/eg/opac/home?carousel_loc=' +
+ this.options[this.selectedIndex].value">
+ <option value="" class="org_unit" disabled selected="selected">[% l("Choose a library to see newly purchased items") %]</option>
+ [%-
+ WHILE node_stack.size > 0;
+ node = node_stack.pop();
+ org_unit = node.org;
+ loc_grp = node.loc_grp;
+ ou_id = org_unit.id;
+ css_class = '';
+ disabled = '';
+ selected = '';
+ visible = org_unit.opac_visible == 't';
+
+ # org and all children are invisible.
+ NEXT IF !visible AND inherited_vis AND !ctx.is_staff;
+
+ IF !loc_grp; # processing an org unit
+
+ top_loc_groups = [];
+ IF show_loc_groups;
+ # add the location groups that sort below the child org units
+ FOR grp IN ctx.copy_location_groups.$ou_id.reverse;
+ IF grp.top == 't';
+ top_loc_groups.push(grp);
+ ELSE;
+ node_stack.push({org => org_unit, loc_grp => grp});
+ END;
+ END;
+ END;
+
+ # add the child org units
+ FOR child IN org_unit.children.reverse;
+ node_stack.push({org => child});
+ END;
+
+ # add the location groups that sort to the top
+ # above the child org units
+ FOR grp IN top_loc_groups;
+ node_stack.push({org => org_unit, loc_grp => grp});
+ END;
+
+ END;
+
+ # org is not publicly visible (though its children may be).
+ NEXT UNLESS ctx.is_staff OR visible;
+
+ # org is not within hiding scope (though its children may be).
+ NEXT UNLESS hiding_disabled OR ctx.org_within_hiding_scope(ou_id);
+
+ node_value = ou_id;
+ IF loc_grp;
+ node_value = node_value _ ':' _ loc_grp.id;
+ css_class = 'class="loc_grp"';
+ ELSE;
+ css_class = 'class="org_unit"';
+ END;
+
+ IF can_have_vols_only AND org_unit.ou_type.can_have_vols != 't';
+ disabled = 'disabled="disabled"';
+ ELSIF node_value == value;
+ selected = 'selected="selected"';
+ END;
+
+ IF can_have_users_only AND org_unit.ou_type.can_have_users != 't';
+ disabled = 'disabled="disabled"';
+ ELSIF node_value == value;
+ selected = 'selected="selected"';
+ END;
+
+ IF hold_pickup_lib AND ctx.get_org_setting(
+ org_unit.id, 'opac.holds.org_unit_not_pickup_lib');
+ disabled = 'disabled="disabled"';
+ END;
+
+ # caller provided a list of valid org units.
+ # all orgs not in the list are marked invalid.
+ IF valid_org_list AND
+ !valid_org_list.grep('^' _ org_unit.id _ '$').size;
+ disabled = 'disabled="disabled"';
+ selected = '';
+ END;
+
+ pad_depth = 0;
+
+ # copy loc groups appear as children of the owning org unit
+ SET pad_depth = pad_depth + 1 IF loc_grp;
+
+ # determine the depth by calculating the distance from the root
+ porg = ctx.get_aou(org_unit.parent_ou);
+ WHILE porg;
+ SET pad_depth = pad_depth + 1 IF porg.opac_visible == 't' OR ctx.is_staff;
+ porg = ctx.get_aou(porg.parent_ou);
+ END;
+
+ pad_depth = pad_depth * 5;
+ display_name = loc_grp ? loc_grp.name : org_unit.name %]
+ [% IF node_value == 1 %]
+ [% display_name = "All PINES Libraries" %]
+ [% END %]
+
+ <option value='[% org_unit.id %]' [% selected %] [% disabled %] [% css_class %]>
+ [% ' ' FOR [0..pad_depth]; display_name | html %]
+ </option>
+
+ [%- END %]
+ </select>
+[%- END %]
+