feat(lib): added icon to address entry (#119)
Co-authored-by: Carlo Rosso <carlorosso@Carlos-MacBook-Air.local>
This commit is contained in:
17
lib.typ
17
lib.typ
@@ -21,6 +21,7 @@
|
|||||||
#let birth-icon = box(fa-icon("cake", fill: color-darknight))
|
#let birth-icon = box(fa-icon("cake", fill: color-darknight))
|
||||||
#let homepage-icon = box(fa-icon("home", fill: color-darknight))
|
#let homepage-icon = box(fa-icon("home", fill: color-darknight))
|
||||||
#let website-icon = box(fa-icon("globe", fill: color-darknight))
|
#let website-icon = box(fa-icon("globe", fill: color-darknight))
|
||||||
|
#let address-icon = box(fa-icon("location-crosshairs", fill: color-darknight))
|
||||||
|
|
||||||
/// Helpers
|
/// Helpers
|
||||||
|
|
||||||
@@ -200,6 +201,7 @@
|
|||||||
header-font: "Roboto",
|
header-font: "Roboto",
|
||||||
paper-size: "a4",
|
paper-size: "a4",
|
||||||
use-smallcaps: true,
|
use-smallcaps: true,
|
||||||
|
show-address-icon: false,
|
||||||
body,
|
body,
|
||||||
) = {
|
) = {
|
||||||
if type(accent-color) == str {
|
if type(accent-color) == str {
|
||||||
@@ -297,7 +299,12 @@
|
|||||||
set text(size: 9pt, weight: "regular")
|
set text(size: 9pt, weight: "regular")
|
||||||
align(center)[
|
align(center)[
|
||||||
#if ("address" in author) [
|
#if ("address" in author) [
|
||||||
#author.address
|
#if show-address-icon [
|
||||||
|
#address-icon
|
||||||
|
#box[#text(author.address)]
|
||||||
|
] else [
|
||||||
|
#text(author.address)
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -542,6 +549,7 @@
|
|||||||
closing: none,
|
closing: none,
|
||||||
paper-size: "a4",
|
paper-size: "a4",
|
||||||
use-smallcaps: true,
|
use-smallcaps: true,
|
||||||
|
show-address-icon: false,
|
||||||
body,
|
body,
|
||||||
) = {
|
) = {
|
||||||
if type(accent-color) == str {
|
if type(accent-color) == str {
|
||||||
@@ -634,7 +642,12 @@
|
|||||||
set text(size: 9pt, weight: "bold", fill: color-gray)
|
set text(size: 9pt, weight: "bold", fill: color-gray)
|
||||||
align(right)[
|
align(right)[
|
||||||
#if ("address" in author) [
|
#if ("address" in author) [
|
||||||
#author.address
|
#if show-address-icon [
|
||||||
|
#address-icon
|
||||||
|
#box[#text(author.address)]
|
||||||
|
] else [
|
||||||
|
#text(author.address)
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
// Remove the following line to show the footer
|
// Remove the following line to show the footer
|
||||||
// Or set the value to `true`
|
// Or set the value to `true`
|
||||||
show-footer: false,
|
show-footer: false,
|
||||||
|
// this defaults to false
|
||||||
|
show-address-icon: true,
|
||||||
// set this to `none` to show the default or remove it completely
|
// set this to `none` to show the default or remove it completely
|
||||||
closing: [],
|
closing: [],
|
||||||
// see typst "page" documentation for more options
|
// see typst "page" documentation for more options
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
language: "en",
|
language: "en",
|
||||||
colored-headers: true,
|
colored-headers: true,
|
||||||
show-footer: false,
|
show-footer: false,
|
||||||
|
show-address-icon: true,
|
||||||
paper-size: "us-letter",
|
paper-size: "us-letter",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user