Skip to content

Commit

Permalink
Updating png links to first link to make it more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
amankumarrr committed Mar 14, 2024
1 parent 80c9058 commit caeebee
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .tina/__generated__/_graphql.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .tina/__generated__/_schema.json

Large diffs are not rendered by default.

32 changes: 23 additions & 9 deletions components/blocks/downloadBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type Downloads = {
header: string;
img: string;
imgBackground: keyof typeof bgOptions;
pngLink: string;
firstLink: string;
secondLink: string;
secondLinkText: string;
};
Expand All @@ -42,7 +42,15 @@ export const DownloadBlock = (data: DownloadBlockProps) => {
};

const Download = (data: Downloads) => {
const { header, img, imgBackground, pngLink, secondLink } = data;
const {
header,
img,
imgBackground,
firstLinkText,
firstLink,
secondLink,
secondLinkText,
} = data;
return (
<div className="col-span-1">
<div className={classNames("py-3 text-black md:px-6")}>
Expand All @@ -64,18 +72,18 @@ const Download = (data: Downloads) => {
"grid grid-cols-2 gap-x-0.25 border-t-2 border-white text-black"
)}
>
{pngLink && (
{firstLink && (
<DownloadButton
link={pngLink}
text="PNG"
field="pngLink"
link={firstLink}
text={firstLinkText || "PNG"}
field="firstLink"
schema={data}
/>
)}
{secondLink && (
<DownloadButton
link={secondLink}
text={data.secondLinkText || "PDF"}
text={secondLinkText || "PDF"}
field="secondLink"
schema={data}
/>
Expand Down Expand Up @@ -146,8 +154,14 @@ export const downloadBlockSchema: Template = {
},
{
type: "image",
label: "PNG Link",
name: "pngLink",
label: "First Link Text",
name: "firstLinkText",
description: "Defaults to PNG",
},
{
type: "image",
label: "First Link",
name: "firstLink",
// @ts-expect-error - tina-cms types are incorrect
uploadDir: () => "company-logos/downloads/",
},
Expand Down
18 changes: 9 additions & 9 deletions content/logo/ssw.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,42 @@ _body:
- header: Color
img: /images/company-logos/ssw-logo-preview.png
imgBackground: white
pngLink: /images/company-logos/downloads/images/ssw-logo.png
firstLink: /images/company-logos/downloads/images/ssw-logo.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo.pdf
- header: Black & White
img: /images/company-logos/ssw-logo-bw-preview.png
pngLink: /images/company-logos/downloads/images/ssw-logo-bw.png
firstLink: /images/company-logos/downloads/images/ssw-logo-bw.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-bw.pdf
- header: Charcoal
img: /images/company-logos/ssw-logo-charcoal-preview.png
pngLink: /images/company-logos/downloads/images/ssw-logo-charcoal.png
firstLink: /images/company-logos/downloads/images/ssw-logo-charcoal.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-charcoal.pdf
- header: Red
img: /images/company-logos/ssw-logo-red-preview.png
pngLink: /images/company-logos/downloads/images/ssw-logo-red.png
firstLink: /images/company-logos/downloads/images/ssw-logo-red.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-red.pdf
- header: White
img: /images/company-logos/ssw-logo-white-preview.png
imgBackground: black
pngLink: /images/company-logos/downloads/images/ssw-logo-white.png
firstLink: /images/company-logos/downloads/images/ssw-logo-white.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-white.pdf
- header: Dark Mode
img: /images/company-logos/ssw-logo-darkmode-preview.png
imgBackground: black
pngLink: /images/company-logos/downloads/images/ssw-logo-darkmode.png
firstLink: /images/company-logos/downloads/images/ssw-logo-darkmode.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-darkmode.pdf
- header: Square
img: /images/company-logos/ssw-logo-square-preview.png
imgBackground: grey
pngLink: /images/company-logos/downloads/images/ssw-logo-square.png
firstLink: /images/company-logos/downloads/images/ssw-logo-square.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-square.pdf
- header: Tagline
img: /images/company-logos/ssw-logo-tagline-preview.png
pngLink: /images/company-logos/downloads/images/ssw-logo-tagline.png
firstLink: /images/company-logos/downloads/images/ssw-logo-tagline.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-tagline.pdf
- header: 4 Squares
img: /images/company-logos/ssw-logo-icon-preview.png
pngLink: /images/company-logos/downloads/images/ssw-logo-icon.png
firstLink: /images/company-logos/downloads/images/ssw-logo-icon.png
secondLink: /images/company-logos/downloads/pdfs/ssw-logo-icon.pdf
_template: DownloadBlock
- content: "## Background\n\nIn 2012 we launched a new SSW website with the influence of Windows 8 and Metro tiles. Our nearly 20 year old logo started to look dated.\n\nThen we began a serious effort to reinvent our branding for this new age of digital media.\n\n## Related Links\n\n* [SSW Typography & Web Design References](https://ssw.com.au/ssw/company/Web-Reference.aspx)\n* [Do you set design guidelines for your company?](https://www.ssw.com.au/rules/set-design-guidelines)\n\n## 2014 Logo Refresh\n\nOn the SSW new logo, you may just recognize several elements inspired from our original logo – the web, the globe and the \"swoosh\", as Adam Cogan loves to call it. Our goal was to retain the elements that made our company recognizable, but freshen it up with a Metro touch.\n\nWe kept the \"swoosh\" but replaced the globe and the web with the four squares as homage to our proud Microsoft affiliation.\n\nOf course we tightened the overall alignment and straightened the font - now using\_Helvetica Neue LT Pro 95.\n\nWe hope you like it!\n\n<CustomImage src=\"/images/company-logos/ssw-logo_evolution.png\" height={400} width={600} altText=\"Multiple logos\" />\n"
Expand Down
8 changes: 4 additions & 4 deletions content/logo/timepro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ _body:
downloads:
- header: Color Vertical
img: /images/company-logos/TimePro_preview.png
pngLink: /images/company-logos/downloads/images/TimePro.png
firstLink: /images/company-logos/downloads/images/TimePro.png
secondLinkText: SVG
secondLink: /images/company-logos/downloads/svgs/TimePro.svg
- header: B&W Vertical
img: /images/company-logos/TimePro_BW_preview.png
pngLink: /images/company-logos/downloads/images/TimePro_BW.png
firstLink: /images/company-logos/downloads/images/TimePro_BW.png
secondLinkText: SVG
secondLink: /images/company-logos/downloads/svgs/TimePro_BW.svg
- header: Color Horizontal
img: /images/company-logos/TimePro_horizontal_preview.png
pngLink: /images/company-logos/downloads/images/TimePro_horizontal.png
firstLink: /images/company-logos/downloads/images/TimePro_horizontal.png
secondLinkText: SVG
secondLink: /images/company-logos/downloads/svgs/TimePro_horizontal.svg
- header: B&W Horizontal
img: /images/company-logos/TimePro_horizontal_BW_preview.png
pngLink: /images/company-logos/downloads/images/TimePro_horizontal_BW.png
firstLink: /images/company-logos/downloads/images/TimePro_horizontal_BW.png
secondLinkText: SVG
secondLink: /images/company-logos/downloads/svgs/TimePro_horizontal_BW.svg
_template: DownloadBlock
Expand Down

0 comments on commit caeebee

Please sign in to comment.