Skip to content

Commit

Permalink
Footer adjustments for content and layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lougroshek committed Jun 19, 2020
1 parent 0a5ab1b commit 362e73e
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 100 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -15,8 +15,8 @@ At present, there is only one language in the `./content` directory. Docsy assum
`title`: Displayed on the content page
`linkTitle`: displayed where a link to the page appears (in the docs menu)
`weight`: Determines the order of appearance in lists of content in the same directory, lowest first. To let all titles appear in alphabetical order, remove all weights.
`description`: Short description, appears in lists of directory contents and on content page.
`mermaid`: Boolean `true` indicates that MermaidJS should be loaded on the page.
`description`: Short description, appears in lists of directory contents and on content page.
`mermaid`: Boolean `true` indicates that MermaidJS should be loaded on the page.

## Mermaid

Expand Down
8 changes: 8 additions & 0 deletions archetypes/docs.md
@@ -0,0 +1,8 @@
---
title: Displayed on the content page
linkTitle: displayed where a link to the page appears (in the docs menu)
weight: Determines the order of appearance in lists of content in the same directory, lowest first. To let all titles appear in alphabetical order, remove all weights.
description: >
Short description, appears in lists of directory contents and on content page.
mermaid: Boolean `true` indicates that MermaidJS should be loaded on the page.
---
63 changes: 37 additions & 26 deletions config.toml
Expand Up @@ -75,8 +75,9 @@ weight = 1
# Everything below this are Site Params

[params]
copyright = "Spinnaker.io"
privacy_policy = "https://policies.google.com/privacy"
copyright = 'Copyright © 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 <a href="https://www.linuxfoundation.org/trademark-usage">Trademark Usage</a> page. Linux is a registered trademark of Linus Torvalds.'
privacy_policy = "http://www.linuxfoundation.org/privacy"
terms_of_use = "http://www.linuxfoundation.org/terms"

# First one is picked as the Twitter card image if not set on page.
# images = ["images/project-illustration.png"]
Expand All @@ -93,7 +94,7 @@ archived_version = false
# The version number for the version of the docs represented in this doc set.
# Used in the "version-banner" partial to display a version number for the
# current doc set.
version = "1.19"
version = "v1.19"

# A link to latest version of the docs. Used in the "version-banner" partial to
# point people to the main doc site.
Expand Down Expand Up @@ -148,37 +149,47 @@ enable = false

[params.links]
# End user relevant links. These will show up on left side of footer and in the community page if you have one.
[[params.links.user]]
name = "User mailing list"
url = "https://example.org/mail"
icon = "fa fa-envelope"
desc = "Discussion and help from your fellow users"
[[params.links.user]]
name ="Twitter"
url = "https://example.org/twitter"
icon = "fab fa-twitter"
desc = "Follow us on Twitter to get the latest news!"
[[params.links.user]]
name = "Stack Overflow"
url = "https://example.org/stack"
icon = "fab fa-stack-overflow"
desc = "Practical questions and curated answers"
# [[params.links.user]]
# name = "User mailing list"
# url = "https://example.org/mail"
# icon = "fa fa-envelope"
# desc = "Discussion and help from your fellow users"
# [[params.links.user]]
# name ="Twitter"
# url = "https://example.org/twitter"
# icon = "fab fa-twitter"
# desc = "Follow us on Twitter to get the latest news!"
# [[params.links.user]]
# name = "Stack Overflow"
# url = "https://example.org/stack"
# icon = "fab fa-stack-overflow"
# desc = "Practical questions and curated answers"
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
[[params.links.developer]]
name = "GitHub"
url = "https://github.com/google/docsy"
url = "http://github.com/spinnaker"
icon = "fab fa-github"
desc = "Development takes place here!"
desc = "Spinnaker on Github"
[[params.links.developer]]
name = "Slack"
url = "https://example.org/slack"
url = "http://join.spinnaker.io/"
icon = "fab fa-slack"
desc = "Chat with other project developers"
desc = "Spinnaker Community on Slack"
[[params.links.developer]]
name = "Community Forums"
url = "https://community.spinnaker.io/"
icon = "fas fa-comments"
desc = "Spinnaker Community Forums"
[[params.links.developer]]
name = "Stack Overflow"
url = "https://stackoverflow.com/questions/tagged/spinnaker"
icon = "fab fa-stack-overflow"
desc = "Stack Overflow"
[[params.links.developer]]
name = "Developer mailing list"
url = "https://example.org/mail"
icon = "fa fa-envelope"
desc = "Discuss development issues around the project"
name = "Twitter"
url = "https://twitter.com/spinnakerio"
icon = "fab fa-twitter"
desc = "Spinnaker Twitter"

# Additional menu item out
[[menu.main]]
Expand Down
8 changes: 4 additions & 4 deletions content/en/_index.html
Expand Up @@ -72,10 +72,10 @@ <h1 class="text-center">This is the second Section</h1>

{{< /blocks/section >}}

{{< blocks/section >}}
<!-- {{< blocks/section >}} -->

<div class="col-12">
<!-- <div class="col-12">
<h1 class="text-center">This is another Section</h1>
</div>
</div> -->

{{< /blocks/section >}}
<!-- {{< /blocks/section >}} -->
9 changes: 9 additions & 0 deletions themes/docsy-master/assets/scss/_footer.scss
@@ -0,0 +1,9 @@
.row {
&.row-divider {
hr {
margin-top: 0;
margin-bottom: 0;
// width: 90%;
}
}
}
100 changes: 52 additions & 48 deletions themes/docsy-master/assets/scss/main.scss
@@ -1,60 +1,64 @@
@import "support/functions";
@import "variables_project";
@import "variables";
@import "support/mixins";

@import "../vendor/bootstrap/scss/bootstrap";

@import "../vendor/Font-Awesome/scss/fontawesome.scss";
@import "../vendor/Font-Awesome/scss/solid.scss";
@import "../vendor/Font-Awesome/scss/brands.scss";

@import "support/utilities";
@import "colors";
@import "boxes";
@import "blog";
@import "code";
@import "nav";
@import "sidebar-tree";
@import "sidebar-toc";
@import "buttons";
@import "breadcrumb";
@import "alerts";
@import "content";
@import "search";
@import "main-container";
@import "blocks/blocks";
@import "section-index";
@import "pageinfo";
@import 'support/functions';
@import 'variables_project';
@import 'variables';
@import 'support/mixins';

@import '../vendor/bootstrap/scss/bootstrap';

@import '../vendor/Font-Awesome/scss/fontawesome.scss';
@import '../vendor/Font-Awesome/scss/solid.scss';
@import '../vendor/Font-Awesome/scss/brands.scss';

@import 'support/utilities';
@import 'colors';
@import 'boxes';
@import 'blog';
@import 'code';
@import 'nav';
@import 'sidebar-tree';
@import 'sidebar-toc';
@import 'buttons';
@import 'breadcrumb';
@import 'alerts';
@import 'content';
@import 'search';
@import 'main-container';
@import 'blocks/blocks';
@import 'section-index';
@import 'pageinfo';
@import 'footer';

@if $td-enable-google-fonts {
@import url($web-font-path);
@import url($web-font-path);
}

footer {
min-height: 150px;
min-height: 150px;

@include media-breakpoint-down(md) {
min-height: 200px;
}
@include media-breakpoint-down(md) {
min-height: 200px;
}
}

// Adjust anchors vs the fixed menu.
@include media-breakpoint-up(md) {
.td-offset-anchor:target {
display: block;
position: relative;
top: -4rem;
visibility: hidden;
}

h2[id]:before, h3[id]:before, h4[id]:before, h5[id]:before {
display: block;
content: " ";
margin-top: -5rem;
height: 5rem;
visibility: hidden;
}
.td-offset-anchor:target {
display: block;
position: relative;
top: -4rem;
visibility: hidden;
}

h2[id]:before,
h3[id]:before,
h4[id]:before,
h5[id]:before {
display: block;
content: ' ';
margin-top: -5rem;
height: 5rem;
visibility: hidden;
}
}

@import "styles_project";
@import 'styles_project';
3 changes: 3 additions & 0 deletions themes/docsy-master/i18n/en.toml
Expand Up @@ -25,6 +25,9 @@ other = "All Rights Reserved"
[footer_privacy_policy]
other = "Privacy Policy"

[footer_terms_of_use]
other = "Terms of Use"


# Post (blog, articles etc.)
[post_byline_by]
Expand Down
59 changes: 39 additions & 20 deletions themes/docsy-master/layouts/partials/footer.html
@@ -1,42 +1,61 @@
{{ $links := .Site.Params.links }}
<footer class="bg-dark py-5 row d-print-none">
<footer class="bg-white py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row row-divider">
<div class="col pb-5">
<hr />
</div>
</div>
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
<div class="col-6 d-flex align-items-center text-xs-center order-sm-2">
{{ with $links }}
{{ with index . "user"}}
{{ with index . "developer"}}
{{ template "footer-links-block" . }}
{{ end }}
{{ end }}
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
{{ with $links }}
<div class="col-6 text-right text-xs-center order-sm-3">
{{/* {{ with $links }}
{{ with index . "developer"}}
{{ template "footer-links-block" . }}
{{ end }}
{{ end }}
{{ end }} */}}
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-dark.svg" alt="Deploys by Netlify" />
</a>
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
{{ with .Site.Params.privacy_policy }}<small class="ml-1"><a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a></small>{{ end }}
{{ if not .Site.Params.ui.footer_about_disable }}
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
{{ end }}
<div class="col-12 col-sm-8 py-2 pt-4 mb-5 order-sm-3 col-copy">
{{ with .Site.Params.copyright }}<small class="text-dark">&copy; {{ now.Year}} {{ . | markdownify }} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
{{ if or .Site.Params.privacy_policy .Site.Params.terms_of_use }}
<div class="copy-meta">
{{ with .Site.Params.privacy_policy }}
<small class="">
<a href="{{ . }}" target="_blank">{{ T "footer_privacy_policy" }}</a>
</small>
{{ end }}
{{ if and .Site.Params.privacy_policy .Site.Params.terms_of_use }}
|
{{ end }}
{{ with .Site.Params.terms_of_use }}
<small class="">
<a href="{{ . }}" target="_blank">{{ T "footer_terms_of_use" }}</a>
</small>
{{ end }}
{{ if not .Site.Params.ui.footer_about_disable }}
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
{{ end }}
</div>
{{ end }}
</div>
</div>
</div>

<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-dark.svg" alt="Deploys by Netlify" />
</a>
</div>
</footer>
{{ define "footer-links-block" }}
<ul class="list-inline mb-0">
{{ range . }}
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}">
<a class="text-white" target="_blank" href="{{ .url }}">
<i class="{{ .icon }}"></i>
<li class="list-inline-item mr-3 mb-2 mb-sm-0" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}">
<a class="text-dark" target="_blank" href="{{ .url }}">
<i class="{{ .icon }} fa-2x"></i>
</a>
</li>
{{ end }}
Expand Down

0 comments on commit 362e73e

Please sign in to comment.