UPDATE project structure
64
index.html
Normal file → Executable file
@ -13,35 +13,49 @@
|
||||
<div id="forkme">View on Github <img src="public/github.png" /></div>
|
||||
</a>
|
||||
<div id="readme">
|
||||
<h1 id="bestresumeever">best-resume-ever</h1>
|
||||
<p>Build your best resume ever!</p>
|
||||
<p>A collection of beautiful resumes build with LESS and Mustache Templates. Choose your favorite Curriculum Vitae and easily export it as pdf.</p>
|
||||
<h2 id="resumes">Resumes</h2>
|
||||
<p><a href="resumes/resume-1/resume-1.png"><img src="resumes/resume-1/resume-1.png" width="150"/></a>
|
||||
# best-resume-ever
|
||||
|
||||
Build your best resume ever!
|
||||
|
||||
A collection of beautiful resumes build with LESS and Mustache Templates. Choose your favorite Curriculum Vitae and easily export it as pdf.
|
||||
|
||||
## Resumes
|
||||
|
||||
<a href="resumes/resume-1/resume-1.png"><img src="resumes/resume-1/resume-1.png" width="150"/></a>
|
||||
<a href="resumes/resume-2/resume-2.png"><img src="resumes/resume-2/resume-2.png" width="150"/></a>
|
||||
<a href="resumes/resume-3/resume-3.png"><img src="resumes/resume-3/resume-3.png" width="150"/></a>
|
||||
<a href="resumes/resume-4/resume-4.png"><img src="resumes/resume-4/resume-4.png" width="150"/></a>
|
||||
<a href="resumes/resume-5/resume-5.png"><img src="resumes/resume-5/resume-5.png" width="150"/></a>
|
||||
<a href="resumes/resume-6/resume-6.png"><img src="resumes/resume-6/resume-6.png" width="150"/></a></p>
|
||||
<h2 id="install">Install</h2>
|
||||
<p>Follow these instructions to create your own CV:</p>
|
||||
<ul>
|
||||
<li>Clone this repository.</li>
|
||||
<li>Switch to project directory and run <code>npm install</code>.</li>
|
||||
<li>Adjust your personal information in <code>person.js</code>.</li>
|
||||
<li>Replace placeholder image <code>/public/person.jpg</code> with your portrait.</li>
|
||||
<li>To preview your CV run <code>npm start</code>. Check out <a href="http://localhost:3000">http://localhost:3000</a>.</li>
|
||||
<li>Feel free to adjust styles in <code>/less</code> according to your needs.</li>
|
||||
<li>When finished, run <code>npm run pdf</code> to generate all CVs as pdf. You will find the generated pdfs in <code>/pdf</code>.</li>
|
||||
</ul>
|
||||
<h2 id="addingatemplate">Adding a template</h2>
|
||||
<p>TODO</p>
|
||||
<h2 id="howtoaddafont">How to add a font</h2>
|
||||
<p>TODO</p>
|
||||
<h2 id="contribute">Contribute</h2>
|
||||
<p>Feel free to create your own templates!</p>
|
||||
<hr />
|
||||
<p>Icons made by <a href="http://www.flaticon.com/authors/vectors-market" title="Vectors Market">Vectors Market</a> from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC 3.0 BY</a></p>
|
||||
<a href="resumes/resume-6/resume-6.png"><img src="resumes/resume-6/resume-6.png" width="150"/></a>
|
||||
|
||||
## Install
|
||||
|
||||
Follow these instructions to create your own CV:
|
||||
|
||||
- Clone this repository.
|
||||
- Switch to project directory and run `npm install`.
|
||||
- Adjust your personal information in `person.js`.
|
||||
- Replace placeholder image `/public/person.jpg` with your portrait.
|
||||
- To preview your CV run `npm start`. Check out <http://localhost:3000>.
|
||||
- Feel free to adjust styles in `/less` according to your needs.
|
||||
- When finished, run `npm run pdf` to generate all CVs as pdf. You will find the generated pdfs in `/pdf`.
|
||||
|
||||
## Adding a template
|
||||
|
||||
TODO
|
||||
|
||||
## How to add a font
|
||||
|
||||
TODO
|
||||
|
||||
## Contribute
|
||||
|
||||
Feel free to create your own templates!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Icons made by [Vectors Market](http://www.flaticon.com/authors/vectors-market "Vectors Market") from [www.flaticon.com](http://www.flaticon.com "Flaticon") is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/ "Creative Commons BY 3.0")
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var headline = document.getElementsByTagName('h1')[0];
|
||||
|
||||
17
less/fonts.less
Normal file → Executable file
@ -1,8 +1,11 @@
|
||||
@import "../node_modules/open-sans-fontface/open-sans.less";
|
||||
@import (less) "../node_modules/raleway-webfont/raleway.min.css";
|
||||
@import (less) "../node_modules/npm-font-open-sans-condensed/open-sans-condensed.css";
|
||||
@import (less) "../node_modules/material-design-icons/iconfont/material-icons.css";
|
||||
@import (less) "../node_modules/roboto-fontface/css/roboto/roboto-fontface.css";
|
||||
@import (less) "../node_modules/roboto-fontface/css/roboto-condensed/roboto-condensed-fontface.css";
|
||||
@import (less) "../node_modules/roboto-fontface/css/roboto-slab/roboto-slab-fontface.css";
|
||||
@import "fonts/opensans.less";
|
||||
@import "fonts/montserrat.less";
|
||||
@import "fonts/raleway.less";
|
||||
@import "fonts/opensans-condensed.less";
|
||||
@import "fonts/material-design-icons.less";
|
||||
@import "fonts/roboto.less";
|
||||
@import "fonts/roboto-condensed.less";
|
||||
@import "fonts/roboto-slab.less";
|
||||
/*
|
||||
@import (less) "../node_modules/@typopro/web-montserrat/TypoPRO-Montserrat.css";
|
||||
*/
|
||||
|
||||
31
less/fonts/material-design-icons.less
Normal file
@ -0,0 +1,31 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("/material-design-icons/iconfont/MaterialIcons-Regular.eot");
|
||||
/* For IE6-8 */
|
||||
src: local('Material Icons'), local('MaterialIcons-Regular'), url("/material-design-icons/iconfont/MaterialIcons-Regular.woff2") format('woff2'), url("/material-design-icons/iconfont/MaterialIcons-Regular.woff") format('woff'), url("/material-design-icons/iconfont/MaterialIcons-Regular.ttf") format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
/* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
70
less/fonts/montserrat.less
Normal file
@ -0,0 +1,70 @@
|
||||
/* TypoPRO Montserrat Black */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-Montserrat-Black.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Black.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Black.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Black.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
/* TypoPRO Montserrat Bold */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-Montserrat-Bold.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Bold.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Bold.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Bold.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
/* TypoPRO Montserrat Light */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-Montserrat-Light.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Light.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Light.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Light.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
/* TypoPRO Montserrat */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-Montserrat-Regular.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Regular.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Regular.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Regular.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
/* TypoPRO Montserrat Hairline */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-Montserrat-Thin.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Thin.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Thin.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-Montserrat-Thin.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 200;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
/* TypoPRO Montserrat Alternates */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat Alternates';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Bold.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Bold.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Bold.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Bold.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
/* TypoPRO Montserrat Alternates */
|
||||
@font-face {
|
||||
font-family: 'TypoPRO Montserrat Alternates';
|
||||
src: url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Regular.eot');
|
||||
src: local('*'), url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Regular.eot?#iefix') format('embedded-opentype'), url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Regular.woff') format('woff'), url('/@typopro/web-montserrat/TypoPRO-MontserratAlternates-Regular.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
font-variant: normal;
|
||||
}
|
||||
22
less/fonts/opensans-condensed.less
Normal file
@ -0,0 +1,22 @@
|
||||
@FontPathOpenSansCondensed: "/npm-font-open-sans-condensed/fonts";
|
||||
@font-face {
|
||||
font-family: 'Open Sans Condensed';
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
src: url('@{FontPathOpenSansCondensed}/opensans-condlight.eot');
|
||||
src: url('@{FontPathOpenSansCondensed}/opensans-condlight.eot?#iefix') format('embedded-opentype'), url('@{FontPathOpenSansCondensed}/opensans-condlight.woff') format('woff'), url('@{FontPathOpenSansCondensed}/opensans-condlight.ttf') format('truetype'), url('@{FontPathOpenSansCondensed}/opensans-condlight.svg#OpenSansCondensedLight') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans Condensed';
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
src: url('@{FontPathOpenSansCondensed}/opensans-condlightitalic.eot');
|
||||
src: url('@{FontPathOpenSansCondensed}/opensans-condlightitalic.eot?#iefix') format('embedded-opentype'), url('@{FontPathOpenSansCondensed}/opensans-condlightitalic.woff') format('woff'), url('@{FontPathOpenSansCondensed}/opensans-condlightitalic.ttf') format('truetype'), url('@{FontPathOpenSansCondensed}/opensans-condlightitalic.svg#OpenSansCondensedLightItalic') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Open Sans Condensed';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
src: url('@{FontPathOpenSansCondensed}/opensans-condbold.eot');
|
||||
src: url('@{FontPathOpenSansCondensed}/opensans-condbold.eot?#iefix') format('embedded-opentype'), url('@{FontPathOpenSansCondensed}/opensans-condbold.woff') format('woff'), url('@{FontPathOpenSansCondensed}/opensans-condbold.ttf') format('truetype'), url('@{FontPathOpenSansCondensed}/opensans-condbold.svg#OpenSansCondensedBold') format('svg');
|
||||
}
|
||||
92
less/fonts/opensans.less
Normal file
@ -0,0 +1,92 @@
|
||||
/* Open Sans @font-face kit */
|
||||
@OpenSansPath: "/open-sans-fontface/fonts";
|
||||
/* BEGIN Light */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Light/OpenSans-Light.eot');
|
||||
src: url('@{OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/Light/OpenSans-Light.woff') format('woff'), url('@{OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'), url('@{OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Light */
|
||||
/* BEGIN Light Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot');
|
||||
src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'), url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'), url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Light Italic */
|
||||
/* BEGIN Regular */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot');
|
||||
src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'), url('@{OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'), url('@{OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Regular */
|
||||
/* BEGIN Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot');
|
||||
src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'), url('@{OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'), url('@{OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Italic */
|
||||
/* BEGIN Semibold */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot');
|
||||
src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'), url('@{OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'), url('@{OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg');
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Semibold */
|
||||
/* BEGIN Semibold Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot');
|
||||
src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'), url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'), url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg');
|
||||
font-weight: 600;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Semibold Italic */
|
||||
/* BEGIN Bold */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot');
|
||||
src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'), url('@{OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'), url('@{OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Bold */
|
||||
/* BEGIN Bold Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot');
|
||||
src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'), url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'), url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Bold Italic */
|
||||
/* BEGIN Extrabold */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot');
|
||||
src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'), url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'), url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg');
|
||||
font-weight: 800;
|
||||
font-style: normal;
|
||||
}
|
||||
/* END Extrabold */
|
||||
/* BEGIN Extrabold Italic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot');
|
||||
src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'), url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'), url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'), url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg');
|
||||
font-weight: 800;
|
||||
font-style: italic;
|
||||
}
|
||||
/* END Extrabold Italic */
|
||||
127
less/fonts/raleway.less
Normal file
@ -0,0 +1,127 @@
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Thin.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Thin-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 100;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-ExtraLight.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 200;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-ExtraLight-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 200;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Light.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Light-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Regular.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Regular-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Medium.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Medium-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-SemiBold.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-SemiBold-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Bold.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Bold-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-ExtraBold.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-ExtraBold-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 800;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Black.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
@font-face {
|
||||
font-family: Raleway;
|
||||
src: url("/raleway-webfont/fonts/Raleway-Black-Italic.ttf") format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: 900;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
/*# sourceMappingURL=raleway.min.css.map */
|
||||
72
less/fonts/roboto-condensed.less
Normal file
@ -0,0 +1,72 @@
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.eot");
|
||||
src: local("Roboto-Condensed Regular"), local("Roboto-Condensed-Regular"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.svg#Roboto-Condensed") format("svg");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed-Regular";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed/Roboto-Condensed-Regular.eot");
|
||||
src: local("Roboto-Condensed Regular"), local("Roboto-Condensed-Regular"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Regular.svg#Roboto-Condensed") format("svg");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.eot");
|
||||
src: local("Roboto-Condensed RegularItalic"), local("Roboto-Condensed-RegularItalic"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.svg#Roboto-Condensed") format("svg");
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed-RegularItalic";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed/Roboto-Condensed-RegularItalic.eot");
|
||||
src: local("Roboto-Condensed RegularItalic"), local("Roboto-Condensed-RegularItalic"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-RegularItalic.svg#Roboto-Condensed") format("svg");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.eot");
|
||||
src: local("Roboto-Condensed Light"), local("Roboto-Condensed-Light"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.svg#Roboto-Condensed") format("svg");
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed-Light";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed/Roboto-Condensed-Light.eot");
|
||||
src: local("Roboto-Condensed Light"), local("Roboto-Condensed-Light"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Light.svg#Roboto-Condensed") format("svg");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.eot");
|
||||
src: local("Roboto-Condensed LightItalic"), local("Roboto-Condensed-LightItalic"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.svg#Roboto-Condensed") format("svg");
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed-LightItalic";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed/Roboto-Condensed-LightItalic.eot");
|
||||
src: local("Roboto-Condensed LightItalic"), local("Roboto-Condensed-LightItalic"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-LightItalic.svg#Roboto-Condensed") format("svg");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.eot");
|
||||
src: local("Roboto-Condensed Bold"), local("Roboto-Condensed-Bold"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.svg#Roboto-Condensed") format("svg");
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed-Bold";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed/Roboto-Condensed-Bold.eot");
|
||||
src: local("Roboto-Condensed Bold"), local("Roboto-Condensed-Bold"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-Bold.svg#Roboto-Condensed") format("svg");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.eot");
|
||||
src: local("Roboto-Condensed BoldItalic"), local("Roboto-Condensed-BoldItalic"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.svg#Roboto-Condensed") format("svg");
|
||||
font-weight: 700;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto-Condensed-BoldItalic";
|
||||
src: url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed/Roboto-Condensed-BoldItalic.eot");
|
||||
src: local("Roboto-Condensed BoldItalic"), local("Roboto-Condensed-BoldItalic"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.eot?#iefix") format("embedded-opentype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.woff2") format("woff2"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.woff") format("woff"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.ttf") format("truetype"), url("/roboto-fontface/fonts/Roboto-Condensed/Roboto-Condensed-BoldItalic.svg#Roboto-Condensed") format("svg");
|
||||
}
|
||||
48
less/fonts/roboto-slab.less
Normal file
@ -0,0 +1,48 @@
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.eot');
|
||||
src: local('Roboto-Slab Thin'), local('Roboto-Slab-Thin'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.svg#Roboto-Slab') format('svg');
|
||||
font-weight: 100;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab-Thin';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.eot');
|
||||
src: local('Roboto-Slab Thin'), local('Roboto-Slab-Thin'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Thin.svg#Roboto-Slab') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.eot');
|
||||
src: local('Roboto-Slab Light'), local('Roboto-Slab-Light'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.svg#Roboto-Slab') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab-Light';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.eot');
|
||||
src: local('Roboto-Slab Light'), local('Roboto-Slab-Light'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Light.svg#Roboto-Slab') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.eot');
|
||||
src: local('Roboto-Slab Regular'), local('Roboto-Slab-Regular'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.svg#Roboto-Slab') format('svg');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab-Regular';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.eot');
|
||||
src: local('Roboto-Slab Regular'), local('Roboto-Slab-Regular'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Regular.svg#Roboto-Slab') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.eot');
|
||||
src: local('Roboto-Slab Bold'), local('Roboto-Slab-Bold'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.svg#Roboto-Slab') format('svg');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Slab-Bold';
|
||||
src: url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.eot');
|
||||
src: local('Roboto-Slab Bold'), local('Roboto-Slab-Bold'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.woff') format('woff'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto-Slab/Roboto-Slab-Bold.svg#Roboto-Slab') format('svg');
|
||||
}
|
||||
144
less/fonts/roboto.less
Normal file
@ -0,0 +1,144 @@
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Thin.eot');
|
||||
src: local('Roboto Thin'), local('Roboto-Thin'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.svg#Roboto') format('svg');
|
||||
font-weight: 100;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Thin';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Thin.eot');
|
||||
src: local('Roboto Thin'), local('Roboto-Thin'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Thin.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.eot');
|
||||
src: local('Roboto ThinItalic'), local('Roboto-ThinItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.svg#Roboto') format('svg');
|
||||
font-weight: 100;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-ThinItalic';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.eot');
|
||||
src: local('Roboto ThinItalic'), local('Roboto-ThinItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-ThinItalic.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Light.eot');
|
||||
src: local('Roboto Light'), local('Roboto-Light'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.svg#Roboto') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Light';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Light.eot');
|
||||
src: local('Roboto Light'), local('Roboto-Light'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Light.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.eot');
|
||||
src: local('Roboto LightItalic'), local('Roboto-LightItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.svg#Roboto') format('svg');
|
||||
font-weight: 300;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-LightItalic';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.eot');
|
||||
src: local('Roboto LightItalic'), local('Roboto-LightItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-LightItalic.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Regular.eot');
|
||||
src: local('Roboto Regular'), local('Roboto-Regular'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.svg#Roboto') format('svg');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Regular';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Regular.eot');
|
||||
src: local('Roboto Regular'), local('Roboto-Regular'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Regular.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.eot');
|
||||
src: local('Roboto RegularItalic'), local('Roboto-RegularItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.svg#Roboto') format('svg');
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-RegularItalic';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.eot');
|
||||
src: local('Roboto RegularItalic'), local('Roboto-RegularItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-RegularItalic.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Medium.eot');
|
||||
src: local('Roboto Medium'), local('Roboto-Medium'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.svg#Roboto') format('svg');
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Medium';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Medium.eot');
|
||||
src: local('Roboto Medium'), local('Roboto-Medium'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Medium.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.eot');
|
||||
src: local('Roboto MediumItalic'), local('Roboto-MediumItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.svg#Roboto') format('svg');
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-MediumItalic';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.eot');
|
||||
src: local('Roboto MediumItalic'), local('Roboto-MediumItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-MediumItalic.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Bold.eot');
|
||||
src: local('Roboto Bold'), local('Roboto-Bold'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.svg#Roboto') format('svg');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Bold';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Bold.eot');
|
||||
src: local('Roboto Bold'), local('Roboto-Bold'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Bold.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.eot');
|
||||
src: local('Roboto BoldItalic'), local('Roboto-BoldItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.svg#Roboto') format('svg');
|
||||
font-weight: 700;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-BoldItalic';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.eot');
|
||||
src: local('Roboto BoldItalic'), local('Roboto-BoldItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-BoldItalic.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Black.eot');
|
||||
src: local('Roboto Black'), local('Roboto-Black'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.svg#Roboto') format('svg');
|
||||
font-weight: 900;
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-Black';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-Black.eot');
|
||||
src: local('Roboto Black'), local('Roboto-Black'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-Black.svg#Roboto') format('svg');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.eot');
|
||||
src: local('Roboto BlackItalic'), local('Roboto-BlackItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.svg#Roboto') format('svg');
|
||||
font-weight: 900;
|
||||
font-style: italic;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Roboto-BlackItalic';
|
||||
src: url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.eot');
|
||||
src: local('Roboto BlackItalic'), local('Roboto-BlackItalic'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.eot?#iefix') format('embedded-opentype'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.woff2') format('woff2'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.woff') format('woff'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.ttf') format('truetype'), url('/roboto-fontface/fonts/Roboto/Roboto-BlackItalic.svg#Roboto') format('svg');
|
||||
}
|
||||
2
less/githubPages.less
Normal file → Executable file
@ -1,3 +1,5 @@
|
||||
@main: #E77171;
|
||||
|
||||
#forkme {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
@import "fonts.less";
|
||||
@import "githubPages.less";
|
||||
@import "../resumes/resumes.less";
|
||||
@header: #4B5B6E;
|
||||
@background: #CCCCCC;
|
||||
@darkgrey: #343444;
|
||||
@ -17,8 +16,8 @@ body {
|
||||
page {
|
||||
background: white;
|
||||
position: relative;
|
||||
width: 21cm;
|
||||
height: 297mm;
|
||||
width: 15.8cm;
|
||||
height: 22.25cm;
|
||||
display: block;
|
||||
page-break-after: auto;
|
||||
overflow: hidden;
|
||||
|
||||
58
lib/htmlToPdf.js
Executable file
@ -0,0 +1,58 @@
|
||||
let convertToPdf = (() => {
|
||||
var _ref = _asyncToGenerator(function* () {
|
||||
const layoutTemplate = yield readFileContent('views/layout.mustache');
|
||||
for (let resume of directories) {
|
||||
const resumeTemplate = yield readFileContent(resume + '/' + resume + '.mustache');
|
||||
const html = Mustache.render(layoutTemplate, {
|
||||
person: person
|
||||
}, {
|
||||
content: resumeTemplate
|
||||
});
|
||||
yield generatePdf(html, resume + '.pdf');
|
||||
}
|
||||
console.log('Generated resumes into /pdf.');
|
||||
});
|
||||
|
||||
return function convertToPdf() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
||||
|
||||
const person = require('./person.js');
|
||||
const Mustache = require('mustache');
|
||||
const pdf = require('html-pdf');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const dir = __dirname.replace('lib', '');
|
||||
const directories = getDirectories(dir + '/resumes');
|
||||
|
||||
function getDirectories(srcpath) {
|
||||
return fs.readdirSync(srcpath).filter(file => file.includes('resume-'));
|
||||
}
|
||||
|
||||
function readFileContent(fileName) {
|
||||
const dir = path.join(__dirname, '../resumes/' + fileName);
|
||||
return new Promise((res, rej) => {
|
||||
fs.readFile(dir, 'utf8', (err, template) => {
|
||||
if (err) rej(err);else res(template);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function generatePdf(html, fileName) {
|
||||
const dir = path.join(__dirname, '../pdf/' + fileName);
|
||||
return new Promise((resolve, rej) => {
|
||||
pdf.create(html, {
|
||||
'type': 'pdf',
|
||||
'format': 'A4',
|
||||
'base': 'http://localhost:3000'
|
||||
}).toFile(dir, function (err, res) {
|
||||
if (err) rej(err);else resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
convertToPdf();
|
||||
62
lib/person.js
Executable file
@ -0,0 +1,62 @@
|
||||
module.exports = {
|
||||
name: 'John Doe',
|
||||
position: 'Software Developer',
|
||||
experience: [{
|
||||
company: 'Company A',
|
||||
position: 'Developer',
|
||||
timeperiod: 'since January 2016',
|
||||
description: 'Programming and watching cute cat videos.'
|
||||
}, {
|
||||
company: 'Company B',
|
||||
position: 'Frontend Developer',
|
||||
timeperiod: 'January 2015 - December 2015',
|
||||
description: 'Fulfillment of extremly important tasks.'
|
||||
}, {
|
||||
company: 'Company C',
|
||||
position: 'Trainee',
|
||||
timeperiod: 'March 2014 - December 2014',
|
||||
description: 'Making coffee and baking cookies.'
|
||||
}],
|
||||
education: [{
|
||||
degree: 'Master of Arts',
|
||||
description: 'Major in Hacking and Computer Penetration, University A, New York, USA.'
|
||||
}, {
|
||||
degree: 'Bachelor of Science',
|
||||
description: 'Major in Engineering, University B, Los Angeles, USA.'
|
||||
}],
|
||||
// skill level goes 0 to 100
|
||||
skills: [{
|
||||
name: 'HTML5',
|
||||
level: '99'
|
||||
}, {
|
||||
name: 'CSS3',
|
||||
level: '95'
|
||||
}, {
|
||||
name: 'JavaScript',
|
||||
level: '97'
|
||||
}, {
|
||||
name: 'Node.js',
|
||||
level: '93'
|
||||
}, {
|
||||
name: 'Angular 2',
|
||||
level: '60'
|
||||
}, {
|
||||
name: 'TypeScript',
|
||||
level: '80'
|
||||
}, {
|
||||
name: 'ES.Next',
|
||||
level: '70'
|
||||
}, {
|
||||
name: 'Docker',
|
||||
level: '99'
|
||||
}],
|
||||
skillDescription: 'Also proficient in Adobe Photoshop and Illustrator, grew up bilingual (English and Klingon).',
|
||||
contact: {
|
||||
email: 'john.doe@email.com',
|
||||
phone: '0123 456789',
|
||||
street: '1234 Broadway',
|
||||
city: 'New York',
|
||||
website: 'johndoe.com',
|
||||
github: 'github.com/JohnDoe'
|
||||
}
|
||||
};
|
||||
36
lib/renderReadMe.js
Executable file
@ -0,0 +1,36 @@
|
||||
let renderReadMe = (() => {
|
||||
var _ref = _asyncToGenerator(function* () {
|
||||
const readme = yield readFileContent('README.md');
|
||||
const githubPagesTemplate = yield readFileContent('resumes/views/githubPages.mustache');
|
||||
var html = Mustache.render(githubPagesTemplate, {
|
||||
content: readme
|
||||
});
|
||||
writeFile('index.html', html, function (err) {
|
||||
if (err) console.log(err);else console.log('Github pages index.html was successfully generated from README.');
|
||||
});
|
||||
});
|
||||
|
||||
return function renderReadMe() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
})();
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
||||
|
||||
const showdown = require('showdown');
|
||||
const converter = new showdown.Converter();
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const Mustache = require('mustache');
|
||||
const writeFile = require('write');
|
||||
|
||||
function readFileContent(fileName) {
|
||||
const dir = path.join(__dirname, '../' + fileName);
|
||||
return new Promise((res, rej) => {
|
||||
fs.readFile(dir, 'utf8', (err, template) => {
|
||||
if (err) rej(err);else res(template);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
renderReadMe();
|
||||
40
lib/server.js
Executable file
@ -0,0 +1,40 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const person = require('./person.js');
|
||||
const express = require('express');
|
||||
const mustacheExpress = require('mustache-express');
|
||||
|
||||
let app = express();
|
||||
app.set('views', path.join(__dirname, '../resumes'));
|
||||
app.engine('mustache', require('hogan-express'));
|
||||
app.set('view engine', 'mustache');
|
||||
app.use(express.static(path.join(__dirname, '../public')));
|
||||
app.use(express.static(path.join(__dirname, '../node_modules')));
|
||||
|
||||
const dir = __dirname.replace('lib', '');
|
||||
const directories = getDirectories(dir + '/resumes');
|
||||
|
||||
function getDirectories(srcpath) {
|
||||
return fs.readdirSync(srcpath).filter(file => file.includes('resume-'));
|
||||
}
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.render('views/layout', {
|
||||
partials: {
|
||||
content: 'views/index'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
for (let resume of directories) {
|
||||
app.get('/' + resume, (req, res) => {
|
||||
res.render('views/layout', {
|
||||
partials: {
|
||||
content: resume + '/' + resume
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
app.listen(3000, '0.0.0.0', () => console.log('Listening on localhost:3000!'));
|
||||
0
lib/util.js
Normal file
103
package.json
@ -1,53 +1,54 @@
|
||||
{
|
||||
"name": "best-resume-ever",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"server": "node server.js",
|
||||
"start": "npm run less && npm run server",
|
||||
"pdf": "bash scripts/createPDF.bash",
|
||||
"pdf:win": "sh scripts/createPDF.sh",
|
||||
"png": "npm run pdf && bash scripts/createPNG.bash",
|
||||
"png:win": "npm run pdf:win && sh scripts/createPNG.sh",
|
||||
"readme": "node renderReadMe.js",
|
||||
"less": "lessc --clean-css less/style.less public/style.min.css"
|
||||
},
|
||||
"pre-commit": [
|
||||
"less",
|
||||
"readme"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/SalamiMitPizza/beautifulCV.git"
|
||||
},
|
||||
"author": "salamimipizza",
|
||||
"homepage": "https://salamimitpizza.github.io/beautifulCV/",
|
||||
"dependencies": {
|
||||
"@typopro/web-montserrat": "^3.4.9",
|
||||
"buffer-to-string": "^0.1.0",
|
||||
"electron": "^1.4.15",
|
||||
"electroshot": "^1.2.0",
|
||||
"express": "^4.14.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"hogan-express": "^0.5.2",
|
||||
"html-pdf": "2.1.0",
|
||||
"jquery": "^3.1.1",
|
||||
"less": "^2.7.2",
|
||||
"less-plugin-clean-css": "^1.5.1",
|
||||
"local-web-server": "1.2.6",
|
||||
"markdown-to-html": "0.0.13",
|
||||
"material-design-icons": "^3.0.1",
|
||||
"mustache": "^2.3.0",
|
||||
"mustache-express": "^1.2.4",
|
||||
"npm-font-open-sans-condensed": "^1.0.3",
|
||||
"open-sans-fontface": "^1.4.0",
|
||||
"path": "^0.12.7",
|
||||
"pdf-to-png": "^1.0.3",
|
||||
"pre-commit": "^1.2.2",
|
||||
"raleway-webfont": "^3.0.1",
|
||||
"roboto-fontface": "^0.7.0",
|
||||
"showdown": "^1.6.3",
|
||||
"write": "^0.3.2"
|
||||
}
|
||||
"name": "best-resume-ever",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"server": "node --harmony-async-await src/server.js",
|
||||
"less": "node --harmony-async-await src/compileLess.js",
|
||||
"readme": "node --harmony-async-await src/renderReadMe.js",
|
||||
"start": "npm run less && npm run server",
|
||||
"less:dev": "onchange 'resumes/**/*.less' 'less/**/*.less' -- npm run less"
|
||||
},
|
||||
"pre-commit": [
|
||||
"less",
|
||||
"readme"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/SalamiMitPizza/beautifulCV.git"
|
||||
},
|
||||
"author": "salamimipizza",
|
||||
"homepage": "https://salamimitpizza.github.io/beautifulCV/",
|
||||
"dependencies": {
|
||||
"@typopro/web-montserrat": "^3.4.9",
|
||||
"buffer-to-string": "^0.1.0",
|
||||
"clean-css": "^4.0.4",
|
||||
"electron": "^1.4.15",
|
||||
"electroshot": "^1.2.0",
|
||||
"express": "^4.14.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"fs": "0.0.1-security",
|
||||
"hogan-express": "^0.5.2",
|
||||
"html-pdf": "2.1.0",
|
||||
"html-to-pdf": "^0.1.11",
|
||||
"jquery": "^3.1.1",
|
||||
"less": "^2.7.2",
|
||||
"less-plugin-clean-css": "^1.5.1",
|
||||
"local-web-server": "1.2.6",
|
||||
"markdown-to-html": "0.0.13",
|
||||
"material-design-icons": "^3.0.1",
|
||||
"mustache": "^2.3.0",
|
||||
"mustache-express": "^1.2.4",
|
||||
"npm-font-open-sans-condensed": "^1.0.3",
|
||||
"onchange": "^3.2.1",
|
||||
"open-sans-fontface": "^1.4.0",
|
||||
"path": "^0.12.7",
|
||||
"pdf-to-png": "^1.0.3",
|
||||
"pre-commit": "^1.2.2",
|
||||
"raleway-webfont": "^3.0.1",
|
||||
"roboto-fontface": "^0.7.0",
|
||||
"showdown": "^1.6.3",
|
||||
"write": "^0.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
BIN
pdf/resume-1.pdf
Normal file
BIN
pdf/resume-2.pdf
Normal file
BIN
pdf/resume-3.pdf
Normal file
BIN
pdf/resume-4.pdf
Normal file
BIN
pdf/resume-5.pdf
Normal file
BIN
pdf/resume-6.pdf
Normal file
0
public/github.png
Normal file → Executable file
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
0
resumes/resume-1/resume-1.png → public/preview/resume-1.png
Normal file → Executable file
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
0
resumes/resume-2/resume-2.png → public/preview/resume-2.png
Normal file → Executable file
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
2
public/style.min.css
vendored
0
public/suitcase.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -1,18 +0,0 @@
|
||||
var showdown = require('showdown'),
|
||||
converter = new showdown.Converter();
|
||||
var fs = require('fs');
|
||||
var Mustache = require('mustache');
|
||||
var writeFile = require('write');
|
||||
|
||||
fs.readFile('README.md', 'utf-8', function(err, data) {
|
||||
if (err) console.log(err);
|
||||
var readme = converter.makeHtml(data);
|
||||
fs.readFile('resumes/githubPages.mustache', 'utf-8', function(err, template) {
|
||||
var html = Mustache.render(template, {
|
||||
content: readme
|
||||
});
|
||||
writeFile('index.html', html, function(err) {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -4,7 +4,6 @@
|
||||
}
|
||||
|
||||
h3 {
|
||||
padding-top: 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@ -54,8 +53,8 @@
|
||||
border: 1px solid black;
|
||||
text-transform: uppercase;
|
||||
padding: 10px 20px;
|
||||
margin-top: 80px;
|
||||
margin-bottom: 5px;
|
||||
margin-top: 70px;
|
||||
margin-bottom: 0;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
@ -73,14 +72,14 @@
|
||||
.image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-top: 50px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.contact,
|
||||
@ -91,14 +90,14 @@
|
||||
|
||||
.experience-block span {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.education-block span.degree,
|
||||
.experience-block span.company {
|
||||
font-weight: bold;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 20px;
|
||||
color: #424242;
|
||||
&.company,
|
||||
&.degree {
|
||||
font-weight: bold;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 20px;
|
||||
color: #424242;
|
||||
}
|
||||
}
|
||||
|
||||
.education-block span.degree-description,
|
||||
|
||||
0
resumes/resume-2/resume-2.less
Normal file → Executable file
0
resumes/resume-2/resume-2.mustache
Normal file → Executable file
0
resumes/resume-3/resume-3.less
Normal file → Executable file
0
resumes/resume-3/resume-3.mustache
Normal file → Executable file
|
Before Width: | Height: | Size: 92 KiB |
0
resumes/resume-4/resume-4.less
Normal file → Executable file
0
resumes/resume-4/resume-4.mustache
Normal file → Executable file
|
Before Width: | Height: | Size: 110 KiB |
0
resumes/resume-5/resume-5.less
Normal file → Executable file
0
resumes/resume-5/resume-5.mustache
Normal file → Executable file
|
Before Width: | Height: | Size: 103 KiB |
0
resumes/resume-6/resume-6.less
Normal file → Executable file
0
resumes/resume-6/resume-6.mustache
Normal file → Executable file
|
Before Width: | Height: | Size: 166 KiB |
@ -1,6 +0,0 @@
|
||||
@import "resume-1/resume-1.less";
|
||||
@import "resume-2/resume-2.less";
|
||||
@import "resume-3/resume-3.less";
|
||||
@import "resume-4/resume-4.less";
|
||||
@import "resume-5/resume-5.less";
|
||||
@import "resume-6/resume-6.less";
|
||||
0
resumes/githubPages.mustache → resumes/views/githubPages.mustache
Normal file → Executable file
@ -1,6 +0,0 @@
|
||||
electroshot localhost:3000/resume-1 2481x3508 --pdf-margin none --format pdf --out resumes/resume-1 --filename "resume-1.pdf"
|
||||
electroshot localhost:3000/resume-2 2481x3508 --pdf-margin none --format pdf --out resumes/resume-2 --filename "resume-2.pdf"
|
||||
electroshot localhost:3000/resume-3 2481x3508 --pdf-margin none --format pdf --out resumes/resume-3 --filename "resume-3.pdf"
|
||||
electroshot localhost:3000/resume-4 2481x3508 --pdf-margin none --format pdf --out resumes/resume-4 --filename "resume-4.pdf"
|
||||
electroshot localhost:3000/resume-5 2481x3508 --pdf-margin none --format pdf --out resumes/resume-5 --filename "resume-5.pdf"
|
||||
electroshot localhost:3000/resume-6 2481x3508 --pdf-margin none --format pdf --out resumes/resume-6 --filename "resume-6.pdf"
|
||||
@ -1,2 +0,0 @@
|
||||
electroshot localhost:3000/resume-1 2481x3508 --format pdf --out pdf
|
||||
electroshot localhost:3000/resume-2 2481x3508 --format pdf --out pdf
|
||||
@ -1,2 +0,0 @@
|
||||
electroshot localhost:3000/resume-1 2481x3508 --format png --out resumes/resume-1 --filename "resume-1.png"
|
||||
electroshot localhost:3000/resume-2 2481x3508 --format png --out resumes/resume-2 --filename "resume-2.png"
|
||||
87
server.js
@ -1,87 +0,0 @@
|
||||
var path = require('path');
|
||||
|
||||
// personal data
|
||||
var person = require('./person.js');
|
||||
|
||||
// express app
|
||||
var express = require('express');
|
||||
var mustacheExpress = require('mustache-express');
|
||||
var app = express();
|
||||
app.set('views', path.join(__dirname, 'resumes'));
|
||||
app.engine('mustache', require('hogan-express'));
|
||||
app.set('view engine', 'mustache');
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
app.use(express.static(path.join(__dirname, 'node_modules/material-design-icons/iconfont')));
|
||||
app.use('/fonts', express.static(path.join(__dirname, 'node_modules/npm-font-open-sans-condensed/fonts')));
|
||||
app.use('/fonts', express.static(path.join(__dirname, 'node_modules/roboto-fontface/fonts')));
|
||||
app.use(express.static(path.join(__dirname, 'node_modules/@typopro/web-montserrat')));
|
||||
app.use(express.static(path.join(__dirname, 'resumes')));
|
||||
app.use(express.static(path.join(__dirname, 'node_modules')));
|
||||
app.use('/fonts', express.static(path.join(__dirname, 'node_modules/open-sans-fontface/fonts')));
|
||||
app.use('/fonts', express.static(path.join(__dirname, 'node_modules/raleway-webfont/fonts')));
|
||||
|
||||
app.get('/', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'index'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/resume-1', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'resume-1/resume-1'
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/resume-2', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'resume-2/resume-2'
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/resume-3', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'resume-3/resume-3'
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/resume-4', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'resume-4/resume-4'
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/resume-5', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'resume-5/resume-5'
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/resume-6', function(req, res) {
|
||||
res.render('layout', {
|
||||
partials: {
|
||||
content: 'resume-6/resume-6'
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
|
||||
app.listen(3000, '0.0.0.0', function() {
|
||||
console.log('Listening on localhost:3000!');
|
||||
});
|
||||
70
src/compileLess.js
Normal file
@ -0,0 +1,70 @@
|
||||
const less = require('less');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const CleanCSS = require('clean-css');
|
||||
const writeFile = require('write');
|
||||
|
||||
const dir = path.join(__dirname, '../resumes');
|
||||
const directories = getDirectories(dir);
|
||||
|
||||
function getDirectories(srcpath) {
|
||||
return fs.readdirSync(srcpath)
|
||||
.filter(file => file.includes('resume-'))
|
||||
}
|
||||
|
||||
function compileToCSS(lessContent) {
|
||||
let lessDir = path.join(__dirname, '../less');
|
||||
return new Promise((res, rej) => {
|
||||
less.render(lessContent, {
|
||||
paths: [lessDir, lessDir + '/fonts'],
|
||||
}, (e, output) => {
|
||||
if (e) rej(e);
|
||||
else res(output.css);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function readFileContent(fileName) {
|
||||
const dir = path.join(__dirname, '../' + fileName);
|
||||
return new Promise((res, rej) => {
|
||||
fs.readFile(dir, 'utf8', (err, template) => {
|
||||
if (err) rej(err);
|
||||
else res(template);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function minifyCSS(css) {
|
||||
return new Promise((res, rej) => {
|
||||
new CleanCSS().minify(css, (err, output) => {
|
||||
if (err) rej(err);
|
||||
else res(output)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function compileLessFiles() {
|
||||
const styleLess = await readFileContent('less/style.less');
|
||||
let css = await compileToCSS(styleLess);
|
||||
|
||||
const contents = await Promise.all(
|
||||
directories
|
||||
.map(resume => readFileContent('resumes/' + resume + '/' + resume + '.less'))
|
||||
);
|
||||
const compiledContents = await Promise.all(
|
||||
contents
|
||||
.map(content => compileToCSS(content))
|
||||
);
|
||||
const ret = compiledContents.reduce((pre, cur) => pre += cur, css);
|
||||
|
||||
// minify
|
||||
const minCSS = await minifyCSS(ret);
|
||||
|
||||
// write file
|
||||
const p = path.join(__dirname, '../public/style.min.css');
|
||||
writeFile(p, minCSS.styles, err => {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
compileLessFiles();
|
||||
54
src/htmlToPdf.js
Executable file
@ -0,0 +1,54 @@
|
||||
const person = require('./person.js');
|
||||
const Mustache = require('mustache');
|
||||
const pdf = require('html-pdf');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const dir = path.join(__dirname, '../resumes');
|
||||
const directories = getDirectories(dir);
|
||||
|
||||
function getDirectories(srcpath) {
|
||||
return fs.readdirSync(srcpath)
|
||||
.filter(file => file.includes('resume-'))
|
||||
}
|
||||
|
||||
function readFileContent(fileName) {
|
||||
const dir = path.join(__dirname, '../resumes/' + fileName);
|
||||
return new Promise((res, rej) => {
|
||||
fs.readFile(dir, 'utf8', (err, template) => {
|
||||
if (err) rej(err);
|
||||
else res(template);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function generatePdf(html, fileName) {
|
||||
const dir = path.join(__dirname, '../pdf/' + fileName);
|
||||
return new Promise((resolve, rej) => {
|
||||
pdf.create(html, {
|
||||
'type': 'pdf',
|
||||
'format': 'A4',
|
||||
'base': 'http://localhost:3000'
|
||||
}).toFile(dir, function(err, res) {
|
||||
if (err) rej(err);
|
||||
else resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function convertToPdf() {
|
||||
const layoutTemplate = await readFileContent('views/layout.mustache');
|
||||
for (let resume of directories) {
|
||||
const resumeTemplate = await readFileContent(resume + '/' + resume + '.mustache');
|
||||
const html = Mustache.render(
|
||||
layoutTemplate, {
|
||||
person: person
|
||||
}, {
|
||||
content: resumeTemplate
|
||||
});
|
||||
await generatePdf(html, resume + '.pdf');
|
||||
}
|
||||
console.log('Generated resumes into /pdf.');
|
||||
}
|
||||
|
||||
convertToPdf();
|
||||
30
src/renderReadMe.js
Executable file
@ -0,0 +1,30 @@
|
||||
const showdown = require('showdown');
|
||||
const converter = new showdown.Converter();
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const Mustache = require('mustache');
|
||||
const writeFile = require('write');
|
||||
|
||||
function readFileContent(fileName) {
|
||||
const dir = path.join(__dirname, '../' + fileName);
|
||||
return new Promise((res, rej) => {
|
||||
fs.readFile(dir, 'utf8', (err, template) => {
|
||||
if (err) rej(err);
|
||||
else res(template);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function renderReadMe() {
|
||||
const readme = await readFileContent('README.md');
|
||||
const githubPagesTemplate = await readFileContent('resumes/views/githubPages.mustache');
|
||||
var html = Mustache.render(githubPagesTemplate, {
|
||||
content: readme
|
||||
});
|
||||
writeFile('index.html', html, err => {
|
||||
if (err) console.log(err)
|
||||
else console.log('Github pages index.html was successfully generated from README.');
|
||||
});
|
||||
}
|
||||
|
||||
renderReadMe();
|
||||
41
src/server.js
Executable file
@ -0,0 +1,41 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const person = require('./person.js');
|
||||
const express = require('express');
|
||||
const mustacheExpress = require('mustache-express');
|
||||
|
||||
let app = express();
|
||||
app.set('views', path.join(__dirname, '../resumes'));
|
||||
app.engine('mustache', require('hogan-express'));
|
||||
app.set('view engine', 'mustache');
|
||||
app.use(express.static(path.join(__dirname, '../public')));
|
||||
app.use(express.static(path.join(__dirname, '../node_modules')));
|
||||
|
||||
const dir = path.join(__dirname, '../resumes');
|
||||
const directories = getDirectories(dir);
|
||||
|
||||
function getDirectories(srcpath) {
|
||||
return fs.readdirSync(srcpath)
|
||||
.filter(file => file.includes('resume-'))
|
||||
}
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.render('views/layout', {
|
||||
partials: {
|
||||
content: 'views/index'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
for (let resume of directories) {
|
||||
app.get('/' + resume, (req, res) => {
|
||||
res.render('views/layout', {
|
||||
partials: {
|
||||
content: resume + '/' + resume
|
||||
},
|
||||
person: person
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
app.listen(3000, '0.0.0.0', () => console.log('Listening on localhost:3000!'));
|
||||