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

[docsy] Cleanup Hugo config, add preliminary inline-style workaround #56

Merged
merged 5 commits into from
Sep 6, 2024
Merged
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
31 changes: 31 additions & 0 deletions assets/scss/_csp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Due to the site's Content-Security-Policy, we must move inline styles
// into this file. For some context, see:
// https://github.com/theupdateframework/theupdateframework.io/issues/73

// The following styles appear in the HTML generated for the ...

// Navbar

.navbar-logo > svg {
.cls-1 {
fill: #ff3800;
}
.cls-2 {
fill: #ff3800;
}
.cls-3 {
fill: #0089dd;
}
}

// Homepage: it will need to be updated when the hero image is changed.

#td-cover-block-0 {
background-image: url(/featured-background_hu5459c0360c2b0cb7a147d2df0eb350ca_6445823_960x540_fill_q75_catmullrom_top.jpg);
}

@media only screen and (min-width: 1200px) {
#td-cover-block-0 {
background-image: url(/featured-background_hu5459c0360c2b0cb7a147d2df0eb350ca_6445823_1920x1080_fill_q75_catmullrom_top.jpg);
}
}
23 changes: 23 additions & 0 deletions assets/scss/_news.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.in-toto-news {
.in-toto-columns {
display: flex;
align-items: flex-start;
margin-bottom: 10px;
}

.in-toto-column {
display: block;
padding-left: 0.75rem;
}

.is-2 {
flex: 0 0 16.67%; /* Equivalent to 2 out of 12 columns */
font-weight: bold;
color: #555;
}

.in-toto-column-content {
flex: 1;
margin-left: 20px;
}
}
15 changes: 13 additions & 2 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import 'external_link';
@import 'td/code-dark';
@import 'csp';
@import 'news';

.td-navbar {
background-color: $primary !important;
Expand All @@ -14,6 +16,12 @@
}

.td-home {
.in-toto-logo {
margin-top: 2rem;
margin-bottom: 3rem;
max-height: 12rem;
}

.cncf {
text-align: center;

Expand All @@ -28,8 +36,11 @@
max-width: 80%;
}

a.external-link:after {
display: none;
a {
color: white;
.external-link:after {
display: none;
}
}
}
}
23 changes: 13 additions & 10 deletions content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ description: A framework to secure the integrity of software supply chains

{{% blocks/cover image_anchor="top" height="max" %}}

<img src="/img/in-toto-horizontal-white.svg" alt="in-toto" class="in-toto-logo" style="max-width: 40rem; height: auto;">
<img src="/img/in-toto-horizontal-white.svg" alt="in-toto" class="in-toto-logo">

<div class="display-6">
<!-- prettier-ignore -->
{{% param description %}}
</div>
{.display-6}

<div class="p-initial my-5">
<div class="p-initial mt-5">
<a class="btn btn-lg btn-primary me-3" href="docs/what-is-in-toto/">Learn
More</a>
<a class="btn btn-lg btn-primary me-3" href="https://github.com/in-toto/demo">Try
Expand All @@ -21,15 +21,18 @@ integrations</a>
</div>

<div class="h3 mt-4">
<a class="btn btn-lg btn-secondary" href="docs/getting-started/">Get started <i class="fas fa-arrow-right"></i></a>
<a class="btn btn-lg btn-secondary" href="docs/getting-started/">Get started</i></a>
</div>
{{% blocks/link-down color="info" %}}

{{% /blocks/cover %}}

{{% blocks/lead color="primary" %}} **in-toto is designed to ensure the
integrity of a software product from initiation to end-user installation. It
does so by making it transparent to the user what steps were performed, by whom
and in what order.** {{% /blocks/lead %}}
{{% blocks/lead color="primary" %}}

in-toto is designed to ensure the integrity of a software product from
initiation to end-user installation. It does so by making it transparent to the
user what steps were performed, by whom and in what order.

{{% /blocks/lead %}}

{{% blocks/section color="dark" type="row" %}}

Expand Down
73 changes: 21 additions & 52 deletions hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
baseURL: https://in-toto.io/
baseURL: https://in-toto.io
title: in-toto
enableRobotsTXT: true

disableAliases: true # We do redirects via Netlify's _redirects file
disableKinds: [taxonomy]
enableGitInfo: true
theme: [docsy]
enableRobotsTXT: true

