Status icons in body text

This commit is contained in:
mDuo13
2019-02-14 19:14:21 -08:00
parent cefc36510b
commit d8e4cb7d22
5 changed files with 31 additions and 0 deletions

View File

@@ -1002,6 +1002,10 @@ a.current {
color: #0F72E5;
}
.status.enabled {
color: #5cb85c;
}
/* Responsive design for different viewscreens ------------------------------ */
@media (max-width: 991px) {

View File

@@ -32,6 +32,7 @@ default_filters:
- badges
- link_replacement
- external_links
- status_badges
callout_class: "devportal-callout"

View File

@@ -13,6 +13,7 @@ import re
def filter_soup(soup, **kwargs):
print("currentpage", kwargs["currentpage"])
"""
Adds an external link marker to external links
and makes them open in new tabs.

View File

@@ -0,0 +1,24 @@
################################################
## Amendment Flask Marker
## Author: Rome Reginelli
## Copyright: Ripple Labs, 2019
##
## Uses the
## - end with an "external link" icon
## (FontAwesome required)
################################################
import os.path
STATUSES = {
"(NOT_ENABLED_ICON)": "template-status_not_enabled.html",
"(ENABLED_ICON)": "template-status_enabled.html",
}
def filter_markdown(md, config={}, **kwargs):
for needle, src_file in STATUSES.items():
with open(os.path.join(config["template_path"], src_file)) as f:
replacement = f.read().strip()
md = md.replace(needle, replacement)
return md

View File

@@ -0,0 +1 @@
<span class="status enabled" title="This feature is enabled on the production XRP Ledger as the result of an amendment."><i class="fa fa-flag"></i></span>