Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(debt): Add prettier config #93

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.github
Update hugo.yaml
archive
update
assets
content/en
static
.gitignore
.hugo_build.lock
.nvmrc
CNAME
CODE_OF_CONDUCT.md
CONTRIBUTING-gitflow.md
CONTRIBUTING.md
Dockerfile
LICENSE
Makefile
README.md
SECURITY.md
config.yaml
docker-compose.yaml
go.mod
go.sum
hugo.toml
netlify.toml
package-lock.json
package.json
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"plugins": ["prettier-plugin-organize-imports"]
}
16 changes: 14 additions & 2 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@
<!-- attribution appreciated. github: zjeaton web: https://froglegs.co -->

<div class="md__image">
<img id="{{ first 6 (shuffle (seq 1 500)) }}" src="{{ .Destination | safeURL }}" onclick="openModal(this.id)" alt="{{ .Text }}" {{ with .Title}} class="{{ . }}" {{ end }} />
</div>
<img
id="{{ first 6 (shuffle (seq 1 500)) }}"
src="{{ .Destination | safeURL }}"
onclick="openModal(this.id)"
alt="{{ .Text }}"
{{
with
.Title}}
class="{{ . }}"
{{
end
}}
/>
</div>
4 changes: 1 addition & 3 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<head>
{{ partial "head.html" . }}
</head>
<body
class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}"
>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
<header>{{ partial "navbar.html" . }}</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main">{{ block "main" . }}{{ end }}</main>
Expand Down
16 changes: 8 additions & 8 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ .Page.Title }}</title>
</head>
<head>
<meta charset="utf-8" />
<title>{{ .Page.Title }}</title>
</head>

<body>
{{ .Content }}
</body>
</html>
<body>
{{ .Content }}
</body>
</html>
17 changes: 6 additions & 11 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,21 @@
<head>
{{ partial "head.html" . }} {{ partial "favicon.html" . }}
</head>
<body
class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}"
>
<header>
{{ partial "navbar.html" . }}
</header>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
<header>{{ partial "navbar.html" . }}</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</aside>
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "page-meta-links.html" . }} {{ partial "toc.html" . }} {{
partial "taxonomy_terms_clouds.html" . }}
{{ partial "page-meta-links.html" . }} {{ partial "toc.html" . }} {{ partial
"taxonomy_terms_clouds.html" . }}
</aside>
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
{{ partial "version-banner.html" . }} {{ if not
.Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" .
}}{{ end }} {{ block "main" . }}{{ end }}
{{ partial "version-banner.html" . }} {{ if not .Site.Params.ui.breadcrumb_disable }}{{
partial "breadcrumb.html" . }}{{ end }} {{ block "main" . }}{{ end }}
</main>
</div>
</div>
Expand Down
6 changes: 1 addition & 5 deletions layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{{ define "main" }}
{{ with .Content }}
{{ . }}
{{ end }}
{{ end }}
{{ define "main" }} {{ with .Content }} {{ . }} {{ end }} {{ end }}
18 changes: 9 additions & 9 deletions layouts/partials/favicon.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="manifest" href="/favicons/site.webmanifest">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png" />
<link rel="manifest" href="/favicons/site.webmanifest" />
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" />
<link rel="shortcut icon" href="/favicons/favicon.ico" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="msapplication-config" content="/favicons/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
168 changes: 86 additions & 82 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,90 +1,94 @@
<footer class="footer">
<!-- Hotkey func -->
{{partial "hotkey.html" .}}
<!----------------->
<div class="row footer-top">
<div class="col-lg-6">
<a href="/">
{{ $svg := resources.Get "icons/logo.svg" }}
<img class="footer-logo" src="{{ $svg.Permalink }}">
</a>
</div>
<div class="col-lg-6 footer-info footer-icons">
{{ range .Site.Params.links.footer.icons }}
<a href="{{ .url }}" class="{{ .class }}" target="_blank" rel="noreferrer">
{{ $svg1 := resources.Get .icon }}
<img height="30px" src="{{ $svg1.Permalink }}">
</a>
{{ end }}
</div>
</div>
<div class="footer-info">
<div class="col-lg-3 footer-desc">
<p>An empowerer of engineers, Layer5 helps you extract more value from your infrastructure. Creator and
maintainer of cloud native standards. Maker of Meshery, the cloud native manager.</p>
</div>
<!-- Hotkey func -->
{{partial "hotkey.html" .}}
<!----------------->
<div class="row footer-top">
<div class="col-lg-6">
<a href="/">
{{ $svg := resources.Get "icons/logo.svg" }}
<img class="footer-logo" src="{{ $svg.Permalink }}" />
</a>
</div>
<div class="col-lg-6 footer-info footer-icons">
{{ range .Site.Params.links.footer.icons }}
<a href="{{ .url }}" class="{{ .class }}" target="_blank" rel="noreferrer">
{{ $svg1 := resources.Get .icon }}
<img height="30px" src="{{ $svg1.Permalink }}" />
</a>
{{ end }}
</div>
</div>
<div class="footer-info">
<div class="col-lg-3 footer-desc">
<p>
An empowerer of engineers, Layer5 helps you extract more value from your infrastructure.
Creator and maintainer of cloud native standards. Maker of Meshery, the cloud native
manager.
</p>
</div>

