1 Commits

Author SHA1 Message Date
Paul Tsouchlos
b0293dc61a docs: fix formatting issue in README 2024-03-26 12:13:39 -04:00
39 changed files with 469 additions and 1451 deletions

View File

@@ -1,16 +0,0 @@
[
{
"version" : 1
},
{
"action" : {
"script" : "${repo:path}/scripts/format_typst.ps1",
"showOutput" : true,
"type" : "sh",
"waitForExit" : true
},
"name" : "Format",
"os" : "windows",
"target" : "revision"
}
]

3
.github/FUNDING.yml vendored
View File

@@ -1,3 +0,0 @@
# Thanks for any donations! :)
github: DeveloperPaul123

View File

@@ -1,77 +0,0 @@
name: Package and push to registry repo
on:
push:
tags: [ '*' ]
env:
# the repository to which to push the release version
# usually a fork of typst/packages (https://github.com/typst/packages/)
# that you have push privileges to
REGISTRY_REPO: DeveloperPaul123/typst-packages
# the path within that repo where the "<name>/<version>" directory should be put
# for the Typst package registry, keep this as is
PATH_PREFIX: packages/preview
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Probe runner package cache
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: cargo
version: 1.0
- name: Install just from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Setup typst
uses: typst-community/setup-typst@v3
with:
typst-version: latest
- name: Determine and check package metadata
run: |
. scripts/setup
echo "PKG_NAME=${PKG_PREFIX}" >> "${GITHUB_ENV}"
echo "PKG_VERSION=${VERSION}" >> "${GITHUB_ENV}"
if [[ "${GITHUB_REF_NAME}" != "${VERSION}" ]]; then
echo "package version ${VERSION} does not match release tag ${GITHUB_REF_NAME}" >&2
exit 1
fi
- name: Build package
run: |
just doc
just package out
- name: Checkout package registry
uses: actions/checkout@v4
with:
repository: ${{ env.REGISTRY_REPO }}
token: ${{ secrets.REGISTRY_TOKEN }}
path: typst-packages
- name: Release package
run: |
mkdir -p "typst-packages/${{ env.PATH_PREFIX }}/$PKG_NAME"
mv "out/${PKG_NAME}/${PKG_VERSION}" "typst-packages/${{ env.PATH_PREFIX }}/${PKG_NAME}"
rmdir "out/${PKG_NAME}"
rmdir out
GIT_USER_NAME="$(git log -1 --pretty=format:'%an')"
GIT_USER_EMAIL="$(git log -1 --pretty=format:'%ae')"
cd typst-packages
git config user.name "${GIT_USER_NAME}"
git config user.email "${GIT_USER_EMAIL}"
git checkout -b "${PKG_NAME}-${PKG_VERSION}"
git add .
git commit -m "${PKG_NAME}:${PKG_VERSION}"
git push --set-upstream origin "${PKG_NAME}-${PKG_VERSION}"

View File

