Merge pull request #85 from medialab-prado/78-fixed-index

Make draft index fixed on scroll
This commit is contained in:
Amaia Castro
2017-01-18 17:21:49 +01:00
committed by GitHub
2 changed files with 14 additions and 6 deletions

View File

@@ -615,6 +615,12 @@ $epigraph-line-height: rem-calc(22);
}
}
.border-left {
@include breakpoint(medium) {
border-left: 1px solid $border;
}
}
.draft-panel {
text-transform: uppercase;
font-weight: 700;

View File

@@ -28,7 +28,7 @@
</div>
<div class="row draft-allegation medium-collapse">
<div class="small-12 calc-index column border-right <%= "js-toggle-allegations" unless @draft_version.final_version? %>">
<div class="small-12 calc-index column <%= "js-toggle-allegations" unless @draft_version.final_version? %>">
<div class="draft-panel">
<div>
<span class="icon-banner" aria-hidden="true"></span> <span class="panel-title"><%= t('.text_toc') %></span>
@@ -39,15 +39,17 @@
<span class="panel-title"><%= t('.text_toc') %></span>
</div>
<div class="draft-index">
<%= @draft_version.toc_html.html_safe %>
<div data-sticky-container>
<div data-sticky data-anchor="sticky-panel" class="draft-index sticky">
<%= @draft_version.toc_html.html_safe %>
</div>
</div>
</div>
<div class="small-12 calc-text column border-right">
<div class="small-12 calc-text column border-right border-left">
<div class="draft-panel">
<div><span class="panel-title"><%= t('.text_body') %></span></div>
</div>
<div class="draft-text">
<div id="sticky-panel" class="draft-text">
<% if @draft_version.final_version? %>
<section>
<% else %>