mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-17 10:15:50 +00:00
Status icons in body text
This commit is contained in:
@@ -1002,6 +1002,10 @@ a.current {
|
||||
color: #0F72E5;
|
||||
}
|
||||
|
||||
.status.enabled {
|
||||
color: #5cb85c;
|
||||
}
|
||||
|
||||
/* Responsive design for different viewscreens ------------------------------ */
|
||||
|
||||
@media (max-width: 991px) {
|
||||
|
||||
@@ -32,6 +32,7 @@ default_filters:
|
||||
- badges
|
||||
- link_replacement
|
||||
- external_links
|
||||
- status_badges
|
||||
|
||||
callout_class: "devportal-callout"
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
24
tool/filter_status_badges.py
Normal file
24
tool/filter_status_badges.py
Normal 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
|
||||
1
tool/template-status_enabled.html
Normal file
1
tool/template-status_enabled.html
Normal 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>
|
||||
Reference in New Issue
Block a user