Skip to content

Commit

Permalink
build: Add Stylelint
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRatcliffe committed Sep 17, 2024
1 parent 39655d6 commit b707fcb
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 92 deletions.
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.min.css
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["stylelint-config-standard"]
}
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
"electron-builder": "25.0.5",
"husky": "^9.1.5",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3"
"prettier": "^3.3.3",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1"
},
"scripts": {
"start": "electron ./ --dev",
Expand All @@ -52,9 +54,15 @@
"postinstall": "electron-builder install-app-deps",
"pack-win": "cd out/win-unpacked && cp ../windows-install.bat ./ && 7za a sidenoder-$npm_package_version-win.zip ./* && mv sidenoder-$npm_package_version-win.zip ../",
"pack-mac": "cd out/mac && tar -czf sidenoder-$npm_package_version-mac.tar.gz ./* && mv sidenoder-$npm_package_version-mac.tar.gz ../",
"prepare": "husky"
"prepare": "husky",
"stylelint:check": "stylelint \"**/*.css\"",
"stylelint:fix": "stylelint --fix \"**/*.css\""
},
"lint-staged": {
"**/*.css": [
"stylelint --fix",
"stylelint"
],
"*.{js,html,twig}": [
"eslint --fix",
"eslint"
Expand Down
10 changes: 5 additions & 5 deletions views/browse_include.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
</a>
<a
class="btn btn-md btn-primary"
id="shellOpenDirPath"
id="shell-open-dir-path"
title="Open by filebrowser"
>
<i class="fa fa-folder-open"></i>
</a>
<a class="btn btn-md btn-primary" id="editDirPath" title="Edit path">
<a class="btn btn-md btn-primary" id="edit-dir-path" title="Edit path">
<i class="fa fa-edit"></i>
</a>
<span id="path"></span>
Expand Down Expand Up @@ -104,7 +104,7 @@
class="row row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5"
></div>
<table class="table table-striped-rookie table-hover">
<tbody id="listTable"></tbody>
<tbody id="list-table"></tbody>
</table>
</div>
</div>
Expand All @@ -124,10 +124,10 @@
id('addBookmark').onclick = () => {
addBookmark(id('bookmarkName').value, id('path').title);
};
id('shellOpenDirPath').onclick = () => {
id('shell-open-dir-path').onclick = () => {
shell.openPath(id('path').title);
};
id('editDirPath').onclick = () => {
id('edit-dir-path').onclick = () => {
promptDialog(
'Change directory location',
'',
Expand Down
38 changes: 17 additions & 21 deletions views/css/component.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
}

.cbp-fwslider ul li {
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
transform: translateZ(0);
float: left;
display: block;
Expand All @@ -36,6 +34,16 @@
max-width: 75%;
}

.cbp-fwdots span {
display: inline-block;
width: 18px;
height: 18px;
background: #ddd;
margin: 4px;
border-radius: 50%;
cursor: pointer;
}

.cbp-fwslider nav span {
position: absolute;
top: 50%;
Expand All @@ -51,44 +59,32 @@
font-weight: normal;
}

.cbp-fwdots span:hover {
background: #999;
}

.cbp-fwslider nav span:hover {
background: #378fc3;
}

.cbp-fwslider nav span.cbp-fwnext {
right: 0px;
right: 0;
}

.cbp-fwslider nav span.cbp-fwprev {
left: 0px;
left: 0;
}

.cbp-fwdots {
position: absolute;
bottom: 0px;
bottom: 0;
white-space: nowrap;
text-align: center;
width: 100%;
}

.cbp-fwdots span {
display: inline-block;
width: 18px;
height: 18px;
background: #ddd;
margin: 4px;
border-radius: 50%;
cursor: pointer;
}

.cbp-fwdots span:hover {
background: #999;
}

.cbp-fwdots span.cbp-fwcurrent {
background: #47a3da;
box-shadow: 0 0 0 2px #47a3da;
-webkit-transition: box-shadow 0.2s ease-in-out;
-moz-transition: box-shadow 0.2s ease-in-out;
transition: box-shadow 0.2s ease-in-out;
}
Loading

0 comments on commit b707fcb

Please sign in to comment.