Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

enhancement: add legal links to Footer (#464)

Guilherme Oenning89a7894bd218
diff --git a/public/components/common/Footer.scss b/public/components/common/Footer.scss
index 9f390179d..ddf86fc2b 100644
--- a/public/components/common/Footer.scss
+++ b/public/components/common/Footer.scss
@@ -2,37 +2,40 @@
#c-footer {
flex-shrink: 0;
- height: 70px;
+ height: 80px;
+ font-size: $font-size-tiny;
- div {
+ .container {
text-align: center;
- font-size: 11px;
+ padding-top: 10px;
border-top: 1px solid $gray-lighter;
- a {
- margin-top: 10px;
- color: rgba($text-color, 0.5);
- display: inline-block;
+ .l-powered {
+ img {
+ width: 20px;
+ margin: 15px auto 0px auto;
+ filter: grayscale(100%);
+ display: block;
+ }
span {
+ color: rgba($text-color, 0.5);
display: none;
}
-
&:hover {
+ img {
+ filter: grayscale(0%);
+ }
span {
display: block;
}
}
-
- img {
- width: 20px;
- margin-top: 10px;
- filter: grayscale(100%);
- }
-
+ }
+
+ .l-links a {
+ color: rgba($text-color, 0.5);
+ margin: 0px 10px;
&:hover {
- img {
- filter: grayscale(0%);
- }
+ color: $link-color;
}
}
}
diff --git a/public/components/common/Footer.tsx b/public/components/common/Footer.tsx
index b6f817768..6295e53df 100644
--- a/public/components/common/Footer.tsx
+++ b/public/components/common/Footer.tsx
@@ -1,12 +1,21 @@
import "./Footer.scss";
import * as React from "react";
+import { PrivacyPolicy, TermsOfService } from "@fider/components";
+import { Fider } from "@fider/services";
export const Footer = () => {
return (
<div id="c-footer">
<div className="container">
- <a target="_blank" href="https://getfider.com/">
+ {Fider.settings.hasLegal && (
+ <div className="l-links">
+ <PrivacyPolicy />
+ &middot;
+ <TermsOfService />
+ </div>
+ )}
+ <a className="l-powered" target="_blank" href="https://getfider.com/">
<img src="https://getfider.com/images/logo-100x100.png" alt="Fider" />
<span>Powered by Fider</span>
</a>
diff --git a/public/components/common/Legal.tsx b/public/components/common/Legal.tsx
index bbefc55cd..6f66aa1e3 100644
--- a/public/components/common/Legal.tsx
+++ b/public/components/common/Legal.tsx
@@ -2,27 +2,37 @@ import * as React from "react";
import { Modal, Checkbox } from "@fider/components/common";
import { Fider } from "@fider/services";
-const privacy = (
- <a href="/privacy" target="_blank">
- privacy policy
- </a>
-);
-
-const terms = (
- <a href="/terms" target="_blank">
- terms of service
- </a>
-);
-
interface LegalAgreementProps {
onChange: (agrred: boolean) => void;
}
+export const TermsOfService: React.StatelessComponent<{}> = () => {
+ if (Fider.settings.hasLegal) {
+ return (
+ <a href="/terms" target="_blank">
+ Terms of Service
+ </a>
+ );
+ }
+ return null;
+};
+
+export const PrivacyPolicy: React.StatelessComponent<{}> = () => {
+ if (Fider.settings.hasLegal) {
+ return (
+ <a href="/privacy" target="_blank">
+ Privacy Policy
+ </a>
+ );
+ }
+ return null;
+};
+
export const LegalNotice: React.StatelessComponent<{}> = () => {
if (Fider.settings.hasLegal) {
return (
<p className="info">
- By signing in, you agree to the {privacy} and {terms}.
+ By signing in, you agree to the <PrivacyPolicy /> and <TermsOfService />.
</p>
);
}
@@ -44,7 +54,7 @@ export const LegalAgreement: React.StatelessComponent<LegalAgreementProps> = pro
if (Fider.settings.hasLegal) {
return (
<Checkbox field="legalAgreement" onChange={props.onChange}>
- I have read and agree to the {privacy} and {terms}.
+ I have read and agree to the <PrivacyPolicy /> and <TermsOfService />.
</Checkbox>
);
}