Skip to content

Commit 0a72e60

Browse files
authored
[docsy] Improve styles, change hero image (#67)
1 parent 9e74043 commit 0a72e60

File tree

12 files changed

+84
-26
lines changed

12 files changed

+84
-26
lines changed

assets/icons/logo.svg

Lines changed: 27 additions & 1 deletion
Loading

assets/scss/_csp.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
}
1919
}
2020

21-
// Homepage: it will need to be updated when the hero image is changed.
21+
// Homepage: URLs below will need to be updated when the hero image changes.
2222

2323
#td-cover-block-0 {
24-
background-image: url(/featured-background_hu5459c0360c2b0cb7a147d2df0eb350ca_6445823_960x540_fill_q75_catmullrom_top.jpg);
24+
background-image: url(/featured-background_hu16056391159218873026.jpg);
2525
}
2626

2727
@media only screen and (min-width: 1200px) {
2828
#td-cover-block-0 {
29-
background-image: url(/featured-background_hu5459c0360c2b0cb7a147d2df0eb350ca_6445823_1920x1080_fill_q75_catmullrom_top.jpg);
29+
background-image: url(/featured-background_hu18408291696259244493.jpg);
3030
}
3131
}

assets/scss/_external_link.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Copied from https://github.com/open-telemetry/opentelemetry.io/blob/ddd8d43fff700effbe0047473071f9bab66ddb07/assets/scss/_external_link.scss
12
// External-link icon after an external link
23
//
34
// To ensure that the external-link icon word-wraps along with the preceding

assets/scss/_news.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.is-2 {
1414
flex: 0 0 16.67%; /* Equivalent to 2 out of 12 columns */
1515
font-weight: bold;
16-
color: #555;
16+
color: var(--bs-tertiary-color);
1717
}
1818

1919
.in-toto-column-content {

assets/scss/_styles_project.scss

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
@import 'external_link';
2-
@import 'td/code-dark';
31
@import 'csp';
42
@import 'news';
3+
@import 'external_link';
4+
@import 'td/code-dark';
55

6-
.td-navbar {
7-
background-color: $primary !important;
8-
opacity: 1;
9-
}
10-
11-
.td-navbar .navbar-brand {
12-
svg {
13-
height: 3rem;
14-
margin-left: 5rem;
15-
}
6+
.td-navbar .navbar-brand svg {
7+
height: 38px;
168
}
179

1810
.td-home {
@@ -38,6 +30,7 @@
3830

3931
a {
4032
color: white;
33+
4134
&.external-link:after {
4235
display: none;
4336
}

assets/scss/_variables_project.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ $in-toto-colors: (
55
'blue-light': #a3b5c8,
66
);
77

8-
$primary: map-get($in-toto-colors, 'blue');
98
$secondary: map-get($in-toto-colors, 'orange');
10-
$td-enable-google-fonts: false;

content/en/featured-background.jpg

-5.38 MB
Loading

hugo.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
baseURL: https://in-toto.io
22
title: in-toto
33

4-
disableAliases: true # We do redirects via Netlify's _redirects file
54
disableKinds: [taxonomy]
5+
theme: [docsy]
66
enableGitInfo: true
7-
enableRobotsTXT: true
87

9-
theme: [docsy]
8+
#
9+
# Outputs and Netlify _redirects file support
10+
#
11+
12+
disableAliases: true # We do redirects via Netlify's _redirects file
1013

1114
outputs:
1215
home: [HTML]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{/* Source: https://github.com/open-telemetry/opentelemetry.io/blob/ddd8d43fff700effbe0047473071f9bab66ddb07/layouts/_default/_markup/render-link.html */ -}}
2+
3+
{{ $url := .Destination -}}
4+
5+
{{/* General link-render processing */ -}}
6+
7+
{{ $isExternal := hasPrefix $url "http" -}}
8+
{{ if $isExternal -}}
9+
{{ if findRE "^https://opentelemetry.io/\\w" $url -}}
10+
{{ warnf "%s: use a local path, not an external URL, for the following reference to a site local page: %s"
11+
.Page.File.Path $url -}}
12+
{{ else if or
13+
(findRE "^https://github.com/open-telemetry/opentelemetry-specification/(blob|tree)/main/specification/\\w" $url)
14+
(findRE "^https://github.com/open-telemetry/opentelemetry-proto/(blob|tree)/main/docs/specification" $url)
15+
(findRE "^https://github.com/open-telemetry/semantic-conventions/(blob|tree)/main/docs" $url)
16+
-}}
17+
{{ warnf "%s: use a local path, not an external URL, for the following reference to a local specification page: %s"
18+
.Page.File.Path $url -}}
19+
{{ end -}}
20+
{{ end -}}
21+
22+
{{/* Until Hugo supports hook params (https://github.com/gohugoio/hugo/issues/6670), we'll inspect .Text. */ -}}
23+
24+
<a href="{{ $url | safeURL }}"
25+
{{- with .Title}} title="{{ . }}"{{ end -}}
26+
{{- if $isExternal }} target="_blank" rel="noopener"
27+
{{- $noExternalIcon := in .Text "hk-no-external-icon" -}}
28+
{{ if not $noExternalIcon }} class="external-link"{{ end -}}
29+
{{ end -}}
30+
>
31+
{{- .Text | safeHTML -}}
32+
</a>
33+
34+
{{- /*
35+
cSpell:ignore warnf
36+
This comment ensures that all trailing whitespace is trimmed.
37+
*/ -}}

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ command = "npm run build:production"
1010
[headers.values]
1111
X-Content-Type-Options = "nosniff"
1212
X-Frame-Options = "DENY"
13-
Content-Security-Policy = "default-src 'self' code.jquery.com fonts.googleapis.com fonts.gstatic.com use.fontawesome.com"
13+
Content-Security-Policy = "default-src 'self' code.jquery.com fonts.googleapis.com fonts.gstatic.com cse.google.com www.google.com use.fontawesome.com app.netlify.com netlify-cdp-loader.netlify.app youtube.com; frame-src youtube.com www.youtube.com"

0 commit comments

Comments
 (0)