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

Update social links and logos #938

Merged
merged 1 commit into from
Nov 14, 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
5 changes: 5 additions & 0 deletions src/common/Constants.res
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ let ecosystem = [
]

let tools = [("Syntax Lookup", "/syntax-lookup")]

let githubHref = "https://github.com/rescript-lang/rescript-compiler"
let xHref = "https://x.com/rescriptlang"
let blueSkyHref = "https://bsky.app/profile/rescript-lang.org"
let discourseHref = "https://forum.rescript-lang.org"
11 changes: 7 additions & 4 deletions src/components/Footer.res
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ let make = () => {
</Section>
<Section title="Find us on">
<div className="flex space-x-3 text-gray-100">
<a className=iconLink rel="noopener noreferrer" href="https://github.com/rescript-lang">
<a className=iconLink rel="noopener noreferrer" href=Constants.githubHref>
<Icon.GitHub className="w-6 h-6" />
</a>
<a className=iconLink rel="noopener noreferrer" href="https://twitter.com/rescriptlang">
<Icon.Twitter className="w-6 h-6" />
<a className=iconLink rel="noopener noreferrer" href=Constants.xHref>
<Icon.X className="w-6 h-6" />
</a>
<a className=iconLink rel="noopener noreferrer" href="https://forum.rescript-lang.org">
<a className=iconLink rel="noopener noreferrer" href=Constants.blueSkyHref>
<Icon.BlueSky className="w-6 h-6" />
</a>
<a className=iconLink rel="noopener noreferrer" href=Constants.discourseHref>
<Icon.Discourse className="w-6 h-6" />
</a>
</div>
Expand Down
17 changes: 14 additions & 3 deletions src/components/Icon.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,23 @@ module Npm = {
}
}

module Twitter = {
module X = {
@react.component
let make = (~className: string) =>
<svg className={"fill-current " ++ className} viewBox="0 0 15.53 12.71">
<svg className={"fill-current " ++ className} viewBox="0 0 1200 1227">
<path
d="M5.794,12.711a13.325,13.325,0,0,1-2.058-.163A9.659,9.659,0,0,1,.92,11.523L0,11.02l1-.328c1.089-.358,1.751-.58,2.571-.928A3.421,3.421,0,0,1,1.809,7.726l-.232-.7.19.029a3.456,3.456,0,0,1-.433-.534A3.276,3.276,0,0,1,.779,4.57l.044-.614L1.19,4.1a3.437,3.437,0,0,1-.333-.934A3.552,3.552,0,0,1,1.235.774l.32-.588L1.984.7A7.883,7.883,0,0,0,7.091,3.575a3.054,3.054,0,0,1,.185-1.623A3.038,3.038,0,0,1,8.511.536,3.71,3.71,0,0,1,10.664.008a3.439,3.439,0,0,1,2.114.872,7.1,7.1,0,0,0,.774-.258c.17-.064.362-.136.6-.219L15.042.1l-.579,1.652.119-.008L15.53,1.7l-.56.765c-.032.044-.04.056-.052.073-.045.068-.1.153-.87,1.179a1.448,1.448,0,0,0-.271.943,8.916,8.916,0,0,1-.487,3.586,6.346,6.346,0,0,1-1.7,2.524,7.524,7.524,0,0,1-3.566,1.724A10.979,10.979,0,0,1,5.794,12.711Zm0,0"
d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"
transform="translate(0 -0.001)"
/>
</svg>
}

module BlueSky = {
@react.component
let make = (~className: string) =>
<svg className={"fill-current " ++ className} viewBox="0 0 568 501">
<path
d="M123.121 33.6637C188.241 82.5526 258.281 181.681 284 234.873C309.719 181.681 379.759 82.5526 444.879 33.6637C491.866 -1.61183 568 -28.9064 568 57.9464C568 75.2916 558.055 203.659 552.222 224.501C531.947 296.954 458.067 315.434 392.347 304.249C507.222 323.8 536.444 388.56 473.333 453.32C353.473 576.312 301.061 422.461 287.631 383.039C285.169 375.812 284.017 372.431 284 375.306C283.983 372.431 282.831 375.812 280.369 383.039C266.939 422.461 214.527 576.312 94.6667 453.32C31.5556 388.56 60.7778 323.8 175.653 304.249C109.933 315.434 36.0535 296.954 15.7778 224.501C9.94525 203.659 0 75.2916 0 57.9464C0 -28.9064 76.1345 -1.61183 123.121 33.6637Z"
transform="translate(0 -0.001)"
/>
</svg>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Icon.resi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ module Npm: {
@react.component
let make: (~className: string) => React.element
}
module Twitter: {
module X: {
@react.component
let make: (~className: string) => React.element
}
module BlueSky: {
@react.component
let make: (~className: string) => React.element
}
Expand Down
31 changes: 16 additions & 15 deletions src/components/Navigation.res
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ let linkOrActiveApiSubroute = (~route) => {
}
}

let githubHref = "https://github.com/rescript-lang/rescript-compiler"
//let twitterHref = "https://twitter.com/rescriptlang"
let discourseHref = "https://forum.rescript-lang.org"

module CollapsibleLink = {
// KeepOpen = Menu has been opened and should stay open
type state =
Expand Down Expand Up @@ -392,17 +388,22 @@ module MobileNav = {
</li>
*/
<li className=base>
<a href="https://twitter.com/rescriptlang" rel="noopener noreferrer" className=extLink>
{React.string("Twitter")}
<a href=Constants.xHref rel="noopener noreferrer" className=extLink>
{React.string("X")}
</a>
</li>
<li className=base>
<a href=githubHref rel="noopener noreferrer" className=extLink>
<a href=Constants.blueSkyHref rel="noopener noreferrer" className=extLink>
{React.string("BlueSky")}
</a>
</li>
<li className=base>
<a href=Constants.githubHref rel="noopener noreferrer" className=extLink>
{React.string("GitHub")}
</a>
</li>
<li className=base>
<a href=discourseHref rel="noopener noreferrer" className=extLink>
<a href=Constants.discourseHref rel="noopener noreferrer" className=extLink>
{React.string("Forum")}
</a>
</li>
Expand Down Expand Up @@ -554,16 +555,16 @@ let make = (~fixed=true, ~isOverlayOpen: bool, ~setOverlayOpen: (bool => bool) =
<div className="md:flex flex items-center">
<Search />
<div className="hidden md:flex items-center ml-5">
<a href=githubHref rel="noopener noreferrer" className={"mr-5 " ++ link}>
<a href=Constants.githubHref rel="noopener noreferrer" className={"mr-5 " ++ link}>
<Icon.GitHub className="w-6 h-6 opacity-50 hover:opacity-100" />
</a>
<a
href="https://twitter.com/rescriptlang"
rel="noopener noreferrer"
className={"mr-5 " ++ link}>
<Icon.Twitter className="w-6 h-6 opacity-50 hover:opacity-100" />
<a href=Constants.xHref rel="noopener noreferrer" className={"mr-5 " ++ link}>
<Icon.X className="w-6 h-6 opacity-50 hover:opacity-100" />
</a>
<a href=Constants.blueSkyHref rel="noopener noreferrer" className={"mr-5 " ++ link}>
<Icon.BlueSky className="w-6 h-6 opacity-50 hover:opacity-100" />
</a>
<a href=discourseHref rel="noopener noreferrer" className=link>
<a href=Constants.discourseHref rel="noopener noreferrer" className=link>
<Icon.Discourse className="w-6 h-6 opacity-50 hover:opacity-100" />
</a>
</div>
Expand Down