<div class="col-lg-9">
<div class="footer-info">
<!-- Resources Section -->
<div class="odd-col footer-sections footer-resources">
<h3 class="section-title"><a href="https://layer5.io/learn">RESOURCES</a></h3>
{{ range .Site.Params.links.footer.resources.items }}
<h5 class="footer-h5">
<a href="{{ .url }}">{{ .name }}</a>
</h5>
{{ end }}
</div>
<div class="col-lg-9">
<div class="footer-info">
<!-- Resources Section -->
<div class="odd-col footer-sections footer-resources">
<h3 class="section-title"><a href="https://layer5.io/learn">RESOURCES</a></h3>
{{ range .Site.Params.links.footer.resources.items }}
<h5 class="footer-h5">
<a href="{{ .url }}">{{ .name }}</a>
</h5>
{{ end }}
</div>

<!-- Community Section -->
<div class="even-col footer-sections footer-community">
<h3 class="section-title"><a href="https://layer5.io/community">COMMUNITY</a></h3>
{{ range .Site.Params.links.footer.community.items }}
<h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
{{ end }}
</div>
<!-- Community Section -->
<div class="even-col footer-sections footer-community">
<h3 class="section-title"><a href="https://layer5.io/community">COMMUNITY</a></h3>
{{ range .Site.Params.links.footer.community.items }}
<h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
{{ end }}
</div>

<!-- Projects Section -->
<div class="odd-col footer-sections footer-projects">
<h3 class="section-title"><a href="https://layer5.io/projects">SOLUTIONS</a></h3>
{{ range .Site.Params.links.footer.projects.items }}
<h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
{{ end }}
</div>
<!-- Projects Section -->
<div class="odd-col footer-sections footer-projects">
<h3 class="section-title"><a href="https://layer5.io/projects">SOLUTIONS</a></h3>
{{ range .Site.Params.links.footer.projects.items }}
<h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
{{ end }}
</div>

<!-- Company Section -->
<div class="even-col footer-sections footer-company">
<h3 class="section-title"><a href="https://layer5.io/company/about">COMPANY</a></h3>
{{ range .Site.Params.links.footer.company.items }}
<h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
{{ end }}
</div>
</div>
<div class="row footer-info2 subscribe">
<div class="footer-end">
<form name="contactform">
<div>
<p>
Subscribe to our Newsletter
</p>
<input class="footer-input" type="email" placeholder="Email Address"/>
<button class="footer-button" title="Subscribe" type="submit">Subscribe</button>
</div>
</form>
</div>
</div>
</div>
<!-- Company Section -->
<div class="even-col footer-sections footer-company">
<h3 class="section-title"><a href="https://layer5.io/company/about">COMPANY</a></h3>
{{ range .Site.Params.links.footer.company.items }}
<h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
{{ end }}
</div>
<hr class="footer-hr"/>
<div class="footer-bottom">
<div class="footer-bottom-left">
<span>
<script>document.write(new Date().getFullYear() + ' ');</script> Copyright ©Layer5, Inc | All Rights Reserved
</span>
</div>
<div class="footer-bottom-right">
<span><a href="https://layer5.io/company/legal/privacy">Privacy</a></span> &nbsp; <span><a
href="https://layer5.io/company/legal/terms-of-service">Terms</a></span>
</div>
<div class="row footer-info2 subscribe">
<div class="footer-end">
<form name="contactform">
<div>
<p>Subscribe to our Newsletter</p>
<input class="footer-input" type="email" placeholder="Email Address" />
<button class="footer-button" title="Subscribe" type="submit">Subscribe</button>
</div>
</form>
</div>
</footer>
</div>
</div>
</div>
<hr class="footer-hr" />
<div class="footer-bottom">
<div class="footer-bottom-left">
<span>
<script>
document.write(new Date().getFullYear() + ' ');
</script>
Copyright ©Layer5, Inc | All Rights Reserved
</span>
</div>
<div class="footer-bottom-right">
<span><a href="https://layer5.io/company/legal/privacy">Privacy</a></span> &nbsp;
<span><a href="https://layer5.io/company/legal/terms-of-service">Terms</a></span>
</div>
</div>
</footer>
13 changes: 7 additions & 6 deletions layouts/partials/hotkey.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/main.min.css" />
<script>
function focusSearchBar() {
var searchBar = document.querySelector(".td-search-input");
var searchBar = document.querySelector('.td-search-input');
if (searchBar) {
searchBar.focus();
}
}

document.addEventListener("keydown", function (event) {
if (event.key === "/") {
document.addEventListener('keydown', function (event) {
if (event.key === '/') {
event.preventDefault();
focusSearchBar();
}
Expand All @@ -36,13 +36,14 @@
searchBar.focus();
}
var searchElement = document.querySelector(".td-search-input");

if (searchElement) {
searchElement.appendChild(searchKey);
}

var inputElement = document.querySelector(".td-search-input");
var inputElement = document.querySelector('.td-search-input');
if (inputElement) {
inputElement.placeholder = "Search";
inputElement.placeholder = 'Search';
}
});
</script>
</script>
Loading