diff --git a/package-lock.json b/package-lock.json index 0006ef1ab7..8188d32cc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,16 +16,16 @@ "@astrojs/tailwind": "^4.0.0", "@docsearch/css": "^3.5.2", "@docsearch/react": "^3.5.2", - "@expressive-code/plugin-collapsible-sections": "^0.26.2", + "@expressive-code/plugin-collapsible-sections": "^0.27.1", "@nanostores/react": "^0.7.1", "astro": "^2.10.15", "astro-auto-import": "^0.3.1", - "astro-expressive-code": "^0.26.2", + "astro-expressive-code": "^0.27.1", "classnames": "^2.3.2", "html-escaper": "^3.0.3", "lodash": "^4.17.21", "lodash-es": "^4.17.21", - "nanostores": "^0.9.4", + "nanostores": "^0.9.5", "react": "^18.2.0", "react-dom": "^18.2.0", "rehype": "^13.0.1", @@ -39,11 +39,11 @@ "unist-util-visit-children": "^3.0.0" }, "devDependencies": { - "@types/html-escaper": "^3.0.1", - "@types/lodash-es": "^4.17.10", - "@types/node": "^20.8.9", - "@types/react": "^18.2.32", - "@types/react-dom": "^18.2.14", + "@types/html-escaper": "^3.0.2", + "@types/lodash-es": "^4.17.11", + "@types/node": "^20.9.0", + "@types/react": "^18.2.37", + "@types/react-dom": "^18.2.15", "typescript": "^5.2.2" } }, @@ -1469,9 +1469,9 @@ } }, "node_modules/@expressive-code/core": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.26.2.tgz", - "integrity": "sha512-/ldQmoxziCX2hMsxLIUR1gNOmtBi9S4WOSWMinrCFW78Kxcdh7qofIu4evu70OnK14GoZQ1tFKzX4Nme7k9eCw==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@expressive-code/core/-/core-0.27.1.tgz", + "integrity": "sha512-Ep6nAAXhNNMWRNyaFfSFnc3GjKa4Oms9jH7IC3/VCrXiRsI1+NodKv8NEP/XM1T+E8sYAZ9jfF2MIonRam4JMw==", "dependencies": { "@ctrl/tinycolor": "^3.6.0", "hast-util-to-html": "^8.0.4", @@ -1489,39 +1489,39 @@ } }, "node_modules/@expressive-code/plugin-collapsible-sections": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-collapsible-sections/-/plugin-collapsible-sections-0.26.2.tgz", - "integrity": "sha512-pRsx6wa3s3YW1rnq91CiZrwsiOv4b2ZSbJXNdLl2ybuCW0MUoRAj7b2X6IeGc1yNesu8mJKUpZnHxenXOAslqA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-collapsible-sections/-/plugin-collapsible-sections-0.27.1.tgz", + "integrity": "sha512-9h4frYMfRNYXA3TNPpYwBHrp/v7GEKMaRlp+KRw24od9wGHmQKBheGYTOId08G9/7DcUSmXDVDOOIM7RM3WR4g==", "dependencies": { - "@expressive-code/core": "^0.26.2", + "@expressive-code/core": "^0.27.1", "hast-util-select": "^5.0.5", "hastscript": "^7.2.0" } }, "node_modules/@expressive-code/plugin-frames": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.26.2.tgz", - "integrity": "sha512-CZDkUhVubXOraDC2Agaczmv05Uwl/L0zbNWpufJB87Dw7nqS9VY2ZpQnUxXrNRBvAr8k7OYBmiXWU+EPjozZww==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-frames/-/plugin-frames-0.27.1.tgz", + "integrity": "sha512-q8lXECgz5rzzqKNfBIM+BinG3yimh582KRiyzvUJtG3PX5AVeXdSyaUNhBt+gpKWG74WSBzzboWRsQgi3vUOYA==", "dependencies": { - "@expressive-code/core": "^0.26.2", + "@expressive-code/core": "^0.27.1", "hastscript": "^7.2.0" } }, "node_modules/@expressive-code/plugin-shiki": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.26.2.tgz", - "integrity": "sha512-34VGYMt24yLf+TLf+DqST4EOEcXM5L/fTY+n3+idKyRnDLlGyGIesSE36Y0PVvh0Tl9vwQQq1T3TAMBLfR4NSQ==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-shiki/-/plugin-shiki-0.27.1.tgz", + "integrity": "sha512-qDYg908ig+O6m1ZHRwGikUKYDOe2Boq5TtQrZzQd6kRk1O1jQDkklPyvGa/eDJPslsA1wk/2aP4ek5O4UNP9mQ==", "dependencies": { - "@expressive-code/core": "^0.26.2", + "@expressive-code/core": "^0.27.1", "shiki": "^0.14.1" } }, "node_modules/@expressive-code/plugin-text-markers": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.26.2.tgz", - "integrity": "sha512-z62yZLsoTaxIsl8UHYj9H4G8z2eQVtbcYkCNpuIAx+eD46OVzwsBVp0ioMsY+RLYZWggwS8QbNrwbm5zsats7w==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@expressive-code/plugin-text-markers/-/plugin-text-markers-0.27.1.tgz", + "integrity": "sha512-igqTQAF0qt2mKCUb4hjvUJKu8nJ6h0dwk40jZDnW7Djy7nUurJgK8+NcYjmyLbpQztwZ0zU5X913rKGnRYxASg==", "dependencies": { - "@expressive-code/core": "^0.26.2", + "@expressive-code/core": "^0.27.1", "hastscript": "^7.2.0", "unist-util-visit-parents": "^5.1.3" } @@ -1884,9 +1884,9 @@ } }, "node_modules/@types/html-escaper": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/html-escaper/-/html-escaper-3.0.1.tgz", - "integrity": "sha512-lVnoTUR09iECkTInzCzFEasZKs11VuCTIdo8hnLXwCU40UUbSl8boPsy6MNJ9+HbJQ/jxju8nSZxSHPVIbmCbg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/html-escaper/-/html-escaper-3.0.2.tgz", + "integrity": "sha512-A8vk09eyYzk8J/lFO4OUMKCmRN0rRzfZf4n3Olwapgox/PtTiU8zPYlL1UEkJ/WeHvV6v9Xnj3o/705PKz9r4Q==", "dev": true }, "node_modules/@types/json5": { @@ -1901,9 +1901,9 @@ "dev": true }, "node_modules/@types/lodash-es": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.10.tgz", - "integrity": "sha512-YJP+w/2khSBwbUSFdGsSqmDvmnN3cCKoPOL7Zjle6s30ZtemkkqhjVfFqGwPN7ASil5VyjE2GtyU/yqYY6mC0A==", + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.11.tgz", + "integrity": "sha512-eCw8FYAWHt2DDl77s+AMLLzPn310LKohruumpucZI4oOFJkIgnlaJcy23OKMJxx4r9PeTF13Gv6w+jqjWQaYUg==", "dev": true, "dependencies": { "@types/lodash": "*" @@ -1936,9 +1936,9 @@ } }, "node_modules/@types/node": { - "version": "20.8.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz", - "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==", + "version": "20.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", + "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", "dependencies": { "undici-types": "~5.26.4" } @@ -1959,9 +1959,9 @@ "integrity": "sha512-FbtmBWCcSa2J4zL781Zf1p5YUBXQomPEcep9QZCfRfQgTxz3pJWiDFLebohZ9fFntX5ibzOkSsrJ0TEew8cAog==" }, "node_modules/@types/react": { - "version": "18.2.32", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.32.tgz", - "integrity": "sha512-F0FVIZQ1x5Gxy/VYJb7XcWvCcHR28Sjwt1dXLspdIatfPq1MVACfnBDwKe6ANLxQ64riIJooXClpUR6oxTiepg==", + "version": "18.2.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.37.tgz", + "integrity": "sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -1969,9 +1969,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.14", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.14.tgz", - "integrity": "sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==", + "version": "18.2.15", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.15.tgz", + "integrity": "sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg==", "dependencies": { "@types/react": "*" } @@ -2343,11 +2343,11 @@ "integrity": "sha512-3xA4X31gHT1F1l38ATDIL9GpRLdwVhnEFC8Uikv5ZLlXATwrCYyPq7ZWHxzxc3J/30SUiwiYT+bQe0/XvKlWbw==" }, "node_modules/astro-expressive-code": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.26.2.tgz", - "integrity": "sha512-4sRk3jBqr5EW+j7WP5FrwmVDL6no1Y4bZVGNOGxfTAM6G/9Ano3lQAZck0YTwFs1Wgzvy3ivH0rkDXENu1lCXQ==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/astro-expressive-code/-/astro-expressive-code-0.27.1.tgz", + "integrity": "sha512-2zfv9Vh42pRujEDP0ZFLNa0dj7KMm1Sr3g0bEDf1r03/hELPQWDxqHQIA5sYldvnx4DmQY1H3XnZP3Hn8baw/w==", "dependencies": { - "remark-expressive-code": "^0.26.2" + "remark-expressive-code": "^0.27.1" }, "peerDependencies": { "astro": "^2.0.0 || ^3.0.0-beta" @@ -3631,14 +3631,14 @@ } }, "node_modules/expressive-code": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.26.2.tgz", - "integrity": "sha512-r3W9XhlqHXiN0rbxo6rX2CFeVj6vwM5752AIUdA9DZ34OeZn5cY/gj1Y1aU81TvgG5qKhyf94agdYMc+9Zg5sA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/expressive-code/-/expressive-code-0.27.1.tgz", + "integrity": "sha512-Aw/XuJ1TLNezuoaFa2F9ydNO7I140sUVMZsic78UWgL8TlV5sy6WGXFoKspgQFLKop758BTXKQbHf3r7g4CrQA==", "dependencies": { - "@expressive-code/core": "^0.26.2", - "@expressive-code/plugin-frames": "^0.26.2", - "@expressive-code/plugin-shiki": "^0.26.2", - "@expressive-code/plugin-text-markers": "^0.26.2" + "@expressive-code/core": "^0.27.1", + "@expressive-code/plugin-frames": "^0.27.1", + "@expressive-code/plugin-shiki": "^0.27.1", + "@expressive-code/plugin-text-markers": "^0.27.1" } }, "node_modules/extend": { @@ -8400,9 +8400,9 @@ } }, "node_modules/nanostores": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/nanostores/-/nanostores-0.9.4.tgz", - "integrity": "sha512-BVFzKt6K5P8tYQLL7MItqcev7jpspA5pIjv+Ck3k6wBnUlwCJcpkGTIinj4APvx8SvdP9fXDGoMRCTY6DO/9QA==", + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/nanostores/-/nanostores-0.9.5.tgz", + "integrity": "sha512-Z+p+g8E7yzaWwOe5gEUB2Ox0rCEeXWYIZWmYvw/ajNYX8DlXdMvMDj8DWfM/subqPAcsf8l8Td4iAwO1DeIIRQ==", "funding": [ { "type": "github", @@ -10051,11 +10051,11 @@ } }, "node_modules/remark-expressive-code": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/remark-expressive-code/-/remark-expressive-code-0.26.2.tgz", - "integrity": "sha512-OpBYP9BWdtCkQmYNONwab+S14m3CYraElvPEf71GmxRImd4FXjtSFQDKRFTJeIaNPdP5wivDkgYgg5P7mq47PA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/remark-expressive-code/-/remark-expressive-code-0.27.1.tgz", + "integrity": "sha512-r/Eugd2pUBWyaRByWZ15x19O0bQGxn2JH6zT9+VAENSJqZmX+nPuJdHZtXF57EvaDc3wzX528kV81LjFmNwEFw==", "dependencies": { - "expressive-code": "^0.26.2", + "expressive-code": "^0.27.1", "hast-util-to-html": "^8.0.4", "unist-util-visit": "^4.1.2" } diff --git a/package.json b/package.json index 4da02cb75c..6d5744edef 100644 --- a/package.json +++ b/package.json @@ -19,16 +19,16 @@ "@astrojs/tailwind": "^4.0.0", "@docsearch/css": "^3.5.2", "@docsearch/react": "^3.5.2", - "@expressive-code/plugin-collapsible-sections": "^0.26.2", + "@expressive-code/plugin-collapsible-sections": "^0.27.1", "@nanostores/react": "^0.7.1", "astro": "^2.10.15", "astro-auto-import": "^0.3.1", - "astro-expressive-code": "^0.26.2", + "astro-expressive-code": "^0.27.1", "classnames": "^2.3.2", "html-escaper": "^3.0.3", "lodash": "^4.17.21", "lodash-es": "^4.17.21", - "nanostores": "^0.9.4", + "nanostores": "^0.9.5", "react": "^18.2.0", "react-dom": "^18.2.0", "rehype": "^13.0.1", @@ -42,11 +42,11 @@ "unist-util-visit-children": "^3.0.0" }, "devDependencies": { - "@types/html-escaper": "^3.0.1", - "@types/lodash-es": "^4.17.10", - "@types/node": "^20.8.9", - "@types/react": "^18.2.32", - "@types/react-dom": "^18.2.14", + "@types/html-escaper": "^3.0.2", + "@types/lodash-es": "^4.17.11", + "@types/node": "^20.9.0", + "@types/react": "^18.2.37", + "@types/react-dom": "^18.2.15", "typescript": "^5.2.2" } } diff --git a/public/images/api-icon.svg b/public/images/api-icon.svg new file mode 100644 index 0000000000..703f65503d --- /dev/null +++ b/public/images/api-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/footer/facebook-icon.svg b/public/images/footer/facebook-icon.svg new file mode 100644 index 0000000000..d547de4e62 --- /dev/null +++ b/public/images/footer/facebook-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/footer/instagram-icon.svg b/public/images/footer/instagram-icon.svg new file mode 100644 index 0000000000..2c0a852d5f --- /dev/null +++ b/public/images/footer/instagram-icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/images/footer/linkedin-icon.svg b/public/images/footer/linkedin-icon.svg new file mode 100644 index 0000000000..31376ee26e --- /dev/null +++ b/public/images/footer/linkedin-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/footer/twitter-icon.svg b/public/images/footer/twitter-icon.svg new file mode 100644 index 0000000000..19b9001867 --- /dev/null +++ b/public/images/footer/twitter-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/footer/wechat-icon.svg b/public/images/footer/wechat-icon.svg new file mode 100644 index 0000000000..c0b54062ec --- /dev/null +++ b/public/images/footer/wechat-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/footer/youtube-icon.svg b/public/images/footer/youtube-icon.svg new file mode 100644 index 0000000000..5283dbc481 --- /dev/null +++ b/public/images/footer/youtube-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/icon-search.svg b/public/images/icon-search.svg new file mode 100644 index 0000000000..15411e0c04 --- /dev/null +++ b/public/images/icon-search.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/images/landing-bg.svg b/public/images/landing-bg.svg new file mode 100644 index 0000000000..aad31225da --- /dev/null +++ b/public/images/landing-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/images/sdk-icon.svg b/public/images/sdk-icon.svg new file mode 100644 index 0000000000..bf55da7f75 --- /dev/null +++ b/public/images/sdk-icon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/Cards/CategoryCard.astro b/src/components/Cards/CategoryCard.astro index 034a419846..0c372840d5 100644 --- a/src/components/Cards/CategoryCard.astro +++ b/src/components/Cards/CategoryCard.astro @@ -1,6 +1,8 @@ --- import type { ChildLink } from "@utils/helpers/navigation/types"; +import "./category-card.css"; + interface CategoryCardProps { child: ChildLink; } @@ -8,8 +10,8 @@ interface CategoryCardProps { const { child } = Astro.props as CategoryCardProps; --- -
- +
+
diff --git a/src/components/Cards/SearchResultCard.astro b/src/components/Cards/SearchResultCard.astro new file mode 100644 index 0000000000..8186748db5 --- /dev/null +++ b/src/components/Cards/SearchResultCard.astro @@ -0,0 +1,19 @@ +--- +import PageBreadcrumbs from "@components/Layout/PageBreadcrumbs/PageBreadcrumbs.astro"; + +const { title, description, breadcrumbs, link } = Astro.props; +--- + + diff --git a/src/components/Cards/TopCategoryCard.astro b/src/components/Cards/TopCategoryCard.astro new file mode 100644 index 0000000000..d47a945bb2 --- /dev/null +++ b/src/components/Cards/TopCategoryCard.astro @@ -0,0 +1,34 @@ +--- +import "./category-card.css"; + +interface TopCategoryProps { + category: { + title: string; + icon: string; + iconAlt: string; + link: string; + }; +} + +const { category } = Astro.props as TopCategoryProps; +--- + + diff --git a/src/components/PageContent/article.css b/src/components/Cards/category-card.css similarity index 81% rename from src/components/PageContent/article.css rename to src/components/Cards/category-card.css index a0d3069d59..269297e3dd 100644 --- a/src/components/PageContent/article.css +++ b/src/components/Cards/category-card.css @@ -1,4 +1,4 @@ -.article-categories a { +div .category a { color: black; text-decoration: none; &:hover { diff --git a/src/components/HeadSEO.astro b/src/components/HeadSEO.astro index 2057953e33..31eca63bc9 100644 --- a/src/components/HeadSEO.astro +++ b/src/components/HeadSEO.astro @@ -2,7 +2,7 @@ import type { CollectionEntry } from "astro:content"; import { SITE, OPEN_GRAPH } from "../consts"; -type Props = { canonicalUrl: URL } & CollectionEntry<"docs">["data"]; +type Props = Partial<{ canonicalUrl: URL } & CollectionEntry<"docs">["data"]>; const { ogLocale, image, title, description, canonicalUrl } = Astro.props; const formattedContentTitle = `${title} 🚀 ${SITE.title}`; diff --git a/src/components/Icon.astro b/src/components/Icon.astro index 64905f5e43..2fb8903897 100644 --- a/src/components/Icon.astro +++ b/src/components/Icon.astro @@ -1,12 +1,19 @@ --- -import type { IconName } from "@adjust/components"; +import type { IconColor, IconName, IconSize } from "@adjust/components"; import { Icon as AtlasIcon } from "@adjust/components"; // Icons must be supported by Atlas's Icon component. // https://atlas.adeven.com/docs/components/Icon#available-icons export interface Props { name: IconName; + color?: IconColor; + size?: IconSize; } -const { name } = Astro.props as Props; +const { name, color, size } = Astro.props as Props; --- - + diff --git a/src/components/LeftSidebar/SidebarHeader/audience.css b/src/components/Layout/AudienceDropdown/audience.css similarity index 100% rename from src/components/LeftSidebar/SidebarHeader/audience.css rename to src/components/Layout/AudienceDropdown/audience.css diff --git a/src/components/LeftSidebar/SidebarHeader/AudienceDropdown.tsx b/src/components/Layout/AudienceDropdown/index.tsx similarity index 100% rename from src/components/LeftSidebar/SidebarHeader/AudienceDropdown.tsx rename to src/components/Layout/AudienceDropdown/index.tsx diff --git a/src/components/Layout/Footer/ContactSupportBlock/ContactSupportButton/index.astro b/src/components/Layout/Footer/ContactSupportBlock/ContactSupportButton/index.astro new file mode 100644 index 0000000000..48cbb396b2 --- /dev/null +++ b/src/components/Layout/Footer/ContactSupportBlock/ContactSupportButton/index.astro @@ -0,0 +1,14 @@ +--- +import { HELP_CENTER_LINK } from "src/consts"; + +import type { IWithLanguage } from "src/types/WithLanguage"; + +const { language, contentLevel } = Astro.props as IWithLanguage; +--- + + + {contentLevel ? "Contact Us" : "Contact Support"} + diff --git a/src/components/Layout/Footer/ContactSupportBlock/index.astro b/src/components/Layout/Footer/ContactSupportBlock/index.astro new file mode 100644 index 0000000000..1263fa1758 --- /dev/null +++ b/src/components/Layout/Footer/ContactSupportBlock/index.astro @@ -0,0 +1,15 @@ +--- +import ContactSupportButton from "./ContactSupportButton/index.astro"; + +import type { ContactSupportBlockProps } from "./types"; + +const { language } = Astro.props as ContactSupportBlockProps; +--- + +
+ Can't find what you're looking for? +
diff --git a/src/components/Layout/Footer/ContactSupportBlock/types.ts b/src/components/Layout/Footer/ContactSupportBlock/types.ts new file mode 100644 index 0000000000..b168f39dfb --- /dev/null +++ b/src/components/Layout/Footer/ContactSupportBlock/types.ts @@ -0,0 +1,3 @@ +export interface ContactSupportBlockProps { + language: string; +} diff --git a/src/components/Layout/Footer/FooterContent.astro b/src/components/Layout/Footer/FooterContent.astro new file mode 100644 index 0000000000..a3b1eaaa7f --- /dev/null +++ b/src/components/Layout/Footer/FooterContent.astro @@ -0,0 +1,72 @@ +--- +import ContactSupportButton from "./ContactSupportBlock/ContactSupportButton/index.astro"; +import { footerIcons, footerLinks } from "./static"; + +import type { IWithLanguage } from "src/types/WithLanguage"; + +import "./footer.css"; + +const { language } = Astro.props as IWithLanguage; +const fullYear = new Date().getFullYear(); +--- + +
+
+

+ Have a question? Get in touch +

+ +
+ +
+
+
+
+
+ { + footerLinks.map((lnk) => ( + + )) + } +
+
+
+ { + footerIcons.map((icon) => ( + + + + )) + } +
+
+
+
+ © {fullYear} Adjust GmbH. All rights reserved +
+
diff --git a/src/components/Layout/Footer/FooterLanguageSwitch.astro b/src/components/Layout/Footer/FooterLanguageSwitch.astro new file mode 100644 index 0000000000..cd0b89d2b8 --- /dev/null +++ b/src/components/Layout/Footer/FooterLanguageSwitch.astro @@ -0,0 +1,28 @@ +--- +import { getLanguageFromURL, LOCALE_NAMES } from "@i18n/locales"; +import LanguageSwitch from "../LanguageSwitch"; +import { Icon } from "@adjust/components"; + +import "./footer.css"; + +const currentPage = Astro.url.pathname; +const currentLang = getLanguageFromURL(currentPage); +--- + + diff --git a/src/components/Layout/Footer/FooterMain.astro b/src/components/Layout/Footer/FooterMain.astro new file mode 100644 index 0000000000..972eb0f9fc --- /dev/null +++ b/src/components/Layout/Footer/FooterMain.astro @@ -0,0 +1,73 @@ +--- +import ContactSupportButton from "./ContactSupportBlock/ContactSupportButton/index.astro"; +import FooterLanguageSwitch from "./FooterLanguageSwitch.astro"; +import { footerIcons, footerLinks } from "./static"; +import type { IWithLanguage } from "src/types/WithLanguage"; + +import "./footer.css"; + +const { language } = Astro.props as IWithLanguage; +const fullYear = new Date().getFullYear(); +--- + +
+
+
+

+ Can't find what you're looking for? Get in touch +

+ +
+
+
+
+
+
+ { + footerLinks.map((lnk) => ( + + )) + } +
+
+ +
+ { + footerIcons.map((icon) => ( + + + + )) + } +
+
+
+
+
+ © {fullYear} Adjust GmbH. All rights reserved +
+
diff --git a/src/components/Layout/Footer/footer.css b/src/components/Layout/Footer/footer.css new file mode 100644 index 0000000000..9a993b556d --- /dev/null +++ b/src/components/Layout/Footer/footer.css @@ -0,0 +1,24 @@ +.footer-link { + text-decoration: none !important; +} + +.footer-link > span { + background: linear-gradient(0deg, #04182b, #04182b) no-repeat 100% 100%/0 + 0.0625rem; + transition: background-size 0.35s; + padding-bottom: 0.125rem; + &:hover { + background-size: 100% 0.0625rem; + background-position-x: left; + } +} + +.footer_language-switch:hover { + & .lang-tooltip { + display: block; + } +} + +.footer_language-switch #current-lang { + font-weight: 500; +} diff --git a/src/components/Layout/Footer/static.ts b/src/components/Layout/Footer/static.ts new file mode 100644 index 0000000000..3dd709be58 --- /dev/null +++ b/src/components/Layout/Footer/static.ts @@ -0,0 +1,37 @@ +export const adjustLink = "https://www.adjust.com"; + +export const footerLinks = [ + { text: "About Us", url: `${adjustLink}/company/` }, + { text: "Security", url: `${adjustLink}/security/` }, + { + text: "Privacy Policy", + url: `${adjustLink}/terms/privacy-policy/`, + }, + { + text: "Terms & Conditions", + url: `${adjustLink}/terms/general-terms-and-conditions/`, + }, + { text: "CCPA & GDPR", url: `${adjustLink}/terms/ccpa/` }, + { + text: "Legal Notice", + url: `${adjustLink}/terms/impressum/`, + }, +]; + +export const footerIcons = [ + { + name: "wechat-icon", + link: "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIzODg5ODQwMg==", + }, + { name: "facebook-icon", link: "https://www.facebook.com/adjustcom" }, + { name: "twitter-icon", link: "https://twitter.com/adjustcom" }, + { name: "instagram-icon", link: "https://www.instagram.com/adjustcom/" }, + { + name: "linkedin-icon", + link: "https://www.linkedin.com/company/adjustcom/", + }, + { + name: "youtube-icon", + link: "https://www.youtube.com/channel/UCLxY21pzKyjTuODjUytJIsA", + }, +]; diff --git a/src/components/Layout/Footer/types.ts b/src/components/Layout/Footer/types.ts new file mode 100644 index 0000000000..d1ce9211fb --- /dev/null +++ b/src/components/Layout/Footer/types.ts @@ -0,0 +1,10 @@ +import type { Locales } from "@i18n/locales"; +import type { IWithLanguage } from "src/types/WithLanguage"; + +export interface LanguageSwitchProps { + lang: string; + locales: Locales; + hideIcon?: boolean; + isFooter?: boolean; + currentUrl: string; +} diff --git a/src/components/Layout/Header/MainHeader.astro b/src/components/Layout/Header/MainHeader.astro new file mode 100644 index 0000000000..8c52e771af --- /dev/null +++ b/src/components/Layout/Header/MainHeader.astro @@ -0,0 +1,38 @@ +--- +import { Icon } from "@adjust/components"; + +import { getLanguageFromURL } from "@i18n/locales"; +import AudienceDropdown from "../AudienceDropdown"; +import { HELP_CENTER_LINK } from "src/consts"; +import MenuToggle from "./SidebarToggle"; + +import "./main-header.css"; + +const currentLang = getLanguageFromURL(Astro.url.pathname); +const homeUrl = `${Astro.url.origin}/${currentLang}`; +--- + + +
+
+ + adjust-icon + + +
+ +
diff --git a/src/components/Header/MobileHeader.astro b/src/components/Layout/Header/MobileHeader.astro similarity index 100% rename from src/components/Header/MobileHeader.astro rename to src/components/Layout/Header/MobileHeader.astro diff --git a/src/components/Header/SidebarToggle.tsx b/src/components/Layout/Header/SidebarToggle.tsx similarity index 100% rename from src/components/Header/SidebarToggle.tsx rename to src/components/Layout/Header/SidebarToggle.tsx diff --git a/src/components/Layout/Header/main-header.css b/src/components/Layout/Header/main-header.css new file mode 100644 index 0000000000..7b9183a390 --- /dev/null +++ b/src/components/Layout/Header/main-header.css @@ -0,0 +1,27 @@ +.mobile-sidebar-toggle { + @media (max-width: 1024px) { + & header { + display: flex; + flex-direction: column; + flex-wrap: wrap; + padding-top: 1px; + width: 100%; + row-gap: 20px; + } + & .header-dropdown { + justify-content: space-between; + width: 100%; + padding-right: 22px; + } + & .header-links { + justify-content: space-between; + width: 100%; + padding: 0; + margin-bottom: 20px; + column-gap: 14px; + } + & .header-links_icon { + display: none; + } + } +} diff --git a/src/components/LeftSidebar/LanguageSwitch/index.tsx b/src/components/Layout/LanguageSwitch/index.tsx similarity index 93% rename from src/components/LeftSidebar/LanguageSwitch/index.tsx rename to src/components/Layout/LanguageSwitch/index.tsx index 95f2078994..6aff3ee918 100644 --- a/src/components/LeftSidebar/LanguageSwitch/index.tsx +++ b/src/components/Layout/LanguageSwitch/index.tsx @@ -52,7 +52,12 @@ const LanguageSwitch: FC = ({
{!hideIcon && }
-
+
{locales[lang as keyof Locales] || "English"}
diff --git a/src/components/LeftSidebar/LanguageSwitch/language-switch.css b/src/components/Layout/LanguageSwitch/language-switch.css similarity index 100% rename from src/components/LeftSidebar/LanguageSwitch/language-switch.css rename to src/components/Layout/LanguageSwitch/language-switch.css diff --git a/src/components/LeftSidebar/LanguageSwitch/types.ts b/src/components/Layout/LanguageSwitch/types.ts similarity index 100% rename from src/components/LeftSidebar/LanguageSwitch/types.ts rename to src/components/Layout/LanguageSwitch/types.ts diff --git a/src/components/LeftSidebar/Navigation.astro b/src/components/Layout/LeftSidebar/Navigation.astro similarity index 82% rename from src/components/LeftSidebar/Navigation.astro rename to src/components/Layout/LeftSidebar/Navigation.astro index 5ee36dd097..4a8c7f770a 100644 --- a/src/components/LeftSidebar/Navigation.astro +++ b/src/components/Layout/LeftSidebar/Navigation.astro @@ -3,6 +3,7 @@ import classNames from "classnames"; import { getLanguageFromURL } from "@i18n/locales"; import NavigationItem from "./NavigationItem"; +import { getCurrentPage } from "@utils/helpers/navigation/getCurrentPage"; import type { NavigationData } from "src/utils/helpers/navigation/types"; @@ -11,10 +12,7 @@ interface NavigationProps { } const { navigationEntries } = Astro.props as NavigationProps; -const currentPage = Astro.url.pathname; -const currentPageMatch = currentPage.endsWith("/") - ? currentPage.slice(1, -1) - : currentPage.slice(1); +const currentPage = getCurrentPage(Astro.url.pathname); const langCode = getLanguageFromURL(currentPage); const sidebar = navigationEntries[langCode]; @@ -25,7 +23,7 @@ const sidebar = navigationEntries[langCode]; class="sidebar-navigation w-[294px] break-words flex flex-col gap-y-[18px] pr-6 text-secondary lg:h-[calc(100%-62px)] lg:pb-6 lg:pl-[18px] lg:pt-0 xs:pt-4 xs:h-full static xs:inset-y-0 xs:left-0 xs:z-30 xs:shadow-right xs:pl-3 lg:shadow-none overflow-y-auto print:hidden" > { - sidebar.children.map((child, i) => ( + sidebar.children.map((child) => (
diff --git a/src/components/LeftSidebar/NavigationItem.tsx b/src/components/Layout/LeftSidebar/NavigationItem.tsx similarity index 94% rename from src/components/LeftSidebar/NavigationItem.tsx rename to src/components/Layout/LeftSidebar/NavigationItem.tsx index d2506cecbb..8f7200f7e3 100644 --- a/src/components/LeftSidebar/NavigationItem.tsx +++ b/src/components/Layout/LeftSidebar/NavigationItem.tsx @@ -51,11 +51,11 @@ const LeftSidebarItem: FC<{ ) : null} 1 && !isOpen, diff --git a/src/components/LeftSidebar/SidebarHeader/SidebarHeader.astro b/src/components/Layout/LeftSidebar/SidebarHeader/SidebarHeader.astro similarity index 85% rename from src/components/LeftSidebar/SidebarHeader/SidebarHeader.astro rename to src/components/Layout/LeftSidebar/SidebarHeader/SidebarHeader.astro index 4d309fcf24..6430302ef5 100644 --- a/src/components/LeftSidebar/SidebarHeader/SidebarHeader.astro +++ b/src/components/Layout/LeftSidebar/SidebarHeader/SidebarHeader.astro @@ -1,5 +1,5 @@ --- -import AudienceDropdown from "./AudienceDropdown"; +import AudienceDropdown from "../../AudienceDropdown"; interface SidebarHeaderProps { homeUrl: string; diff --git a/src/components/LeftSidebar/SidebarSearch/SidebarSearch.astro b/src/components/Layout/LeftSidebar/SidebarSearch/SidebarSearch.astro similarity index 100% rename from src/components/LeftSidebar/SidebarSearch/SidebarSearch.astro rename to src/components/Layout/LeftSidebar/SidebarSearch/SidebarSearch.astro diff --git a/src/components/LeftSidebar/SidebarSearch/types.ts b/src/components/Layout/LeftSidebar/SidebarSearch/types.ts similarity index 100% rename from src/components/LeftSidebar/SidebarSearch/types.ts rename to src/components/Layout/LeftSidebar/SidebarSearch/types.ts diff --git a/src/components/PageBreadcrumbs/PageBreadcrumbs.astro b/src/components/Layout/PageBreadcrumbs/PageBreadcrumbs.astro similarity index 52% rename from src/components/PageBreadcrumbs/PageBreadcrumbs.astro rename to src/components/Layout/PageBreadcrumbs/PageBreadcrumbs.astro index 7dcdcc6bbe..e44c07f3d4 100644 --- a/src/components/PageBreadcrumbs/PageBreadcrumbs.astro +++ b/src/components/Layout/PageBreadcrumbs/PageBreadcrumbs.astro @@ -1,22 +1,25 @@ --- import classNames from "classnames"; +import { getCurrentPage } from "@utils/helpers/navigation/getCurrentPage"; + import type { NavigationData } from "src/utils/helpers/navigation/types"; import "./breadcrumbs.css"; interface BreadcrumbsProps { breadcrumbs: NavigationData["breadcrumbs"]; + withMargin?: boolean; } -const { breadcrumbs } = Astro.props as BreadcrumbsProps; -const currentPage = Astro.url.pathname; -const currentPageMatch = currentPage.endsWith("/") - ? currentPage.slice(1, -1) - : currentPage.slice(1); +const { breadcrumbs, withMargin = true } = Astro.props as BreadcrumbsProps; +const currentPage = getCurrentPage(Astro.url.pathname)?.slice(1); --- -
+