Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(homepage): replaced the second cta in homepage with guide #563

Merged
merged 2 commits into from
Jul 2, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
381 changes: 193 additions & 188 deletions config/webpack.config.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"jest-resolve": "27.4.5",
"jest-watch-typeahead": "1.0.0",
"k6": "^0.0.0",
"url": "^0.11.3",
"prettier": "^2.8.0",
"prop-types": "^15.8.1",
"react-dev-utils": "12.0.1",
Expand Down
2 changes: 0 additions & 2 deletions src/components/common/Anchor/Anchor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ Anchor.propTypes = {
children: node
};

Anchor.defaultProps = {};

export default Anchor;
2 changes: 1 addition & 1 deletion src/components/common/BreadCrumbs/BreadCrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ BreadCrumbs.propTypes = {
})
).isRequired
};
BreadCrumbs.defaultProps = {};

export default BreadCrumbs;
2 changes: 0 additions & 2 deletions src/components/common/Callout/Callout.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ Callout.propTypes = {
children: PropTypes.node
};

Callout.defaultProps = {};

export default Callout;
2 changes: 0 additions & 2 deletions src/components/common/CategoryIcon/CategoryIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ CategoryIcon.propTypes = {
}).isRequired
};

CategoryIcon.defaultProps = {};

export default CategoryIcon;
2 changes: 1 addition & 1 deletion src/components/common/EndSection/EndSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ export const EndSection = (props) => {
EndSection.propTypes = {
type: number.isRequired
};
EndSection.defaultProps = {};

export default EndSection;
18 changes: 10 additions & 8 deletions src/components/common/IntroSection/IntroSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ const IntroSection = ({
<h1 className="h3">{title}</h1>
</div>
<p className={"lead"}>{subtitle}</p>
<div className={`mt-4 ${styles.buttonSection} row`}>
<div
className={`mt-4 ${styles.buttonSection} row`}
style={{ gap: "20px" }}
>
{primaryButtonLink && primaryButtonText ? (
<div
className={
primaryButtonText.length > 20
? "col-xl-5 mb-2 mb-xl-0 mx-2 px-1"
: "col-xl-4 mb-2 mb-xl-0 mx-2 px-1"
: "col-xl-4 mb-0 mb-xl-0 ms-2 px-0"
}
style={{ width: "fit-content" }}
>
<Link className={"btn btn-primary"} to={primaryButtonLink}>
{primaryButtonText}
Expand All @@ -82,15 +86,15 @@ const IntroSection = ({
)}

{secondaryButtonLink ? (
<div className="col-xl-6 d-flex justify-content-xl-start mx-0">
<Link
<div className="col-xl-6 ms-xl-0 ms-2 d-flex justify-content-xl-start px-0 mx-0">
<a
className={
"btn btn-outline-primary " + styles.btnSecondary
}
to={secondaryButtonLink}
href={secondaryButtonLink}
>
{secondaryButtonText}
</Link>
</a>
</div>
) : (
""
Expand Down Expand Up @@ -121,6 +125,4 @@ IntroSection.propTypes = {
isSearch: bool
};

IntroSection.defaultProps = {};

export default IntroSection;
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,3 @@ ModalChangeOrientation.propTypes = {
onRedirect: func,
closeModal: func
};

ModalChangeOrientation.defaultProps = {};
2 changes: 0 additions & 2 deletions src/components/explore/ExploreByCategory/ExploreByCategory.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,4 @@ const ExploreByCategory = () => {

ExploreByCategory.propTypes = {};

ExploreByCategory.defaultProps = {};

export default ExploreByCategory;
2 changes: 0 additions & 2 deletions src/components/explore/ExploreByText/ExploreByText.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ const ExploreByText = () => {

ExploreByText.propTypes = {};

ExploreByText.defaultProps = {};

export default ExploreByText;
2 changes: 0 additions & 2 deletions src/components/explore/ExploreByType/ExploreByType.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,4 @@ const ExploreByType = () => {

ExploreByType.propTypes = {};

ExploreByType.defaultProps = {};

export default ExploreByType;
8 changes: 4 additions & 4 deletions src/components/explore/ExplorePage/ExplorePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const ExplorePage = () => {
subtitle="Schema è il catalogo in continua evoluzione, che armonizza e standardizza i modelli di dati condivisi e garantisce che formato e significato delle informazioni scambiate siano preservati e compresi durante gli scambi."
primaryButtonText="Esplora il catalogo"
primaryButtonLink={routes.search()}
secondaryButtonText="Scopri l’iniziativa"
secondaryButtonLink={routes.project()}
secondaryButtonText="Leggi la guida"
secondaryButtonLink={
"https://teamdigitale.github.io/dati-semantic-guida-ndc-docs/index.html"
}
type="HEADER"
isSearch={false}
/>
Expand All @@ -35,6 +37,4 @@ const ExplorePage = () => {

ExplorePage.propTypes = {};

ExplorePage.defaultProps = {};

export default ExplorePage;
2 changes: 0 additions & 2 deletions src/components/explore/ExploreSection/ExploreSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ ExploreSection.propTypes = {
children: element.isRequired
};

ExploreSection.defaultProps = {};

export default ExploreSection;
1 change: 0 additions & 1 deletion src/components/layout/CookiePanel/CookiePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ const CookiePanel = () => {
};

CookiePanel.propTypes = {};
CookiePanel.defaultProps = {};
export default CookiePanel;
2 changes: 0 additions & 2 deletions src/components/layout/ErrorPage/ErrorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,4 @@ const ErrorPage = () => {
};
ErrorPage.propTypes = {};

ErrorPage.defaultProps = {};

export default ErrorPage;
2 changes: 0 additions & 2 deletions src/components/layout/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ Footer.propTypes = {
childRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) })
};

Footer.defaultProps = {};

export default Footer;
2 changes: 0 additions & 2 deletions src/components/layout/FooterLinks/FooterLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ const FooterLinks = () => {

FooterLinks.propTypes = {};

FooterLinks.defaultProps = {};

export default FooterLinks;
2 changes: 0 additions & 2 deletions src/components/layout/FooterLogos/FooterLogos.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,4 @@ const FooterLogos = () => {

FooterLogos.propTypes = {};

FooterLogos.defaultProps = {};

export default FooterLogos;
2 changes: 0 additions & 2 deletions src/components/layout/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ const Header = () => {

Header.propTypes = {};

Header.defaultProps = {};

export default Header;
2 changes: 0 additions & 2 deletions src/components/layout/HeaderMainMenu/HeaderMainMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,4 @@ const HeaderMainMenu = () => {

HeaderMainMenu.propTypes = {};

HeaderMainMenu.defaultProps = {};

export default HeaderMainMenu;
2 changes: 0 additions & 2 deletions src/components/layout/HeaderMainTitle/HeaderMainTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ const HeaderMainTitle = () => (

HeaderMainTitle.propTypes = {};

HeaderMainTitle.defaultProps = {};

export default HeaderMainTitle;
2 changes: 0 additions & 2 deletions src/components/layout/HeaderNavigation/HeaderNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ const HeaderNavigation = () => (

HeaderNavigation.propTypes = {};

HeaderNavigation.defaultProps = {};

export default HeaderNavigation;
2 changes: 0 additions & 2 deletions src/components/layout/HeaderSlim/HeaderSlim.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ const HeaderSlim = () => (

HeaderSlim.propTypes = {};

HeaderSlim.defaultProps = {};

export default HeaderSlim;
2 changes: 0 additions & 2 deletions src/components/layout/Main/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,4 @@ Main.propTypes = {
childRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) })
};

Main.defaultProps = {};

export default Main;
5 changes: 5 additions & 0 deletions src/components/layout/Main/Main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { renderWithRoute } from "../../../services/testUtils";
import NotFound from "../NotFound/NotFound";
import ExplorePage from "../../explore/ExplorePage/ExplorePage";

jest.mock("swagger-ui-react", () => ({
__esModule: true,
default: jest.fn()
}));

jest.mock("../../explore/ExplorePage/ExplorePage", () => ({
__esModule: true,
default: jest.fn()
Expand Down
2 changes: 0 additions & 2 deletions src/components/layout/NewErrorPage/NewErrorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,4 @@ const NewErrorPage = () => {
};
NewErrorPage.propTypes = {};

NewErrorPage.defaultProps = {};

export default NewErrorPage;
2 changes: 0 additions & 2 deletions src/components/layout/NotFound/NotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,4 @@ const NotFound = () => {

NotFound.propTypes = {};

NotFound.defaultProps = {};

export default NotFound;
2 changes: 0 additions & 2 deletions src/components/search/AssetTypeChip/AssetTypeChip.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ AssetTypeChip.propTypes = {
isSearchChip: bool
};

AssetTypeChip.defaultProps = {};

export default AssetTypeChip;
2 changes: 0 additions & 2 deletions src/components/search/AssetTypeFilter/AssetTypeFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@ AssetTypeFilter.propTypes = {
selection: PropTypes.arrayOf(string)
};

AssetTypeFilter.defaultProps = {};

export default AssetTypeFilter;
2 changes: 0 additions & 2 deletions src/components/search/FilterPanel/FilterPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,4 @@ FilterPanel.propTypes = {
rightsHoldersList: array
};

FilterPanel.defaultProps = {};

export default FilterPanel;
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ FilterPanelSection.propTypes = {
children: node
};

FilterPanelSection.defaultProps = {};

export default FilterPanelSection;
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,4 @@ MultiCheckBoxFilter.propTypes = {
labbledById: string
};

MultiCheckBoxFilter.defaultProps = {};

export default MultiCheckBoxFilter;
2 changes: 0 additions & 2 deletions src/components/search/MultiSelectChips/MultiSelectChips.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,3 @@ MultiSelectChips.propTypes = {
labbledById: string,
type: string
};

MultiSelectChips.defaultProps = {};
2 changes: 0 additions & 2 deletions src/components/search/Pagination/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,4 @@ Pagination.propTypes = {
onPageSelect: PropTypes.func.isRequired
};

Pagination.defaultProps = {};

export default Pagination;
2 changes: 0 additions & 2 deletions src/components/search/PatternFilter/PatternFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,4 @@ PatternFilter.propTypes = {
isHomeSection: bool
};

PatternFilter.defaultProps = {};

export default PatternFilter;
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,4 @@ RightsHoldersFilter.propTypes = {
isMobileFilter: bool
};

RightsHoldersFilter.defaultProps = {};

export default RightsHoldersFilter;
2 changes: 0 additions & 2 deletions src/components/search/SearchPage/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,4 @@ const SearchPage = () => {

SearchPage.propTypes = {};

SearchPage.defaultProps = {};

export default SearchPage;
2 changes: 0 additions & 2 deletions src/components/search/SearchResultAlert/SearchResultAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@ SearchResultAlert.propTypes = {
message: string.isRequired
};

SearchResultAlert.defaultProps = {};

export default SearchResultAlert;
2 changes: 0 additions & 2 deletions src/components/search/SearchResultItem/SearchResultItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,4 @@ SearchResultItem.propTypes = {
}).isRequired
};

SearchResultItem.defaultProps = {};

export default SearchResultItem;
2 changes: 0 additions & 2 deletions src/components/search/SearchResults/SearchResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,4 @@ SearchResults.propTypes = {
areFiltersActive: bool
};

SearchResults.defaultProps = {};

export default SearchResults;
2 changes: 0 additions & 2 deletions src/components/search/ThemeFilter/ThemeFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ ThemeFilter.propTypes = {
selection: PropTypes.arrayOf(string)
};

ThemeFilter.defaultProps = {};

export default ThemeFilter;
2 changes: 0 additions & 2 deletions src/components/semantic-assets/AssetDetails/AssetDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,4 @@ const AssetDetails = ({ details }) => {

AssetDetails.propTypes = { ...getDetailsPropTypes() };

AssetDetails.defaultProps = {};

export default AssetDetails;
2 changes: 0 additions & 2 deletions src/components/semantic-assets/AssetNotFound/AssetNotFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,4 @@ AssetNotFound.propTypes = {
reason: oneOf([MISSING_URI, MISSING_RESOURCE]).isRequired
};

AssetNotFound.defaultProps = {};

export default AssetNotFound;
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ const AssetDetailsPage = () => {

AssetDetailsPage.propTypes = {};

AssetDetailsPage.defaultProps = {};
;

export default AssetDetailsPage;
2 changes: 0 additions & 2 deletions src/components/static-content/faq/FaqBody/FaqBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,4 @@ const FaqBody = () => {

FaqBody.propTypes = {};

FaqBody.defaultProps = {};

export default FaqBody;
2 changes: 0 additions & 2 deletions src/components/static-content/faq/FaqPage/FaqPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ const FaqPage = () => {

FaqPage.propTypes = {};

FaqPage.defaultProps = {};

export default FaqPage;
Loading
Loading