forked from linkerd/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blog List and Detail Updates (linkerd#1082)
* Update: blog list change sub heading * feat: blog list add pagination * update: blog detail adopter banner * feat: blog single add related blog posts * Style: refinements on Blog List page Signed-off-by: Christian Mejlak <[email protected]>
- Loading branch information
Showing
11 changed files
with
178 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="wrapper body-header foundation-member has-background-navy-black"> | ||
<div class="columns container is-centered"> | ||
<div class="column is-half has-text-centered-mobile"> | ||
<h4 class="title is-size-4 has-text-white">Do you use Linkerd? Let us know and we'll send you some sweeet swag!</h4> | ||
</div> | ||
<div class="column is-narrow is-centered has-text-centered"> | ||
<a href="https://docs.google.com/forms/d/e/1FAIpQLSe69G-4GmhMb9nzBO9Du0582eJJMHAmK0BQi1F23X6htsieLQ/viewform" target="_blank" class="button is-primary is-large"> | ||
Let Us Know! | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<nav class="pagination is-centered" role="navigation" aria-label="pagination"> | ||
<!-- | ||
// | ||
// PAGE NUMBERS | ||
//–––––––––––––––––––––––––––––––––––––––––––––––––– | ||
--> | ||
{{ $paginator := .Paginator }} | ||
|
||
<!-- Number of links either side of the current page. --> | ||
{{ $adjacent_links := 2 }} | ||
|
||
<!-- $max_links = ($adjacent_links * 2) + 1 --> | ||
{{ $max_links := (add (mul $adjacent_links 2) 1) }} | ||
|
||
<!-- $lower_limit = $adjacent_links + 1 --> | ||
{{ $lower_limit := (add $adjacent_links 1) }} | ||
|
||
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links --> | ||
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} | ||
|
||
<!-- If there's more than one page. --> | ||
{{ if gt $paginator.TotalPages 1 }} | ||
|
||
<!-- First page. --> | ||
{{ if ne $paginator.PageNumber 1 }} | ||
<a class="pagination-previous" href="{{ $paginator.First.URL }}">First</a> | ||
{{ end }} | ||
<!-- Previous page. --> | ||
{{ if $paginator.HasPrev }} | ||
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}">Previous</a> | ||
{{ end }} | ||
|
||
<ul class="pagination-list"> | ||
<!-- Page numbers. --> | ||
{{ range $paginator.Pagers }} | ||
|
||
{{ $.Scratch.Set "page_number_flag" false }} | ||
|
||
|
||
<!-- Advanced page numbers. --> | ||
{{ if gt $paginator.TotalPages $max_links }} | ||
|
||
|
||
<!-- Lower limit pages. --> | ||
<!-- If the user is on a page which is in the lower limit. --> | ||
{{ if le $paginator.PageNumber $lower_limit }} | ||
|
||
<!-- If the current loop page is less than max_links. --> | ||
{{ if le .PageNumber $max_links }} | ||
{{ $.Scratch.Set "page_number_flag" true }} | ||
{{ end }} | ||
|
||
|
||
<!-- Upper limit pages. --> | ||
<!-- If the user is on a page which is in the upper limit. --> | ||
{{ else if ge $paginator.PageNumber $upper_limit }} | ||
|
||
<!-- If the current loop page is greater than total pages minus $max_links --> | ||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }} | ||
{{ $.Scratch.Set "page_number_flag" true }} | ||
{{ end }} | ||
|
||
|
||
<!-- Middle pages. --> | ||
{{ else }} | ||
|
||
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }} | ||
{{ $.Scratch.Set "page_number_flag" true }} | ||
{{ end }} | ||
|
||
{{ end }} | ||
|
||
|
||
<!-- Simple page numbers. --> | ||
{{ else }} | ||
|
||
{{ $.Scratch.Set "page_number_flag" true }} | ||
|
||
{{ end }} | ||
|
||
<!-- Output page numbers. --> | ||
{{ if eq ($.Scratch.Get "page_number_flag") true }} | ||
<li> | ||
<a href="{{ .URL }}" class="pagination-link {{ if eq . $paginator }} is-current{{ end }}"> | ||
{{ .PageNumber }} | ||
</a> | ||
</li> | ||
{{ end }} | ||
|
||
{{ end }} | ||
|
||
</ul> | ||
<!-- Next page. --> | ||
{{ if $paginator.HasNext }} | ||
<a class="pagination-next" href="{{ $paginator.Next.URL }}">Next</a> | ||
{{ end }} | ||
|
||
<!-- Last page. --> | ||
{{ if ne $paginator.PageNumber $paginator.TotalPages }} | ||
<a class="pagination-next" href="{{ $paginator.Last.URL }}">Last</a> | ||
{{ end }} | ||
|
||
<!-- .pagination --> | ||
{{ end }} | ||
</nav> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters