-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
747 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* Base styles */ | ||
body { | ||
background-color: #a69999; | ||
color: #000000; | ||
font-family: sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
h1 { | ||
font-size: 1.2em; | ||
color: #000000; | ||
} | ||
|
||
/* Choose section */ | ||
#choose { | ||
width: 100%; | ||
text-align: right; | ||
background-color: #696565; | ||
margin: 0 0 1em; | ||
padding: 1em; | ||
} | ||
|
||
#choose label { | ||
color: #aaa; | ||
} | ||
|
||
#choose.big { | ||
border: 1px solid #555; | ||
padding: 2em 0; | ||
text-align: center; | ||
font-size: 1.2em; | ||
} | ||
|
||
#choose.big #source { | ||
font-size: 1.5em; | ||
color: #eee; | ||
} | ||
|
||
#chooseOption .row { | ||
border-bottom: 1px dotted #444; | ||
padding: 0.5em 0; | ||
} | ||
|
||
#chooseOption input, | ||
#chooseOption select { | ||
font-size: 0.9em; | ||
color: #ddd; | ||
} | ||
|
||
/* View mode styles */ | ||
body.view #chooseOption { | ||
display: none; | ||
} | ||
|
||
body.view h1 { | ||
float: left; | ||
font-size: 1em; | ||
margin: 0.1em 0.5em; | ||
color: #eee; | ||
} | ||
|
||
/* Print styles */ | ||
@media print { | ||
.noprint { | ||
display: none; | ||
} | ||
|
||
body { | ||
margin: 1.5cm; | ||
padding: 0; | ||
background-color: #fff; | ||
color: #000; | ||
} | ||
|
||
#f div.desc { | ||
border: 1px solid #ddd !important; | ||
margin: 0 0 0.5em !important; | ||
padding: 0.3em !important; | ||
font-size: 0.9em; | ||
background-color: #eee; | ||
} | ||
|
||
#f div.info { | ||
display: none; | ||
} | ||
|
||
#f { | ||
page-break-inside: avoid; | ||
} | ||
|
||
svg { | ||
height: 900px; | ||
} | ||
|
||
@page { | ||
margin: 0; | ||
} | ||
} |
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,45 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="dark-theme.css"> | ||
<title>Flowgorithm file viewer</title> | ||
<meta charset="utf-8"> | ||
<script src="lib/jquery-3.5.0.min.js"></script> | ||
<script src="script.js?016"></script> | ||
<script> | ||
var config = {}; | ||
var xml; | ||
function loadFile() { | ||
var file = $('#source').get(0).files[0]; | ||
var reader = new FileReader(); | ||
reader.addEventListener("load", function() { | ||
xml = reader.result; | ||
config.groupInput = true; // Default grouping | ||
config.aH = 12; // Default arrow length | ||
config.aT = 7; // Default arrow tip size | ||
config.itMode = 2; // Default pre-conditional iteration style (Flowgorithm) | ||
config.viewDesc = true; // Default print description | ||
config.labelTrue = "True"; // Default True label | ||
config.labelFalse = "False"; // Default False label | ||
drawFlowchartFromSource(xml, '#f', config); | ||
$('#choose').removeClass('big'); | ||
$('body').addClass('view'); | ||
$('title').text($('#f div.title').text()); | ||
}, false); | ||
if (file) { | ||
reader.readAsText(file); | ||
} | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<script src="https://cdn.jsdelivr.net/npm/canvg@3/dist/browser/canvg.min.js"></script> | ||
<h1 class="noprint">Flowgorithm file viewer</h1> | ||
<div id="choose" class="big noprint"> | ||
<label for="source">Select .fprg file</label> | ||
<input type="file" onchange="loadFile()" id="source" accept=".fprg"> | ||
</div> | ||
<div id="chooseOption" class="noprint" style="display: none;"> </div> | ||
<div id="f"></div> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.