-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tighten up spacing * make site query row clickable * add hover state to site sidebar
- Loading branch information
Showing
6 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(() => { | ||
console.log('site-template view.js'); | ||
document.querySelectorAll('.wpcloud-site-template tr, .wp-block-query .wp-block-wpcloud-site-card').forEach((row) => { | ||
row.addEventListener('click', (event) => { | ||
const targetLink = event.target.closest('a'); | ||
if (targetLink) { | ||
return true; | ||
} | ||
const link = row.querySelector('.site-title a'); | ||
if (link) { | ||
window.location = link.href; | ||
} | ||
}); | ||
}); | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
& { | ||
&.wpcloud-site-list--sidebar { | ||
max-width: 400px;; | ||
max-width: 400px; | ||
.wp-block-wpcloud-site-card + .wp-block-wpcloud-site-card { | ||
border-top: 1px solid var(--wp--preset--color--border-primary); | ||
} | ||
.wp-block-wpcloud-site-card { | ||
margin: 0; | ||
padding: 11px 16px; | ||
border-bottom: 1px solid var(--wp--preset--color--border-primary); | ||
|
||
&.is-current { | ||
background-color: var(--wp--preset--color--background-secondary); | ||
} | ||
&:hover { | ||
background-color: var(--wp--preset--color--background-secondary); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters