diff --git a/src/back/jdd-components/technology-tile/technology-tile.css b/src/back/jdd-components/technology-tile/technology-tile.css new file mode 100644 index 0000000..5998f16 --- /dev/null +++ b/src/back/jdd-components/technology-tile/technology-tile.css @@ -0,0 +1,24 @@ +.technology-tile { + .img-container { + height: 144px; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 0 0 1px var(--alto-gray); + background-color: white; + } + + picture { + background: inherit !important; + max-width: 50%; + + img { + filter: grayscale(50%); + transition: filter 200ms; + } + } +} + +.technology-tile:hover picture { + filter: none; +} diff --git a/src/back/jdd-components/technology-tile/technology-tile.jdd.tsx b/src/back/jdd-components/technology-tile/technology-tile.jdd.tsx new file mode 100644 index 0000000..19397bb --- /dev/null +++ b/src/back/jdd-components/technology-tile/technology-tile.jdd.tsx @@ -0,0 +1,39 @@ +import { TempstreamJSX } from "tempstream"; +import type { ComponentToHTMLArgs } from "@sealcode/jdd"; +import { Component, ComponentArguments } from "@sealcode/jdd"; + +const component_arguments = { + name: new ComponentArguments.ShortText(), + image_with_alt: new ComponentArguments.Structured({ + image: new ComponentArguments.Image(), + alt: new ComponentArguments.ShortText(), + }), + title: new ComponentArguments.ShortText(), +} as const; + +export class TechnologyTile extends Component { + getArguments() { + return component_arguments; + } + + async toHTML({ + args: { name, image_with_alt, title }, + classes, + jdd_context: { render_image }, + }: ComponentToHTMLArgs): Promise { + return ( +
+ {image_with_alt.image ? ( +
+ {render_image(image_with_alt.image, { + sizesAttr: "100vw", + alt: title || image_with_alt.alt || name, + })} +
+ ) : ( + {name} + )} +
+ ); + } +} diff --git a/src/global-styles/colors.css b/src/global-styles/colors.css new file mode 100644 index 0000000..b61de4f --- /dev/null +++ b/src/global-styles/colors.css @@ -0,0 +1,29 @@ +html { + --default-font-color: #222; + --secondary: #55a4b4; + --secondary-light-01: #a4d2db; + --secondary-dark-01: #5294a1; + --secondary-dark-02: #3c7c88; + --alto-gray: #e0e0e0; + --dove-gray: #6f6e6e; + --faint-gray: #ededed; + --main: #6d4477; + --main-dark-01: #62386c; + --main-dark-02: #56335d; + --main-dark-03: #4a2a52; + --main-dark-04: #55335d; + --main-light-01: #744d7e; + --main-light-02: #8b7192; + --main-light-03: #a686af; + --main-bg-text: #fff; + --main-bg-text-secondary: hsl(286.4deg 15.5% 86.2%); + --main-dark-02-bg-secondary: #b5a2ba; + --wild-sand: #f6f6f6; + --london-hue: #beadc3; + --wild-sand-bg-text: #000; + --white-bg-text: #6f6e6e; + --white-bg-text-secondary: #000; + --white-bg-text-gray: #565656; + --white-bg-link: #404f6e; + --white-on-darker-bg-text: #fff; +} diff --git a/src/global-styles/config.css b/src/global-styles/config.css new file mode 100644 index 0000000..b49ac46 --- /dev/null +++ b/src/global-styles/config.css @@ -0,0 +1,9 @@ +html { + --navbar-height: 96px; + --navbar-mobile-height: 72px; + --navbar-mobile-breakpoint: 900px; + --focus-color: hsl(214deg 33% 88%); + --font-sans-serif: "Inter UI", sans-serif; + --font-slab-serif: "Zilla Slab", serif; + --container-width: 1200px; +}