Compare commits

...
Sign in to create a new pull request.

10 commits

Author SHA1 Message Date
59820ed5c9 [#9] Update table of contents function 2023-05-29 14:50:50 +00:00
a3b5c7523e [#9] Update headers styles 2023-05-29 14:50:50 +00:00
a79d0c8359 [#9] Update headers levels 2023-05-29 14:50:50 +00:00
920e71ee68 [#9] Update table of contents styles 2023-05-29 14:50:50 +00:00
bf439c2673 [#9] Update table of contents function 2023-05-29 14:50:50 +00:00
1ed372a791 [#9] Update FEP links styles 2023-05-29 14:50:50 +00:00
e83fceafdc [#9] Add table of contents 2023-05-29 14:50:50 +00:00
bdc9e03932 [#8] Fix section highlighting 2023-05-24 11:52:09 +03:00
95e99e3d4b partials: Support custom title
Add opportunity to override default page title

Signed-off-by: Dmitriy Rychkov <d.rychkov@yadro.com>
2023-02-15 14:26:27 +03:00
Mike Petrov
72d06db4e8 Implement FrostFS design version
Signed-off-by: Mikhail Petrov <m.petrov@yadro.com>
2022-12-29 14:55:12 +03:00
27 changed files with 76607 additions and 92 deletions

View file

@ -1,3 +1,31 @@
@font-face {
font-family: "WorkSans";
font-style: normal;
font-weight: normal;
src: url(../fonts/WorkSans-Regular.eot);
src: url(../fonts/WorkSans-Regular.eot?#iefix) format("embedded-opentype"), url(../fonts/WorkSans-Regular.woff) format("woff"), url(../fonts/WorkSans-Regular.ttf) format("truetype"), url(../fonts/WorkSans-Regular.svg) format("svg")
}
@font-face {
font-family: "WorkSans";
font-style: normal;
font-weight: bold;
src: url(../fonts/WorkSans-Bold.eot);
src: url(../fonts/WorkSans-Bold.eot?#iefix) format("embedded-opentype"), url(../fonts/WorkSans-Bold.woff) format("woff"), url(../fonts/WorkSans-Bold.ttf) format("truetype"), url(../fonts/WorkSans-Bold.svg) format("svg")
}
@font-face {
font-family: "WorkSans";
font-style: normal;
font-weight: 700;
src: url(../fonts/WorkSans-SemiBold.eot);
src: url(../fonts/WorkSans-SemiBold.eot?#iefix) format("embedded-opentype"), url(../fonts/WorkSans-SemiBold.woff) format("woff"), url(../fonts/WorkSans-SemiBold.ttf) format("truetype"), url(../fonts/WorkSans-SemiBold.svg) format("svg")
}
html {
scroll-behavior: smooth;
}
body { body {
line-height: 1.5; line-height: 1.5;
font-family: var(--font-family), sans-serif; font-family: var(--font-family), sans-serif;
@ -26,27 +54,27 @@ h6 {
h1, h1,
.h1 { .h1 {
font-size: 45px; font-size: 32px;
} }
h2, h2,
.h2 { .h2 {
font-size: 32px; font-size: 26px;
} }
h3, h3,
.h3 { .h3 {
font-size: 26px; font-size: 20px;
} }
h4, h4,
.h4 { .h4 {
font-size: 20px; font-size: 18px;
} }
h5, h5,
.h5 { .h5 {
font-size: 18px; font-size: 16px;
} }
h6, h6,
@ -193,6 +221,7 @@ select:focus {
.section-sm { .section-sm {
padding-top: 60px; padding-top: 60px;
padding-bottom: 60px; padding-bottom: 60px;
background: #fff;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
@ -201,8 +230,17 @@ select:focus {
} }
} }
.main-title {
font-size: 45px;
}
.section-title { .section-title {
margin-bottom: 40px; margin-bottom: 40px;
font-size: 32px;
}
.section-item {
font-size: 26px;
} }
.bg-cover { .bg-cover {
@ -244,11 +282,12 @@ pre {
} }
.bg-primary { .bg-primary {
background: var(--primary-color) !important; background: var(--bg-color) !important;
} }
.bg-white { .bg-white {
background-color: var(--white-color) !important; background-color: var(--white-color) !important;
font-weight: 400;
} }
.bg-light { .bg-light {
@ -276,7 +315,11 @@ pre {
} }
.navbar { .navbar {
padding: 0; background: #fff;
}
.navbar img {
height: 34px;
} }
.navbar-dark .navbar-toggler-icon { .navbar-dark .navbar-toggler-icon {
@ -289,15 +332,17 @@ pre {
} }
} }
.navbar-brand {
padding: 0;
}
.navbar-brand img { .navbar-brand img {
max-width: 100px;
margin-bottom: 0; margin-bottom: 0;
} }
.navbar .nav-item .nav-link { .navbar .nav-item .nav-link {
text-transform: uppercase; padding: 0.5rem 1rem !important;
padding: 10px 15px !important; font-size: 16px;
font-size: 15px;
} }
.navbar .dropdown:hover .dropdown-menu { .navbar .dropdown:hover .dropdown-menu {
@ -395,19 +440,28 @@ pre {
.banner p { .banner p {
font-size: 20px; font-size: 20px;
opacity: .8; }
.ti-github,
.ti-twitter-alt {
font-size: 20px;
} }
.banner .nav-link.text-dark { .banner .nav-link.text-dark {
color: var(--white-color) !important; color: var(--dark-color) !important;
} }
.banner .nav-link.text-dark:hover { .banner .nav-link.text-dark:hover {
color: var(--white-color) !important; color: var(--dark-color) !important;
} }
.banner .navbar-brand { .banner .navbar-brand {
color: var(--white-color) !important; color: var(--dark-color) !important;
}
.copyright-container {
color: #939b9f;
font-weight: 600;
} }
/* search */ /* search */
@ -498,10 +552,12 @@ pre {
border-radius: 25px; border-radius: 25px;
border: 0; border: 0;
padding: 0 20px; padding: 0 20px;
border: 1px solid #ced4da;
border-radius: 0;
} }
.form-control:focus { .form-control:focus {
border: 0; border-color: #ced4da;
box-shadow: none !important; box-shadow: none !important;
} }
@ -558,27 +614,45 @@ textarea.form-control {
height: 8px; height: 8px;
width: 8px; width: 8px;
border-radius: 50%; border-radius: 50%;
background: var(--primary-color); background: #003;
opacity: .3;
left: 0; left: 0;
top: 8px; top: 8px;
} }
.list-styled li { #TableOfContents ul li,
padding-left: 20px; #TableOfContents ul li ul {
position: relative; margin-bottom: 0;
} }
.list-styled li::before { #TableOfContents ul li a:hover,
position: absolute; #TableOfContents ul li ul a:hover {
content: ''; text-decoration: underline;
height: 8px; }
width: 8px;
border-radius: 50%; /* this is so that the header does not overlap the section title */
background: var(--primary-color); .content h2:before,
opacity: .3; .content h3:before,
left: 0; .content h4:before {
top: 17px; display: block;
content: "";
height: 75px;
margin: -75px 0 0;
}
.content .title-link {
opacity: 0;
transition: 0.3s;
margin-left: 10px;
}
.content h2:hover .title-link,
.content h3:hover .title-link,
.content h4:hover .title-link {
opacity: 1;
}
.list-styled li {
position: relative;
} }
.post-meta { .post-meta {
@ -587,6 +661,10 @@ textarea.form-control {
font-size: 14px; font-size: 14px;
} }
.border-bottom {
border-bottom: 2px solid #003 !important;
}
blockquote { blockquote {
font-size: 20px !important; font-size: 20px !important;
color: var(--text-color-dark); color: var(--text-color-dark);
@ -607,6 +685,7 @@ blockquote p {
.pagination a { .pagination a {
color: var(--primary-color); color: var(--primary-color);
font-weight: 700;
} }
.pagination i { .pagination i {
@ -738,18 +817,38 @@ li.sidelist>a {
margin-bottom: 10px; margin-bottom: 10px;
display: block; display: block;
font-size: 20px; font-size: 20px;
font-weight: 700;
} }
li.sidelist li a { li.sidelist li a {
margin: 0; margin: 0;
font-weight: 700;
font-size: 18px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.75rem 1rem;
}
li.sidelist li a:hover {
color: var(--primary-color);
} }
.sidelist li.sidelist { .sidelist li.sidelist {
display: block; display: block;
} }
.sidelist li.sidelist.active a { .sidelist i {
color: var(--primary-color); display: none;
}
.sidelist li.sidelist.active>a {
border-left: 5px solid var(--primary-color);
background: #e9eeed;
}
.sidelist li.sidelist.active>a>i {
display: block;
} }
.sidelist li.sidelist.active::before { .sidelist li.sidelist.active::before {
@ -804,12 +903,11 @@ code {
color: inherit; color: inherit;
text-align: right; text-align: right;
z-index: 1; z-index: 1;
left: -5px; left: -22px;
top: -5px; top: -5px;
} }
.ui-autocomplete-input { .ui-autocomplete-input {
border-bottom: 1px solid rgb(212, 212, 212) !important;
padding-right: 50px; padding-right: 50px;
} }
@ -848,7 +946,7 @@ pre code::-webkit-scrollbar-thumb {
/* content tabs */ /* content tabs */
.code-tabs { .code-tabs {
border: 1px solid #dee2e6; border: 2px solid #003;
overflow: hidden; overflow: hidden;
margin: 20px 0px; margin: 20px 0px;
} }
@ -866,9 +964,13 @@ pre code::-webkit-scrollbar-thumb {
margin-bottom: 0; margin-bottom: 0;
} }
.nav-tabs {
border-bottom: 2px solid #003;
}
.code-tabs .nav-tabs .nav-item { .code-tabs .nav-tabs .nav-item {
padding-left: 0; padding-left: 0;
border-right: 1px solid #dee2e6; border-right: 2px solid #003;
} }
.code-tabs .nav-tabs .nav-item .nav-link { .code-tabs .nav-tabs .nav-item .nav-link {
@ -876,6 +978,16 @@ pre code::-webkit-scrollbar-thumb {
font-weight: 500; font-weight: 500;
border: 0; border: 0;
margin-bottom: 0; margin-bottom: 0;
font-weight: 700;
}
table td,
table th {
font-weight: 500;
}
.nav-tabs .nav-item {
margin-bottom: -2px;
} }
.code-tabs .nav-tabs .nav-item::before { .code-tabs .nav-tabs .nav-item::before {
@ -888,4 +1000,4 @@ pre code::-webkit-scrollbar-thumb {
.code-tabs .nav-tabs .nav-item.active .nav-link { .code-tabs .nav-tabs .nav-item.active .nav-link {
color: var(--white-color); color: var(--white-color);
} }

View file

@ -128,6 +128,14 @@
}) })
// table of contents
$('h2, h3, h4', '.content').each(function () {
if ($('#TableOfContents', '.content').length) {
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '">#</a>');
}
});
// Download page to pdf format // Download page to pdf format
window.onload = function() { window.onload = function() {
var generatePDF = document.getElementById('generatePDF'); var generatePDF = document.getElementById('generatePDF');

View file

@ -36,7 +36,7 @@ white_color = "#ffffff"
light_color = "#f8f9fa" light_color = "#f8f9fa"
# font family # font family
font_family = "lato" # Choose font family from : https://fonts.google.com/ font_family = "WorkSans" # Choose font family from : https://fonts.google.com/
# contact form action # contact form action
contact_form_action = "#" # contact form works with : https://formspree.io contact_form_action = "#" # contact form works with : https://formspree.io

View file

@ -51,5 +51,5 @@ If you need to change this default behavior, create a new file in `layouts/parti
```toml ```toml
[params] [params]
# font family # font family
font_family = "lato" # Choose font family from : https://fonts.google.com/ font_family = "WorkSans" # Choose font family from : https://fonts.google.com/
``` ```

View file

@ -51,5 +51,5 @@ If you need to change this default behavior, create a new file in `layouts/parti
```toml ```toml
[params] [params]
# font family # font family
font_family = "lato" # Choose font family from : https://fonts.google.com/ font_family = "WorkSans" # Choose font family from : https://fonts.google.com/
``` ```

View file

@ -22,7 +22,7 @@
{{ with .Params.icon}} {{ with .Params.icon}}
<i class="{{.}} icon text-primary d-block mb-4"></i> <i class="{{.}} icon text-primary d-block mb-4"></i>
{{end}} {{end}}
<h3 class="mb-3 mt-0">{{ .Title }}</h3> <h3 class="mb-3 mt-0 section-item">{{ .Title }}</h3>
{{with .Params.description}} {{with .Params.description}}
<p class="mb-0">{{. | markdownify}}</p> <p class="mb-0">{{. | markdownify}}</p>
{{end}} {{end}}

View file

@ -2,7 +2,7 @@
<div class="container section"> <div class="container section">
<div class="row"> <div class="row">
<div class="col-lg-8 text-center mx-auto"> <div class="col-lg-8 text-center mx-auto">
<h1 class="text-white mb-3"> <h1 class="text-white mb-3 main-title">
{{ .Site.Params.banner.title | markdownify }} {{ .Site.Params.banner.title | markdownify }}
</h1> </h1>
<p class="text-white mb-4"> <p class="text-white mb-4">

View file

@ -2,7 +2,7 @@
<section class="single section-sm pb-0"> <section class="single section-sm pb-0">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-lg-3"> <div class="col-lg-4">
<div class="sidebar"> <div class="sidebar">
<a <a
class="back-btn" class="back-btn"
@ -10,25 +10,57 @@
aria-label="back" aria-label="back"
></a> ></a>
<ul class="list-styled"> <ul class="list-styled">
{{ $currentNode := . }} {{range .Site.Home.Sections.ByWeight}} {{ if {{ $currentNode := . }}
eq .FirstSection $currentNode.FirstSection }} {{ template {{range .Site.Home.Sections.ByWeight}}
"section-tree-nav" dict "sect" . "currentnode" $currentNode}} {{ end {{ if eq .FirstSection $currentNode.FirstSection }}
}} {{ end }} {{ if .Content }} {{ if eq .Params.downloadBtn "true" {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode}}
}} {{ end }}
<div> {{ end }}
<button class="btn btn-primary btn-block" id="generatePDF"> {{ if .Content }}
Get Pdf {{ if eq .Params.downloadBtn "true" }}
</button> <div>
</div> <button class="btn btn-primary btn-block" id="generatePDF">
{{ end }} {{ end }} Get Pdf
</button>
</div>
{{ end }}
{{ end }}
</ul> </ul>
</div> </div>
</div> </div>
<div class="col-lg-9"> <div class="col-lg-8">
<div class="p-lg-5 p-4 bg-white" id="content"> <div class="p-lg-5 p-4 bg-white" id="content">
<h2 class="mb-5" id="title">{{ .Title }}</h2> <h1 class="mb-5" id="title">{{ partial "title.html" . }}</h1>
{{ if .Content }} {{ if .Content }}
<div class="content">{{.Content}}</div> <div class="content">
{{ if isset .Params "status" }}
<table>
<thead>
<tr>
<th>Status</th>
<th>Category</th>
<th>Authors</th>
</tr>
</thead>
<tbody>
<tr>
<th>{{ .Params.status }}</th>
<th>{{ .Params.category }}</th>
<th>{{ .Params.author }}</th>
</tr>
</tbody>
</table>
{{ if .Params.toc }}
<details>
<summary>Table of Contents</summary>
<aside>
{{ .TableOfContents }}
</aside>
</details>
{{ end }}
{{ end }}
{{.Content}}
</div>
{{ else }} {{ else }}
<div class="bg-light p-4"> <div class="bg-light p-4">
<ul class="page-list"> <ul class="page-list">
@ -85,28 +117,50 @@
<!-- /details page --> <!-- /details page -->
<!-- templates --> <!-- templates -->
{{ define "section-tree-nav" }} {{ $showvisitedlinks := .showvisitedlinks }} {{ {{ define "section-tree-nav" }}
$currentNode := .currentnode }} {{with .sect}} {{safeHTML .Params.head}} {{ {{ $showvisitedlinks := .showvisitedlinks }}
$fileUniqueID := "" }} {{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }} {{ $currentNode := .currentnode }}
{{ $currentNodeFileUniqueID := "" }} {{ with $currentNode.File }}{{ {{with .sect}}
$currentNodeFileUniqueID = .UniqueID }}{{ end }} {{safeHTML .Params.head}}
<li {{ $fileUniqueID := "" }}
data-nav-id="{{.Permalink}}" {{ with .File }}
title="{{.Title}}" {{ $fileUniqueID = .UniqueID }}
class="sidelist {{ end }}
{{if eq $fileUniqueID $currentNodeFileUniqueID}}active{{end}}" {{ $currentNodeFileUniqueID := "" }}
> {{ with $currentNode.File }}
<a href="{{.Permalink}}"> {{ $currentNodeFileUniqueID = .UniqueID }}
{{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML {{ end }}
.Params.Post}} <li
</a> data-nav-id="{{.Permalink}}"
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }} {{ if ne title="{{.Title}}"
$numberOfPages 0 }} class="sidelist
<ul> {{if (or (eq $fileUniqueID $currentNodeFileUniqueID) (eq $currentNode.Type .Page.Title))}}active{{end}}"
{{ range .Pages.ByWeight }} {{ if and .Params.hidden (not $.showhidden) }} >
{{else}} {{ template "section-tree-nav" dict "sect" . "currentnode" <a href="{{.Permalink}}">
$currentNode }} {{end}} {{end}} {{ safeHTML .Params.Pre }}
</ul> {{ or .Params.menuTitle .LinkTitle .Title }}
{{ safeHTML .Params.Post }}
<i class="ti-angle-right"></i>
</a>
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{ if ne $numberOfPages 0 }}
<ul>
{{ $currentNodePath := split $currentNode.File "/" }}
{{ $folderName := (index $currentNodePath 1) }}
{{ if gt (len (findRE ".md" $folderName)) 0 }}
{{ $folderName = "Others" }}
{{ end }}
{{ range .Pages.ByWeight }}
{{ if eq (isset .Page.Params "status") false }}
{{ if and .Params.hidden (not $.showhidden) }}
{{else}}
{{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }}
{{end}}
{{end}}
{{end}}
</ul>
{{ end }}
</li>
{{ end }} {{ end }}
</li> {{ end }}
{{ end }} {{ end }}

View file

@ -3,7 +3,7 @@
<div class="container"> <div class="container">
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-md-8 text-md-left text-center"> <div class="col-md-8 text-md-left text-center">
<p class="mb-md-0 mb-4">{{ .Site.Params.copyright | markdownify }}</p> <p class="mb-md-0 mb-4 copyright-container">{{ .Site.Params.copyright | markdownify }}</p>
</div> </div>
<div class="col-md-4 text-md-right text-center"> <div class="col-md-4 text-md-right text-center">
<ul class="list-inline"> <ul class="list-inline">

View file

@ -28,12 +28,6 @@
type="image/x-icon" type="image/x-icon"
/> />
<!-- fonts -->
<link
href="https://fonts.googleapis.com/css?family={{replace .Site.Params.font_family ' ' '+' | title}}:300,400,700&display=swap"
rel="stylesheet"
/>
<!-- PDF.js --> <!-- PDF.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.9.359/pdf.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.9.359/pdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.9.3/html2pdf.bundle.js"></script>
@ -42,6 +36,7 @@
:root{ :root{
--primary-color:{{ .Site.Params.primary_color }}; --primary-color:{{ .Site.Params.primary_color }};
--body-color:{{ .Site.Params.body_color }}; --body-color:{{ .Site.Params.body_color }};
--bg-color:{{ .Site.Params.bg_color }};
--text-color:{{ .Site.Params.text_color }}; --text-color:{{ .Site.Params.text_color }};
--text-color-dark:{{ .Site.Params.text_color_dark }}; --text-color-dark:{{ .Site.Params.text_color_dark }};
--white-color:{{ .Site.Params.white_color }}; --white-color:{{ .Site.Params.white_color }};

View file

@ -1,6 +1,6 @@
<nav class="navbar navbar-expand-md {{ if .IsHome }}navbar-dark{{ else }}navbar-light{{ end }}"> <nav class="navbar navbar-expand-md {{ if .IsHome }}navbar-dark{{ else }}navbar-light{{ end }}">
<div class="container px-2 px-md-0"> <div class="container px-2 px-md-0">
<a class="navbar-brand px-2" href="{{ site.BaseURL | relLangURL }}"> <a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
{{ $logo:= site.Params.logo }} {{ $logo:= site.Params.logo }}
{{ $logoWhite:= site.Params.logo_white }} {{ $logoWhite:= site.Params.logo_white }}
{{ if (or $logo $logoWhite) }} {{ if (or $logo $logoWhite) }}

View file

@ -0,0 +1 @@
{{ .Title }}

Binary file not shown.

Binary file not shown.

26488
static/fonts/WorkSans-Bold.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Binary file not shown.