css: remove definition of footer colours
[mina86.com.git] / cv / cv.xsl
blob11b31b7dbfb5ec06602743ff97e13577010b4b84
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4 <xsl:output method="html" encoding="utf-8" indent="yes" />
6 <xsl:template match="@*|node()" priority="-1.0">
7 <xsl:copy>
8 <xsl:apply-templates select="@*|node()"/>
9 </xsl:copy>
10 </xsl:template>
13 <xsl:template match="/cv">
14 <meta charset="utf-8" />
15 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
16 <base href="https://mina86.com/" />
17 <title>Michał Nazarewicz — Curriculum Vitæ</title>
18 <style>
19 @import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&amp;family=Libre+Baskerville:wght@400;700&amp;family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&amp;display=swap');
21 * {
22 box-sizing: content-box;
23 margin: 0;
24 padding: 0
27 body, main {
28 font-family: Lato, DejaVu Sans, Noto Sans, Verdana, sans-serif;
29 background: #FFF;
30 color: #000;
31 line-height: 1.5;
34 h1, h2, h3 {
35 font-family: Libre Baskerville, Georgia, Charter, Utopia, serif;
36 font-weight: bold;
37 page-break-after: avoid;
39 h1, h2 {
40 text-align: center;
42 h1 {
43 font-size: 2em;
44 margin: 0.25em 0 0;
45 page-break-before: avoid;
47 h2 {
48 font-size: 1.25em;
49 padding: 0.125em 0;
50 margin: 1rem 0;
52 h3 {
53 margin: 1em 0;
54 font-size: 1em;
55 font-weight: normal;
57 .entry {
58 margin-bottom: 1.5em;
59 page-break-inside: avoid;
62 .contact {
63 page-break-inside: avoid;
64 page-break-before: avoid;
66 .contact ul {
67 display: flex;
68 flex-wrap: wrap;
69 align-items: center;
70 justify-content: center;
71 gap: 1em;
73 .contact li {
74 display: block;
77 .icon {
78 font-family: Material Symbols Rounded;
79 font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
80 color: #657b83;
81 margin-right: 0.25em;
82 position: relative;
83 top: 0.125em;
86 p, .entry ul {
87 margin: 0.5em 0;
88 text-align: justify;
90 .entry ul {
91 padding-left: 1.5em;
93 .time {
94 margin: -1em 0 0;
95 font-weight: bold;
96 font-size: 0.75em;
97 color: #586e75;
99 .logo, svg {
100 width: auto;
101 height: auto;
102 max-width: 8em; max-width: min(20vw, 8em);
103 max-height: 3em; max-height: min(54vw, 3em);
104 float: right;
105 margin: 0 0 0.5em 1em;
107 @media (max-width: 20em) {
108 .logo, svg { display: none }
110 .tech {
111 color: #586e75;
115 a, a:link, a:visited, a:hover, a:focus, a:active {
116 color: inherit;
117 background: transparent;
118 text-decoration: none;
121 @media screen {
122 body { background: #93a1a1; }
123 @media (prefers-color-scheme: dark) {
124 body { background: #073642; }
126 main {
127 background: #fdf6e3;
128 color: #073642;
129 max-width: 44em;
130 margin: 0 auto;
131 padding: 1em;
132 padding: 1em clamp(1em, calc(25vw - 11em), 5em);
133 box-shadow: 0 0 1em #000;
136 h1, h2 {
137 color: #0fa74a;
139 h1 {
140 margin: 0;
141 page-break-before: avoid;
143 h2 {
144 border-bottom: 1px dashed #0fa74a;
147 a, a:link, a:visited {
148 color: #268bd2;
150 a:hover, a:active, a:focus {
151 text-decoration: underline;
155 @media print {
156 body {
157 line-height: 1.25;
160 </style>
161 <main>
162 <h1>Michał Nazarewicz</h1>
163 <xsl:apply-templates />
164 </main>
165 </xsl:template>
167 <xsl:template match="/cv/contact">
168 <section class="contact">
169 <ul>
170 <xsl:apply-templates select="li" />
171 </ul>
172 </section>
173 </xsl:template>
175 <xsl:template match="/cv/group">
176 <section>
177 <xsl:apply-templates select="head" />
178 <xsl:apply-templates select="entry" />
179 </section>
180 </xsl:template>
182 <xsl:template match="group/head">
183 <h2><xsl:apply-templates select="node()" /></h2>
184 </xsl:template>
186 <xsl:template match="group/entry/head">
187 <h3><xsl:apply-templates select="node()" /></h3>
188 </xsl:template>
190 <xsl:template match="entry">
191 <section class="entry">
192 <xsl:choose>
193 <xsl:when test="contains(@logo, '.svg')">
194 <xsl:copy-of select="document(@logo)" />
195 </xsl:when>
196 <xsl:when test="@logo">
197 <img alt="" class="logo">
198 <xsl:attribute name="src">
199 <xsl:value-of select="@logo" />
200 </xsl:attribute>
201 </img>
202 </xsl:when>
203 </xsl:choose>
205 <xsl:apply-templates select="head" />
206 <xsl:if test="position | company">
207 <h3>
208 <xsl:if test="position">
209 <xsl:apply-templates select="position" /> at
210 </xsl:if>
211 <xsl:apply-templates select="company" />
212 </h3>
213 </xsl:if>
214 <xsl:apply-templates select="time" />
215 <xsl:apply-templates select="p | ul" />
216 <xsl:apply-templates select="tech" />
217 </section>
218 </xsl:template>
220 <xsl:template match="position | company">
221 <b><xsl:apply-templates select="node()" /></b>
222 </xsl:template>
224 <xsl:template match="time">
225 <div class="time">
226 <xsl:apply-templates select="node()" />
227 </div>
228 </xsl:template>
230 <xsl:template match="cv/group/entry/tech">
231 <p class="tech">Technologies: <strong><xsl:apply-templates select="node()" /></strong></p>
232 </xsl:template>
234 <xsl:template match="li">
235 <li>
236 <xsl:if test="@icon">
237 <span class="icon"><xsl:value-of select="@icon" /></span>
238 </xsl:if>
239 <xsl:apply-templates select="node()" />
240 </li>
241 </xsl:template>
242 </xsl:stylesheet>