release 0.5

This commit is contained in:
Stefan Breunig 2013-02-11 17:39:43 +01:00
parent fdd5de3143
commit 3a45b560f5
4 changed files with 3511 additions and 0 deletions

33
dist/autolink.js vendored Normal file
View File

@ -0,0 +1,33 @@
// Generated by CoffeeScript 1.4.0
(function() {
var autoLink,
__slice = [].slice;
autoLink = function() {
var callbackThunk, key, link_attributes, option, options, url_pattern, value;
options = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
link_attributes = '';
option = options[0];
url_pattern = /(^|\s)(\b(https?|ftp):\/\/[\-A-Z0-9+\u0026@#\/%?=~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~_|])/gi;
if (!(options.length > 0)) {
return this.replace(url_pattern, "$1<a href='$2'>$2</a>");
}
if ((option['callback'] != null) && typeof option['callback'] === 'function') {
callbackThunk = option['callback'];
delete option['callback'];
}
for (key in option) {
value = option[key];
link_attributes += " " + key + "='" + value + "'";
}
return this.replace(url_pattern, function(match, space, url) {
var link, returnCallback;
returnCallback = callbackThunk && callbackThunk(url);
link = returnCallback || ("<a href='" + url + "'" + link_attributes + ">" + url + "</a>");
return "" + space + link;
});
};
String.prototype['autoLink'] = autoLink;
}).call(this);

152
dist/leaflet_google.js vendored Normal file
View File

@ -0,0 +1,152 @@
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 18,
tileSize: 256,
subdomains: 'abc',
errorTileUrl: '',
attribution: '',
opacity: 1,
continuousWorld: false,
noWrap: false,
},
// Possible types: SATELLITE, ROADMAP, HYBRID, INGRESS
initialize: function(type, options, styles) {
L.Util.setOptions(this, options);
if(type === 'INGRESS') {
type = 'ROADMAP';
this._styles = [{featureType:"all", elementType:"all", stylers:[{visibility:"on"}, {hue:"#0091ff"}, {invert_lightness:true}]}, {featureType:"water", elementType:"all", stylers:[{visibility:"on"}, {hue:"#005eff"}, {invert_lightness:true}]}, {featureType:"poi", stylers:[{visibility:"off"}]}, {featureType:"transit", elementType:"all", stylers:[{visibility:"off"}]}];
} else {
this._styles = null;
}
this._type = google.maps.MapTypeId[type || 'SATELLITE'];
},
onAdd: function(map, insertAtTheBottom) {
this._map = map;
this._insertAtTheBottom = insertAtTheBottom;
// create a container div for tiles
this._initContainer();
this._initMapObject();
// set up events
map.on('viewreset', this._resetCallback, this);
this._limitedUpdate = L.Util.limitExecByInterval(this._update, 150, this);
map.on('move', this._update, this);
//map.on('moveend', this._update, this);
this._reset();
this._update();
},
onRemove: function(map) {
this._map._container.removeChild(this._container);
//this._container = null;
this._map.off('viewreset', this._resetCallback, this);
this._map.off('move', this._update, this);
//this._map.off('moveend', this._update, this);
},
getAttribution: function() {
return this.options.attribution;
},
setOpacity: function(opacity) {
this.options.opacity = opacity;
if (opacity < 1) {
L.DomUtil.setOpacity(this._container, opacity);
}
},
_initContainer: function() {
var tilePane = this._map._container
first = tilePane.firstChild;
if (!this._container) {
this._container = L.DomUtil.create('div', 'leaflet-google-layer leaflet-top leaflet-left');
this._container.id = "_GMapContainer";
}
if (true) {
tilePane.insertBefore(this._container, first);
this.setOpacity(this.options.opacity);
var size = this._map.getSize();
this._container.style.width = size.x + 'px';
this._container.style.height = size.y + 'px';
}
},
_initMapObject: function() {
this._google_center = new google.maps.LatLng(0, 0);
var map = new google.maps.Map(this._container, {
center: this._google_center,
zoom: 0,
styles: this._styles,
mapTypeId: this._type,
disableDefaultUI: true,
keyboardShortcuts: false,
draggable: false,
disableDoubleClickZoom: true,
scrollwheel: false,
streetViewControl: false
});
var _this = this;
this._reposition = google.maps.event.addListenerOnce(map, "center_changed",
function() { _this.onReposition(); });
map.backgroundColor = '#ff0000';
this._google = map;
},
_resetCallback: function(e) {
this._reset(e.hard);
},
_reset: function(clearOldContainer) {
this._initContainer();
},
_update: function() {
this._resize();
var bounds = this._map.getBounds();
var ne = bounds.getNorthEast();
var sw = bounds.getSouthWest();
var google_bounds = new google.maps.LatLngBounds(
new google.maps.LatLng(sw.lat, sw.lng),
new google.maps.LatLng(ne.lat, ne.lng)
);
var center = this._map.getCenter();
var _center = new google.maps.LatLng(center.lat, center.lng);
this._google.setCenter(_center);
this._google.setZoom(this._map.getZoom());
//this._google.fitBounds(google_bounds);
},
_resize: function() {
var size = this._map.getSize();
if (this._container.style.width == size.x &&
this._container.style.height == size.y)
return;
this._container.style.width = size.x + 'px';
this._container.style.height = size.y + 'px';
google.maps.event.trigger(this._google, "resize");
},
onReposition: function() {
//google.maps.event.trigger(this._google, "resize");
}
});

