Update letter header and split CSS into own file
parent
85b52208a9
commit
39bd2ab3a9
|
|
@ -146,21 +146,3 @@ dd {
|
|||
footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer:has(#signature) {
|
||||
margin-block-start: 1.5em;
|
||||
margin-top: 1.5em;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
#signature {
|
||||
margin-block-end: -1.5rem;
|
||||
margin-bottom: -1.5rem;
|
||||
max-width: 15em;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#signature {
|
||||
filter: invert();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
body > header {
|
||||
padding-block-end: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.headline {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
header li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
li+li::before {
|
||||
content: " | ";
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
footer:has(#signature) {
|
||||
margin-block-start: 1.5em;
|
||||
margin-top: 1.5em;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
#signature {
|
||||
margin-block-end: -1.375em;
|
||||
margin-bottom: -1.375em;
|
||||
margin-block-start: -1em;
|
||||
margin-top: -0.75em;
|
||||
max-width: 15em;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#signature {
|
||||
filter: invert();
|
||||
}
|
||||
}
|
||||
|
|
@ -2,10 +2,11 @@
|
|||
hash="$(git rev-parse HEAD)"
|
||||
body="<text>$(pandoc --from=markdown $1)</text>"
|
||||
company="$2" || ""
|
||||
addressee="$3" || ""
|
||||
date="$(date +'%d %B %Y')"
|
||||
signature="$(base64 ./assets/signature.svg)"
|
||||
|
||||
mkdir -p ./dist
|
||||
|
||||
echo $body | xsltproc --stringparam company "$company" --stringparam date "$date" --stringparam signature "$signature" ./templates/letter.xsl - > ./dist/letter.html
|
||||
echo $body | xsltproc --stringparam company "$company" --stringparam date "$date" --stringparam addressee "$addressee" --stringparam signature "$signature" ./templates/letter.xsl - > ./dist/letter.html
|
||||
weasyprint --quiet ./dist/letter.html ./dist/letter.pdf
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<xsl:copy-of select="document('./fragments/header.xml')"/>
|
||||
<xsl:copy-of select="document('./fragments/header-cv.xml')"/>
|
||||
<!-- <xsl:copy-of select="/cv"/> -->
|
||||
<section id="objective">
|
||||
<h2>Objective</h2>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<header>
|
||||
<h1>Ainsley Ellis</h1>
|
||||
<p class="headline">Artist, Programmer, Digital Citizen</p>
|
||||
<ul role="list">
|
||||
<li><a href="mailto:ainsleymae@proton.me">ainsleymae@proton.me</a></li>
|
||||
<li><a href="https://ains.me">ains.me</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
<xsl:param name="company" select="'ACME Corporation'"/>
|
||||
<xsl:param name="date" select="'01 January 1970'"/>
|
||||
<xsl:param name="title">Ainsley Ellis: <xsl:value-of select="$company"/> Letter</xsl:param>
|
||||
<xsl:param name="addressee"><xsl:value-of select="$company"/></xsl:param>
|
||||
<xsl:template match="/text" data-xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html lang="en" dir="ltr">
|
||||
<!-- The Yesterweb is dead, long live the Yesterweb! -->
|
||||
|
|
@ -13,16 +14,17 @@
|
|||
<meta name="color-scheme" content="light dark" />
|
||||
<title><xsl:value-of select="$title"/></title>
|
||||
<link rel="stylesheet" href="../assets/css/all.css" />
|
||||
<link rel="stylesheet" href="../assets/css/letter.css" />
|
||||
<link rel="stylesheet" href="../assets/css/screen.css" media="screen" />
|
||||
<link rel="stylesheet" href="../assets/css/print.css" media="print" />
|
||||
</head>
|
||||
<body class="letter">
|
||||
<xsl:copy-of select="document('./fragments/header.xml')"/>
|
||||
<xsl:copy-of select="document('./fragments/header-letter.xml')"/>
|
||||
<hr />
|
||||
<main id="main">
|
||||
<header>
|
||||
<p><time><xsl:value-of select="$date"/></time></p>
|
||||
<p>Dear <xsl:value-of select="$company"/> Hiring Team,</p>
|
||||
<p>Dear <xsl:value-of select="$addressee"/>,</p>
|
||||
</header>
|
||||
<xsl:copy-of select="./node()" />
|
||||
<footer>
|
||||
|
|
|
|||
Loading…
Reference in New Issue