2012-04-12 01:26:10 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2013-10-12 18:45:37 +00:00
|
|
|
<html ng-app="fishconfig">
|
2012-03-15 10:43:45 +00:00
|
|
|
<head>
|
2012-04-12 01:26:10 +00:00
|
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
|
|
<title>fish shell configuration</title>
|
2013-10-02 13:40:40 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="fishconfig.css"/>
|
2013-10-19 18:26:23 +00:00
|
|
|
<script type="text/javascript" src="js/angular.js"></script>
|
2013-10-19 18:24:51 +00:00
|
|
|
<script type="text/javascript" src="js/colorutils.js"></script>
|
2013-10-19 06:32:00 +00:00
|
|
|
<script type="text/javascript" src="js/filters.js"></script>
|
|
|
|
<script type="text/javascript" src="js/controllers.js"></script>
|
|
|
|
<script type="text/javascript" src="js/app.js"></script>
|
2013-08-16 18:32:58 +00:00
|
|
|
|
2012-03-15 10:43:45 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
|
2013-09-07 17:27:25 +00:00
|
|
|
/*
|
|
|
|
Need to find what to do with these functions
|
|
|
|
*/
|
2012-03-25 10:00:38 +00:00
|
|
|
function rgb_to_hsl(r, g, b){
|
|
|
|
r /= 255, g /= 255, b /= 255;
|
|
|
|
var max = Math.max(r, g, b), min = Math.min(r, g, b);
|
|
|
|
var h, s, l = (max + min) / 2;
|
|
|
|
|
|
|
|
if(max == min){
|
|
|
|
h = s = 0; // achromatic
|
|
|
|
}else{
|
|
|
|
var d = max - min;
|
|
|
|
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
|
|
switch(max){
|
|
|
|
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
|
|
|
|
case g: h = (b - r) / d + 2; break;
|
|
|
|
case b: h = (r - g) / d + 4; break;
|
|
|
|
}
|
|
|
|
h /= 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
return [h, s, l];
|
|
|
|
}
|
|
|
|
|
|
|
|
function hsl_to_rgb(h, s, l){
|
|
|
|
var r, g, b;
|
|
|
|
|
|
|
|
if(s == 0){
|
|
|
|
r = g = b = l; // achromatic
|
|
|
|
}else{
|
|
|
|
function hue2rgb(p, q, t){
|
|
|
|
if(t < 0) t += 1;
|
|
|
|
if(t > 1) t -= 1;
|
|
|
|
if(t < 1/6) return p + (q - p) * 6 * t;
|
|
|
|
if(t < 1/2) return q;
|
|
|
|
if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
|
|
|
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
|
|
var p = 2 * l - q;
|
|
|
|
r = hue2rgb(p, q, h + 1.0/3);
|
|
|
|
g = hue2rgb(p, q, h);
|
|
|
|
b = hue2rgb(p, q, h - 1.0/3);
|
|
|
|
}
|
|
|
|
|
|
|
|
return [r * 255, g * 255, b * 255]
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Given a color, compute the master text color for it, by giving it a minimum brightness */
|
|
|
|
function master_color_for_color(color_str) {
|
|
|
|
return adjust_lightness(color_str, function(lightness){
|
|
|
|
if (lightness < .33) {
|
|
|
|
lightness = .33
|
|
|
|
}
|
|
|
|
return lightness
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2012-03-31 22:17:14 +00:00
|
|
|
/* Given a color name, like 'normal' or 'red' or 'FF00F0', return an RGB color string (or empty string) */
|
|
|
|
function interpret_color(str) {
|
|
|
|
str = str.toLowerCase()
|
|
|
|
if (str == 'black') return '000000'
|
|
|
|
if (str == 'red') return 'FF0000'
|
|
|
|
if (str == 'green') return '00FF00'
|
|
|
|
if (str == 'brown') return '725000'
|
|
|
|
if (str == 'yellow') return 'FFFF00'
|
|
|
|
if (str == 'blue') return '0000FF'
|
|
|
|
if (str == 'magenta') return 'FF00FF'
|
|
|
|
if (str == 'purple') return 'FF00FF'
|
|
|
|
if (str == 'cyan') return '00FFFF'
|
|
|
|
if (str == 'white') return 'FFFFFF'
|
|
|
|
if (str == 'normal') return ''
|
|
|
|
return str
|
|
|
|
}
|
|
|
|
|
2012-03-17 00:21:37 +00:00
|
|
|
</script>
|
2012-03-15 10:43:45 +00:00
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="ancestor">
|
2013-10-19 17:06:18 +00:00
|
|
|
<span style="font-size: 16pt; color: #8888FF">fish</span><p id="global_error" class="error_msg" error-message></p>
|
2012-03-15 10:43:45 +00:00
|
|
|
<div id="parent">
|
2013-08-16 18:32:58 +00:00
|
|
|
<div id="tab_parent" ng-controller="main">
|
2013-10-19 17:17:18 +00:00
|
|
|
<div ng-class="{'tab': true, 'selected_tab': currentTab =='colors'}" id="tab_colors" ng-click="changeView('colors')">colors</div>
|
|
|
|
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'prompt'}" id="tab_prompt" ng-click="changeView('prompt')">prompt</div>
|
|
|
|
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'functions'}" id="tab_functions" ng-click="changeView('functions')">functions</div>
|
|
|
|
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'variables'}" id="tab_variables" ng-click="changeView('variables')">variables</div>
|
|
|
|
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'history'}" id="tab_history" ng-click="changeView('history')">history</div>
|
|
|
|
<div ng-class="{'tab': true, 'selected_tab': currentTab == 'bindings'}" id="tab_bindings" ng-click="changeView('bindings')">bindings</div>
|
2012-03-15 10:43:45 +00:00
|
|
|
</div>
|
2012-03-26 05:41:22 +00:00
|
|
|
<div id="tab_contents">
|
2013-08-16 18:32:58 +00:00
|
|
|
<ng-view></ng-view>
|
2012-03-26 05:41:22 +00:00
|
|
|
</div>
|
2012-03-15 10:43:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body></html>
|