Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

add flexibility to footer #230

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion layouts/_default/baseof.html
@@ -1,4 +1,4 @@
<!--
<!--
Copyright (c) 2018 Eclipse Foundation, Inc.

This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -28,6 +28,7 @@
{{ block "featured_footer" . }}{{ partial "featured_footer.html" . }}{{ end }}
{{ block "footer" . }}{{ partial "footer.html" . }}{{ end }}
{{ block "footer-suffix" . }}{{ partial "footer_suffix.html" . }}{{ end }}
{{ block "footer-js" . }}{{ partial "footer_js.html" . }}{{ end }}
</body>
</html>

105 changes: 6 additions & 99 deletions layouts/partials/footer.html
@@ -1,4 +1,4 @@
<!--
<!--
Copyright (c) 2018 Eclipse Foundation, Inc.

This program and the accompanying materials are made available under the
Expand All @@ -14,105 +14,12 @@
<a class="visible-xs" href="#top">{{ i18n "navigation-back-to-top" }}</a>
</p>
<footer id="{{- .Params.footer_id | default .Site.Params.footer_id | default "solstice-footer"}}" class="{{- .Params.footer_class | default .Site.Params.footer_class | default ""}}">
<div class="container">
<div class="{{- .Params.footer_container_class | default .Site.Params.footer_container_class | default "container"}}">
<div class="row">
<section class="col-sm-6 hidden-print" id="footer-eclipse-foundation">
<h2 class="section-title">{{ i18n "eclipse-foundation-text" }}</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/org/">{{ i18n "footer-foundation-about-us-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/foundation/contact.php">{{ i18n "footer-foundation-contact-us-text" }}</a></li>
<li><a href="https://www.eclipse.org/donate">{{ i18n "footer-foundation-donate-text" }}</a></li>
<li><a href="https://www.eclipse.org/membership">{{ i18n "footer-foundation-members-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/documents/">{{ i18n "footer-foundation-governance-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php">{{ i18n "footer-foundation-code-of-conduct-text" }}</a></li>
<li><a href="https://www.eclipse.org/artwork/">{{ i18n "footer-foundation-logo-artwork-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/foundation/directors.php">{{ i18n "footer-foundation-board-of-directors-text" }}</a></li>
</ul>
</section>
<section class="col-sm-6 hidden-print" id="footer-legal">
<h2 class="section-title">{{ i18n "footer-legal-section-text" }}</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/legal/privacy.php">{{ i18n "footer-legal-privacy-policy-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/termsofuse.php">{{ i18n "footer-legal-terms-use-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/copyright.php">{{ i18n "footer-legal-copyright-agent-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/epl-2.0/">{{ i18n "footer-legal-epl-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/">{{ i18n "footer-legal-resources-text" }} </a></li>
</ul>
</section>
<section class="col-sm-6 hidden-print" id="footer-useful-links">
<h2 class="section-title">{{ i18n "footer-useful-links-section-text" }}</h2>
<ul class="nav">
<li><a href="https://bugs.eclipse.org/bugs/">{{ i18n "footer-useful-links-report-bug-text" }}</a></li>
<li><a href="//help.eclipse.org/">{{ i18n "footer-useful-links-documentation-text" }}</a></li>
<li><a href="https://www.eclipse.org/contribute/">{{ i18n "footer-useful-links-contribute-text" }}</a></li>
<li><a href="https://www.eclipse.org/mail/">{{ i18n "footer-useful-links-mailing-list-text" }}</a></li>
<li><a href="https://www.eclipse.org/forums/">{{ i18n "footer-useful-links-forums-text" }}</a></li>
<li><a href="//marketplace.eclipse.org">{{ i18n "footer-useful-links-marketplace-text" }}</a></li>
</ul>
</section>
<section class="col-sm-6 hidden-print" id="footer-other">
<h2 class="section-title">{{ i18n "footer-other-section-text" }}</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/ide/">{{ i18n "footer-other-tools-text" }}</a></li>
<li><a href="https://www.eclipse.org/projects">{{ i18n "footer-other-community-projects-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/workinggroups/">{{ i18n "footer-other-working-groups-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/research/">{{ i18n "footer-other-research-text" }}</a></li>
<li><a href="https://www.eclipse.org/security/">{{ i18n "footer-other-report-vulnerability-text" }}</a></li>
<li><a href="https://status.eclipse.org">{{ i18n "footer-other-status-text" }}</a></li>
</ul>
</section>
<div class="col-sm-24 margin-top-20">
<div class="row">
<div id="copyright" class="col-md-16">
<p id="copyright-text">{{ i18n "footer-copyright-text" | safeHTML}}</p>
</div>
{{ partial "socials.html" . }}
</div>
</div>
{{ partial "footer_links/prefix.html" . }}
{{ partial "footer_links/links.html" . }}
{{ partial "footer_links/suffix.html" . }}
<a href="#" class="scrollup">{{ i18n "navigation-back-to-top" }}</a>
</div>
</div>
</footer>
<!-- Placed at the end of the document so the pages load faster -->
{{- with .Site.Params.js | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js"}}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ if isset .Site.Params "hugo_js" }}
{{- with .Site.Params.hugo_js }}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ else }}
<script src="{{ "/js/solstice.hugo.js" | relURL }}"></script>
{{ end }}

<!-- Read in mustache templates registered in page scratch -->
{{ range $key, $value := (.Page.Scratch.Get "mustache-templates") }}
<script id="{{ $key }}" type="text/html">
{{ readFile $value | safeHTML}}
</script>
{{ end }}
<!-- Initialize any newsroom components on the page -->
<script>
(function($, document) {
{{ range (.Page.Scratch.Get "events-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "filteredEvents"
});
{{ end }}
{{ range (.Page.Scratch.Get "news-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "newsItems"
});
{{ end }}
{{ if ne .Page.Params.show_featured_story false }}
$("{{ .Site.Params.featured_footer_selector | default "#featured-story" }}").eclipseFdnApi({
type: "featuredStory"
});
{{ end }}
{{ if ne .Page.Params.show_featured_footer false }}
$("{{ .Site.Params.featured_footer_selector | default "#featured-footer" }}").eclipseFdnApi({
type: "featuredFooter"
});
{{ end }}
})(jQuery, document);
</script>
</footer>
45 changes: 45 additions & 0 deletions layouts/partials/footer_js.html
@@ -0,0 +1,45 @@

<!-- Placed at the end of the document so the pages load faster -->
{{- with .Site.Params.js | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js"}}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ if isset .Site.Params "hugo_js" }}
{{- with .Site.Params.hugo_js }}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ else }}
<script src="{{ "/js/solstice.hugo.js" | relURL }}"></script>
{{ end }}

<!-- Read in mustache templates registered in page scratch -->
{{ range $key, $value := (.Page.Scratch.Get "mustache-templates") }}
<script id="{{ $key }}" type="text/html">
{{ readFile $value | safeHTML}}
</script>
{{ end }}

<!-- Initialize any newsroom components on the page -->
<script>
(function($, document) {
{{ range (.Page.Scratch.Get "events-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "filteredEvents"
});
{{ end }}
{{ range (.Page.Scratch.Get "news-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "newsItems"
});
{{ end }}
{{ if ne .Page.Params.show_featured_story false }}
$("{{ .Site.Params.featured_footer_selector | default "#featured-story" }}").eclipseFdnApi({
type: "featuredStory"
});
{{ end }}
{{ if ne .Page.Params.show_featured_footer false }}
$("{{ .Site.Params.featured_footer_selector | default "#featured-footer" }}").eclipseFdnApi({
type: "featuredFooter"
});
{{ end }}
})(jQuery, document);
</script>
8 changes: 8 additions & 0 deletions layouts/partials/footer_links/footer-copyright.html
@@ -0,0 +1,8 @@
<div class="col-sm-24 margin-top-20">
<div class="row">
<div id="copyright" class="col-md-16">
<p id="copyright-text">{{ i18n "footer-copyright-text" | safeHTML}}</p>
</div>
{{ partial "socials.html" . }}
</div>
</div>
13 changes: 13 additions & 0 deletions layouts/partials/footer_links/footer-eclipse-foundation.html
@@ -0,0 +1,13 @@
<section class="{{- .Params.footer_section_eclipse_foundation_class | default .Site.Params.footer_section_eclipse_foundation_class | default "col-sm-6 hidden-print"}}" id="footer-eclipse-foundation">
<h2 class="section-title">{{ i18n "eclipse-foundation-text" }}</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/org/">{{ i18n "footer-foundation-about-us-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/foundation/contact.php">{{ i18n "footer-foundation-contact-us-text" }}</a></li>
<li><a href="https://www.eclipse.org/donate">{{ i18n "footer-foundation-donate-text" }}</a></li>
<li><a href="https://www.eclipse.org/membership">{{ i18n "footer-foundation-members-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/documents/">{{ i18n "footer-foundation-governance-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php">{{ i18n "footer-foundation-code-of-conduct-text" }}</a></li>
<li><a href="https://www.eclipse.org/artwork/">{{ i18n "footer-foundation-logo-artwork-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/foundation/directors.php">{{ i18n "footer-foundation-board-of-directors-text" }}</a></li>
</ul>
</section>
10 changes: 10 additions & 0 deletions layouts/partials/footer_links/footer-legal.html
@@ -0,0 +1,10 @@
<section class="{{- .Params.footer_section_legal_class | default .Site.Params.footer_section_legal_class | default "col-sm-6 hidden-print"}}" id="footer-legal">
<h2 class="section-title">{{ i18n "footer-legal-section-text" }}</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/legal/privacy.php">{{ i18n "footer-legal-privacy-policy-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/termsofuse.php">{{ i18n "footer-legal-terms-use-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/copyright.php">{{ i18n "footer-legal-copyright-agent-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/epl-2.0/">{{ i18n "footer-legal-epl-text" }}</a></li>
<li><a href="https://www.eclipse.org/legal/">{{ i18n "footer-legal-resources-text" }} </a></li>
</ul>
</section>
11 changes: 11 additions & 0 deletions layouts/partials/footer_links/footer-other.html
@@ -0,0 +1,11 @@
<section class="{{- .Params.footer_section_other_class | default .Site.Params.footer_section_other_class | default "col-sm-6 hidden-print"}}" id="footer-other">
<h2 class="section-title">{{ i18n "footer-other-section-text" }}</h2>
<ul class="nav">
<li><a href="https://www.eclipse.org/ide/">{{ i18n "footer-other-tools-text" }}</a></li>
<li><a href="https://www.eclipse.org/projects">{{ i18n "footer-other-community-projects-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/workinggroups/">{{ i18n "footer-other-working-groups-text" }}</a></li>
<li><a href="https://www.eclipse.org/org/research/">{{ i18n "footer-other-research-text" }}</a></li>
<li><a href="https://www.eclipse.org/security/">{{ i18n "footer-other-report-vulnerability-text" }}</a></li>
<li><a href="https://status.eclipse.org">{{ i18n "footer-other-status-text" }}</a></li>
</ul>
</section>
11 changes: 11 additions & 0 deletions layouts/partials/footer_links/footer-useful-links.html
@@ -0,0 +1,11 @@
<section class="{{- .Params.footer_section_useful_links_class | default .Site.Params.footer_section_useful_links_class | default "col-sm-6 hidden-print"}}" id="footer-useful-links">
<h2 class="section-title">{{ i18n "footer-useful-links-section-text" }}</h2>
<ul class="nav">
<li><a href="https://bugs.eclipse.org/bugs/">{{ i18n "footer-useful-links-report-bug-text" }}</a></li>
<li><a href="//help.eclipse.org/">{{ i18n "footer-useful-links-documentation-text" }}</a></li>
<li><a href="https://www.eclipse.org/contribute/">{{ i18n "footer-useful-links-contribute-text" }}</a></li>
<li><a href="https://www.eclipse.org/mail/">{{ i18n "footer-useful-links-mailing-list-text" }}</a></li>
<li><a href="https://www.eclipse.org/forums/">{{ i18n "footer-useful-links-forums-text" }}</a></li>
<li><a href="//marketplace.eclipse.org">{{ i18n "footer-useful-links-marketplace-text" }}</a></li>
</ul>
</section>
6 changes: 6 additions & 0 deletions layouts/partials/footer_links/links.html
@@ -0,0 +1,6 @@
{{ partial "footer_links/footer-eclipse-foundation.html" . }}
{{ partial "footer_links/footer-legal.html" . }}
{{ partial "footer_links/footer-useful-links.html" . }}
{{ partial "footer_links/footer-other.html" . }}
{{ partial "footer_links/footer-copyright.html" . }}

Empty file.
Empty file.