feat(finely-crafte-cv): make icon header user defineable

This commit is contained in:
swaits committed 2025-01-26 12:56:09 -07:00
1 parent 57c961dd18
commit 081b821457
23 files changed
+459 -39

No files matched your search

+24 -10
View File
@@ -1,18 +1,32 @@
#import "constants.typ":*
#let icon_and_contact(icon, content) = {
grid(
columns: 2,
align: center+horizon,
gutter: COMPANY_ICON_SPACING,
if icon != none and content != none {
grid(
columns: 2,
align: center+horizon,
gutter: COMPANY_ICON_SPACING,
box(
height: HEADER_ICON_HEIGHT,
width: auto,
icon
),
content
)
}
}
#let make-icon-header(icon-tuples) = {
// what we put between elements
let icon-joiner = box(baseline: -0.15em, [#h(0.5em)#sym.divides#h(0.5em)])
// map them into formatted content, and join
icon-tuples.map(((icon, content)) => {
box(
height: HEADER_ICON_HEIGHT,
width: auto,
image(icon)
),
content
)
icon_and_contact(icon, content)
)
}).join(icon-joiner)
}
#let hrule(stroke: 1pt + black) = {
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" ?>
␍<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 500 500" enable-background="new 0 0 500 500" id="Layer_1" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
␍<g>
␍<path d="M458.41,284.071c-18.154-57.832-35.808-115.882-54.029-173.704c-4.565-14.082-14.193-28.553-33.242-22.906 c-86.518,24.843-173.71,47.452-260.272,72.213c-14.963,4.171-29.882,8.495-44.873,12.569c-14.311,3.135-29.075,11.983-25.48,30.866 c14.936,61.124,33.264,121.347,50.649,181.802c2.237,15.592,14.588,31.238,31.45,28.585c72.706-18.79,144.089-43.364,216.18-64.692 c33.493-10.35,67.068-20.44,100.36-31.43C453.27,313.46,464.304,298.759,458.41,284.071z" fill="#3F3756"/>
␍<path d="M44.073,210.175c0,0,50.037,177.5,53.987,184.874s10.26,15.563,25.282,15.275 c15.022-0.288,319.535-97.353,319.535-97.353s16.509-10.394,14.923-22.692S396.703,103.78,396.703,103.78 c-12.169,19.051-109.591,152.363-130.096,167.23C233.361,268.354,79.309,221.321,44.073,210.175z" fill="#A7943F"/>
␍<path d="M43.283,206.4c0,0-4.74-20.542,8.427-26.335c13.168-5.794,326.295-90.242,326.295-90.242 c4.311,0.848,17.887,6.526,18.522,15.626c-21.7,29.349-104.91,147.391-132.33,165.662C229.163,268.336,69.886,217.4,43.283,206.4z" fill="#E2B251"/>
␍<path d="M266.08,272.194c-13.27,13.363-45.925-2.647-63.153-4.52c-18.892-4.309-38.147-9.169-56.266-15.287 c13.603,47.964,33.582,104.519,83.401,125.328c-143.309,41.418-115.691,63.405-153.984-65.577 c-8.718-29.637-17.36-59.299-26.641-88.766c-0.365-2.374-5.808-14.08-1.952-12.017c48.553,16.221,97.041,32.774,146.504,46.051 C217.964,262.429,241.249,273.18,266.08,272.194z" fill="#8A7527"/>
␍<path d="M126.522,161.733c3.341,26.359,9.387,52.371,16.484,77.958c-32.998-10.262-67.253-21.367-99.044-33.044 c-2.483-10.573,1.86-23.222,13.198-26.109C80.314,174.392,103.389,167.958,126.522,161.733z" fill="#D69735"/>
␍<path d="M259.062,271.603c29.71-34.519,57.443-72.46,85.769-108.715c8.73-12.689,18.119-24.896,26.81-37.598 c5.275-8.938,15.914-18.135,10.779-29.384c-2.747-5.353,3.785-2.266,5.815-0.469c2.242,2.153,5.831,4.9,6.138,7.946 c-16.608,29.633-38.763,55.699-59.785,82.281c-17.534,22.284-34.915,44.704-52.911,66.607 C274.619,258.636,269.141,270.523,259.062,271.603z" fill="#E9C36F"/>
␍<path d="M447.846,308.757c0.903-3.543,3.654-7.16,2.642-10.851c-3.482-13.921-7.759-27.592-12.426-41.121 c-15.14-47.874-30.532-95.655-46.855-143.157c1.118-2.208,4.629-5.622,5.321-8.181c15.417,44.009,27.148,89.173,42.155,133.405 C442.252,257.143,468.594,296.807,447.846,308.757z" fill="#B9A95D"/>
␍<path d="M403.892,186.878c-0.563-12.899,9.32,7.439,2.184,1.283c-0.272,8.362-5.525,1.896-5.155-2.655 c-0.128-1.612,2.153-1.814,2.259-0.176C403.271,185.811,403.354,186.322,403.892,186.878z" fill="#B9A95C"/>
␍<path d="M369.338,298.88c-0.09,2.536-5.866-8.478-4.42-8.543C367.342,291.786,367.996,296.251,369.338,298.88z" fill="#403855"/>
␍<path d="M420.881,240.028c0.873,1.67,1.046,3.768,3.198,4.331c1.11,0.313,2.848,1.95,2.533,3.194 C424.104,246.767,419.213,243.273,420.881,240.028z" fill="#403855"/>
␍<path d="M249.795,195.487c-6.514,18.297-21.794-1.671-14.574-12.717c3.273-7.936,15.955-5.894,15.536,2.962 c0.113,1.663-1.809,2.177-2.467,0.629c-7.179-11.812-14.888,4.75-7.934,11.026c6.179,5.617,5.532-12.904,11.645-6.446 c1.705,0.937,3.64,6.512,5.452,3.672c4.643-6.611,4.493-15.833,0.751-22.817c-6.192-11.404-22.622-7.491-29.03,1.69 c-21.86,24.921,15.885,59.152,36.083,31.539c1.301-1.397,2.356-4.807,4.71-4.058c2.638,3.829-2.249,9.206-4.68,12.212 c-8.948,9.343-24.995,9.556-35.057,1.794c-37.188-28.612,21.896-82.716,34.302-36.948 C267.258,186.948,259.745,211.09,249.795,195.487z" fill="#3F3756"/>
␍<path d="M107.708,341.981c-0.265-3.05-0.342-7.25,1.106-9.723C109.692,335.054,108.203,338.926,107.708,341.981z" fill="#403855"/>
␍<path d="M171.484,364.605c-1.577-0.108-4.007-0.477-4.138-1.971C168.548,361.849,170.372,363.446,171.484,364.605z" fill="#413954"/>
␍<path d="M458.41,284.071c-18.154-57.832-35.808-115.882-54.029-173.704c-4.565-14.082-14.193-28.553-33.242-22.906 c-86.518,24.843-173.71,47.452-260.272,72.213c-14.963,4.171-29.882,8.495-44.873,12.569c-14.311,3.135-29.075,11.983-25.48,30.866 c14.936,61.124,33.264,121.347,50.649,181.802c2.237,15.592,14.588,31.238,31.45,28.585c72.706-18.79,144.089-43.364,216.18-64.692 c33.493-10.35,67.068-20.44,100.36-31.43C453.27,313.46,464.304,298.759,458.41,284.071z M45.872,206.074 c-2.394-10.213,1.793-22.425,12.746-25.214c29.258-7.855,58.494-15.791,87.672-23.938c78.549-19.703,156.067-47.735,235.126-63.279 c0,0,0,0,0,0c5.158,0.71,8.83,5.048,11.573,9.141c1.411,0.613-3.351,6.334-3.555,7.886 c-23.567,38.081-53.701,71.572-80.867,107.072c-10.762,11.332-34.474,49.499-48.099,51.317 c-40.482-5.179-79.8-19.541-118.944-31.072l0,0v0C109.656,228.075,76.574,217.353,45.872,206.074z M446.168,305.924 c-29.501,14.249-62.982,19.95-93.929,30.951c-48.05,14.895-96.115,29.765-144.067,44.94c-17.002,5.359-34.034,10.626-50.919,16.342 c-17.115,3.652-42.526,18.196-54.683-1.087c-19.131-56.61-32.972-115.145-51.638-172.018c-0.552-2.479-5.533-13.706-1.904-11.731 c35.279,11.753,70.438,23.838,106.114,34.347c28.717,8.99,57.994,16.012,87.083,23.669c9.587,1.982,21.895,6.093,29.764-1.935 c41.214-50.542,84.444-99.922,121.082-154.002c0,0,0,0,0,0c1.048-2.156,2.42-4.152,3.069-6.65 c13.794,42.855,27.068,86.146,41.439,128.92C440.834,255.699,465.694,293.673,446.168,305.924z" fill="#3F3756"/>
␍</g>
␍</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
<g>
<path d="M218.123122,218.127392 L180.191928,218.127392 L180.191928,158.724263 C180.191928,144.559023 179.939053,126.323993 160.463756,126.323993 C140.707926,126.323993 137.685284,141.757585 137.685284,157.692986 L137.685284,218.123441 L99.7540894,218.123441 L99.7540894,95.9665207 L136.168036,95.9665207 L136.168036,112.660562 L136.677736,112.660562 C144.102746,99.9650027 157.908637,92.3824528 172.605689,92.9280076 C211.050535,92.9280076 218.138927,118.216023 218.138927,151.114151 L218.123122,218.127392 Z M56.9550587,79.2685282 C44.7981969,79.2707099 34.9413443,69.4171797 34.9391618,57.260052 C34.93698,45.1029244 44.7902948,35.2458562 56.9471566,35.2436736 C69.1040185,35.2414916 78.9608713,45.0950217 78.963054,57.2521493 C78.9641017,63.090208 76.6459976,68.6895714 72.5186979,72.8184433 C68.3913982,76.9473153 62.7929898,79.26748 56.9550587,79.2685282 M75.9206558,218.127392 L37.94995,218.127392 L37.94995,95.9665207 L75.9206558,95.9665207 L75.9206558,218.127392 Z M237.033403,0.0182577091 L18.8895249,0.0182577091 C8.57959469,-0.0980923971 0.124827038,8.16056231 -0.001,18.4706066 L-0.001,237.524091 C0.120519052,247.839103 8.57460631,256.105934 18.8895249,255.9977 L237.033403,255.9977 C247.368728,256.125818 255.855922,247.859464 255.999,237.524091 L255.999,18.4548016 C255.851624,8.12438979 247.363742,-0.133792868 237.033403,0.000790807055" fill="#0A66C2">
␍</path>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

