Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
(#32) Don't show up-down arrows for the default table state.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandru-dinu committed Aug 6, 2022
1 parent 201c570 commit c5291bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See also the [releases](https://github.com/alexandru-dinu/obsidian-sortable/releases) page.

## [0.2.6] - 2022-08-06
### Fixed
- Don't show up-down arrows for the default table state; only show up / down arrows for ascending / descending sorting.

## [0.2.5] - 2022-05-03
### Fixed
- Use `Intl.Collator` for natural sorting of strings.
Expand Down Expand Up @@ -35,6 +39,7 @@ See also the [releases](https://github.com/alexandru-dinu/obsidian-sortable/rele
### Added
- Sort tables in ascending & descending order.

[0.2.6]: https://github.com/alexandru-dinu/obsidian-sortable/compare/0.2.5...0.2.6
[0.2.5]: https://github.com/alexandru-dinu/obsidian-sortable/compare/0.2.4...0.2.5
[0.2.4]: https://github.com/alexandru-dinu/obsidian-sortable/compare/0.2.3...0.2.4
[0.2.3]: https://github.com/alexandru-dinu/obsidian-sortable/compare/0.2.2...0.2.3
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-sortable",
"name": "Sortable",
"version": "0.2.5",
"version": "0.2.6",
"minAppVersion": "0.12.0",
"description": "Wiki-like table sorting.",
"author": "Alexandru Dinu",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.28.5",
"eslint": "^7.32.0",
"obsidian": "^0.14.0",
"obsidian": "^0.15.0",
"rollup": "^2.32.1",
"tslib": "^2.2.0",
"typescript": "^4.2.4"
Expand Down
9 changes: 4 additions & 5 deletions styles.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
.theme-light {
--arrows-up: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='4' viewBox='0 0 21 4'%3E%3Cpath d='M6.5 4l4-4 4 4z'/%3E%3C/svg%3E");
--arrows-down: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='4' viewBox='0 0 21 4'%3E%3Cpath d='M14.5 0l-4 4-4-4z'/%3E%3C/svg%3E");
--arrows-up-down: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='9' viewBox='0 0 21 9'%3E%3Cpath d='M14.5 5l-4 4-4-4zm0-1l-4-4-4 4z'/%3E%3C/svg%3E");
}

.theme-dark {
--arrows-up: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='4' viewBox='0 0 21 4'%3E%3Cpath fill='grey' d='M6.5 4l4-4 4 4z'/%3E%3C/svg%3E");
--arrows-down: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='4' viewBox='0 0 21 4'%3E%3Cpath fill='grey' d='M14.5 0l-4 4-4-4z'/%3E%3C/svg%3E");
--arrows-up-down: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='9' viewBox='0 0 21 9'%3E%3Cpath fill='grey' d='M14.5 5l-4 4-4-4zm0-1l-4-4-4 4z'/%3E%3C/svg%3E");
}

.markdown-preview-view th,
.table-view-table > thead > tr > th,
.markdown-source-view.mod-cm6 .dataview.table-view-table thead.table-view-thead tr th {
background-image: var(--arrows-up-down);
background-image: none;
background-repeat: no-repeat;
background-position: center right;
background-position: right, left;
padding-right: 21px;
padding-left: 21px;
cursor: pointer;
}

Expand All @@ -26,4 +25,4 @@ th[sortable-style="sortable-asc"] {

th[sortable-style="sortable-desc"] {
background-image: var(--arrows-down) !important;
}
}

0 comments on commit c5291bc

Please sign in to comment.