Skip to content

Commit 0fd7618

Browse files
committed
[feature] add tile shadow options
1 parent d3cc4f0 commit 0fd7618

File tree

8 files changed

+39
-10
lines changed

8 files changed

+39
-10
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nighttab",
3-
"version": "3.81.0",
3+
"version": "3.82.0",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
55
"main": "index.js",
66
"scripts":{

‎src/css/link.css‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,9 @@
131131
text-decoration: none;
132132
}
133133

134-
.link-item:focus .link-panel-front,
135-
.link-item:focus-within .link-panel-front,
136-
.link-item:hover .link-panel-front{
137-
text-decoration: none;
138-
outline: none;
139-
background-color:rgb(var(--theme-gray-03));
134+
.is-link-item-shadow-show .link-item:focus .link-panel-front,
135+
.is-link-item-shadow-show .link-item:focus-within .link-panel-front,
136+
.is-link-item-shadow-show .link-item:hover .link-panel-front{
140137
box-shadow:var(--layout-shadow-large);
141138
}
142139

@@ -547,7 +544,12 @@
547544
.is-link-edit .link-item:hover .link-panel-front,
548545
.is-link-edit .link-item:focus .link-panel-front{
549546
height:calc(100%-var(--link-item-edit-height));
550-
box-shadow:var(--layout-shadow-small);
547+
}
548+
549+
.is-link-item-shadow-show.is-link-edit .link-panel-front,
550+
.is-link-item-shadow-show.is-link-edit .link-item:hover .link-panel-front,
551+
.is-link-item-shadow-show.is-link-edit .link-item:focus .link-panel-front{
552+
box-shadow:var(--layout-shadow-medium);
551553
}
552554

553555
.is-link-edit.is-link-item-url-show .link-item:focus .link-panel-front,

‎src/index.html‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,11 @@ <h1 class="menu-item-header-text">Bookmarks</h1>
903903
<labelfor="control-link-item-line-show">Tile line</label>
904904
</div>
905905
<hr>
906+
<divclass="input-wrap">
907+
<inputid="control-link-item-shadow-show" class="control-link-item-shadow-show" type="checkbox" tabindex="-1">
908+
<labelfor="control-link-item-shadow-show">Tile shadow</label>
909+
</div>
910+
<hr>
906911
<divclass="input-wrap">
907912
<inputid="control-link-item-hoverscale" class="control-link-item-hoverscale" type="checkbox" tabindex="-1">
908913
<labelfor="control-link-item-hoverscale">Grow on tile hover</label>

‎src/js/control.js‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,6 +1947,13 @@ var control = (function(){
19471947
func: function(){
19481948
render.class();
19491949
}
1950+
},{
1951+
element: helper.e(".control-link-item-shadow-show"),
1952+
path: "link.item.shadow.show",
1953+
type: "checkbox",
1954+
func: function(){
1955+
render.class();
1956+
}
19501957
},{
19511958
element: helper.e(".control-link-item-name-show"),
19521959
path: "link.item.name.show",
@@ -2531,6 +2538,7 @@ var control = (function(){
25312538
helper.removeClass(html,"is-link-display-alignment-bottomright");
25322539
helper.removeClass(html,"is-link-item-url-show");
25332540
helper.removeClass(html,"is-link-item-line-show");
2541+
helper.removeClass(html,"is-link-item-shadow-show");
25342542
helper.removeClass(html,"is-link-item-hoverscale");
25352543
helper.removeClass(html,"is-link-item-alignment-left");
25362544
helper.removeClass(html,"is-link-item-alignment-center");
@@ -2559,6 +2567,9 @@ var control = (function(){
25592567
if(state.get().link.item.line.show){
25602568
helper.addClass(html,"is-link-item-line-show");
25612569
};
2570+
if(state.get().link.item.shadow.show){
2571+
helper.addClass(html,"is-link-item-shadow-show");
2572+
};
25622573
if(state.get().link.item.hoverScale){
25632574
helper.addClass(html,"is-link-item-hoverscale");
25642575
};
@@ -2969,6 +2980,7 @@ var control = (function(){
29692980
_disable.element(".control-link-item-order-namedisplay-helper",true);
29702981
_disable.input(".control-link-item-url-show",true);
29712982
_disable.input(".control-link-item-line-show",true);
2983+
_disable.input(".control-link-item-shadow-show",true);
29722984
_disable.input(".control-link-item-hoverscale",true);
29732985
_disable.element(".control-link-item-display-alignment-grid",true);
29742986
_disable.element(".control-link-item-display-alignment-label",true);
@@ -3015,6 +3027,7 @@ var control = (function(){
30153027
_disable.input(".control-link-item-name-show",false);
30163028
_disable.input(".control-link-item-url-show",false);
30173029
_disable.input(".control-link-item-line-show",false);
3030+
_disable.input(".control-link-item-shadow-show",false);
30183031
_disable.input(".control-link-item-hoverscale",false);
30193032
_disable.input(".control-link-newtab",false);
30203033
_disable.input(".control-link-style-block",false);

‎src/js/state.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ var state = (function(){
159159
line: {
160160
show: true
161161
},
162+
shadow: {
163+
show: true
164+
},
162165
hoverScale: {
163166
show: true
164167
},

‎src/js/update.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,12 @@ var update = (function(){
612612
"3.81.0": function(data){
613613
data.state.link.orientation="bottom";
614614
returndata;
615+
},
616+
"3.82.0": function(data){
617+
data.state.link.item.shadow={
618+
show: true
619+
};
620+
returndata;
615621
}
616622
};
617623

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varversion=(function(){
22

3-
varcurrent="3.81.0";
3+
varcurrent="3.82.0";
44

55
varcompare=function(a,b){
66
varpa=a.split(".");

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "3.81.0",
5+
"version": "3.82.0",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)