Skip to content

Commit

Permalink
fix: change links in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabio committed Jan 30, 2024
1 parent 2e78f4b commit 7cfeb1c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
15 changes: 13 additions & 2 deletions src/app/components/Head.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {
repositoryUrl,
documentationUrl,
} from "../contents/constants";

import { useTranslation } from "react-i18next";
import { Icon } from "design-react-kit";

// let timer = null;
// let lastGen = null;
Expand Down Expand Up @@ -45,11 +47,20 @@ export const Head = (): JSX.Element => {
<div className="content__head__title">{t("editor.title")}</div>
<div className="content__head__help">
<div>
<a href={repositoryUrl} rel="noopener noreferrer" target="_blank">
<a href={documentationUrl} rel="noopener noreferrer" target="_blank">
<Icon icon="it-info-circle" />&nbsp;
{t("editor.needhelp")}
</a>
</div>
<div>
<a
href="https://github.com/italia/publiccode-editor"
rel="noopener noreferrer"
target="_blank"
>
<Icon icon="it-github" />
{t("editor.source_code")}
</a>
{/* {info && (
<span className="content__head__status">
{t("editor.lastgeneration")}: {info}
Expand Down
2 changes: 1 addition & 1 deletion src/app/contents/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const {
// eslint-disable-next-line no-undef
} = process.env;

export const repositoryUrl = `https://docs.italia.it/italia/developers-italia/publiccodeyml/it/master/`;
export const documentationUrl = `https://yml.publiccode.tools`;
export const versionsUrl = `https://api.github.com/repos/${REPOSITORY}/contents/version`;
export const SAMPLE_YAML_URL = `https://raw.githubusercontent.com/italia/publiccode-editor/master/publiccode.yml`;
export const elasticUrl = ELASTIC_URL || "";
Expand Down
7 changes: 4 additions & 3 deletions src/asset/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ $head-background-color: #fdfdfd;

.content__head__help {
margin: 10px 20px 0;
height: 100%;
height: 40px;

display: flex;
flex-direction: column;
flex-direction: row;
align-items: flex-end;
justify-content: space-around;
justify-content: space-between;
text-align: right;

a {
Expand All @@ -44,6 +44,7 @@ $head-background-color: #fdfdfd;
font-size: 16px;
font-weight: bold;
line-height: 24px;
padding-left: 2rem;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cancel": "Cancel",
"title": "publiccode.yml Editor",
"needhelp": "Need Help?",
"source_code": "Source code",
"lastgeneration": "Last generation",
"addlanguage": "add language to the publiccode.yml file...",
"readmore": "Read more",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cancel": "Cancel",
"title": "publiccode.yml Editor",
"needhelp": "Need Help?",
"source_code": "Source code",
"lastgeneration": "Last generation",
"addlanguage": "add language to the publiccode.yml file...",
"readmore": "Read more",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cancel": "Annulla",
"title": "publiccode.yml Editor",
"needhelp": "Aiuto?",
"source_code": "Codice sorgente",
"lastgeneration": "Ultimo aggiornamento",
"addlanguage": "aggiungi lingua al file publiccode.yml...",
"readmore": "Leggi di più",
Expand Down

0 comments on commit 7cfeb1c

Please sign in to comment.