@@ -1,84 +0,0 @@
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
strategy:
matrix:
# add any other Typst versions that your package should support
typst-version: ["0.12"]
# the docs don't need to build with all versions supported by the package;
# the latest one is enough
include:
- typst-version: "0.12"
doc: 1
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Probe runner package cache
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: imagemagick cargo
version: 1.0
- name: Install oxipng from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: oxipng
- name: Install just from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: just
- name: Install typst-test from github
uses: baptiste0928/cargo-install@v3
with:
crate: typst-test
git: https://github.com/tingerrr/typst-test.git
tag: ci-semi-stable
- name: Setup typst
uses: typst-community/setup-typst@v3
with:
typst-version: ${{ matrix.typst-version }}
- name: Install fonts
run: |
sudo apt update
sudo apt-get install fonts-roboto
./scripts/install-fontawesome
./scripts/install-source-sans
- name: Install locally
run: just install
- name: Run test suite
run: just test
- name: Archive diffs
uses: actions/upload-artifact@v4
if: always()
with:
name: diffs
path: |
tests/**/diff/*.png
tests/**/out/*.png
tests/**/ref/*.png
retention-days: 5
- name: Build docs
if: ${{ matrix.doc }}
run: just doc
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: manual
path: docs/manual.pdf

2
.gitignore vendored
View File

@@ -1,3 +1 @@
*.pdf
tests/*/diff
tests/*/out

View File

@@ -1,7 +0,0 @@
# Integration with Issue Tracker
#
# (note that '\' need to be escaped).
[issuetracker "Github"]
regex = "#(\\d+)"
url = "https://github.com/DeveloperPaul123/modern-cv/issues/$1"

View File

@@ -1,9 +0,0 @@
.github
.fork
scripts
template/*.pdf
.gitignore
.issuetracker
tests/*
docs/*
Justfile

View File

@@ -1,45 +0,0 @@
root := justfile_directory()
export TYPST_ROOT := root
[private]
default:
@just --list --unsorted
# generate manual
doc:
typst compile docs/manual.typ docs/manual.pdf
# run test suite
test *args:
typst-test run {{ args }}
# update test cases
update *args:
typst-test update {{ args }}
# package the library into the specified destination folder
package target:
./scripts/package "{{target}}"
# install the library with the "@local" prefix
install: (package "@local")
# install the library with the "@preview" prefix (for pre-release testing)
install-preview: (package "@preview")
[private]
remove target:
./scripts/uninstall "{{target}}"
# uninstalls the library from the "@local" prefix
uninstall: (remove "@local")
# uninstalls the library from the "@preview" prefix (for pre-release testing)
uninstall-preview: (remove "@preview")
format:
./scripts/format
# run ci suite
ci: test doc

View File

@@ -3,33 +3,17 @@
[![say thanks](https://img.shields.io/badge/Say%20Thanks-👍-1EAEDB.svg)](https://github.com/DeveloperPaul123/modern-cv/stargazers)
[![Discord](https://img.shields.io/discord/652515194572111872?logo=Discord)](https://discord.gg/CX2ybByRnt)
![Release](https://img.shields.io/github/v/release/DeveloperPaul123/modern-cv)
[![Tests](https://github.com/DeveloperPaul123/modern-cv/actions/workflows/tests.yml/badge.svg)](https://github.com/DeveloperPaul123/modern-cv/actions/workflows/tests.yml)
A port of the [Awesome-CV](https://github.com/posquit0/Awesome-CV) Latex resume template in [typst](https://github.com/typst/typst).
## Requirements
### Tools
The following tools are used for the development of this template:
- [typst](https://github.com/typst/typst)
- [typst-test](https://github.com/tingerrr/typst-test) for running tests
- [just](https://github.com/casey/just) for simplifying command running
- [oxipng](https://github.com/shssoichiro/oxipng) for compressing thumbnails used in the README
### Fonts
You will need the `Roboto` and `Source Sans Pro` fonts installed on your system or available somewhere. If you are using the `typst` web app, no further action is necessary. You can download them from the following links:
- [Roboto](https://fonts.google.com/specimen/Roboto)
- [Source Sans Pro](https://github.com/adobe-fonts/source-sans-pro)
This template also uses FontAwesome icons via the [fontawesome](https://typst.app/universe/package/fontawesome) package. You will need to install the fontawesome fonts on your system or configure the `typst` web app to use them. You can download fontawesome [here](https://fontawesome.com/download).
To use the fontawesome icons in the web app, add a `fonts` folder to your project and upload the `otf` files from the fontawesome download to this folder like so:
![alt text](assets/images/typst_web_editor.png)
This template also uses FontAwesome icons via the [`fontawesome`](https://typst.app/universe/package/fontawesome) package.
See `typst fonts --help` for more information on configuring fonts for `typst` that are not installed on your system.
@@ -38,7 +22,7 @@ See `typst fonts --help` for more information on configuring fonts for `typst` t
Below is a basic example for a simple resume:
```typst
#import "@preview/modern-cv:0.8.0": *
#import "@preview/modern-cv:0.1.0": *
#show: resume.with(
author: (
@@ -54,67 +38,27 @@ Below is a basic example for a simple resume:
"Software Architect"
)
),
profile-picture: none,
date: datetime.today().display(),
page-size: "us-letter"
date: datetime.today().display()
)
= Education
#resume-entry(
#resume_entry(
title: "Example University",
location: "B.S. in Computer Science",
date: "August 2014 - May 2019",
description: "Example"
)
#resume-item[
#resume_item[
- #lorem(20)
- #lorem(15)
- #lorem(25)
]
```
After saving to a `*.typ` file, compile your resume using the following command:
### Output
```bash
typst compile resume.typ
```
For more information on how to use and compile `typst` files, see the [official documentation](https://typst.app/docs).
Documentation for this template is published with each commit. See the attached PDF on each Github Action run [here](https://github.com/DeveloperPaul123/modern-cv/actions).
### Output Examples
| Resumes | Cover letters |
| | |
| --- | --- |
| ![Resume](assets/images/resume.png) | ![Cover Letter](assets/images/coverletter.png) |
| ![Resume 2](assets/images/resume2.png) | ![Cover Letter 2](assets/images/coverletter2.png)|
## Building and Testing Locally
To build and test the project locally, you will need to install the `typst` CLI. You can find instructions on how to do this [here](https://github.com/typst/typst#installation).
With typst installed you can make changes to `lib.typ` and then `just install` or `just install-preview` to install the package locally. Change the import statements in the template files to point to the local package (if needed):
```typst
#import "@local/modern-cv:0.8.0": *
````
If you use `just install-preview` you will only need to update the version number to match `typst.toml`.
Note that the script parses the `typst.toml` to determine the version number and the folder the local files are installed to.
### Formatting
This project uses [typstyle](https://github.com/Enter-tainer/typstyle) to format the code. Run `just format` to format all the `*.typ` files in the project. Be sure to install `typstyle` before running the script.
## License
The project is licensed under the MIT license. See [LICENSE](LICENSE) for more details.
## Author
| [<img src="https://avatars0.githubusercontent.com/u/6591180?s=460&v=4" width="100"><br><sub>@DeveloperPaul123</sub>](https://github.com/DeveloperPaul123) |
|:----:|
| ![Resume](resume.png) | ![Coverletter](coverletter.png) |

165
assets/icons/LICENSE.txt Normal file
View File

@@ -0,0 +1,165 @@
Fonticons, Inc. (https://fontawesome.com)
--------------------------------------------------------------------------------
Font Awesome Free License
Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license/free.
--------------------------------------------------------------------------------
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
The Font Awesome Free download is licensed under a Creative Commons
Attribution 4.0 International License and applies to all icons packaged
as SVG and JS file types.
--------------------------------------------------------------------------------
# Fonts: SIL OFL 1.1 License
In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files.
Copyright (c) 2023 Fonticons, Inc. (https://fontawesome.com)
with Reserved Font Name: "Font Awesome".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
SIL OPEN FONT LICENSE
Version 1.1 - 26 February 2007
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting — in part or in whole — any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
# Code: MIT License (https://opensource.org/licenses/MIT)
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.
Copyright 2023 Fonticons, Inc.
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.
--------------------------------------------------------------------------------
# Attribution
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.
We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.
--------------------------------------------------------------------------------
# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm90.7 96.7c9.7-2.6 19.9 2.3 23.7 11.6l20 48c3.4 8.2 1 17.6-5.8 23.2L168 231.7c16.6 35.2 45.1 63.7 80.3 80.3l20.2-24.7c5.6-6.8 15-9.2 23.2-5.8l48 20c9.3 3.9 14.2 14 11.6 23.7l-12 44C336.9 378 329 384 320 384C196.3 384 96 283.7 96 160c0-9 6-16.9 14.7-19.3l44-12z"/></svg>

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

BIN
coverletter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

View File

@@ -1,9 +0,0 @@
#import "../lib.typ"
#import "@preview/tidy:0.4.1"
#let docs = tidy.parse-module(
read("../lib.typ"),
name: "Modern CV",
scope: (resume: lib),
)
#tidy.show-module(docs, style: tidy.styles.minimal)

View File

@@ -1,13 +0,0 @@
# Release Checklist
This document outlines the steps required to prepare a new release of `modern-cv`.
Steps:
1. Create a new release branch with the format `release/x.y.z`.
2. Update the version in the `typst.toml`.
3. Update examples in the [README.md](../README.md) to reflect the new version.
4. Update templates to import the correct version.
5. Do a final compilation/export check of all the templates.
6. Ensure that tests pass.
7. Ensure that the documentation manual builds.

View File

@@ -1,83 +0,0 @@
[conf]
default-lang = "en"
[lang.en]
resume = "Résumé"
dear = "Dear"
cover-letter = "Cover Letter"
attached = "Attached"
curriculum-vitae = "Curriculum Vitae"
sincerely = "Sincerely"
letter-position-pretext = "Job Application for"
[lang.de]
resume = "Lebenslauf"
dear = "Sehr geehrte"
cover-letter = "Anschreiben"
attached = "Angehängt"
curriculum-vitae = "Lebenslauf"
sincerely = "Mit freundlichen Grüßen"
letter-position-pretext = "Bewerbung für"
[lang.gr]
resume = "Βιογραφικό"
dear = "Αγαπητέ"
cover-letter = "Συνοδευτική Επιστολή"
attached = "Συνημμένο"
curriculum-vitae = "Βιογραφικό"
sincerely = "Με εκτίμηση"
letter-position-pretext = "Αίτηση εργασίας για"
[lang.pt]
resume = "Currículo"
dear = "Caro(a)"
cover-letter = "Carta de Apresentação"
attached = "Em anexo"
curriculum-vitae = "Currículo"
sincerely = "Atenciosamente"
letter-position-pretext = "Candidatura a emprego para"
[lang.sp]
resume = "Currículum"
dear = "Estimado"
cover-letter = "Carta de Presentación"
attached = "Adjunto"
curriculum-vitae = "Currículum"
sincerely = "Sinceramente"
letter-position-pretext = "Solicitud de empleo para"
[lang.fr]
resume = "Curriculum Vitae"
dear = "Cher/Chère"
cover-letter = "Lettre de motivation"
attached = "Ci-joint"
curriculum-vitae = "Curriculum Vitae"
sincerely = "Sincèrement"
letter-position-pretext = "Demande d'emploi pour"
[lang.ru]
resume = "Резюме"
dear = "Уважаемый"
cover-letter = "Сопроводительное письмо"
attached = "Прилагается"
curriculum-vitae = "Биографическая справка"
sincerely = "Искренне"
letter-position-pretext = "Заявление о приеме на работу"
[lang.zh]
resume = "简历"
dear = "亲爱的"
cover-letter = "求职信"
attached = "附件"
curriculum-vitae = "简历"
sincerely = "真诚的"
letter-position-pretext = "職位申請"
[lang.it]
resume = "Curriculum"
dear = "Egregio"
cover-letter = "Lettera di presentazione"
attached = "Allegato"
curriculum-vitae = "Curriculum Vitae"
sincerely = "Cordiali saluti"
letter-position-pretext = "Domanda di lavoro per"

595
lib.typ
View File

@@ -1,34 +1,17 @@
#import "@preview/fontawesome:0.5.0": *
#import "@preview/linguify:0.4.1": *
#import "@preview/fontawesome:0.1.0": *
// const color
#let color-darknight = rgb("#131A28")
#let color-darkgray = rgb("#333333")
#let color-gray = rgb("#5d5d5d")
#let default-accent-color = rgb("#262F99")
#let default-location-color = rgb("#333333")
#let color-darknight = rgb("131A28")
#let color-darkgray = rgb("414141")
#let color-gray = rgb("5d5d5d")
#let default-accent-color = rgb("333ECC")
// const icons
#let linkedin-icon = box(
fa-icon("linkedin", fill: color-darknight),
)
#let github-icon = box(
fa-icon("github", fill: color-darknight),
)
#let twitter-icon = box(
fa-icon("twitter", fill: color-darknight),
)
#let google-scholar-icon = box(
fa-icon("google-scholar", fill: color-darknight),
)
#let orcid-icon = box(
fa-icon("orcid", fill: color-darknight),
)
#let phone-icon = box(fa-icon("square-phone", fill: color-darknight))
#let linkedin-icon = box(fa-icon("linkedin", fa-set: "Brands", fill: color-darknight))
#let github-icon = box(fa-icon("github", fa-set: "Brands", fill: color-darknight))
// for some reason this icon doesn't work with fa-icon, so we use the local version
#let phone-icon = box(image("assets/icons/square-phone-solid.svg"))
#let email-icon = box(fa-icon("envelope", fill: color-darknight))
#let birth-icon = box(fa-icon("cake", fill: color-darknight))
#let homepage-icon = box(fa-icon("home", fill: color-darknight))
#let website-icon = box(fa-icon("globe", fill: color-darknight))
/// Helpers
@@ -64,87 +47,31 @@
]
}
#let __coverletter_footer(author, language, date, lang_data) = {
set text(
fill: gray,
size: 8pt,
)
__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#if language == "zh" or language == "ja" [
#author.firstname#author.lastname
] else [
#author.firstname#sym.space#author.lastname
]
#sym.dot.c
#linguify("cover-letter", from: lang_data)
]
][
#context {
counter(page).display()
}
]
}
#let __resume_footer(author, language, lang_data, date) = {
set text(
fill: gray,
size: 8pt,
)
__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#if language == "zh" or language == "ja" [
#author.firstname#author.lastname
] else [
#author.firstname#sym.space#author.lastname
]
#sym.dot.c
#linguify("resume", from: lang_data)
]
][
#context {
counter(page).display()
}
]
}
/// Show a link with an icon, specifically for Github projects
/// *Example*
/// #example(`resume.github-link("DeveloperPaul123/awesome-resume")`)
/// - github-path (string): The path to the Github project (e.g. "DeveloperPaul123/awesome-resume")
/// - github_path (string): The path to the Github project (e.g. "DeveloperPaul123/awesome-resume")
/// -> none
#let github-link(github-path) = {
#let github-link(github_path) = {
set box(height: 11pt)
align(right + horizon)[
#fa-icon("github", fill: color-darkgray) #link(
"https://github.com/" + github-path,
github-path,
)
#fa-icon("github", fa-set: "Brands", fill: color-darkgray) #link("https://github.com/" + github_path, github_path)
]
}
/// Right section for the justified headers
/// - body (content): The body of the right header
#let secondary-right-header(body) = {
set text(
size: 11pt,
weight: "medium",
)
/// - accent_color (color): The accent color to color the text with. This defaults to the default-accent-color
#let secondary-right-header(body, accent_color: default-accent-color) = {
set text(accent_color, size: 11pt, style: "italic", weight: "light")
body
}
/// Right section of a tertiaty headers.
/// - body (content): The body of the right header
#let tertiary-right-header(body) = {
set text(
weight: "light",
size: 9pt,
)
set text(weight: "light", style: "italic", size: 9pt)
body
}
@@ -152,10 +79,7 @@
/// - primary (content): The primary section of the header
/// - secondary (content): The secondary section of the header
#let justified-header(primary, secondary) = {
set block(
above: 0.7em,
below: 0.7em,
)
set block(above: 0.7em, below: 0.7em)
pad[
#__justify_align[
== #primary
@@ -184,102 +108,78 @@
/// The original template: https://github.com/posquit0/Awesome-CV
///
/// - author (content): Structure that takes in all the author's information
/// - profile-picture (image): The profile picture of the author. This will be cropped to a circle and should be square in nature.
/// - date (string): The date the resume was created
/// - accent-color (color): The accent color of the resume
/// - colored-headers (boolean): Whether the headers should be colored or not
/// - language (string): The language of the resume, defaults to "en". See lang.toml for available languages
/// - accent_color (color): The accent color of the resume
/// - body (content): The body of the resume
/// -> none
#let resume(
author: (:),
profile-picture: image,
date: datetime.today().display("[month repr:long] [day], [year]"),
accent-color: default-accent-color,
colored-headers: true,
show-footer: true,
language: "en",
font: ("Source Sans Pro", "Source Sans 3"),
header-font: ("Roboto"),
paper-size: "a4",
body,
) = {
if type(accent-color) == "string" {
accent-color = rgb(accent-color)
}
let lang_data = toml("lang.toml")
show: body => context {
accent_color: default-accent-color,
body) = {
set document(
author: author.firstname + " " + author.lastname,
title: lflib._linguify("resume", lang: language, from: lang_data).ok,
title: "resume",
)
body
}
set text(
font: font,
lang: language,
font: ("Source Sans Pro"),
lang: "en",
size: 11pt,
fill: color-darkgray,
fallback: true,
fallback: true
)
set page(
paper: paper-size,
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: if show-footer [#__resume_footer(
author,
language,
lang_data,
date,
)] else [],
footer: [
#set text(fill: gray, size: 8pt)
#__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#author.firstname
#author.lastname
#sym.dot.c
#"Résumé"
]
][
#counter(page).display()
]
],
footer-descent: 0pt,
)
// set paragraph spacing
set par(
spacing: 0.75em,
justify: true,
)
show par: set block(above: 0.75em, below: 0.75em)
set par(justify: true)
set heading(
numbering: none,
outlined: false,
)
show heading.where(level: 1): it => [
show heading.where(level:1): it => [
#set block(above: 1em, below: 1em)
#set text(
size: 16pt,
weight: "regular",
weight: "regular"
)
#set align(left)
#set block(above: 1em)
#let color = if colored-headers {
accent-color
} else {
color-darkgray
}
#text[#strong[#text(color)[#it.body]]]
#align(left)[
#text[#strong[#text(accent_color)[#it.body.text.slice(0, 3)]]]#strong[#text[#it.body.text.slice(3)]]
#box(width: 1fr, line(length: 100%))
]
]
show heading.where(level: 2): it => {
set text(
color-darkgray,
size: 12pt,
style: "normal",
weight: "bold",
)
set text(color-darkgray, size: 12pt, style: "normal", weight: "bold")
it.body
}
show heading.where(level: 3): it => {
set text(
size: 10pt,
weight: "regular",
)
set text(size: 10pt, weight: "regular")
smallcaps[#it.body]
}
@@ -287,35 +187,24 @@
align(center)[
#pad(bottom: 5pt)[
#block[
#set text(
size: 32pt,
style: "normal",
font: header-font,
)
#if language == "zh" or language == "ja" [
#text(
accent-color,
weight: "thin",
)[#author.firstname]#text(weight: "bold")[#author.lastname]
] else [
#text(accent-color, weight: "thin")[#author.firstname]
#set text(size: 32pt, style: "normal", font: ("Roboto"))
#text(accent_color, weight: "thin")[#author.firstname]
#text(weight: "bold")[#author.lastname]
]
]
]
]
}
let positions = {
set text(
accent-color,
accent_color,
size: 9pt,
weight: "regular",
weight: "regular"
)
align(center)[
#smallcaps[
#author.positions.join(
text[#" "#sym.dot.c#" "],
text[#" "#sym.dot.c#" "]
)
]
]
@@ -324,13 +213,12 @@
let address = {
set text(
size: 9pt,
weight: "regular",
weight: "bold",
style: "italic",
)
align(center)[
#if ("address" in author) [
#author.address
]
]
}
let contacts = {
@@ -339,121 +227,41 @@
let separator = box(width: 5pt)
align(center)[
#set text(
size: 9pt,
weight: "regular",
style: "normal",
)
#set text(size: 9pt, weight: "regular", style: "normal")
#block[
#align(horizon)[
#if ("birth" in author) [
#birth-icon
#box[#text(author.birth)]
#separator
]
#if ("phone" in author) [
#phone-icon
#box[#text(author.phone)]
#separator
]
#if ("email" in author) [
#email-icon
#box[#link("mailto:" + author.email)[#author.email]]
]
#if ("homepage" in author) [
#separator
#homepage-icon
#box[#link(author.homepage)[#author.homepage]]
]
#if ("github" in author) [
#separator
#github-icon
#box[#link("https://github.com/" + author.github)[#author.github]]
]
#if ("linkedin" in author) [
#separator
#linkedin-icon
#box[
#link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname]
]
]
#if ("twitter" in author) [
#separator
#twitter-icon
#box[#link("https://twitter.com/" + author.twitter)[\@#author.twitter]]
]
#if ("scholar" in author) [
#let fullname = str(author.firstname + " " + author.lastname)
#separator
#google-scholar-icon
#box[#link("https://scholar.google.com/citations?user=" + author.scholar)[#fullname]]
]
#if ("orcid" in author) [
#separator
#orcid-icon
#box[#link("https://orcid.org/" + author.orcid)[#author.orcid]]
]
#if ("website" in author) [
#separator
#website-icon
#box[#link(author.website)[#author.website]]
]
]
]
]
}
if profile-picture != none {
grid(
columns: (100% - 4cm, 4cm),
rows: (100pt),
gutter: 10pt,
[
#name
#positions
#address
#contacts
],
align(left + horizon)[
#block(
clip: true,
stroke: 0pt,
radius: 2cm,
width: 4cm,
height: 4cm,
profile-picture,
)
],
)
} else {
name
positions
address
contacts
}
body
}
/// The base item for resume entries.
/// This formats the item for the resume entries. Typically your body would be a bullet list of items. Could be your responsibilities at a company or your academic achievements in an educational background section.
/// - body (content): The body of the resume entry
#let resume-item(body) = {
set text(
size: 10pt,
style: "normal",
weight: "light",
fill: color-darknight,
)
set block(
above: 0.75em,
below: 1.25em,
)
set text(size: 10pt, style: "normal", weight: "light")
set par(leading: 0.65em)
block(above: 0.5em)[
#body
]
body
}
/// The base item for resume entries. This formats the item for the resume entries. Typically your body would be a bullet list of items. Could be your responsibilities at a company or your academic achievements in an educational background section.
@@ -461,43 +269,23 @@
/// - location (string): The location of the resume entry
/// - date (string): The date of the resume entry, this can be a range (e.g. "Jan 2020 - Dec 2020")
/// - description (content): The body of the resume entry
/// - title-link (string): The link to use for the title (can be none)
/// - accent-color (color): Override the accent color of the resume-entry
/// - location-color (color): Override the default color of the "location" for a resume entry.
#let resume-entry(
title: none,
location: "",
date: "",
description: "",
title-link: none,
accent-color: default-accent-color,
location-color: default-location-color,
description: ""
) = {
let title-content
if type(title-link) == "string" {
title-content = link(title-link)[#title]
} else {
title-content = title
}
block(above: 1em, below: 0.65em)[
#pad[
#justified-header(title-content, location)
#if description != "" or date != "" [
pad[
#justified-header(title, location)
#secondary-justified-header(description, date)
]
]
]
}
/// Show cumulative GPA.
/// *Example:*
/// #example(`resume.resume-gpa("3.5", "4.0")`)
#let resume-gpa(numerator, denominator) = {
set text(
size: 12pt,
style: "italic",
weight: "light",
)
set text(size: 12pt, style: "italic", weight: "light")
text[Cumulative GPA: #box[#strong[#numerator] / #denominator]]
}
@@ -526,11 +314,7 @@
== #category
],
align(left)[
#set text(
size: 11pt,
style: "normal",
weight: "light",
)
#set text(size: 11pt, style: "normal", weight: "light")
#items.join(", ")
],
)
@@ -541,82 +325,57 @@
/// ---- Coverletter ----
#let default-closing(lang_data) = {
align(bottom)[
#text(weight: "light", style: "italic")[ #linguify(
"attached",
from: lang_data,
)#sym.colon #linguify("curriculum-vitae", from: lang_data)]
]
}
/// Cover letter template that is inspired by the Awesome CV Latex template by posquit0. This template can loosely be considered a port of the original Latex template.
/// This coverletter template is designed to be used with the resume template.
/// - author (content): Structure that takes in all the author's information. The following fields are required: firstname, lastname, positions. The following fields are used if available: email, phone, github, linkedin, orcid, address, website.
/// - profile-picture (image): The profile picture of the author. This will be cropped to a circle and should be square in nature.
/// - date (datetime): The date the cover letter was created. This will default to the current date.
/// - accent-color (color): The accent color of the cover letter
/// - language (string): The language of the cover letter, defaults to "en". See lang.toml for available languages
/// - font (array): The font families of the cover letter
/// - show-footer (boolean): Whether to show the footer or not
/// - closing (content): The closing of the cover letter. This defaults to "Attached Curriculum Vitae". You can set this to `none` to show the default closing or remove it completely.
/// - author (content): Structure that takes in all the author's information
/// - profile_picture (image): The profile picture of the author. This will be cropped to a circle and should be square in nature.
/// - date (date): The date the cover letter was created
/// - accent_color (color): The accent color of the cover letter
/// - body (content): The body of the cover letter
#let coverletter(
author: (:),
profile-picture: image,
profile_picture: image,
date: datetime.today().display("[month repr:long] [day], [year]"),
accent-color: default-accent-color,
language: "en",
font: ("Source Sans Pro", "Source Sans 3"),
show-footer: true,
closing: none,
paper-size: "a4",
body,
accent_color: default-accent-color,
body
) = {
if type(accent-color) == "string" {
accent-color = rgb(accent-color)
}
// language data
let lang_data = toml("lang.toml")
if closing == none {
closing = default-closing(lang_data)
}
show: body => context {
set document(
author: author.firstname + " " + author.lastname,
title: lflib._linguify("cover-letter", lang: language, from: lang_data).ok,
title: "resume",
)
body
}
set text(
font: font,
lang: language,
font: ("Source Sans Pro"),
lang: "en",
size: 11pt,
fill: color-darkgray,
fallback: true,
fallback: true
)
set page(
paper: paper-size,
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: if show-footer [#__coverletter_footer(
author,
language,
date,
lang_data,
)] else [],
footer: [
#set text(fill: gray, size: 8pt)
#__justify_align_3[
#smallcaps[#date]
][
#smallcaps[
#author.firstname
#author.lastname
#sym.dot.c
#"Cover Letter"
]
][
#counter(page).display()
]
],
footer-descent: 0pt,
)
// set paragraph spacing
set par(
spacing: 0.75em,
justify: true,
)
show par: set block(above: 0.75em, below: 0.75em)
set par(justify: true)
set heading(
numbering: none,
@@ -624,17 +383,14 @@
)
show heading: it => [
#set block(
above: 1em,
below: 1em,
)
#set block(above: 1em, below: 1em)
#set text(
size: 16pt,
weight: "regular",
weight: "regular"
)
#align(left)[
#text[#strong[#text(accent-color)[#it.body]]]
#text[#strong[#text(accent_color)[#it.body.text.slice(0, 3)]]]#strong[#text[#it.body.text.slice(3)]]
#box(width: 1fr, line(length: 100%))
]
]
@@ -643,36 +399,24 @@
align(right)[
#pad(bottom: 5pt)[
#block[
#set text(
size: 32pt,
style: "normal",
font: ("Roboto"),
)
#if language == "zh" or language == "ja" [
#text(
accent-color,
weight: "thin",
)[#author.firstname]#text(weight: "bold")[#author.lastname]
] else [
#text(accent-color, weight: "thin")[#author.firstname]
#set text(size: 32pt, style: "normal", font: ("Roboto"))
#text(accent_color, weight: "thin")[#author.firstname]
#text(weight: "bold")[#author.lastname]
]
]
]
]
}
let positions = {
set text(
accent-color,
accent_color,
size: 9pt,
weight: "regular",
weight: "regular"
)
align(right)[
#smallcaps[
#author.positions.join(
text[#" "#sym.dot.c#" "],
text[#" "#sym.dot.c#" "]
)
]
]
@@ -681,103 +425,66 @@
let address = {
set text(
size: 9pt,
weight: "bold",
fill: color-gray,
weight: "regular",
style: "italic",
fill: color-gray
)
align(right)[
#if ("address" in author) [
#author.address
]
]
}
let contacts = {
set box(height: 9pt)
let separator = [ #box(sym.bar.v) ]
let author_list = ()
if ("phone" in author) {
author_list.push[
#phone-icon
#box[#text(author.phone)]
]
}
if ("email" in author) {
author_list.push[
#email-icon
#box[#link("mailto:" + author.email)[#author.email]]
]
}
if ("github" in author) {
author_list.push[
#github-icon
#box[#link("https://github.com/" + author.github)[#author.github]]
]
}
if ("linkedin" in author) {
author_list.push[
#linkedin-icon
#box[
#link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname]
]
]
}
if ("orcid" in author) {
author_list.push[
#orcid-icon
#box[#link("https://orcid.org/" + author.orcid)[#author.orcid]]
]
}
if ("website" in author) {
author_list.push[
#website-icon
#box[#link(author.website)[#author.website]]
]
}
let separator = [#box(sym.bar.v)]
align(right)[
#set text(
size: 8pt,
weight: "light",
style: "normal",
#set text(size: 8pt, weight: "light", style: "normal")
#block[
#align(horizon)[
#stack(dir: ltr, spacing: 0.5em,
phone-icon,
box[#text(author.phone)],
separator,
email-icon,
box[#link("mailto:" + author.email)[#author.email]],
separator,
github-icon,
box[#link("https://github.com/" + author.github)[#author.github]],
separator,
linkedin-icon,
box[
#link("https://www.linkedin.com/in/" + author.linkedin)[#author.firstname #author.lastname]
]
)
#author_list.join(separator)
]
]
]
}
let letter-heading = {
grid(
columns: (1fr, 2fr),
grid(columns: (1fr, 2fr),
rows: (100pt),
align(left + horizon)[
#block(
clip: true,
stroke: 0pt,
radius: 2cm,
width: 4cm,
height: 4cm,
profile-picture,
)
align(left+horizon)[
#block(clip: true, stroke: 0pt, radius: 2cm,
width: 4cm, height: 4cm, profile_picture)
],
[
#name
#positions
#address
#contacts
],
]
)
}
let signature = {
let letter_conclusion = {
align(bottom)[
#pad(bottom: 2em)[
#text(weight: "light")[#linguify(
"sincerely",
from: lang_data,
)#if language != "de" [#sym.comma]] \
#text(weight: "light")[Sincerely,] \
#text(weight: "bold")[#author.firstname #author.lastname] \ \
#text(weight: "light", style: "italic")[Attached: Curriculum Vitae]
]
]
}
@@ -786,54 +493,42 @@
letter-heading
body
linebreak()
signature
closing
letter_conclusion
}
/// Cover letter heading that takes in the information for the hiring company and formats it properly.
/// - entity-info (content): The information of the hiring entity including the company name, the target (who's attention to), street address, and city
/// - entity_info (content): The information of the hiring entity including the company name, the target (who's attention to), street address, and city
/// - date (date): The date the letter was written (defaults to the current date)
#let hiring-entity-info(
entity-info: (:),
date: datetime.today().display("[month repr:long] [day], [year]"),
) = {
#let hiring-entity-info(entity_info: (:), date: datetime.today().display("[month repr:long] [day], [year]")) = {
set par(leading: 1em)
pad(top: 1.5em, bottom: 1.5em)[
#__justify_align[
#text(weight: "bold", size: 12pt)[#entity-info.target]
#text(weight: "bold", size: 12pt)[#entity_info.target]
][
#text(weight: "light", style: "italic", size: 9pt)[#date]
]
#pad(top: 0.65em, bottom: 0.65em)[
#text(weight: "regular", fill: color-gray, size: 9pt)[
#smallcaps[#entity-info.name] \
#entity-info.street-address \
#entity-info.city \
#smallcaps[#entity_info.name] \
#entity_info.street_address \
#entity_info.city \
]
]
]
}
/// Letter heading for a given job position and addressee.
/// - job-position (string): The job position you are applying for
/// - job_position (string): The job position you are applying for
/// - addressee (string): The person you are addressing the letter to
/// - dear (string): optional field for redefining the "dear" variable
#let letter-heading(job-position: "", addressee: "", dear: "") = {
let lang_data = toml("lang.toml")
#let letter-heading(job_position: "", addressee: "") = {
// TODO: Make this adaptable to content
underline(evade: false, stroke: 0.5pt, offset: 0.3em)[
#text(weight: "bold", size: 12pt)[#linguify("letter-position-pretext", from: lang_data) #job-position]
#text(weight: "bold", size: 12pt)[Job Application for #job_position]
]
pad(top: 1em, bottom: 1em)[
#text(weight: "light", fill: color-gray)[
#if dear == "" [
#linguify("dear", from: lang_data)
] else [
#dear
]
#addressee,
Dear #addressee,
]
]
}

9
modern-cv-docs.typ Normal file
View File

@@ -0,0 +1,9 @@
#import "lib.typ"
#import "@preview/tidy:0.2.0"
#let docs = tidy.parse-module(
read("lib.typ"),
name: "Modern CV",
scope: (resume: lib)
)
#tidy.show-module(docs)

BIN
resume.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 KiB

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
set -eu
find . -iname "*.typ" | xargs typstyle -i

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -eu
wget -O ~/fontawesome.zip https://use.fontawesome.com/releases/v6.6.0/fontawesome-free-6.6.0-desktop.zip
mkdir -p ~/fontawesome-fonts
unzip ~/fontawesome.zip -d ~/fontawesome-fonts
mkdir -p ~/.fonts
find ~/fontawesome-fonts -type f -name "*.otf" -exec cp {} ~/.fonts \;
rm ~/fontawesome.zip
rm -rf ~/fontawesome-fonts
fc-cache -f -v

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -eu
wget -O ~/source-sans.zip https://github.com/adobe-fonts/source-sans/releases/download/3.052R/OTF-source-sans-3.052R.zip
mkdir -p ~/source-sans-fonts
unzip ~/source-sans.zip -d ~/source-sans-fonts
mkdir -p ~/.fonts
find ~/source-sans-fonts -type f -name "*.otf" -exec cp {} ~/.fonts \;
rm ~/source-sans.zip
rm -rf ~/source-sans-fonts
fc-cache -f -v

View File

@@ -0,0 +1,3 @@
$Source = "$PSScriptRoot/../*"
$Destination = "$env:LOCALAPPDATA/typst/packages/local/modern-cv/0.1.0"
Copy-Item -Path $Source -Destination $Destination -Recurse -Force

View File

@@ -1,86 +0,0 @@
#!/usr/bin/env bash
set -eu
# adapted from https://github.com/johannes-wolf/cetz/blob/35c0868378cea5ad323cc0d9c2f76de8ed9ba5bd/scripts/package
# licensed under Apache License 2.0
. "$(dirname "${BASH_SOURCE[0]}")/setup"
if (( $# < 1 )) || [[ "${1:-}" == "help" ]]; then
echo "package TARGET"
echo ""
echo "Packages all relevant files into a directory named '<name>/<version>'"
echo "at TARGET. If TARGET is set to @local or @preview, the local Typst package"
echo "directory will be used so that the package gets installed for local use."
echo "The name and version are read from 'typst.toml' in the project root."
echo ""
echo "Local package prefix: $DATA_DIR/typst/package/local"
echo "Local preview package prefix: $DATA_DIR/typst/package/preview"
exit 1
fi
TARGET="$(resolve-target "${1:?Missing target path, @local or @preview}")"
echo "Install dir: $TARGET"
# ignore rules
readarray -t ignores < <(grep -v '^#' .typstignore | grep '[^[:blank:]]')
# recursively print all files that are not excluded via .typstignore
function enumerate {
local root="$1"
if [[ -f "$root" ]]; then
echo "$root"
else
local files
readarray -t files < <(find "$root" \
-mindepth 1 -maxdepth 1 \
-not -name .git \
-not -name .typstignore)
# declare -p files >&2
local f
for f in "${files[@]}"; do
local include
include=1
local ignore
for ignore in "${ignores[@]}"; do
if [[ "$ignore" =~ ^! ]]; then
ignore="${ignore:1}"
if [[ "$f" == ./$ignore ]]; then
# echo "\"$f\" matched \"!$ignore\"" >&2
include=1
fi
elif [[ "$f" == ./$ignore ]]; then
# echo "\"$f\" matched \"$ignore\"" >&2
include=0
fi
done
if [[ "$include" == 1 ]]; then
enumerate "$f"
fi
done
fi
}
# List of all files that get packaged
readarray -t files < <(enumerate ".")
# declare -p files >&2
TMP="$(mktemp -d)"
for f in "${files[@]}"; do
mkdir -p "$TMP/$(dirname "$f")" 2>/dev/null
cp -r "$ROOT/$f" "$TMP/$f"
done
TARGET="${TARGET:?}/${PKG_PREFIX:?}/${VERSION:?}"
echo "Packaged to: $TARGET"
if rm -r "${TARGET:?}" 2>/dev/null; then
echo "Overwriting existing version."
fi
mkdir -p "$TARGET"
# include hidden files by setting dotglob
shopt -s dotglob
mv "$TMP"/* "$TARGET"

View File

@@ -1,37 +0,0 @@
# source this script to prepare some common environment variables
# adapted from https://github.com/johannes-wolf/cetz/blob/35c0868378cea5ad323cc0d9c2f76de8ed9ba5bd/scripts/package
# licensed under Apache License 2.0
# Local package directories per platform
if [[ "$OSTYPE" == "linux"* ]]; then
DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}"
elif [[ "$OSTYPE" == "darwin"* ]]; then
DATA_DIR="$HOME/Library/Application Support"
else
DATA_DIR="${APPDATA}"
fi
function read-toml() {
local file="$1"
local key="$2"
# Read a key value pair in the format: <key> = "<value>"
# stripping surrounding quotes.
perl -lne "print \"\$1\" if /^${key}\\s*=\\s*\"(.*)\"/" < "$file"
}
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd -P)/.." # macOS has no realpath
PKG_PREFIX="$(read-toml "$ROOT/typst.toml" "name")"
VERSION="$(read-toml "$ROOT/typst.toml" "version")"
function resolve-target() {
local target="$1"
if [[ "$target" == "@local" ]]; then
echo "${DATA_DIR}/typst/packages/local"
elif [[ "$target" == "@preview" ]]; then
echo "${DATA_DIR}/typst/packages/preview"
else
echo "$target"
fi
}

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env bash
set -eu
# adapted from https://github.com/johannes-wolf/cetz/blob/35c0868378cea5ad323cc0d9c2f76de8ed9ba5bd/scripts/package
# licensed under Apache License 2.0
. "$(dirname "${BASH_SOURCE[0]}")/setup"
if (( $# < 1 )) || [[ "${1:-}" == "help" ]]; then
echo "uninstall TARGET"
echo ""
echo "Removes the package installed into a directory named '<name>/<version>'"
echo "at TARGET. If TARGET is set to @local or @preview, the local Typst package"
echo "directory will be used so that the package gets installed for local use."
echo "The name and version are read from 'typst.toml' in the project root."
echo ""
echo "Local package prefix: $DATA_DIR/typst/package/local"
echo "Local preview package prefix: $DATA_DIR/typst/package/preview"
exit 1
fi
TARGET="$(resolve-target "${1:?Missing target path, @local or @preview}")"
echo "Install dir: $TARGET"
TARGET="${TARGET:?}/${PKG_PREFIX:?}/${VERSION:?}"
echo "Package to uninstall: $TARGET"
if [[ ! -e "${TARGET:?}" ]]; then
echo "Package was not found."
elif rm -r "${TARGET:?}" 2>/dev/null; then
echo "Successfully removed."
else
echo "Removal failed."
fi

View File

@@ -1,5 +0,0 @@
typst compile -f png $PSScriptRoot/../template/resume.typ $PSScriptRoot/../assets/images/resume.png
typst compile -f png $PSScriptRoot/../template/coverletter.typ $PSScriptRoot/../assets/images/coverletter.png
typst compile -f png $PSScriptRoot/../template/coverletter2.typ $PSScriptRoot/../assets/images/coverletter2.png
oxipng.exe $PSScriptRoot/../assets/images/*

View File

@@ -1,44 +1,34 @@
#import "@preview/modern-cv:0.8.0": *
#import "@preview/modern-cv:0.1.0":*
#show: coverletter.with(
author: (
firstname: "John",
lastname: "Smith",
email: "js@gmail.com",
homepage: "https://example.com",
phone: "(+1) 111-111-1111",
github: "DeveloperPaul123",
linkedin: "John Smith",
address: "111 Example St. Apt. 111, Example City, EX 11111",
website: "https://www.github.com/DeveloperPaul123",
positions: (
"Software Engineer",
"Full Stack Developer",
"Full Stack Developer"
)
),
),
profile-picture: image("./profile.png"),
// change this to match the language available in 'lang.toml'
language: "en",
font: "Times New Roman",
// Remove the following line to show the footer
// Or set the value to `true`
show-footer: false,
// set this to `none` to show the default or remove it completely
closing: [],
// see typst "page" documentation for more options
paper-size: "us-gov-legal"
profile_picture: image("./profile.png")
)
#hiring-entity-info(entity-info: (
#hiring-entity-info(
entity_info: (
target: "Company Recruitement Team",
name: "Google, Inc.",
street-address: "1600 AMPHITHEATRE PARKWAY",
city: "MOUNTAIN VIEW, CA 94043",
))
street_address: "1600 AMPHITHEATRE PARKWAY",
city: "MOUNTAIN VIEW, CA 94043"
)
)
#letter-heading(
job-position: "Software Engineer",
addressee: "Sir or Madame",
job_position: "Software Engineer",
addressee: "Sir or Madame"
)
= About Me

View File

@@ -1,44 +0,0 @@
#import "@preview/modern-cv:0.8.0": *
#show: coverletter.with(
author: (
firstname: "John",
lastname: "Smith",
email: "js@gmail.com",
homepage: "https://example.com",
phone: "(+1) 111-111-1111",
github: "DeveloperPaul123",
linkedin: "John Smith",
address: "111 Example St. Apt. 111, Example City, EX 11111",
positions: (
"Software Engineer",
"Full Stack Developer",
),
),
profile-picture: none,
language: "sp",
)
#hiring-entity-info(entity-info: (
target: "Company Recruitement Team",
name: "Google, Inc.",
street-address: "1600 AMPHITHEATRE PARKWAY",
city: "MOUNTAIN VIEW, CA 94043",
))
#letter-heading(
job-position: "Software Engineer",
addressee: "Sir or Madame",
)
#coverletter-content[
#lorem(100)
]
#coverletter-content[
#lorem(90)
]
#coverletter-content[
#lorem(110)
]

View File

@@ -1,41 +1,44 @@
#import "@preview/modern-cv:0.8.0": *
#import "@preview/modern-cv:0.1.0": *
#show: resume.with(
author: (
firstname: "John",
lastname: "Smith",
email: "js@example.com",
homepage: "https://example.com",
phone: "(+1) 111-111-1111",
github: "DeveloperPaul123",
twitter: "typstapp",
scholar: "",
orcid: "0000-0000-0000-000X",
birth: "January 1, 1990",
linkedin: "Example",
address: "111 Example St. Example City, EX 11111",
positions: (
"Software Engineer",
"Software Architect",
"Developer",
"Software Architect"
)
),
),
profile-picture: none,
date: datetime.today().display(),
language: "en",
colored-headers: true,
show-footer: false,
paper-size: "us-letter",
date: datetime.today().display()
)
= Education
#resume-entry(
title: "Example University",
location: "B.S. in Computer Science",
date: "August 2014 - May 2019",
description: "Example"
)
#resume-item[
- #lorem(20)
- #lorem(15)
- #lorem(25)
]
= Experience
#resume-entry(
title: "Senior Software Engineer",
title: "Example, Inc.",
location: "Example City, EX",
date: "2019 - Present",
description: "Example, Inc.",
title-link: "https://github.com/DeveloperPaul123",
description: "Senior Software Engineer"
)
#resume-item[
@@ -45,20 +48,10 @@
]
#resume-entry(
title: "Software Engineer",
title: "Previous Company, Inc.",
location: "Example City, EX",
date: "2011 - 2019",
description: "Previous Company, Inc.",
)
#resume-item[
// content doesn't have to be bullet points
#lorem(72)
]
#resume-entry(
title: "Intern",
location: "Example City, EX",
description: "Software Engineer"
)
#resume-item[
@@ -73,7 +66,7 @@
title: "Thread Pool C++ Library",
location: [#github-link("DeveloperPaul123/thread-pool")],
date: "May 2021 - Present",
description: "Designer/Developer",
description: "Designer/Developer"
)
#resume-item[
@@ -82,10 +75,10 @@
]
#resume-entry(
title: "Event Bus C++ Library",
title: " Event Bus C++ Library",
location: github-link("DeveloperPaul123/eventbus"),
date: "Sep. 2019 - Present",
description: "Designer/Developer",
description: "Designer/Developer"
)
#resume-item[
@@ -95,27 +88,6 @@
= Skills
#resume-skill-item(
"Languages",
(strong("C++"), strong("Python"), "Java", "C#", "JavaScript", "TypeScript"),
)
#resume-skill-item("Programming Languages", (strong("C++"), "Python", "Java", "C#", "JavaScript", "TypeScript"))
#resume-skill-item("Spoken Languages", (strong("English"), "Spanish"))
#resume-skill-item(
"Programs",
(strong("Excel"), "Word", "Powerpoint", "Visual Studio"),
)
= Education
#resume-entry(
title: "Example University",
location: "Example City, EX",
date: "August 2014 - May 2019",
description: "B.S. in Computer Science",
)
#resume-item[
- #lorem(20)
- #lorem(15)
- #lorem(25)
]
#resume-skill-item("Programs", (strong("Excel"),"Word"))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,95 +0,0 @@
#import "@local/modern-cv:0.8.0": *
// setup the document like we do for the resume
#let font = ("Source Sans Pro", "Source Sans 3")
#set text(
font: font,
size: 11pt,
fill: color-darkgray,
fallback: true,
)
#set page(
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: [],
footer-descent: 0pt,
)
// set paragraph spacing
#set par(spacing: 0.75em, justify: true)
#set heading(
numbering: none,
outlined: false,
)
#show heading.where(level: 1): it => [
#set block(
above: 1em,
below: 1em,
)
#set text(
size: 16pt,
weight: "regular",
)
#align(left)[
#let color = if colored-headers {
accent-color
} else {
color-darkgray
}
#text[#strong[#text(color)[#it.body.text]]]
#box(width: 1fr, line(length: 100%))
]
]
#show heading.where(level: 2): it => {
set text(
color-darkgray,
size: 12pt,
style: "normal",
weight: "bold",
)
it.body
}
#show heading.where(level: 3): it => {
set text(
size: 10pt,
weight: "regular",
)
smallcaps[#it.body]
}
// test the resume functions
#resume-item("Education")
#resume-entry(
title: "BSc Computer Science",
location: "Example City",
date: "2019 - 2022",
description: "Achieved acaademic honors and awards.",
)
// resume-entry also support omitting the date and description
#resume-entry(
title: "Title",
location: "Location",
)
#resume-certification(
"Certified Scrum Master (CSM)",
"Jan 2022",
)
#resume-skill-item(
"Programming",
(strong["C++"], "Python", "Java"),
)
#resume-gpa("3.5", "4.0")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -1,88 +0,0 @@
#import "@local/modern-cv:0.8.0": *
// setup the document like we do for the resume
#let font = ("Source Sans Pro", "Source Sans 3")
#set text(
font: font,
size: 11pt,
fill: color-darkgray,
fallback: true,
)
#set page(
paper: "a4",
margin: (left: 15mm, right: 15mm, top: 10mm, bottom: 10mm),
footer: [],
footer-descent: 0pt,
)
// set paragraph spacing
#set par(spacing: 0.75em, justify: true)
#set heading(
numbering: none,
outlined: false,
)
#show heading.where(level: 1): it => [
#set block(
above: 1em,
below: 1em,
)
#set text(
size: 16pt,
weight: "regular",
)
#align(left)[
#let color = if colored-headers {
accent-color
} else {
color-darkgray
}
#text[#strong[#text(color)[#it.body.text]]]
#box(width: 1fr, line(length: 100%))
]
]
#show heading.where(level: 2): it => {
set text(
color-darkgray,
size: 12pt,
style: "normal",
weight: "bold",
)
it.body
}
#show heading.where(level: 3): it => {
set text(
size: 10pt,
weight: "regular",
)
smallcaps[#it.body]
}
#justified-header("Modern CV", "A modern curriculum vitae template")
#secondary-justified-header("Created by", "DeveloperPaul123")
#github-link("DeveloperPaul123/modern-cv")
#linkedin-icon
#github-icon
#twitter-icon
#google-scholar-icon
#orcid-icon
#phone-icon
#email-icon
#birth-icon
#homepage-icon
#website-icon
#square(size: 1em, fill: color-darkgray)
#square(size: 1em, fill: color-darknight)
#square(size: 1em, fill: color-gray)
#square(size: 1em, fill: default-accent-color)
#square(size: 1em, fill: default-location-color)

View File

@@ -1,7 +1,7 @@
[package]
name = "modern-cv"
version = "0.8.0"
compiler = "0.12.0"
version = "0.1.0"
compiler = "0.11.0"
entrypoint = "lib.typ"
authors = ["Paul Tsouchlos <https://github.com/DeveloperPaul123>"]
license = "MIT"
@@ -9,10 +9,11 @@ description = "A modern resume template based on the Awesome-CV Latex template."
keywords = ["CV", "Curriculum Vitae", "Resume", "Minimalistic", "Professional", "Modern"]
categories = ["cv"]
disciplines = []
exclude = ["resume-documentation*", "scripts*", "assets/images/*"]
exclude = ["resume-documentation*", "scripts*"]
homepage = "https://github.com/DeveloperPaul123/modern-cv"
repository = "https://github.com/DeveloperPaul123/modern-cv"
[template]
path = "template"
entrypoint = "resume.typ"
thumbnail = "assets/images/resume.png"
thumbnail = "resume.png"