Created
March 4, 2021 16:20
-
-
Save ciceronianus/57214d3b5a0401d92f4f82b29947ae9e to your computer and use it in GitHub Desktop.
Roam-count-mentions (alpha)
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
/* Just a simple experiment :) */ | |
/* Counts mentions of a page */ | |
/* Syntax: Count:: {{[[mentions]]: [[Tweet]]}} */ | |
[data-page-links*='\"Count\"'] > .rm-block-main | |
> .roam-block > span > .rm-reference-main { | |
display:inline-block; | |
} | |
[data-page-links*='\"Count\"'] > .rm-block-main | |
> .roam-block > span > .rm-reference-main .rm-reference-container | |
> .flex-h-box { | |
display: inline-block; | |
} | |
/*removes the main block */ | |
[data-page-links*='\"Count\"'] > .rm-block-main | |
> .roam-block > span > .rm-reference-main > div | |
> .rm-reference-container > .rm-mentions { | |
display:none; | |
} | |
/* Removes unlinked references */ | |
[data-page-links*='\"Count\"'] > .rm-block-main | |
> .roam-block > span > .rm-reference-main > div | |
> div:nth-child(2) { | |
display:none; | |
} | |
[data-page-links*='\"Count\"'] > .rm-block-main | |
> .roam-block > span > .rm-reference-main .rm-reference-container | |
> .flex-h-box | |
> :is(span, div){ | |
display:none; | |
} | |
/* Linked references */ | |
[data-page-links*='\"Count\"'] > .rm-block-main | |
> .roam-block > span > .rm-reference-main .rm-reference-container | |
> .flex-h-box | |
> div:nth-child(3) { | |
display: inline-block; | |
position: relative; | |
background-color: #f5d9d9; | |
border: #c47f7f solid 1px; | |
color: black !important; | |
border-radius: 4px; | |
padding-left: 5px; | |
padding-right: 5px; | |
left: 15px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment