Skip to content

Commit 7cfeb1c

Browse files
committed
fix: change links in the header
Fix italia#246.
1 parent 2e78f4b commit 7cfeb1c

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

src/app/components/Head.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import {
2-
repositoryUrl,
2+
documentationUrl,
33
} from "../contents/constants";
4+
45
import { useTranslation } from "react-i18next";
6+
import { Icon } from "design-react-kit";
57

68
// let timer = null;
79
// let lastGen = null;
@@ -45,11 +47,20 @@ export const Head = (): JSX.Element => {
4547
<div className="content__head__title">{t("editor.title")}</div>
4648
<div className="content__head__help">
4749
<div>
48-
<a href={repositoryUrl} rel="noopener noreferrer" target="_blank">
50+
<a href={documentationUrl} rel="noopener noreferrer" target="_blank">
51+
<Icon icon="it-info-circle" />&nbsp;
4952
{t("editor.needhelp")}
5053
</a>
5154
</div>
5255
<div>
56+
<a
57+
href="https://github.com/italia/publiccode-editor"
58+
rel="noopener noreferrer"
59+
target="_blank"
60+
>
61+
<Icon icon="it-github" />
62+
{t("editor.source_code")}
63+
</a>
5364
{/* {info && (
5465
<span className="content__head__status">
5566
{t("editor.lastgeneration")}: {info}

src/app/contents/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const {
88
// eslint-disable-next-line no-undef
99
} = process.env;
1010

11-
export const repositoryUrl = `https://docs.italia.it/italia/developers-italia/publiccodeyml/it/master/`;
11+
export const documentationUrl = `https://yml.publiccode.tools`;
1212
export const versionsUrl = `https://api.github.com/repos/${REPOSITORY}/contents/version`;
1313
export const SAMPLE_YAML_URL = `https://raw.githubusercontent.com/italia/publiccode-editor/master/publiccode.yml`;
1414
export const elasticUrl = ELASTIC_URL || "";

src/asset/content.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ $head-background-color: #fdfdfd;
2929

3030
.content__head__help {
3131
margin: 10px 20px 0;
32-
height: 100%;
32+
height: 40px;
3333

3434
display: flex;
35-
flex-direction: column;
35+
flex-direction: row;
3636
align-items: flex-end;
37-
justify-content: space-around;
37+
justify-content: space-between;
3838
text-align: right;
3939

4040
a {
@@ -44,6 +44,7 @@ $head-background-color: #fdfdfd;
4444
font-size: 16px;
4545
font-weight: bold;
4646
line-height: 24px;
47+
padding-left: 2rem;
4748
}
4849
}
4950

src/i18n/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"cancel": "Cancel",
44
"title": "publiccode.yml Editor",
55
"needhelp": "Need Help?",
6+
"source_code": "Source code",
67
"lastgeneration": "Last generation",
78
"addlanguage": "add language to the publiccode.yml file...",
89
"readmore": "Read more",

src/i18n/locales/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"cancel": "Cancel",
44
"title": "publiccode.yml Editor",
55
"needhelp": "Need Help?",
6+
"source_code": "Source code",
67
"lastgeneration": "Last generation",
78
"addlanguage": "add language to the publiccode.yml file...",
89
"readmore": "Read more",

src/i18n/locales/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"cancel": "Annulla",
44
"title": "publiccode.yml Editor",
55
"needhelp": "Aiuto?",
6+
"source_code": "Codice sorgente",
67
"lastgeneration": "Ultimo aggiornamento",
78
"addlanguage": "aggiungi lingua al file publiccode.yml...",
89
"readmore": "Leggi di più",

0 commit comments

Comments
 (0)