-
Notifications
You must be signed in to change notification settings - Fork 793
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #729 - implement custom PNG export viewer instead of opening wi…
…ndow to data-uri
- Loading branch information
1 parent
dc52096
commit a555ce7
Showing
3 changed files
with
76 additions
and
1 deletion.
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
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
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<div style="display:none"> | ||
<script type="text/template" id="data-uri-export-partial"> | ||
<style> | ||
html, body { | ||
margin: 0; | ||
} | ||
|
||
body { | ||
background: #444; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-family: monospace; | ||
height: 100%; | ||
} | ||
|
||
#image-wrapper { | ||
flex-grow: 1; | ||
flex-shrink: 0; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
} | ||
|
||
img { | ||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABlBMVEXf39////8zI3BgAAAAHklEQVR4AWNghAIGCMDgjwgFCDDSw2M0PSCD0fQAACRcAgF4ciGUAAAAAElFTkSuQmCC') repeat; | ||
margin: 20px 0; | ||
} | ||
|
||
#bottom-wrapper { | ||
width: 600px; | ||
height: 300px; | ||
position: relative; | ||
flex-shrink: 0; | ||
} | ||
textarea { | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
height: 100%; | ||
padding: 10px; | ||
border-style: none; | ||
} | ||
|
||
span { | ||
position: absolute; | ||
bottom: 10px; | ||
left: 10px; | ||
font-size: 12px; | ||
padding: 5px; | ||
color: white; | ||
background-color: #444; | ||
} | ||
</style> | ||
<body> | ||
<div id="image-wrapper"> | ||
<img src="{{src}}" alt="Exported image as data-uri"> | ||
</div> | ||
<div id="bottom-wrapper"> | ||
<textarea spellcheck="false" onclick="this.select()">{{src}}</textarea> | ||
<span>Data-uri for the exported framesheet</span> | ||
</div> | ||
</body> | ||
</script> | ||
</div> |