Friday, March 6, 2020

Request to help understand text in sidebar --> header

Hello,I run a bot on /r/cryptocurrency which pulls price data from an API every so often, and then puts that price data in an ordered list in the sidebar/subreddit settings, and also generates an image that gets uploaded to the css page. Recently the API I was using shutdown and the bot kind of erased more text from the subreddit settings than I know how to fix now (someone else did the CSS originally who isn't around to help fix it now).

Here is the text that is inserted into the sidebar:

1. **Bitcoin (BTC) - $166.51B - $9120.63** 2. **Ethereum (ETH) - $26.75B - $243.24** 3. **XRP (XRP) - $10.68B - $0.24** 4. **Bitcoin Cash (BCH) - $6.38B - $348.57** 5. **Tether (USDT) - $4.66B - $1.00** 6. **Bitcoin SV (BSV) - $4.47B - $244.17** 7. **Litecoin (LTC) - $4.04B - $62.83** 8. **EOS (EOS) - $3.52B - $3.82** 9. **Binance Coin (BNB) - $3.28B - $21.11** 10. **Tezos (XTZ) - $2.20B - $3.12** 

And here is what I think is at least the most relevant part of the CSS:

.side .md > ul + ol::before { content: "Top 10 market cap currencies"; position: absolute; bottom: 100%; margin-bottom: 5px; left: 50%; transform: translateX(-50%); font-size: 12px; line-height: 24px; letter-spacing: .05em; color: #333; font-weight: 500; pointer-events: none; text-transform: uppercase; white-space: nowrap; width: 290px; text-align: center; } .side .md > ul + ol li::before { content: ""; display: block; width: 24px; height: 24px; background: url(%%crypto-top10%%) no-repeat; background-size: 24px 240px; background-position: 0 0; opacity: 1; -webkit-transition: .3s ease; -moz-transition: .3s ease; -o-transition: .3s ease; transition: .3s ease; } 

So, I think it's looking for the text "Top 10 market cap currencies" in an element with a parent of ".side .md" and comes after an unordered list but before an ordered list item. I've tried some things like:

* Top 10 market cap currencies 1. **Bitcoin (BTC) - $166.51B - $9120.63** 2. **Ethereum (ETH) - $26.75B - $243.24** 3. **XRP (XRP) - $10.68B - $0.24** 4. **Bitcoin Cash (BCH) - $6.38B - $348.57** 5. **Tether (USDT) - $4.66B - $1.00** 6. **Bitcoin SV (BSV) - $4.47B - $244.17** 7. **Litecoin (LTC) - $4.04B - $62.83** 8. **EOS (EOS) - $3.52B - $3.82** 9. **Binance Coin (BNB) - $3.28B - $21.11** 10. **Tezos (XTZ) - $2.20B - $3.12** 

but I'm unable to get it displaying in the header like it's supposed to (it's just shown in the sidebar as text). I know the CSS hasn't changed, so it's just like the formatting isn't quite right in the sidebar/subreddit settings for what the CSS is "looking for".

Any help would be greatly appreciated!


No comments:

Post a Comment