Skip to content

Commit

Permalink
Maintain 12 columns per row in the layout
Browse files Browse the repository at this point in the history
This fixes the problem where the subheader was not aligning with the toolbar.
  • Loading branch information
jcoyne committed Mar 1, 2024
1 parent 4b0e9a1 commit d810836
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 32 deletions.
1 change: 0 additions & 1 deletion app/assets/stylesheets/modules/managed_purl_panel.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.managed-purl {
@include show-page-row-layout;
ul {
list-style: none;
padding-left: 0;
Expand Down
2 changes: 0 additions & 2 deletions app/assets/stylesheets/modules/record-metadata-section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
.record-metadata,
.upper-record-metadata,
.purl-embed-viewer {
@include show-page-row-layout;

.section-heading {
h3 {
color: $stone;
Expand Down
11 changes: 9 additions & 2 deletions app/assets/stylesheets/modules/side-nav-minimap.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
$mini-button-width: 35px;

// Make room for the mini-menu in the right margin
#main-container > .row {
margin-right: calc(-#{$grid-gutter-width} * .5 + #{$mini-button-width});
}

.side-nav-minimap {
background-color: transparent;
list-style-type: none;
Expand Down Expand Up @@ -28,7 +35,7 @@
button {
background-color: $sul-side-nav-minimap-background-color;
border: none;
height: 35px;
height: $mini-button-width;
padding: 0;
text-align: right;
width: 100%;
Expand All @@ -47,7 +54,7 @@
i.fa, .sul-icon {
display: inline-block;
text-align: center;
width: 35px;
width: $mini-button-width;
}
}

Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/searchworks-mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
color: $font-color;
}

@mixin show-page-row-layout {
margin-right: 25px;
}

@mixin link-styling {
border-bottom: 1px solid $sul-link-color-hover;
}
Expand Down
51 changes: 28 additions & 23 deletions app/views/catalog/_managed_purl_embed.html.erb
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
<div class="managed-purl row">
<div class="col-md-12">
<h2>Digital content</h2>
<div class="managed-purl">
<div class="row">
<div class="col-md-12">
<h2>Digital content</h2>
</div>
</div>
<div class="col-md-4">
<div class="card managed-purl-panel mb-3">
<div class="managed-purl-heading">
<%= "#{document.marc_links.managed_purls.count} parts" %>
</div>
<div class="card-body">
<ul>
<% document.marc_links.managed_purls.each_with_index do |purl, i| %>
<li>
<%= button_tag data: { embed_target: "#{Settings.PURL_EMBED_RESOURCE}#{purl.druid}", embed_provider: Settings.PURL_EMBED_PROVIDER } do %>
<% if purl.file_id %>
<img src="<%= document.craft_image_url(image_id: purl.file_id, size: :thumbnail) %>">

<div class="row">
<div class="col-md-4">
<div class="card managed-purl-panel mb-3">
<div class="managed-purl-heading">
<%= "#{document.marc_links.managed_purls.count} parts" %>
</div>
<div class="card-body">
<ul>
<% document.marc_links.managed_purls.each_with_index do |purl, i| %>
<li>
<%= button_tag data: { embed_target: "#{Settings.PURL_EMBED_RESOURCE}#{purl.druid}", embed_provider: Settings.PURL_EMBED_PROVIDER } do %>
<% if purl.file_id %>
<img src="<%= document.craft_image_url(image_id: purl.file_id, size: :thumbnail) %>">
<% end %>
<%= purl.text.presence || "part #{i + 1}" %>
<% end %>
<%= purl.text.presence || "part #{i + 1}" %>
<% end %>
</li>
<% end %>
</ul>
</li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-8">
<div class='managed-purl-embed'>
<div class="col-md-8">
<div class='managed-purl-embed'>
</div>
</div>
</div>
</div>

0 comments on commit d810836

Please sign in to comment.