604
dist/style.css vendored Normal file
View File

@ -0,0 +1,604 @@
/* general rules ******************************************************/
html, body, #map {
height: 100%;
}
body {
font-size: 14px;
font-family: "coda",arial,helvetica,sans-serif;
margin: 0;
}
#scrollwrapper {
overflow: hidden;
position: fixed;
right: -38px;
top: 0;
width: 340px;
bottom: 45px;
}
#sidebar {
background-color: rgba(8, 48, 78, 0.9);
border-left: 1px solid #20A8B1;
color: #888;
position: relative;
left: 0;
top: 0;
max-height: 100%;
overflow-y:scroll;
overflow-x:hidden;
z-index: 3000;
}
#sidebartoggle {
display: block;
padding: 20px 5px;
margin-top: -31px;
line-height: 10px;
position: absolute;
top: 50%;
z-index: 3001;
background-color: rgba(8, 48, 78, 0.9);
color: #FFCE00;
border: 1px solid #20A8B1;
border-right: none;
border-radius: 5px 0 0 5px;
text-decoration: none;
}
.enl {
color: #03fe03 !important;
}
.res {
color: #00c5ff !important;
}
.none {
color: #fff;
}
a {
color: #ffce00;
cursor: pointer;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* map display, required because GMaps uses a high z-index which is
* normally above Leaflets vector pane */
.leaflet-map-pane {
z-index: 1000;
}
.leaflet-control-layers-overlays label.disabled {
text-decoration: line-through;
cursor: help;
}
.help {
cursor: help;
}
.toggle {
display: block;
height: 0;
width: 0;
}
/* chat ***************************************************************/
#chatcontrols {
color: #FFCE00;
background: rgba(8, 48, 78, 0.9);
position: absolute;
left: 0;
z-index: 3001;
height: 26px;
padding-left:1px;
}
#chatcontrols.expand {
top: 0;
bottom: auto;
}
#chatcontrols a {
margin-left: -1px;
display: inline-block;
width: 94px;
text-align: center;
height: 24px;
line-height: 24px;
border: 1px solid #20A8B1;
vertical-align: top;
}
#chatcontrols a:first-child {
letter-spacing:-1px;
text-decoration: none !important;
}
#chatcontrols a.active {
border-color: #FFCE00;
border-bottom-width:0px;
font-weight:bold
}
#chatcontrols a.active + a {
border-left-color: #FFCE00
}
#chatcontrols .toggle {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
margin: 6px auto auto;
}
#chatcontrols .expand {
border-bottom: 10px solid #FFCE00;
}
#chatcontrols .shrink {
border-top: 10px solid #FFCE00;
}
#chat {
position: absolute;
width: 708px;
bottom: 24px;
left: 0;
z-index: 3000;
background: rgba(8, 48, 78, 0.9);
font-size: 12.6px;
color: #eee;
border: 1px solid #20A8B1;
border-bottom: 0;
}
em {
color: red;
font-style: normal;
}
#chat.expand {
height:auto;
top: 25px;
}
#chatpublic, #chatautomated {
display: none;
}
#chat > div {
overflow-x:hidden;
overflow-y:scroll;
height: 100%; /* fallback for Opera which doesnt support calc */
height: calc(100% - 4px);
height: -webkit-calc(100% - 4px);
height: -moz-calc(100% - 4px);
padding: 2px;
position:relative;
}
#chat p {
display: block;
padding: 1px 2px;
margin:0;
}
#chat time {
cursor: help;
}
time, mark, #chat span, #chat a {
font-family: Verdana, sans-serif;
font-size: 12.6px;
vertical-align: top;
}
time {
display: inline-block;
width: 44px;
color: #bbb;
}
mark {
display: inline-block;
width: 91px;
margin-right:4px;
overflow:hidden;
vertical-align: top;
background: transparent;
}
summary {
color: #bbb;
display: inline-block;
font-family: Verdana,sans-serif;
height: 16px;
overflow: hidden;
padding: 0 2px;
white-space: nowrap;
width: 683px;
}
#chat span {
display: inline-block;
width: 540px;
}
#chatinput {
line-height:22px;
padding: 0 4px;
position: absolute;
bottom: 0;
left: 0;
background: rgba(8, 48, 78, 0.9);
width: 700px;
border: 1px solid #20A8B1;
z-index: 3001;
}
#chat .invisibleseparator {
color: rgba(8, 48, 78, 0.0);
overflow: hidden;
width: 0px;
}
#chatinput span {
font-family: Verdana,sans-serif;
display: inline-block;
font-size: 12.6px;
width: 84px;
color: red;
padding: 0 4px 0 1px;
width: 85px;
}
#chatinput input {
background: transparent;
font-size: 12.6px;
font-family: Verdana,sans-serif;
color: #EEEEEE;
width: 558px
}
/* sidebar ************************************************************/
#sidebar > * {
border-bottom: 1px solid #20A8B1;
}
#sidebartoggle .toggle {
border-bottom: 10px solid transparent;
border-top: 10px solid transparent;
}
#sidebartoggle .open {
border-right: 10px solid #FFCE00;
}
#sidebartoggle .close {
border-left: 10px solid #FFCE00;
}
/* player stats */
#playerstat {
height: 30px;
}
h2 {
color: #ffce00;
font-size: 21px;
padding: 0 4px;
margin: 0;
cursor:help;
}
h2 span {
display: inline-block;
overflow: hidden;
text-overflow: "~";
vertical-align: top;
white-space: nowrap;
width: 205px;
}
h2 div {
float: right;
height: 100%;
overflow: hidden;
}
h2 sup, h2 sub {
display: block;
font-size: 11px;
margin-bottom: -1px;
}
/* gamestats */
#gamestat, #gamestat span {
height: 22px;
line-height: 22px;
}
#gamestat span {
display: block;
float: left;
font-weight: bold;
cursor:help;
}
#gamestat .res {
background: #005684;
text-align: right;
}
#gamestat .enl {
background: #017f01;
}
/* geosearch input, and others */
input {
background-color: rgba(0, 0, 0, 0.3);
color: #ffce00;
height: 22px;
line-height: 22px;
padding: 0 4px;
font-size: 14px;
border:0;
font-family:inherit;
}
::-webkit-input-placeholder {
font-style: italic;
}
:-moz-placeholder {
font-style: italic;
}
::-moz-placeholder {
font-style: italic;
}
/* portal title and image */
h3 {
font-size: 17px;
padding: 0 4px;
margin:0;
height: 25px;
width: 100%;
overflow:hidden;
text-overflow: "~";
white-space: nowrap;
}
.imgpreview {
height: 200px;
overflow: hidden;
}
.imgpreview img {
cursor: help;
}
#level {
font-size: 40px;
position: absolute;
right: 10px;
text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000, 0 0 5px #fff;
top: 100px;
}
/* portal mods */
.mods {
margin-bottom: 1px;
margin-top: 5px;
height: 75px;
}
.mods span {
background-color: rgba(0, 0, 0, 0.3);
/* cant use inline-block because Webkits implementation is buggy and
* introduces additional margins in random cases. No clear necessary,
* as thats solved by setting height on .mods. */
display: block;
float:left;
height: 63.7px;
margin-left: 4px;
overflow: hidden;
padding: 2px;
text-align: center;
width: 63.7px;
cursor:help;
border: 1px solid #666;
}
.mods span[title=""] {
cursor: auto;
}
.res .mods span, .res .meter {
border: 1px solid #0076b6;
}
.enl .mods span, .enl .meter {
border: 1px solid #017f01;
}
/* random details list */
#randdetails {
margin: 0 4px;
margin-top: 11px;
}
aside {
display: inline-block;
width: 140px;
}
aside span {
overflow: hidden;
text-overflow: "~";
white-space: nowrap;
width: 74px;
}
aside:nth-child(odd) {
margin-right: 4px;
text-align: right;
}
aside:nth-child(even) {
margin-left: 4px;
text-align: left;
}
aside:nth-child(even) span {
float: right;
padding-left: 4px;
text-align: left;
}
aside:nth-child(odd) span {
float: left;
padding-right: 4px;
text-align: right;
}
#randdetails tt {
font-family: inherit;
cursor: help;
}
/* resonators */
#resodetails {
white-space: nowrap;
margin: 16px 0;
-moz-column-gap: 10px;
-moz-column-width: 141px;
-webkit-column-gap: 10px;
-webkit-column-width: 141px;
}
.meter {
background: #000;
cursor: help;
display: inline-block;
height: 14px;
padding: 1px;
width: 58px;
}
.meter-text {
display: inline-block;
height: 18px;
margin: 0 4px;
overflow: hidden;
text-overflow: "~";
vertical-align: top;
white-space: nowrap;
width: 75px;
}
.meter-text.left {
text-align: right;
}
.meter span {
display: block;
height: 14px;
}
.meter-rel {
position: relative;
left: 0;
top: 0;
}
.meter-level {
position: absolute;
top: -2px;
left: 25px;
text-shadow: 0.0em 0.0em 0.3em #808080;
}
/* links below resos */
.linkdetails {
text-align: center;
margin-bottom: 10px;
}
.linkdetails aside {
margin: 0 4px;
width: 140px;
}
#toolbox {
padding: 4px;
font-size:90%;
}
#toolbox > a {
padding: 5px;
}
#spacer {
height: 10px;
}
/* a common portal display takes this much space (prevents moving
* content when first selecting a portal) */
#portaldetails {
min-height: 553px;
}
/* update status */
#updatestatus {
background-color: rgba(8, 48, 78, 1);
border-bottom: 0;
border-top: 1px solid #20A8B1;
border-left: 1px solid #20A8B1;
bottom: 0;
color: #ffce00;
font-size:13px;
padding: 4px;
position: fixed;
right: 0;
z-index:3002;
}
/* preview */
#largepreview {
left: 50%;
position: fixed;
top: 50%;
z-index: 2000;
}
#largepreview img {
box-shadow: 0 0 40px #000;
}
#largepreview img {
border: 2px solid #f8ff5e;
}

2722
dist/total-conversion-build.user.js vendored Normal file

File diff suppressed because it is too large Load Diff