Skip to content

Commit

Permalink
Merge pull request #506 from gwu-libraries/t475-update-current-navbar…
Browse files Browse the repository at this point in the history
…-pages

T475 & T503 update navbar and static pages
  • Loading branch information
maxturer authored Feb 20, 2024
2 parents 89c1780 + ff394c4 commit 8e3afcd
Show file tree
Hide file tree
Showing 16 changed files with 576 additions and 586 deletions.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/scholarspace/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ html {
}

div.section-gw-white {
min-height: auto;

.gw-white-content {
padding: 1.5em 0 0 0;

Expand Down
66 changes: 49 additions & 17 deletions app/assets/stylesheets/scholarspace/components/_header.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// navbar and header styling

header {
height: 20px;
background-color: $gw-light-blue;

#masthead {
height: 100%;
display: flex;
Expand All @@ -13,11 +16,16 @@ header {
height: auto;
display: flex;
align-items: center;
justify-content: space-between;
justify-content: end;
}

@media (min-width: $mobile-breakpoint) {
height: 7.8em;
background-color: transparent;

.container-fluid {
justify-content: space-between;
}
}
}

Expand Down Expand Up @@ -81,7 +89,7 @@ header {
}

.navbar-inverse {
background-color: $gw-dark-blue !important;
background-color: transparent !important;
border-color: transparent;

@media (min-width: $mobile-breakpoint) {
Expand Down Expand Up @@ -158,9 +166,10 @@ header {
align-items: center;

#mobile-title {
font-size: 2.5em;
font-weight: bold;
margin-left: 0.3rem;
color: $gw-white;
text-decoration: underline;

&:hover {
color: $gw-light-grey;
Expand Down Expand Up @@ -239,6 +248,16 @@ header {
}
}
}

.active > a {
color: $gw-white;
background-color: unset;

&:hover {
color: $gw-white;
background: $gw-light-blue;
}
}

.open .dropdown-menu > li > a {
color: $gw-white;
Expand All @@ -257,9 +276,14 @@ header {

.searchbar-right {
width: 90%;
margin: 0.5em 0;

@media (min-width: $mobile-breakpoint) {
width: 60%;
width: 70%;
}

@media (min-width: 880px) {
width: 100%;
}

input, .dropdown-toggle {
Expand Down Expand Up @@ -291,6 +315,14 @@ header {
.dropdown-menu > li > a {
font-weight: 200;
}

#search-form-header {
margin-top: 0;

.input-group {
margin-bottom: 0;
}
}

#search-field-header {
border-radius: 4px;
Expand All @@ -309,15 +341,11 @@ header {
}
}

.home_share_work {
margin: 0;
}

#user_utility_links {
display: flex;
flex-direction: row;
margin-left: 1rem;
margin-top: 0.3em;
margin-top: 0;
margin-right: 0;

.dropdown a, .notify-number {
Expand All @@ -328,14 +356,6 @@ header {
background-color: transparent;
color: $gw-white;
}

@media (min-width: $mobile-breakpoint) {
color: $gw-dark-grey;

&:hover, &:focus {
color: $gw-dark-grey;
}
}
}

.open .dropdown-menu {
Expand All @@ -360,6 +380,18 @@ header {
background-color: $gw-light-blue;
}
}

@media (min-width: $mobile-breakpoint) {
margin-top: 0.3rem;

.dropdown a, .notify-number {
color: $gw-dark-grey;

&:hover, &:focus {
color: $gw-dark-grey;
}
}
}
}

.navbar-right {
Expand Down
41 changes: 41 additions & 0 deletions app/assets/stylesheets/scholarspace/components/_static-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,44 @@
}
}

// About Page Styles
.about-header-text {
margin-bottom: 0;
color: $gw-light-blue;
font-size: 6em;
font-weight: bold;

@media (max-width: 1200px) {
font-size: 5em;
}

@media (max-width: 991px) {
font-size: 4em;
}

@media (max-width: 748px) {
font-size: 3em;
}

@media (max-width: 535px) {
font-size: 2.7em;
}
}

//contact page
#new_contact_form {
display: flex;
flex-direction: column;
align-items: end;

.form-group {
margin-left: 0;
margin-right: 0;
width: 100%;
}

input[type="submit"] {
margin-right: 15px;
width: 10em;
}
}
8 changes: 4 additions & 4 deletions app/views/_controls.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
</div>
<div class="collapse navbar-collapse" id="top-navbar-collapse">
<ul class="nav navbar-nav col-sm-5">
<li <%= 'class=active' if current_page?(hyrax.contact_path) %>>
<%= link_to t(:'hyrax.controls.terms'), hyrax.terms_path, aria: current_page?(hyrax.terms_path) ? {current: 'page'} : nil %></li>
<li <%= 'class=active' if current_page?(hyrax.about_path) %>>
<%= link_to t(:'hyrax.controls.about'), hyrax.about_path, aria: current_page?(hyrax.about_path) ? {current: 'page'} : nil %></li>
<li <%= 'class=active' if current_page?(hyrax.help_path) %>>
<%= link_to t(:'hyrax.controls.help'), hyrax.help_path, aria: current_page?(hyrax.help_path) ? {current: 'page'} : nil %></li>
<li <%= 'class=active' if current_page?(hyrax.contact_path) %>>
<%= link_to t(:'hyrax.controls.contact'), hyrax.contact_path, aria: current_page?(hyrax.contact_path) ? {current: 'page'} : nil %></li>
<li <%= 'class=active' if current_page?(hyrax.share_path) %>>
<%= link_to t(:'hyrax.controls.share'), hyrax.share_path, aria: current_page?(hyrax.share_path) ? {current: 'page'} : nil %></li>
<li <%= 'class=active' if current_page?(main_app.search_catalog_path) %>>
<%= link_to t(:'hyrax.controls.browse'), main_app.search_catalog_path, aria: current_page?(main_app.search_catalog_path) ? {current: 'page'} : nil %></li>
<!-- Commented out language selector for now
<li>
<%= render 'shared/locale_picker' if available_translations.size > 1 %></li> -->
Expand Down
20 changes: 1 addition & 19 deletions app/views/_masthead.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,10 @@
<%= render '/logo' %>
</div>

<div class="share-header">
<!-- share your work button display qualities -->
<div class="home_share_work row">
<div class="text-center">
<% if signed_in? %>
<%= link_to '#',
class: "gw-btn",
data: { behavior: 'select-work', target: '#worktypes-to-create', 'create-type' => 'single' } do %>
<i class="glyphicon glyphicon-upload" aria-hidden="true"></i> <%= t('hyrax.share_button') %>
<% end %>
<% else %>
<%= link_to t('hyrax.upload_url'),
class: "gw-btn" do %>
<i class="glyphicon glyphicon-upload" aria-hidden="true"></i> <%= t('hyrax.share_button') %>
<% end %>
<% end %>
</div>
</div>
<!-- toggle user util links, depending on sign in status-->
<%= render '/user_util_links' %>
</div>
</div>
</nav>
</header>
<%= render '/shared/select_work_type_modal', create_work_presenter: standard_work_types_presenter %>
<%= render '/shared/select_work_type_modal', create_work_presenter: standard_work_types_presenter %>
9 changes: 9 additions & 0 deletions app/views/catalog/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="container">
<div id="content" class="col-md-9 col-md-push-3 col-sm-8 col-sm-push-4">
<%= render 'search_results' %>
</div>

<div id="sidebar" class="col-md-3 col-md-pull-9 col-sm-4 col-sm-pull-8">
<%= render 'search_sidebar' %>
</div>
</container>
74 changes: 38 additions & 36 deletions app/views/hyrax/base/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
<% provide :page_title, @presenter.page_title %>
<div class="container">
<% provide :page_title, @presenter.page_title %>

<%= render 'shared/citations' %>
<%= render 'shared/citations' %>

<div class="row work-type">
<div class="col-xs-12">
<%= render 'work_type', presenter: @presenter %>
<%= render 'show_actions', presenter: @presenter %>
</div>
<div class="col-xs-12">&nbsp;</div>
<div itemscope itemtype="http://schema.org/CreativeWork" class="col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
<%= render 'work_title', presenter: @presenter %>
</div>
<div class="panel-body">
<div class="row">
<%= render 'workflow_actions_widget', presenter: @presenter %>
<% if @presenter.iiif_viewer? %>
<div class="row work-type">
<div class="col-xs-12">
<%= render 'work_type', presenter: @presenter %>
<%= render 'show_actions', presenter: @presenter %>
</div>
<div class="col-xs-12">&nbsp;</div>
<div itemscope itemtype="http://schema.org/CreativeWork" class="col-xs-12">
<div class="panel panel-default">
<div class="panel-heading">
<%= render 'work_title', presenter: @presenter %>
</div>
<div class="panel-body">
<div class="row">
<%= render 'workflow_actions_widget', presenter: @presenter %>
<% if @presenter.iiif_viewer? %>
<div class="col-sm-12">
<%= render 'representative_media', presenter: @presenter, viewer: true %>
</div>
<% end %>
<div class="col-sm-3 text-center work-preview">
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? %>
<%= render 'citations', presenter: @presenter %>
<%= render 'social_media' %>
</div>
<div class="col-sm-9">
<%= render 'work_description', presenter: @presenter %>
<%= render 'metadata', presenter: @presenter %>
<%= render 'note_to_authors', presenter: @presenter %>
</div>
<div class="col-sm-12">
<%= render 'representative_media', presenter: @presenter, viewer: true %>
<%= render 'relationships', presenter: @presenter %>
<%= render 'items', presenter: @presenter %>
<%# TODO: we may consider adding these partials in the future %>
<%# = render 'sharing_with', presenter: @presenter %>
<%# = render 'user_activity', presenter: @presenter %>
</div>
<% end %>
<div class="col-sm-3 text-center work-preview">
<%= render 'representative_media', presenter: @presenter, viewer: false unless @presenter.iiif_viewer? %>
<%= render 'citations', presenter: @presenter %>
<%= render 'social_media' %>
</div>
<div class="col-sm-9">
<%= render 'work_description', presenter: @presenter %>
<%= render 'metadata', presenter: @presenter %>
<%= render 'note_to_authors', presenter: @presenter %>
</div>
<div class="col-sm-12">
<%= render 'relationships', presenter: @presenter %>
<%= render 'items', presenter: @presenter %>
<%# TODO: we may consider adding these partials in the future %>
<%# = render 'sharing_with', presenter: @presenter %>
<%# = render 'user_activity', presenter: @presenter %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Loading

0 comments on commit 8e3afcd

Please sign in to comment.