pygmentsCodeFences: true
pygmentsUseClasses: false
pygmentsUseClassic: false
pygmentsStyle: tango
theme: [docsy]

outputs:
home: [HTML]
page: [HTML]
section: [HTML, RSS, print]
section: [HTML]

imaging:
resampleFilter: CatmullRom
Expand All @@ -30,6 +29,7 @@ markup:
parser:
attribute:
block: true
wrapStandAloneImageWithinParagraph: false
renderer:
unsafe: true
highlight:
Expand All @@ -39,42 +39,27 @@ params:
logo: /img/logo.png
copyright:
authors: >-
in-toto Authors | Documentation Distributed under CC-BY-4.0[CC BY
in-toto Authors | Docs [CC BY
4.0](https://creativecommons.org/licenses/by/4.0)
from_year: 2020
version: 0.10.0
url_latest_version: https://in-toto.io/docs/
github_repo: https://github.com/in-toto/in-toto.io
github_project_repo: https://github.com/in-toto/in-toto
github_subdir: userguide
time_format_blog: Monday, January 02, 2006
time_format_default: January 2, 2006
rss_sections: [blog] # TODO: drop since this is the default
gcs_engine_id: 011217106833237091527:la2vtv2emlw
offlineSearch: false
offlineSearchSummaryLength: 70
offlineSearchMaxResults: 10
prism_syntax_highlighting: false
search:
# algolia:
# gcs_engine_id: 011217106833237091527:la2vtv2emlw # FIXME: get ID for this site

ui:
showLightDarkModeMenu: true
sidebar_cache_limit: 10
sidebar_menu_compact: true
sidebar_menu_foldable: false
sidebar_search_disable: true
feedback:
enable: true
enable: false # Disable until we have a proper CSP-compatible solution
'yes': >-
Glad to hear it! Please <a
href="https://github.com/in-toto/in-toto.io/issues/new">tell us how we
can improve</a>.
Thank you. Your feedback is appreciated!
# prettier-ignore
'no': >-
Sorry to hear that. Please <a
href="https://github.com/in-toto/in-toto.io/issues/new">tell us how we
can improve</a>.
readingtime:
enable: false
Please let us know <a class="external-link" target="_blank" rel="noopener"
href="https://github.com/in-toto/in-toto.io/issues/new?title=Page%20feedback&body=Suggested%20improvements%20for%20page:%20ADD%20PAGE-URL-HERE">how
we can improve this page</a>. Your feedback is appreciated!

links:
user:
- name: GitHub Discussions
Expand All @@ -84,7 +69,7 @@ params:
- name: User mailing list
url: mailto:[email protected]
icon: fa-solid fa-envelope
desc: Sign up for Docsy announcements
desc: Sign up for announcements
- name: Slack
url: https://slack.cncf.io/
icon: fa-brands fa-slack
Expand All @@ -93,26 +78,10 @@ params:
url: https://web.libera.chat/#in-toto
icon: fa-solid fa-comments
desc: in-toto on libera
- name: Email the Developers
- name: Email developers
url: mailto:[email protected]
icon: fa-solid fa-envelope
desc: Email the developers

plantuml:
enable: true
theme: default
svg_image_url: https://www.plantuml.com/plantuml/svg/
svg: false
print:
disable_toc: false
markmap:
enable: true
drawio:
enable: true

taxonomies:
tag: tags
category: categories
desc: Email developers

module:
mounts:
Expand Down
25 changes: 3 additions & 22 deletions layouts/shortcodes/news.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
{{ $news := site.Data.news }}
<style>
.columns {
display: flex;
align-items: flex-start;
margin-bottom: 10px;
}

.is-2 {
flex: 0 0 16.67%; /* Equivalent to 2 out of 12 columns */
font-weight: bold;
color: #555;
}

.column-content {
flex: 1;
margin-left: 20px;
}

</style>
<div class="container">
<div class="in-toto-news">
{{ range $news }}
{{ $date := dateFormat "January 2, 2006" .date }}
<div class="columns content is-medium">
<div class="in-toto-columns in-toto-content is-medium">
<div class="column is-2">
<strong>
{{ $date }}
</strong>
</div>

<div class="column">
<div class="in-toto-column">
{{ .text | markdownify }}
</div>
</div>
Expand Down