Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple script to generate production ready code
- Loading branch information
Showing
5 changed files
with
185 additions
and
8 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,13 @@ | ||
<script type="text/javascript"> | ||
|
||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-20607161-6']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
|
||
</script> |
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,83 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>SVG to jVectorMap converter</title> | ||
<link href="jvectormap/jquery-jvectormap.css" rel="stylesheet" media="all"/> | ||
<link href="css/style.css" rel="stylesheet" media="all"/> | ||
<link href="css/jquery-ui-1.9.1.custom.min.css" rel="stylesheet" media="all"/> | ||
<script src="js/knockout-2.2.0.js"></script> | ||
<script src="js/jquery-1.8.2.min.js"></script> | ||
<script src="jvectormap/jquery-jvectormap.min.js"></script> | ||
<script src="js/jquery-ui-1.9.1.custom.min.js"></script> | ||
<script src="js/app.js"></script> | ||
|
||
<script type="text/javascript"> | ||
|
||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-20607161-6']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<div id="card-input" class="card"> | ||
<div class="card-header">Paste SVG code</div> | ||
<div class="card-content"> | ||
<div id="input-id-attribute"><label>Id attribute:</label><input value="id"/></div> | ||
<div id="input-name-attribute"><label>Name attribute:</label><input value="title"/></div> | ||
<textarea id="input-source"></textarea> | ||
</div> | ||
<div class="card-footer"> | ||
<button id="input-convert">Convert to map</button> | ||
</div> | ||
</div> | ||
<div id="card-settings" class="card"> | ||
<div class="card-header">Settings</div> | ||
<div class="card-content"> | ||
<div id="settings-panel"> | ||
<label>Map name: <input type="text" value="map" id="setting-map-name"/></label> | ||
<label>Region parameters:</label> | ||
<div id="settings-table"> | ||
<table cellpadding="0" cellspacing="0" width="100%"> | ||
<thead> | ||
<tr class="header"> | ||
<th>id</th> | ||
<th>name</th> | ||
</tr> | ||
</thead> | ||
<tbody data-bind="foreach: map.paths"> | ||
<tr data-bind="attr: {'data-region-id': originalId}"> | ||
<td data-bind="text: id"></td> | ||
<td data-bind="text: name"></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div id="settings-divider"></div> | ||
<div id="settings-map"></div> | ||
</div> | ||
<div class="card-footer"> | ||
<button id="setting-save">Save</button> | ||
</div> | ||
</div> | ||
<div id="card-save" class="card"> | ||
<div class="card-header">Copy map source</div> | ||
<div class="card-content"> | ||
<textarea id="save-source"></textarea> | ||
</div> | ||
<div class="card-footer"></div> | ||
</div> | ||
<div id="edit-dialog"> | ||
<div><label for="edit-dialog-id">Id</label><input id="edit-dialog-id"/></div> | ||
<div><label for="edit-dialog-name">Name</label><input id="edit-dialog-name"/></div> | ||
</div> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>SVG to jVectorMap converter</title> | ||
<link href="jvectormap/jquery-jvectormap.css" rel="stylesheet" media="all"/> | ||
<link href="css/style.css" rel="stylesheet" media="all"/> | ||
<link href="css/jquery-ui-1.9.1.custom.min.css" rel="stylesheet" media="all"/> | ||
<script src="js/knockout-2.2.0.js"></script> | ||
<script src="js/jquery-1.8.2.min.js"></script> | ||
<script src="jvectormap/jquery-jvectormap.min.js"></script> | ||
<script src="js/jquery-ui-1.9.1.custom.min.js"></script> | ||
<script src="js/app.js"></script> | ||
%gacode% | ||
<script type="text/javascript"> | ||
|
||
var _gaq = _gaq || []; | ||
_gaq.push(['_setAccount', 'UA-20607161-6']); | ||
_gaq.push(['_trackPageview']); | ||
|
||
(function() { | ||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | ||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | ||
})(); | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<div id="card-input" class="card"> | ||
<div class="card-header">Paste SVG code</div> | ||
<div class="card-content"> | ||
<div id="input-id-attribute"><label>Id attribute:</label><input value="id"/></div> | ||
<div id="input-name-attribute"><label>Name attribute:</label><input value="title"/></div> | ||
<textarea id="input-source"></textarea> | ||
</div> | ||
<div class="card-footer"> | ||
<button id="input-convert">Convert to map</button> | ||
</div> | ||
</div> | ||
<div id="card-settings" class="card"> | ||
<div class="card-header">Settings</div> | ||
<div class="card-content"> | ||
<div id="settings-panel"> | ||
<label>Map name: <input type="text" value="map" id="setting-map-name"/></label> | ||
<label>Region parameters:</label> | ||
<div id="settings-table"> | ||
<table cellpadding="0" cellspacing="0" width="100%"> | ||
<thead> | ||
<tr class="header"> | ||
<th>id</th> | ||
<th>name</th> | ||
</tr> | ||
</thead> | ||
<tbody data-bind="foreach: map.paths"> | ||
<tr data-bind="attr: {'data-region-id': originalId}"> | ||
<td data-bind="text: id"></td> | ||
<td data-bind="text: name"></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
<div id="settings-divider"></div> | ||
<div id="settings-map"></div> | ||
</div> | ||
<div class="card-footer"> | ||
<button id="setting-save">Save</button> | ||
</div> | ||
</div> | ||
<div id="card-save" class="card"> | ||
<div class="card-header">Copy map source</div> | ||
<div class="card-content"> | ||
<textarea id="save-source"></textarea> | ||
</div> | ||
<div class="card-footer"></div> | ||
</div> | ||
<div id="edit-dialog"> | ||
<div><label for="edit-dialog-id">Id</label><input id="edit-dialog-id"/></div> | ||
<div><label for="edit-dialog-name">Name</label><input id="edit-dialog-name"/></div> | ||
</div> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
gacode=`cat gacode` | ||
sed '/%gacode%/r gacode' <index-dev.html >index-prod.html | ||
sed -i -e 's/%gacode%//g' index-prod.html |