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

Misc tweaks #39

Merged
merged 15 commits into from
Jan 22, 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
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ Options:
- caption # (optional) markdown is accepted
- loading # (optional) defaults to lazy, use eager above the fold

### Intro

Formats a paragraph with larger text as suitable for an introduction paragraph at the top of a page.

```
{{< intro >}}
Paragraph text...
{{< /intro >}}
```

### Linebreak

Sometimes markdown can bunch paragraphs together. You can force a line return using the linebreak shortcode.
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/_blog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
margin-block-end: 0;
color: #000;
font-family: Nunito;
font-size: 12px;
font-size: 14px;
@media (min-width: 600px) {
font-size: 14px;
font-size: 16px;
}
font-style: normal;
font-weight: 700;
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/_breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
margin-block-end: 0;
}
font-family: Nunito;
font-size: 12px;
font-size: 14px;
@media (min-width: 600px) {
font-size: 14px;
font-size: 16px;
}
font-style: normal;
font-weight: 700;
Expand Down
5 changes: 4 additions & 1 deletion assets/scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
}
}
> a {
@media (min-width: $min-desktop) {
cursor: default;
}
&::after {
display: inline-block;
content: "";
Expand Down Expand Up @@ -262,7 +265,7 @@
padding-top: 25px;
padding-bottom: 25px;
@media (min-width: $min-desktop) {
padding-top: 30px;
padding-top: 15px;
padding-bottom: 0;
display: block;
// position.
Expand Down
File renamed without changes.
10 changes: 8 additions & 2 deletions assets/scss/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ h4,
.h4 {
font-family: var(--rounded-font-family);
font-weight: 900;
font-size: 14px;
font-size: 16px;
line-height: 150%;
text-transform: uppercase;
letter-spacing: 2.4px;
margin-block-start: 28px;
margin-block-end: 18px;
@media (min-width: $min-desktop) {
font-size: 16px;
font-size: 18px;
}
}

Expand All @@ -83,6 +85,8 @@ h5,
font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.8px;
margin-block-start: 25px;
margin-block-end: 16px;
@media (min-width: $min-desktop) {
font-size: 16px;
}
Expand All @@ -95,6 +99,8 @@ h6,
font-weight: 800;
font-size: 12px;
letter-spacing: 0.8px;
margin-block-start: 20px;
margin-block-end: 14px;
@media (min-width: $min-desktop) {
font-size: 14px;
}
Expand Down
4 changes: 4 additions & 0 deletions assets/scss/shortcodes/_intro.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.intro {
font-size: 1.6em;
margin-bottom: 1.6em;
}
1 change: 1 addition & 0 deletions assets/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
@import "shortcodes/card";
@import "shortcodes/columns";
@import "shortcodes/toc";
@import "shortcodes/intro";
@import "shortcodes/youtube-enhanced";
4 changes: 3 additions & 1 deletion exampleSite/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ title: Dot Org Theme Demo
description: This is the demo site for Dot Org Theme. The title description and images front matter is required for meta og content.
---

This is an example site for the [Dot Org Theme](https://github.com/cncf/dot-org-hugo-theme). The [Dot Org Theme](https://github.com/cncf/dot-org-hugo-theme) has been created for the [Hugo CMS](https://gohugo.io), and has been developed and released by the [CNCF](https://www.cncf.io), part of the [Linux Foundation](https://www.linuxfoundation.org).
{{< intro >}}
This is an example site for the [Dot Org Theme](https://github.com/cncf/dot-org-hugo-theme). The [Dot Org Theme](https://github.com/cncf/dot-org-hugo-theme) has been created for the [Hugo CMS](https://gohugo.io), and has been developed and released by the [CNCF](https://www.cncf.io), part of the [Linux Foundation](https://www.linuxfoundation.org).
{{< /intro >}}
6 changes: 6 additions & 0 deletions exampleSite/content/en/demo-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo [link t

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula get dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient.

## Example Intro Paragraph

{{< intro >}}
Donec pede justo, fringilla vel, aliquet nec, vulputate get, arcu. In enim justo, rhoncus ut imperdiet a. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula get dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.
{{< /intro >}}

## Example Paragraph with Buttons

Donec pede justo, fringilla vel, aliquet nec, vulputate get, arcu. In enim justo, rhoncus ut imperdiet a. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula get dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.
Expand Down
2 changes: 2 additions & 0 deletions exampleSite/content/en/example-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ title: Example Page
description:
---

{{< intro >}}
This is used for the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula get dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate get, arcu. In enim justo, rhoncus ut imperdiet a.
{{< /intro >}}

{{< toc >}}

Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/en/faq/long-faq.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "An example FAQ with a long title to test wrapping"
noindex: true
---

Not rapping. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula get dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate get, arcu. In enim justo, rhoncus ut imperdiet a.
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/en/faq/what-is-hugo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "What is Hugo?"
weight: 1
noindex: true
---

Hugo is a static site generator written in Go. It's fast and flexible.
5 changes: 5 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
{{- partial "head/csp.html" . }}
<title>{{ $title }}</title>
<meta name="description" content="{{ $description }}" />

{{ if .Params.noindex }}
<meta name="robots" content="noindex, nofollow" />
{{ end }}

{{- partial "head/preload.html" . }}
{{- partial "head/css.html" . }}
{{- template "_internal/opengraph.html" . -}}
Expand Down
3 changes: 3 additions & 0 deletions layouts/shortcodes/intro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p class="intro">
{{ .Inner | markdownify }}
</p>