Update letter header and split CSS into own file
parent
85b52208a9
commit
39bd2ab3a9
|
|
@ -146,21 +146,3 @@ dd {
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
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)"
|
hash="$(git rev-parse HEAD)"
|
||||||
body="<text>$(pandoc --from=markdown $1)</text>"
|
body="<text>$(pandoc --from=markdown $1)</text>"
|
||||||
company="$2" || ""
|
company="$2" || ""
|
||||||
|
addressee="$3" || ""
|
||||||
date="$(date +'%d %B %Y')"
|
date="$(date +'%d %B %Y')"
|
||||||
signature="$(base64 ./assets/signature.svg)"
|
signature="$(base64 ./assets/signature.svg)"
|
||||||
|
|
||||||
mkdir -p ./dist
|
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
|
weasyprint --quiet ./dist/letter.html ./dist/letter.pdf
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<xsl:copy-of select="document('./fragments/header.xml')"/>
|
<xsl:copy-of select="document('./fragments/header-cv.xml')"/>
|
||||||
<!-- <xsl:copy-of select="/cv"/> -->
|
<!-- <xsl:copy-of select="/cv"/> -->
|
||||||
<section id="objective">
|
<section id="objective">
|
||||||
<h2>Objective</h2>
|
<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="company" select="'ACME Corporation'"/>
|
||||||
<xsl:param name="date" select="'01 January 1970'"/>
|
<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="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">
|
<xsl:template match="/text" data-xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<html lang="en" dir="ltr">
|
<html lang="en" dir="ltr">
|
||||||
<!-- The Yesterweb is dead, long live the Yesterweb! -->
|
<!-- The Yesterweb is dead, long live the Yesterweb! -->
|
||||||
|
|
@ -13,16 +14,17 @@
|
||||||
<meta name="color-scheme" content="light dark" />
|
<meta name="color-scheme" content="light dark" />
|
||||||
<title><xsl:value-of select="$title"/></title>
|
<title><xsl:value-of select="$title"/></title>
|
||||||
<link rel="stylesheet" href="../assets/css/all.css" />
|
<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/screen.css" media="screen" />
|
||||||
<link rel="stylesheet" href="../assets/css/print.css" media="print" />
|
<link rel="stylesheet" href="../assets/css/print.css" media="print" />
|
||||||
</head>
|
</head>
|
||||||
<body class="letter">
|
<body class="letter">
|
||||||
<xsl:copy-of select="document('./fragments/header.xml')"/>
|
<xsl:copy-of select="document('./fragments/header-letter.xml')"/>
|
||||||
<hr />
|
<hr />
|
||||||
<main id="main">
|
<main id="main">
|
||||||
<header>
|
<header>
|
||||||
<p><time><xsl:value-of select="$date"/></time></p>
|
<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>
|
</header>
|
||||||
<xsl:copy-of select="./node()" />
|
<xsl:copy-of select="./node()" />
|
||||||
<footer>
|
<footer>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue