diff --git a/packages/preview/iconic-salmon-fa/1.0.0/LICENSE b/packages/preview/iconic-salmon-fa/1.0.0/LICENSE new file mode 100644 index 000000000..0384f5d95 --- /dev/null +++ b/packages/preview/iconic-salmon-fa/1.0.0/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Nico Neumann (Bi0T1N) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/preview/iconic-salmon-fa/1.0.0/README.md b/packages/preview/iconic-salmon-fa/1.0.0/README.md new file mode 100644 index 000000000..892a571ba --- /dev/null +++ b/packages/preview/iconic-salmon-fa/1.0.0/README.md @@ -0,0 +1,57 @@ +# [Social Media References based on Font Awesome for Typst](https://github.com/Bi0T1N/typst-iconic-salmon-fa) +The `iconic-salmon-fa` package is designed to help you create your curriculum vitae (CV). It allows you to easily reference your social media profiles with the typical icon of the service plus a link to your profile. +The package name is a combination of the acronym *SociAL Media icONs* and the word *iconic* because all these icons have an iconic design (and iconic also contains the word *icon*). + +## Features +- Support for popular social media, developer and career platforms +- Uniform design for all entries +- Based on the Internet's icon library [Font Awesome](https://fontawesome.com/) +- Easy to use +- Allows the customization of the look (extra args are passed to [`text`](https://typst.app/docs/reference/text/text/)) + +## Fonts Installation +### Linux +1. [Download Font Awesome for Desktop](https://fontawesome.com/download) +2. Unzip the file +3. Switch into the `otfs` folder within the unzipped folder +4. Run `mkdir -p /usr/share/fonts/truetype/` +5. Run `install -m644 'Font Awesome 6 Brands-Regular-400.otf' /usr/share/fonts/truetype/` +6. Unfortunately not all brands are included in the brands font file, so you must also run `install -m644 'Font Awesome 6 Free-Regular-400.otf' /usr/share/fonts/truetype/` + +## Usage +### Using Typst's package manager +You can install the library using the [typst packages](https://github.com/typst/packages): +```typst +#import "@preview/iconic-salmon-fa:1.0.0": * +``` + +### Install manually +Put the `iconic-salmon-fa.typ` file in your project directory and import it: +```typst +#import "iconic-salmon-fa.typ": * +``` + +### Minimal Example +```typst +// #import "@preview/iconic-salmon-fa:1.0.0": github-info, gitlab-info +#import "iconic-salmon-fa.typ": github-info, gitlab-info + +This project was created by #github-info("Bi0T1N"). You can also find me on #gitlab-info("GitLab", rgb("#811052"), url: "https://gitlab.com/Bi0T1N"). +``` + +### Examples +See the [`examples.typ`](examples/examples.typ) file for a complete example. The [generated PDF files](examples/) are also available for preview. + +## Troubleshooting +### Icons are not displayed correctly +Make sure that you have installed the required Font Awesome ligature-based font files. + +## Contribution +Feel free to open an issue or a pull request if you find any problems or have any suggestions. + +## License +This library is licensed under the MIT license. Feel free to use it in your project. + +## Trademark Disclaimer +Product names, logos, brands and other trademarks referred to in this project are the property of their respective trademark holders. +These trademark holders are not affiliated with this Typst library, nor are the authors officially endorsed by them, nor do the authors claim ownership of these trademarks. diff --git a/packages/preview/iconic-salmon-fa/1.0.0/examples/examples.pdf b/packages/preview/iconic-salmon-fa/1.0.0/examples/examples.pdf new file mode 100644 index 000000000..dbb756089 Binary files /dev/null and b/packages/preview/iconic-salmon-fa/1.0.0/examples/examples.pdf differ diff --git a/packages/preview/iconic-salmon-fa/1.0.0/examples/examples.typ b/packages/preview/iconic-salmon-fa/1.0.0/examples/examples.typ new file mode 100644 index 000000000..eb528ea9b --- /dev/null +++ b/packages/preview/iconic-salmon-fa/1.0.0/examples/examples.typ @@ -0,0 +1,104 @@ +#import "../iconic-salmon-fa.typ": * + += Usage Examples +== Facebook +#facebook-info("NEFFEX", url: "https://www.facebook.com/Neffexmusic/") +#h(1cm) +#facebook-info("NEFFEX", url: "https://www.facebook.com/Neffexmusic", blue) + +== Instagram +#instagram-info("janlo.pulling_pictures") +#h(0.5cm) +#instagram-info("janlo.pulling_pictures", purple) +#h(0.5cm) +#instagram-info("Jan Lo - Tractor-Pulling Media „Jan Knips“", url: "https://www.instagram.com/janlo.pulling_pictures/") + +== TikTok +#tiktok-info("neffex", green, style: "italic") +#h(1cm) +#tiktok-info("NEFFEX", url: "https://www.tiktok.com/@neffex/", font: "DejaVu Sans") + +== YouTube +#youtube-info("floatingfinish2211") +#h(1cm) +#youtube-info("floatingfinish2211", rgb("#0033cc"), weight: "bold") +#h(1cm) +#youtube-info("floatingfinish2211", green) + +== Vimeo +#vimeo-info("osrfoundation") +#h(1cm) +#vimeo-info("Open Robotics", url: "https://vimeo.com/osrfoundation/") + +== LinkedIn +#linkedin-info("BMW Group", url: "https://www.linkedin.com/company/bmw-group/", rgb("0166B1")) + +== XING +#xing-info("CLAAS", url: "https://www.xing.com/pages/claas") +#h(1cm) +#xing-info("ABB Deutschland", url: "https://www.xing.com/pages/abbde") + +== GitHub +#github-info("Bi0T1N") +#h(1cm) +#github-info("Bi0T1N", rgb("#ffcc00")) +#h(1cm) +#github-info("Bi0T1N", green) + +== GitLab +#gitlab-info("Bi0T1N") +#h(1cm) +#gitlab-info("Bi0T1N", rgb("#811052")) +#h(1cm) +#gitlab-info("Bi0T1N", green) +#h(1cm) +#gitlab-info("Bi0T1N", url: "https://gitlab.com/Bi0T1N/fpc-docker") + +== Bitbucket +#bitbucket-info("karaiskc") +#h(1cm) +#bitbucket-info("karaiskc", url: "https://bitbucket.org/karaiskc/ros-sensor-info-viewer-and-logger/") + +// == Codeberg +// #codeberg-info("biotite-dev") + +// == SourceForge +// #sourceforge-info("Lazarus", url: "https://sourceforge.net/projects/lazarus/") + +== Docker +#docker-info("rust", url: "https://hub.docker.com/_/rust", rgb("b7410e")) +#h(1cm) +#docker-info("Bi0T1N", url: "https://hub.docker.com/u/bi0t1n") +#h(1cm) +#docker-info("debian", url: "https://hub.docker.com/_/debian", red) + +== Stack Overflow +#stackoverflow-info("Remy Lebeau", url: "https://stackoverflow.com/users/65863/remy-lebeau") +#h(1cm) +#stackoverflow-info("Bi0T1N", url: "https://stackoverflow.com/users/20742512/bi0t1n", orange) + +== Stack Exchange +#stackexchange-info("Remy Lebeau", url: "https://scifi.stackexchange.com/users/42754/remy-lebeau") +#h(1cm) +#stackexchange-info("Bi0T1N", url: "https://robotics.stackexchange.com/users/33077/bi0t1n") + +== Skype +#skype-info("callme") + +== Discord +#discord-info("messageme") + +== Twitter +#twitter-info("elonmusk", rgb("#663300")) +#h(1cm) +#twitter-info("Elon Musk", url: "https://twitter.com/elonmusk/", rgb("#663300")) + +== X / Twitter +#x-twitter-info("elonmusk", rgb("#663300")) +#h(1cm) +#x-twitter-info("Elon Musk", url: "https://twitter.com/elonmusk/", rgb("#663300")) + +== ORCID +#orcid-info("0000-0002-1825-0097") +#h(1cm) +#orcid-info("Josiah Carberry", url: "https://orcid.org/0000-0002-1825-0097", green) diff --git a/packages/preview/iconic-salmon-fa/1.0.0/examples/minimal_example.pdf b/packages/preview/iconic-salmon-fa/1.0.0/examples/minimal_example.pdf new file mode 100644 index 000000000..252773dab Binary files /dev/null and b/packages/preview/iconic-salmon-fa/1.0.0/examples/minimal_example.pdf differ diff --git a/packages/preview/iconic-salmon-fa/1.0.0/examples/minimal_example.typ b/packages/preview/iconic-salmon-fa/1.0.0/examples/minimal_example.typ new file mode 100644 index 000000000..f059b3215 --- /dev/null +++ b/packages/preview/iconic-salmon-fa/1.0.0/examples/minimal_example.typ @@ -0,0 +1,4 @@ +// #import "@preview/iconic-salmon-fa:1.0.0": github-info, gitlab-info +#import "../iconic-salmon-fa.typ": github-info, gitlab-info + +This project was created by #github-info("Bi0T1N"). You can also find me on #gitlab-info("GitLab", rgb("#811052"), url: "https://gitlab.com/Bi0T1N"). diff --git a/packages/preview/iconic-salmon-fa/1.0.0/iconic-salmon-fa.typ b/packages/preview/iconic-salmon-fa/1.0.0/iconic-salmon-fa.typ new file mode 100644 index 000000000..3b4f7a7c3 --- /dev/null +++ b/packages/preview/iconic-salmon-fa/1.0.0/iconic-salmon-fa.typ @@ -0,0 +1,216 @@ +#import "@preview/fontawesome:0.1.0": * + + /// A function that creates a clickable link with the passed name as text. + /// In addition to this, the associated icon of the web page is inserted + /// + /// - name (str): The visible name of the clickable link + /// - url (str): The URL to the website (it is assumed to start with the http(s) scheme) + /// - icon (function): A function from fontawesome that provides the associated icon + /// -> content +#let icon-link-generator( + name, + url, + icon, + ..args +) = { + if name.len() == 0 { + panic("The name must contain at least one character") + } + + if url.len() == 0 { + panic("The url must contain at least one character") + } + + let styled_text = text( + name, + ..args + ) + + let clickable_link + if url.ends-with(regex("\.(com|org|net)/@?$")) { + // links where the name is only appended, i.e. https://github.com/Bi0T1N + clickable_link = url + name + } else { + // links where the profile link is more complicated, i.e. https://stackoverflow.com/users/20742512/bi0t1n + clickable_link = url + } + + // unify all links + if not clickable_link.ends-with("/") { + clickable_link = clickable_link + "/" + } + + // content + icon() + " " + link(clickable_link)[#styled_text] +} + + +#let facebook-info( + name, + url: "https://www.facebook.com/", + ..args +) = { + icon-link-generator(name, url, fa-facebook, ..args) +} + +#let instagram-info( + name, + url: "https://www.instagram.com/", + ..args +) = { + icon-link-generator(name, url, fa-instagram, ..args) +} + +#let tiktok-info( + name, + url: "https://www.tiktok.com/@", + ..args +) = { + // icon-link-generator(name, url, fa-tiktok, ..args) + // icon-link-generator(name, url, fa-icon.with("\u{e07b}", fa-set: "Brands"), ..args) + icon-link-generator(name, url, fa-icon.with("tiktok", fa-set: "Brands"), ..args) +} + +#let youtube-info( + name, + url: "https://www.youtube.com/@", + ..args +) = { + icon-link-generator(name, url, fa-youtube, ..args) +} + +#let vimeo-info( + name, + url: "https://vimeo.com/", + ..args +) = { + icon-link-generator(name, url, fa-vimeo, ..args) +} + +#let linkedin-info( + name, + url: "https://www.linkedin.com/", + ..args +) = { + icon-link-generator(name, url, fa-linkedin, ..args) +} + +#let xing-info( + name, + url: "https://www.xing.com/", + ..args +) = { + icon-link-generator(name, url, fa-xing, ..args) +} + +#let github-info( + name, + url: "https://github.com/", + ..args +) = { + icon-link-generator(name, url, fa-github, ..args) +} + +#let gitlab-info( + name, + url: "https://gitlab.com/", + ..args +) = { + icon-link-generator(name, url, fa-gitlab, ..args) +} + +#let bitbucket-info( + name, + url: "https://bitbucket.org/", + ..args +) = { + icon-link-generator(name, url, fa-bitbucket, ..args) +} + +// TODO: no icon available +// #let codeberg-info( +// name, +// url: "https://codeberg.org/", +// ..args +// ) = { +// icon-link-generator(name, url, fa-question, ..args) +// } + +// TODO: no icon available +// #let sourceforge-info( +// name, +// url: "https://sourceforge.net/", +// ..args +// ) = { +// icon-link-generator(name, url, fa-question, ..args) +// } + +#let docker-info( + name, + url: "https://hub.docker.com/", + ..args +) = { + icon-link-generator(name, url, fa-docker, ..args) +} + +#let stackoverflow-info( + name, + url: "https://stackoverflow.com/", + ..args +) = { + // icon-link-generator(name, url, fa-stack-overflow, ..args) + // icon-link-generator(name, url, fa-icon.with("\u{f16c}", fa-set: "Brands"), ..args) + icon-link-generator(name, url, fa-icon.with("stack-overflow", fa-set: "Brands"), ..args) +} + +#let stackexchange-info( + name, + url: "https://stackexchange.com/", + ..args +) = { + // icon-link-generator(name, url, fa-stack-exchange, ..args) + // icon-link-generator(name, url, fa-icon.with("\u{f18d}", fa-set: "Brands"), ..args) + icon-link-generator(name, url, fa-icon.with("stack-exchange", fa-set: "Brands"), ..args) +} + +#let skype-info( + name, + url: "https://www.skype.com/", + ..args +) = { + icon-link-generator(name, url, fa-skype, ..args) +} + +#let discord-info( + name, + url: "https://discord.com/", + ..args +) = { + icon-link-generator(name, url, fa-discord, ..args) +} + +#let twitter-info( + name, + url: "https://twitter.com/", + ..args +) = { + icon-link-generator(name, url, fa-twitter, ..args) +} + +#let x-twitter-info( + name, + url: "https://x.com/", + ..args +) = { + icon-link-generator(name, url, fa-icon.with("\u{e61b}"), ..args) +} + +#let orcid-info( + name, + url: "https://orcid.org/", + ..args +) = { + icon-link-generator(name, url, fa-icon.with("orcid", fa-set: "Brands"), ..args) +} diff --git a/packages/preview/iconic-salmon-fa/1.0.0/typst.toml b/packages/preview/iconic-salmon-fa/1.0.0/typst.toml new file mode 100644 index 000000000..e827dae25 --- /dev/null +++ b/packages/preview/iconic-salmon-fa/1.0.0/typst.toml @@ -0,0 +1,11 @@ +[package] +name = "iconic-salmon-fa" +version = "1.0.0" +repository = "https://github.com/Bi0T1N/typst-iconic-salmon-fa" +entrypoint = "iconic-salmon-fa.typ" +authors = ["Nico Neumann (Bi0T1N)"] +license = "MIT" +description = "A Typst library for Social Media references with icons based on Font Awesome." +keywords = ["social", "media", "icons", "Font Awesome"] +categories = ["components"] +exclude = ["examples"] \ No newline at end of file