|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +--- |
| 4 | + |
| 5 | +{% include back-to-top.html %} |
| 6 | + |
| 7 | +{% assign versioned_page = page.url | startswith: '/version/' %} |
| 8 | +{% if versioned_page %} |
| 9 | + {% assign docversion = page.url | replace_regex: '^/version/([^/]+)/.*', '\1' %} |
| 10 | +{% else %} |
| 11 | + {% assign docversion = 'latest' %} |
| 12 | +{% endif %} |
| 13 | + |
| 14 | +<div class="home"> |
| 15 | + <div> |
| 16 | + <label id="configindex-version-label">Version</label> |
| 17 | + <select id="configindex-version-dropdown"> |
| 18 | + {% for version in site.data.versions.documentation %} |
| 19 | + <option value="{{ version }}" {% if docversion == version %}selected{% endif %}>{% if version == 'latest' %}{{ site.data.versions.cryostat.version }} - {% endif %}{{ version | capitalize }}</option> |
| 20 | + {% endfor %} |
| 21 | + </select> |
| 22 | + </div> |
| 23 | + |
| 24 | + {%- if page.title -%} |
| 25 | + <h1 class="page-heading">{{ page.title }}</h1> |
| 26 | + {%- endif -%} |
| 27 | + |
| 28 | + {{ content }} |
| 29 | + |
| 30 | + |
| 31 | + {% if site.paginate %} |
| 32 | + {% assign posts = paginator.posts %} |
| 33 | + {% else %} |
| 34 | + {% assign posts = site.posts %} |
| 35 | + {% endif %} |
| 36 | + |
| 37 | + |
| 38 | + {%- if posts.size > 0 -%} |
| 39 | + {%- if page.list_title -%} |
| 40 | + <h2 class="post-list-heading">{{ page.list_title }}</h2> |
| 41 | + {%- endif -%} |
| 42 | + <ul class="post-list"> |
| 43 | + {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%} |
| 44 | + {%- for post in posts -%} |
| 45 | + <li> |
| 46 | + <span class="post-meta">{{ post.date | date: date_format }}</span> |
| 47 | + <h3> |
| 48 | + <a class="post-link" href="{{ post.url | relative_url }}"> |
| 49 | + {{ post.title | escape }} |
| 50 | + </a> |
| 51 | + </h3> |
| 52 | + {%- if site.show_excerpts -%} |
| 53 | + {{ post.excerpt }} |
| 54 | + {%- endif -%} |
| 55 | + </li> |
| 56 | + {%- endfor -%} |
| 57 | + </ul> |
| 58 | + |
| 59 | + {% if site.paginate %} |
| 60 | + <div class="pager"> |
| 61 | + <ul class="pagination"> |
| 62 | + {%- if paginator.previous_page %} |
| 63 | + <li><a href="{{ paginator.previous_page_path | relative_url }}" class="previous-page">{{ paginator.previous_page }}</a></li> |
| 64 | + {%- else %} |
| 65 | + <li><div class="pager-edge">•</div></li> |
| 66 | + {%- endif %} |
| 67 | + <li><div class="current-page">{{ paginator.page }}</div></li> |
| 68 | + {%- if paginator.next_page %} |
| 69 | + <li><a href="{{ paginator.next_page_path | relative_url }}" class="next-page">{{ paginator.next_page }}</a></li> |
| 70 | + {%- else %} |
| 71 | + <li><div class="pager-edge">•</div></li> |
| 72 | + {%- endif %} |
| 73 | + </ul> |
| 74 | + </div> |
| 75 | + {%- endif %} |
| 76 | + |
| 77 | + {%- endif -%} |
| 78 | + |
| 79 | +</div> |
0 commit comments