Skip to content

Commit

Permalink
🧹 Fixing a few styles
Browse files Browse the repository at this point in the history
This commit will change the maximized size to match Bootstrap 4 break
points.  Also, added btn-secondary to hyku.css so it doesn't get
overriden by appearance styles.  Finally, restructured the homepage to
make it look more like Hyrax 5.
  • Loading branch information
kirkkwang committed Jan 3, 2024
1 parent f802001 commit e15b2dd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/assets/javascripts/hyrax/app.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -167,25 +167,25 @@ Hyrax = {
sidebar: function () {
$('.sidebar-toggle').on('click', function() {
$('.sidebar').toggleClass('maximized');
if ($(window).width() >= 768) {
if ($(window).width() >= 992) {
$('.main-content').toggleClass('maximized');
}
});

$('.sidebar').on('mouseenter', function() {
if ($(window).width() < 768) {
if ($(window).width() < 992) {
$('.sidebar').addClass('maximized');
}
});

$('.sidebar').on('mouseleave', function() {
if ($(window).width() < 768) {
if ($(window).width() < 992) {
$('.sidebar').removeClass('maximized');
}
});

$(window).on('resize', function() {
if ($(window).width() >= 768) {
if ($(window).width() >= 992) {
$('.sidebar, .main-content').addClass('maximized');
} else {
$('.sidebar, .main-content').removeClass('maximized');
Expand Down
11 changes: 11 additions & 0 deletions app/assets/stylesheets/hyku.scss
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ nav.navbar.navbar-default.navbar-static-top .container-fluid .row {
body.public-facing {
.btn {
&.btn-primary,
&.btn-secondary,
&.btn-danger {
color: #fff;
}
Expand Down Expand Up @@ -487,3 +488,13 @@ body.public-facing {
.mt-20 {
margin-top: 20px;
}

.navbar-toggler-icon {
display: inline-block;
width: 1.5em;
height: 1.5em;
vertical-align: middle;
content: "";
background: no-repeat center center;
background-size: 100% 100%;
}
8 changes: 4 additions & 4 deletions app/views/hyrax/homepage/_home_content.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
also, to render featured collections
%>

<div class="<%= @presenter.display_featured_works? || @presenter.display_recently_uploaded? ? 'home-tabs-left col-md-6' : '' %>">
<div class="<%= @presenter.display_featured_works? || @presenter.display_recently_uploaded? ? 'col-md-6' : '' %>">
<ul id="homeTabs" class="nav nav-tabs" role="list">
<%# add check for featured works %>
<% if @presenter.display_featured_works? %>
Expand Down Expand Up @@ -41,10 +41,10 @@
</div>
</div><!-- /.col-md-6 -->

<div class="home-tabs-right col-md-6">
<div class="col-md-6">
<ul class="nav nav-tabs" role="list">
<li class="nav-item active">
<a class="nav-link" aria-expanded="true" href="#tab-col2-first" data-toggle="tab">
<li class="nav-item">
<a class="nav-link active" aria-expanded="true" href="#tab-col2-first" data-toggle="tab">
<%= t('hyrax.homepage.admin_sets.title') %>
</a>
</li>
Expand Down

0 comments on commit e15b2dd

Please sign in to comment.