|
@@ -2,20 +2,29 @@
|
|
|
|
|
|
if $theme['name'] = '': $theme['name'] = 'Dynamic' & gs 'themes', 'set_dynamic'
|
|
|
|
|
|
+!! ------------------------------------------------------------------------------
|
|
|
+!! ---------------------------------- Helpers -----------------------------------
|
|
|
+!! ------------------------------------------------------------------------------
|
|
|
+if $ARGS[0] = 'alt_color':
|
|
|
+ $result = iif($ARGS[1] = $theme['table_bg'], $theme['table_bg_alt'], $theme['table_bg'])
|
|
|
+end
|
|
|
+
|
|
|
+if $ARGS[0] = 'clothing':
|
|
|
+ $temp_bcolor = func('themes', 'alt_color', $temp_bcolor)
|
|
|
+end
|
|
|
+
|
|
|
!! ------------------------------------------------------------------------------
|
|
|
!! ---------------------------------- Routing -----------------------------------
|
|
|
!! ------------------------------------------------------------------------------
|
|
|
if $ARGS[0] = 'outdoors':
|
|
|
gs 'themes', 'apply_'+$theme['type'], $ARGS[0]
|
|
|
-end
|
|
|
-
|
|
|
-if $ARGS[0] = 'indoors':
|
|
|
+elseif $ARGS[0] = 'indoors':
|
|
|
gs 'themes', 'apply_'+$theme['type'], $ARGS[0]
|
|
|
gs 'indoors'
|
|
|
end
|
|
|
|
|
|
!! ------------------------------------------------------------------------------
|
|
|
-!! ---------------------------------- Helpers -----------------------------------
|
|
|
+!! ----------------------------------- Apply ------------------------------------
|
|
|
!! ------------------------------------------------------------------------------
|
|
|
if $ARGS[0] = 'apply_dynamic':
|
|
|
if $ARGS[1] = 'indoors':
|
|
@@ -88,9 +97,8 @@ if $ARGS[0] = 'apply_dynamic':
|
|
|
end
|
|
|
|
|
|
gs 'themes', 'apply_static'
|
|
|
-end
|
|
|
|
|
|
-if $ARGS[0] = 'apply_static':
|
|
|
+elseif $ARGS[0] = 'apply_static':
|
|
|
bcolor = theme['bcolor']
|
|
|
fcolor = theme['fcolor']
|
|
|
lcolor = theme['lcolor']
|
|
@@ -101,9 +109,11 @@ if $ARGS[0] = 'apply_static':
|
|
|
|
|
|
fsize = theme['fsize']
|
|
|
$fname = $theme['fname']
|
|
|
-end
|
|
|
|
|
|
-if $ARGS[0] = 'reset':
|
|
|
+elseif $ARGS[0] = 'reset':
|
|
|
+ killvar 'theme'
|
|
|
+ killvar '$theme'
|
|
|
+
|
|
|
killvar 'bcolor'
|
|
|
killvar 'fcolor'
|
|
|
killvar 'lcolor'
|
|
@@ -118,10 +128,6 @@ if $ARGS[0] = 'reset':
|
|
|
theme['is_dark'] = 0
|
|
|
end
|
|
|
|
|
|
-if $ARGS[0] = 'alt_color':
|
|
|
- $result = iif($ARGS[1] = $theme['table_bg'], $theme['table_bg_alt'], $theme['table_bg'])
|
|
|
-end
|
|
|
-
|
|
|
!! ------------------------------------------------------------------------------
|
|
|
!! ----------------------------------- Themes -----------------------------------
|
|
|
!! ------------------------------------------------------------------------------
|
|
@@ -133,9 +139,8 @@ if $ARGS[0] = 'set_dynamic':
|
|
|
|
|
|
theme['fsize'] = 12
|
|
|
$theme['fname'] = 'Tahoma'
|
|
|
-end
|
|
|
|
|
|
-if $ARGS[0] = 'set_white':
|
|
|
+elseif $ARGS[0] = 'set_white':
|
|
|
$theme['name'] = 'White'
|
|
|
$theme['type'] = 'static'
|
|
|
theme['is_dark'] = 0
|
|
@@ -155,9 +160,8 @@ if $ARGS[0] = 'set_white':
|
|
|
|
|
|
$theme['table_bg'] = "#FFFFFF"
|
|
|
$theme['table_bg_alt'] = "#e6f2ff"
|
|
|
-end
|
|
|
|
|
|
-if $ARGS[0] = 'set_black':
|
|
|
+elseif $ARGS[0] = 'set_black':
|
|
|
$theme['name'] = 'Black'
|
|
|
$theme['type'] = 'static'
|
|
|
theme['is_dark'] = 1
|
|
@@ -177,9 +181,8 @@ if $ARGS[0] = 'set_black':
|
|
|
|
|
|
$theme['table_bg'] = "#202020"
|
|
|
$theme['table_bg_alt'] = "#303030"
|
|
|
-end
|
|
|
|
|
|
-if $ARGS[0] = 'set_gray':
|
|
|
+elseif $ARGS[0] = 'set_gray':
|
|
|
$theme['name'] = 'Modern Grey'
|
|
|
$theme['type'] = 'static'
|
|
|
theme['is_dark'] = 1
|
|
@@ -199,9 +202,8 @@ if $ARGS[0] = 'set_gray':
|
|
|
|
|
|
$theme['table_bg'] = "#202020"
|
|
|
$theme['table_bg_alt'] = "#303030"
|
|
|
-end
|
|
|
|
|
|
-if $ARGS[0] = 'set_custom':
|
|
|
+elseif $ARGS[0] = 'set_custom':
|
|
|
$theme['name'] = 'Custom'
|
|
|
$theme['type'] = 'static'
|
|
|
theme['is_dark'] = 1
|
|
@@ -291,35 +293,4 @@ if $ARGS[0] = 'default_palette':
|
|
|
$theme['green'] = "#859900"
|
|
|
end
|
|
|
|
|
|
-
|
|
|
-!! ------------------------------------------------------------------------------
|
|
|
-!! --------------------------------- DEPRECATED ---------------------------------
|
|
|
-!! ------------------------------------------------------------------------------
|
|
|
-
|
|
|
-!clothing th themes are for table backgrounds. 1 is first colour, 2 is second colour.
|
|
|
-!eg gs 'themes', 'clothing', 1
|
|
|
-if $ARGS[0] = 'clothing':
|
|
|
- if ARGS[1] = 1:
|
|
|
- if night_mode = 0:
|
|
|
- $bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#f3f4ee')
|
|
|
- elseif night_mode = 1:
|
|
|
- $bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
|
|
|
- elseif night_mode = 2:
|
|
|
- $bgcolor = iif($bgcolor='#0C0B11','#141414','#0C0B11')
|
|
|
- elseif night_mode = 99:
|
|
|
- killvar 'bgcolor'
|
|
|
- end
|
|
|
- elseif ARGS[1] = 2:
|
|
|
- if night_mode = 0:
|
|
|
- $bgcolor = iif($bgcolor='#f3f4ee','#ffffff','#f3f4ee')
|
|
|
- elseif night_mode = 1:
|
|
|
- $bgcolor = iif($bgcolor='#0C0B11','#000000','#0C0B11')
|
|
|
- elseif night_mode = 2:
|
|
|
- $bgcolor = iif($bgcolor='#0C0B11','#202020','#0C0B11')
|
|
|
- elseif night_mode = 99:
|
|
|
- killvar '$bgcolor'
|
|
|
- end
|
|
|
- end
|
|
|
-end
|
|
|
-
|
|
|
--- themes ---------------------------------
|