Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Enhancements 34, 35, 36, 50 #40

Merged
merged 13 commits into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions assets/sass/custom.sass
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@

$font-family-headers: "Fira Sans"

.logo
max-width: 200px
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, sign-off on #36


.breadcrumb
li
list-style: none
Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title = "Hugo Netlify Starter"
disableKinds = ["taxonomy", "taxonomyTerm"]
copyright = "Cloud Native Computing Foundation"
copyright = "Cloud Native Computing Foundation."

enableGitInfo = true

Expand Down
1 change: 1 addition & 0 deletions content/test-content/docs-section-1/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Section 1 index"
linkTitle: "Section 1 index and `linkTitle` Sample"
description: "Example description text, lorem ipsum dolor sit amet make it look good"
date: 2020-01-07T14:59:38+01:00
draft: true
Expand Down
1 change: 1 addition & 0 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ define "main" }}
{{ partial "home/hero.html" . }}
{{ partial "home/content.html" . }}
{{ partial "home/cncf-status.html" . }}
{{ end }}
7 changes: 4 additions & 3 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{{ with site.Copyright }}
{{ $year := now.Year }}
<footer class="footer">
<div class="container">
<p>
&copy; {{ $year }} {{ . }}
{{ with site.Copyright }}
&copy; {{ $year }} {{ . }} </br>
{{ end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renders oddly on the page. I don't know if the CNCF holds trademarks independently from the LF, and I would avoid adding custom boilerplate without clear guidance from legal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the odd rendering is an artifact of the page responsiveness--this element tracks with the header, and not the content, so for some viewports it can look odd.

I think we should probably open an issue for responsiveness generally, and probably one for mobile rendering specifically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if the CNCF holds trademarks independently from the LF, and I would avoid adding custom boilerplate without clear guidance from legal.

The double copyright lines has confused me for a couple weeks now. I see it on a lot of our project pages. I can try to find the issue i mentioned it in before.

Specifically for the template though, the "Cloud Native Computing Foundation" comes in from the config.toml, which we are expecting people to change when they generate a site from the template, so in practice we'd never actually see both of:

© 2020 Cloud Native Computing Foundation
© 2020 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.

So because the CNCF copyright mark should be removed as a part of the initial site setup work, I think I'm OK leaving this as is.

That all said, how do we get that clear guidance from legal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue for responsiveness issues: #52

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zacharysarah – What renders as © 2020 Cloud Native Computing Foundation is actually © 2020 ProjectName in reality. So for Longhorn, this would be © 2020 Longhorn, for Vitess © 2020 Vitess, etc.

What I suggest for this, @nate-double-u:

  1. Change the string to render to © 2020 The ProjectName Authors | Documentation Distributed under CC-BY-4.0, which is what we actually use on 98% of projects.

The reason the second copyright line is there: the first copyright line (ProjectName Authors) == covers the actual code and docs. The second copyright line (Linux Foundation) covers the logos and trademarks.

Copy link
Member Author

@nate-double-u nate-double-u Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense @celestehorgan, I'll add that change in; however, @zacharysarah, do we still need legal review? If so, at which stage of the process do we need it?

It's already published at https://cncf-hugo-starter.netlify.app/, as follows:
Screen Shot 2020-10-29 at 2 40 58 PM

Copy link
Member Author

@nate-double-u nate-double-u Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1. Change the string to render to `© 2020 The ProjectName Authors | Documentation Distributed under CC-BY-4.0`

@celestehorgan is it reasonable/safe, at least in the template here, to use the site.Title parameter within that string in place of "ProjectName"? (see my commit here for how I intend to make this edit)

Copy link
Member Author

@nate-double-u nate-double-u Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do it that way, likely we can take the copyright entry out of the config.toml file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nate-double-u I would actually do the following:

  1. Rename copyright to projectName here (to make it clearer)

  2. Reference projectName in the copyright footer, but also anywhere else we might use it.

Let title be its own thing that populates a page's <title> tag, i.e.

The reason I'd do it this way is because sometimes sites SEO-ify their <title> tag, and so we can't be guaranteed it's going to be a clean string of the project name every time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@celestehorgan that sounds good, I'll make that update.

&copy; {{ $year }} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage/">Trademark Usage</a> page.
</p>
</div>
</footer>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/github-edit.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="col col-4">
{{ $repoUrl := .Site.Params.repositoryUrl }}
{{ $filePath := .File.Path }}
{{ $editUrl := print $repoUrl "/content/" $filePath }}
{{ $editUrl := print $repoUrl "/blob/main/content/" $filePath }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

<a href="{{ $editUrl }}" class="btn btn-primary" target="_blank">
<span class="fas fa-pen"></span> &nbsp; Edit on GitHub
</a>
Expand Down
17 changes: 17 additions & 0 deletions layouts/partials/home/cncf-status.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<section class="container-xl">
<div class="row">
<div class="col-12">
<hr>
<p>
<a href="https://cncf.io">
<img src="img/logos/cncf-color.png" width="200">
</a>
</br>
We are a Cloud Native Computing Foundation sandbox project.
</p>
<p>
KubeCon + CloudNativeCon North America Virtual | November 17-20, 2020 | Don’t Miss Out | <a href="https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/">Register Now</a>
</p>
</div>
</div>
</section>
2 changes: 1 addition & 1 deletion layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<a class="navbar-item" href="{{ $home }}">
{{ if $logo }}
{{ $url := printf "img/logos/%s" $logo | relURL }}
<img src="{{ $url }}" width="200">
<img src="{{ $url }}" class="logo">
{{ else }}
{{ $title }}
{{ end }}
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/section-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
<nav class="section-nav">
<p class="menu-label">Documentation:</p>
<ul class="menu-list">
<li><a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .CurrentSection.Title | markdownify }}</a>
<li><a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .CurrentSection.LinkTitle | markdownify }}</a>
{{ range .RegularPages }}
<ul>
<li>
<a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">
{{ .Title | markdownify }}
{{ .LinkTitle | markdownify }}
</a>
</li>
</ul>
{{ end }}
</li>
{{ range .Sections }}
<li><a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .CurrentSection.Title | markdownify }}</a>
<li><a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .CurrentSection.LinkTitle | markdownify }}</a>
<ul>
{{ range .CurrentSection.RegularPages }}
<li>
<a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .Page.Title | markdownify }}</a>
<a {{ if $isThisPage }} class="active" {{ end }} href="{{ .RelPermalink }}">{{ .Page.LinkTitle | markdownify }}</a>
</li>
{{ end }}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/social-buttons.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{{ range . }}
{{ $color := .color | default "white" }}
<a class="btn text-light" style="background-color: {{ .color }}">
<a class="btn text-light" style="background-color: {{ .color }}" href="{{ .url }}">
{{ with .icon }}
<span class="icon">
<i class="{{ . }}"></i>
Expand Down