-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update default values add warning for print dialog
- Loading branch information
Showing
6 changed files
with
321 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,127 +1,163 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Faultier-CV</title> | ||
<style> | ||
html, | ||
body { | ||
display: flex; | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
width: 100%; | ||
max-height: 100vh; | ||
} | ||
body { | ||
display: grid; | ||
grid-template-rows: 5em auto; | ||
grid-template-columns: 50% 50%; | ||
max-height: 100vh; | ||
max-width: 100vw; | ||
} | ||
#editor, | ||
body > div { | ||
height: 100%; | ||
width: 100%; | ||
overflow: hidden; | ||
} | ||
#head { | ||
grid-column: 1 / 3; | ||
background-color: #131313; | ||
color: #fff; | ||
font-family: Arial, sans-serif; | ||
display: flex; | ||
align-items: center; | ||
padding: 5px; | ||
gap: 5px; | ||
box-sizing: border-box; | ||
} | ||
#head a { | ||
color: #fff; | ||
text-decoration: none; | ||
} | ||
#head .spacer { | ||
margin-left: 3em; | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Faultier-CV</title> | ||
<style> | ||
html, | ||
body { | ||
display: flex; | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
width: 100%; | ||
max-height: 100vh; | ||
} | ||
|
||
body { | ||
display: grid; | ||
grid-template-rows: 5em auto; | ||
grid-template-columns: 50% 50%; | ||
max-height: 100vh; | ||
max-width: 100vw; | ||
} | ||
|
||
#editor, | ||
body>div { | ||
height: 100%; | ||
width: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
#head { | ||
grid-column: 1 / 3; | ||
background-color: #131313; | ||
color: #fff; | ||
font-family: Arial, sans-serif; | ||
display: flex; | ||
align-items: center; | ||
padding: 5px; | ||
gap: 5px; | ||
box-sizing: border-box; | ||
} | ||
|
||
#head a { | ||
color: #fff; | ||
text-decoration: none; | ||
} | ||
|
||
#head .spacer { | ||
margin-left: 3em; | ||
} | ||
|
||
#preview { | ||
height: calc(100% - 2.3em); | ||
overflow: hidden; | ||
} | ||
|
||
iframe { | ||
border: none; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.actionButtons, | ||
#fileTabs { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1em; | ||
align-items: center; | ||
background-color: #131313; | ||
color: #fff; | ||
font-family: Arial, sans-serif; | ||
padding: 5px; | ||
box-sizing: border-box; | ||
} | ||
|
||
.actionButtons>div, | ||
#fileTabs>div { | ||
display: inline-flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: center; | ||
height: 100%; | ||
border: 1px solid #fff; | ||
padding: 3px; | ||
} | ||
|
||
.actionButtons>div:hover, | ||
#fileTabs .active { | ||
background-color: #fff; | ||
color: #131313; | ||
} | ||
|
||
#warning { | ||
display: none; | ||
} | ||
|
||
@media print { | ||
|
||
body *, | ||
#head, | ||
#left, | ||
#right { | ||
visibility: hidden; | ||
} | ||
#preview { | ||
height: calc(100% - 2.3em); | ||
overflow: hidden; | ||
|
||
#warning, | ||
#warning * { | ||
display: block; | ||
visibility: visible; | ||
} | ||
iframe { | ||
border: none; | ||
|
||
#warning { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.actionButtons, | ||
#fileTabs { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 1em; | ||
align-items: center; | ||
background-color: #131313; | ||
color: #fff; | ||
font-family: Arial, sans-serif; | ||
padding: 5px; | ||
box-sizing: border-box; | ||
} | ||
.actionButtons > div, | ||
#fileTabs > div { | ||
display: inline-flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: center; | ||
height: 100%; | ||
border: 1px solid #fff; | ||
padding: 3px; | ||
} | ||
.actionButtons > div:hover, | ||
#fileTabs .active { | ||
background-color: #fff; | ||
color: #131313; | ||
} | ||
</style> | ||
<script defer src="bundle.js"></script></head> | ||
<body> | ||
<div id="head"> | ||
<img | ||
src="https://i5heu.github.io/Faultier-CV/media/logo.png" | ||
height="80" | ||
alt="" | ||
/> | ||
<h1>Faultier-CV</h1> | ||
<div class="spacer"></div> | ||
<a href="https://github.com/i5heu/Faultier-CV">Github</a> | ||
<!-- Place this tag where you want the button to render. --> | ||
<a | ||
class="github-button" | ||
href="https://github.com/i5heu/Faultier-CV" | ||
data-size="large" | ||
data-show-count="true" | ||
aria-label="Star i5heu/Faultier-CV on GitHub" | ||
>Star</a | ||
> | ||
</div> | ||
<div id="left"> | ||
<div id="fileTabs"> | ||
<div data-file="html">html</div> | ||
<div data-file="css">css</div> | ||
<div data-file="markdown">markdown</div> | ||
</div> | ||
<div id="editor"></div> | ||
} | ||
</style> | ||
<script defer src="bundle.js"></script></head> | ||
|
||
<body> | ||
<div id="head"> | ||
<img src="https://i5heu.github.io/Faultier-CV/media/logo.png" height="80" alt="" /> | ||
<h1>Faultier-CV</h1> | ||
<div class="spacer"></div> | ||
<a href="https://github.com/i5heu/Faultier-CV">Github</a> | ||
<!-- Place this tag where you want the button to render. --> | ||
<a class="github-button" href="https://github.com/i5heu/Faultier-CV" data-size="large" data-show-count="true" | ||
aria-label="Star i5heu/Faultier-CV on GitHub">Star</a> | ||
</div> | ||
<div id="left"> | ||
<div id="fileTabs"> | ||
<div data-file="html">html</div> | ||
<div data-file="css">css</div> | ||
<div data-file="markdown">markdown</div> | ||
</div> | ||
<div> | ||
<div class="actionButtons"> | ||
<div id="save">Save</div> | ||
<div id="html">html</div> | ||
<div id="import">Import</div> | ||
</div> | ||
<div id="preview">Loading...</div> | ||
<div id="editor"></div> | ||
</div> | ||
<div> | ||
<div class="actionButtons"> | ||
<div id="save">Save</div> | ||
<div id="html">html</div> | ||
<div id="import">Import</div> | ||
</div> | ||
<div id="preview">Loading...</div> | ||
</div> | ||
<div id="warning"> | ||
<h1>Warning</h1> | ||
<p>As of now, using only browser-based JavaScript, it's not feasible to print HTML content into a PDF while | ||
specifying a custom height. The workaround involves saving the HTML file, opening it, and then exporting it as a | ||
PDF.</p> | ||
</div> | ||
|
||
<!-- Place this tag in your head or just before your close body tag. --> | ||
<script async defer src="https://buttons.github.io/buttons.js"></script> | ||
</body> | ||
|
||
<!-- Place this tag in your head or just before your close body tag. --> | ||
<script async defer src="https://buttons.github.io/buttons.js"></script> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.