-63
View File
@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 478.512 478.512" xml:space="preserve">
<path style="fill:#3AADD9;" d="M185.497,469.312l-21.344,1.096c-30.016,1.544-58.36-13.872-73.384-39.896L19.737,307.48
c-15.024-26.024-14.2-58.28,2.144-83.504l11.624-17.936l35.816-20.68c7.656-4.416,17.44-1.8,21.856,5.856l24,41.568
c4.416,7.656,1.8,17.44-5.856,21.856l-6.928,4c-15.304,8.84-20.552,28.408-11.712,43.712l40,69.28
c8.84,15.304,28.408,20.552,43.712,11.712l6.928-4c7.656-4.416,17.44-1.8,21.856,5.856l24,41.568
c4.416,7.656,1.8,17.44-5.856,21.856L185.497,469.312z"/>
<path d="M159.969,478.512c-31.424,0-60.288-16.56-76.128-44L12.801,311.48c-16.608-28.784-15.704-63.976,2.36-91.856l1.152-1.776
c7.544-11.64,17.864-21.44,29.856-28.368l19.152-11.056c11.456-6.608,26.168-2.68,32.784,8.784l24,41.568
c3.2,5.552,4.056,12.016,2.392,18.208c-1.656,6.192-5.632,11.368-11.176,14.576l-6.928,4c-5.552,3.2-9.52,8.376-11.184,14.568
c-1.656,6.192-0.808,12.664,2.4,18.208l40,69.28c3.2,5.552,8.376,9.52,14.568,11.184c6.2,1.664,12.656,0.808,18.208-2.4l6.928-4
c11.464-6.616,26.168-2.672,32.784,8.784l24,41.568c6.616,11.464,2.672,26.168-8.784,32.784l-19.152,11.056
c-11.992,6.928-25.648,10.96-39.488,11.672l-2.12,0.112C163.025,478.472,161.497,478.512,159.969,478.512z M77.305,191.216
c-1.36,0-2.728,0.344-3.992,1.072l-19.152,11.056c-9.816,5.664-18.264,13.688-24.424,23.2l-1.144,1.776
c-14.784,22.816-15.52,51.616-1.936,75.16l71.032,123.032c13.592,23.536,38.864,37.312,66.04,35.904l2.12-0.112l0,0
c11.328-0.584,22.496-3.888,32.312-9.552l19.152-11.056c1.848-1.064,3.168-2.792,3.728-4.856s0.272-4.216-0.8-6.072l-24-41.568
c-1.064-1.848-2.792-3.168-4.856-3.728c-2.056-0.544-4.216-0.272-6.072,0.8l-6.928,4c-9.256,5.336-20.04,6.752-30.352,4
c-10.32-2.768-18.944-9.384-24.288-18.64l-40-69.28c-5.344-9.248-6.76-20.032-4-30.352s9.384-18.944,18.64-24.288l6.928-4
c3.824-2.2,5.136-7.104,2.928-10.928l-24-41.568C82.769,192.656,80.073,191.216,77.305,191.216z"/>
<g>
<ellipse style="fill:#FFFFFF;" cx="187.462" cy="421.949" rx="8" ry="8"/>
<ellipse style="fill:#FFFFFF;" cx="155.777" cy="431.049" rx="8" ry="8"/>
<ellipse style="fill:#FFFFFF;" cx="75.466" cy="227.992" rx="8" ry="8"/>
<ellipse style="fill:#FFFFFF;" cx="51.741" cy="250.924" rx="8" ry="8"/>
</g>
<path style="fill:#F5B945;" d="M437.561,8h-248c-17.672,0-32,14.328-32,32v118.792c0,17.672,14.328,33.208,32,33.208h16v34.256
c0,20.4,22.928,32.096,38.544,18.968L307.209,192h130.352c17.672,0,32-14.328,32-32V40C469.561,22.328,455.233,8,437.561,8z"/>
<path d="M229.225,258.76c-4.408,0-8.84-0.96-13.032-2.912c-11.496-5.352-18.632-16.688-18.632-29.592V200h-8
c-21.68,0-40-18.872-40-41.208V40c0-22.056,17.944-40,40-40h248c22.056,0,40,17.944,40,40v120c0,22.056-17.944,40-40,40H310.129
l-60.872,51.344C243.441,256.232,236.377,258.76,229.225,258.76z M189.561,16c-13.232,0-24,10.768-24,24v118.792
c0,13.664,10.992,25.208,24,25.208h16c4.416,0,8,3.584,8,8v34.256c0,7.904,4.84,12.976,9.376,15.088
c2.584,1.2,9.32,3.392,16.016-2.24l63.104-53.224c1.44-1.216,3.264-1.88,5.152-1.88h130.352c13.232,0,24-10.768,24-24V40
c0-13.232-10.768-24-24-24H189.561z"/>
<g>
<circle style="fill:#FFFFFF;" cx="227.745" cy="94.304" r="24"/>
<circle style="fill:#FFFFFF;" cx="311.721" cy="94.792" r="24"/>
<circle style="fill:#FFFFFF;" cx="395.745" cy="94.304" r="24"/>
</g>
<path d="M227.745,126.304c-17.648,0-32-14.352-32-32s14.352-32,32-32s32,14.352,32,32S245.393,126.304,227.745,126.304z
M227.745,78.304c-8.824,0-16,7.176-16,16s7.176,16,16,16s16-7.176,16-16S236.569,78.304,227.745,78.304z"/>
<path d="M311.745,126.792c-17.648,0-32-14.352-32-32s14.352-32,32-32s32,14.352,32,32S329.393,126.792,311.745,126.792z
M311.745,78.792c-8.824,0-16,7.176-16,16s7.176,16,16,16s16-7.176,16-16S320.569,78.792,311.745,78.792z"/>
<path d="M395.745,126.304c-17.648,0-32-14.352-32-32s14.352-32,32-32s32,14.352,32,32S413.393,126.304,395.745,126.304z
M395.745,78.304c-8.824,0-16,7.176-16,16s7.176,16,16,16s16-7.176,16-16S404.569,78.304,395.745,78.304z"/>
<path d="M439.433,241.368c-5.72-0.056-10.592-4.44-10.864-9.8c-0.304-5.352,4.224-10.24,9.744-10.88
c5.848-0.672,10.6,3.728,10.952,9.792C449.561,236.544,445.153,241.424,439.433,241.368z"/>
<path d="M435.537,280.224c-5.592-1.192-9.496-6.456-8.688-11.752c0.84-5.296,6.104-9.208,11.656-8.744
c5.848,0.496,9.776,5.76,8.84,11.768C446.425,277.512,441.129,281.416,435.537,280.224z"/>
<path d="M423.065,319.32c-5.104-2.296-7.64-8.2-5.912-13.272c1.84-5.032,7.784-7.752,13.256-6.08
c5.472,1.672,8.232,7.656,6.136,13.376C434.553,319.088,428.393,321.712,423.065,319.32z"/>
<path d="M402.633,354.888c-4.728-3.472-5.448-9.424-2.856-14.136c2.776-4.584,9.096-6.032,14.088-3.248
c4.992,2.784,6.496,9.264,3.336,14.456C414.209,357.28,407.121,358.2,402.633,354.888z"/>
<path d="M375.257,385.424c-3.816-4.296-3.624-10.632,0.28-14.312c3.6-3.976,10.008-4.136,14.312-0.36
c4.304,3.768,4.48,10.48,0.376,14.968C385.817,389.904,379.033,389.688,375.257,385.424z"/>
<path d="M342.137,409.624c-2.816-4.976-1.392-11.28,3.192-14.056c4.624-2.72,10.632-1.976,14.128,2.728
c3.344,4.472,2.416,11.512-2.808,14.624C351.457,416.088,344.961,414.6,342.137,409.624z"/>
<path d="M306.585,425.68c-1.76-5.44,0.888-11.36,5.92-13.192c5.12-1.632,10.832,0.272,13.312,5.56
c2.384,5.064,0.088,11.808-5.704,13.712C314.401,433.856,308.337,431.12,306.585,425.68z"/>
<path d="M266.521,434.544c-0.568-5.696,3.256-10.976,8.56-11.784c5.328-0.664,10.608,2.92,11.864,8.376
c1.304,5.688-2.464,11.28-8.504,12.064C272.433,444.12,267.097,440.232,266.521,434.544z"/>
</svg>

Before

Width:  |  Height:  |  Size: 5.6 KiB

+8 -16
View File
@@ -10,9 +10,7 @@
heading-font: HEADING_FONT,
body-font: BODY_FONT,
body-size: BODY_SIZE,
email: none,
phone: none,
linkedin-username: none,
icon-contact-header: none,
keywords: "",
thumbnail: none, // check out https://qrframe.kylezhe.ng/ for QR code generation
body
@@ -30,19 +28,13 @@
margin: PAGE_MARGIN,
numbering: "1 / 1",
header: context {
if here().page() == 1 {
text(
size: HEADER_SIZE,
grid(
columns: (1fr, auto, auto, auto, auto, auto),
gutter: 1em,
align: center+horizon,
"",
icon_and_contact("icons/email.svg", link("mailto:" + email, email)),
sym.divides,
icon_and_contact("icons/phone.svg", link("tel:" + phone, phone)),
sym.divides,
icon_and_contact("icons/linkedin.svg", link("https://www.linkedin.com/in/" + linkedin-username, linkedin-username))
if here().page() == 1 and icon-contact-header != none {
grid(
columns: (1fr, auto),
[],
text(
size: HEADER_SIZE,
make-icon-header(icon-contact-header)
)
)
}