Skip to content

Commit

Permalink
anchoring around, see barryclark#8
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin Steinhauser committed Jun 3, 2018
1 parent 444ca80 commit 9cea5c8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
26 changes: 7 additions & 19 deletions themes/casadi-theme/layouts/get-casadi/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
{{ $isDraft := $release.draft }}

{{ if $isLatest }}
<div class="card text-left border-success mb-2">
<div class="card text-left border-success mb-2" id="{{ $tag }}">
{{ else }}
<div class="card text-left border-default mb-2">
<div class="card text-left border-default mb-2" id="{{ $tag }}">
{{ end }}
{{ if $isLatest }}
<a class="card-header bg-white border-success" id="header-{{ $tag }}" data-toggle="collapse" href="#{{ $tag }}" aria-expanded="true" aria-controls="{{ $tag }}">
<a class="card-header bg-white border-success" data-toggle="collapse" href="#body-{{ $tag }}" aria-expanded="true" aria-controls="body-{{ $tag }}">
{{ else }}
<a class="card-header bg-white collapsed" id="header-{{ $tag }}" data-toggle="collapse" href="#{{ $tag }}" aria-expanded="true" aria-controls="{{ $tag }}">
<a class="card-header bg-white collapsed" data-toggle="collapse" href="#body-{{ $tag }}" aria-expanded="false" aria-controls="body-{{ $tag }}">
{{ end }}
{{ if $isLatest }}
<h4 class="text-success" style="display: inline-block; margin: 0;">CasADi v{{ $release.tag_name }}</h4>
Expand All @@ -60,9 +60,9 @@ <h4 class="text-default" style="display: inline-block; margin: 0;">CasADi v{{ $r
<span class="release-info text-muted">released {{ dateFormat "January 2, 2006" $release.created_at }}</span>
</a>
{{ if $isLatest }}
<div class="collapse show" id="{{ $tag }}">
<div class="collapse show" id="body-{{ $tag }}">
{{ else }}
<div class="collapse" id="{{ $tag }}">
<div class="collapse" id="body-{{ $tag }}">
{{ end }}

<!-- TODO ad-hoc solution, filtering for exact tags -->
Expand Down Expand Up @@ -120,23 +120,11 @@ <h4 class="text-default" style="display: inline-block; margin: 0;">CasADi v{{ $r
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
</div>

{{ partial "footer" . }}

<!--<script type="text/javascript">
$( document ).ready(function() {
if (window.location.hash) {
var $target = $('body').find(window.location.hash);
if ($target.hasClass('collapse')) {
target.collapse('show');
}
}
});
</script>-->
1 change: 1 addition & 0 deletions themes/casadi-theme/src/scss/casadi-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
display: block;
height: $casadi-link-offset;
margin-top: -$casadi-link-offset;
visibility: hidden;
}

/* GLOBAL */
Expand Down
3 changes: 2 additions & 1 deletion themes/casadi-theme/static/_css/casadi-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
content: "";
display: block;
height: 65px;
margin-top: -65px; }
margin-top: -65px;
visibility: hidden; }

/* GLOBAL */
html,
Expand Down
2 changes: 1 addition & 1 deletion themes/casadi-theme/static/_css/casadi-theme.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9cea5c8

Please sign in to comment.