Label browsing: proof of concept

This commit is contained in:
mDuo13
2021-06-02 18:17:16 -07:00
parent ec5b68d876
commit d48c3d57a1
19 changed files with 137 additions and 0 deletions

View File

@@ -2,6 +2,9 @@
html: cryptographic-keys.html html: cryptographic-keys.html
parent: accounts.html parent: accounts.html
blurb: Use cryptographic keys to approve transactions so the XRP Ledger can execute them. blurb: Use cryptographic keys to approve transactions so the XRP Ledger can execute them.
labels:
- Smart Contracts
- Security
--- ---
# Cryptographic Keys # Cryptographic Keys

View File

@@ -2,6 +2,9 @@
html: multi-signing.html html: multi-signing.html
parent: accounts.html parent: accounts.html
blurb: Use multi-signing for greater security sending transactions. blurb: Use multi-signing for greater security sending transactions.
labels:
- Smart Contracts
- Security
--- ---
# Multi-Signing # Multi-Signing

View File

@@ -2,6 +2,9 @@
html: escrow.html html: escrow.html
parent: payment-types.html parent: payment-types.html
blurb: Escrows set aside XRP and deliver it later when certain conditions are met. Escrows can depend on time limits, cryptographic conditions, or both. blurb: Escrows set aside XRP and deliver it later when certain conditions are met. Escrows can depend on time limits, cryptographic conditions, or both.
labels:
- Escrow
- Smart Contracts
--- ---
# Escrow # Escrow

View File

@@ -2,6 +2,8 @@
html: escrow-object.html #escrow.html is taken by the concept page html: escrow-object.html #escrow.html is taken by the concept page
parent: ledger-object-types.html parent: ledger-object-types.html
blurb: Contains XRP held for a conditional payment. blurb: Contains XRP held for a conditional payment.
labels:
- Escrow
--- ---
# Escrow # Escrow
[[Source]](https://github.com/ripple/rippled/blob/c6b6d82a754fe449cc533e18659df483c10a5c98/src/ripple/protocol/impl/LedgerFormats.cpp#L90-L101 "Source") [[Source]](https://github.com/ripple/rippled/blob/c6b6d82a754fe449cc533e18659df483c10a5c98/src/ripple/protocol/impl/LedgerFormats.cpp#L90-L101 "Source")

View File

@@ -2,6 +2,8 @@
html: escrowcancel.html html: escrowcancel.html
parent: transaction-types.html parent: transaction-types.html
blurb: Reclaim escrowed XRP. blurb: Reclaim escrowed XRP.
labels:
- Escrow
--- ---
# EscrowCancel # EscrowCancel

View File

@@ -2,6 +2,8 @@
html: escrowcreate.html html: escrowcreate.html
parent: transaction-types.html parent: transaction-types.html
blurb: Create an escrowed XRP payment. blurb: Create an escrowed XRP payment.
labels:
- Escrow
--- ---
# EscrowCreate # EscrowCreate

View File

@@ -2,6 +2,8 @@
html: escrowfinish.html html: escrowfinish.html
parent: transaction-types.html parent: transaction-types.html
blurb: Deliver escrowed XRP to recipient. blurb: Deliver escrowed XRP to recipient.
labels:
- Escrow
--- ---
# EscrowFinish # EscrowFinish

View File

@@ -2,6 +2,8 @@
html: set-up-secure-signing.html html: set-up-secure-signing.html
parent: production-readiness.html parent: production-readiness.html
blurb: Set up an environment where you can submit transactions securely. blurb: Set up an environment where you can submit transactions securely.
labels:
- Security
--- ---
# Set Up Secure Signing # Set Up Secure Signing

View File

@@ -2,6 +2,9 @@
html: cancel-an-expired-escrow.html html: cancel-an-expired-escrow.html
parent: use-escrows.html parent: use-escrows.html
blurb: Cancel an expired escrow. blurb: Cancel an expired escrow.
labels:
- Escrow
- Smart Contracts
--- ---
# Cancel an Expired Escrow # Cancel an Expired Escrow

View File

@@ -2,6 +2,9 @@
html: look-up-escrows.html html: look-up-escrows.html
parent: use-escrows.html parent: use-escrows.html
blurb: Look up pending escrows by sender or destination address. blurb: Look up pending escrows by sender or destination address.
labels:
- Escrow
- Smart Contracts
--- ---
# Look up escrows # Look up escrows

View File

@@ -2,6 +2,9 @@
html: send-a-conditionally-held-escrow.html html: send-a-conditionally-held-escrow.html
parent: use-escrows.html parent: use-escrows.html
blurb: Create an escrow whose release is based on a condition being fulfilled. blurb: Create an escrow whose release is based on a condition being fulfilled.
labels:
- Escrow
- Smart Contracts
--- ---
# Send a Conditionally-Held Escrow # Send a Conditionally-Held Escrow

View File

@@ -2,6 +2,9 @@
html: send-a-time-held-escrow.html html: send-a-time-held-escrow.html
parent: use-escrows.html parent: use-escrows.html
blurb: Create an escrow whose only condition for release is that a specific time has passed. blurb: Create an escrow whose only condition for release is that a specific time has passed.
labels:
- Escrow
- Smart Contracts
--- ---
# Send a Time-Held Escrow # Send a Time-Held Escrow

View File

@@ -2,6 +2,9 @@
html: use-an-escrow-as-a-smart-contract.html html: use-an-escrow-as-a-smart-contract.html
parent: use-escrows.html parent: use-escrows.html
blurb: Use a cryptographic escrow as a smart contract to ensure a recipient gets paid only if they successfully perform a service. blurb: Use a cryptographic escrow as a smart contract to ensure a recipient gets paid only if they successfully perform a service.
labels:
- Escrow
- Smart Contracts
--- ---
# Use an Escrow as a Smart Contract # Use an Escrow as a Smart Contract

View File

@@ -2,6 +2,9 @@
html: use-payment-channels.html html: use-payment-channels.html
parent: use-specialized-payment-types.html parent: use-specialized-payment-types.html
blurb: Payment Channels are an advanced feature for sending "asynchronous" XRP payments that can be divided into very small increments and settled later. This tutorial walks through the entire process of using a payment channel, with examples using the JSON-RPC API of a local rippled server. blurb: Payment Channels are an advanced feature for sending "asynchronous" XRP payments that can be divided into very small increments and settled later. This tutorial walks through the entire process of using a payment channel, with examples using the JSON-RPC API of a local rippled server.
labels:
- Payment Channels
- Smart Contracts
--- ---
# Use Payment Channels # Use Payment Channels

View File

@@ -3132,6 +3132,46 @@ pages:
targets: targets:
- ja - ja
# Landing pages for labels
- name: Escrow
html: label-escrow.html
parent: by-label.html
landing_for: Escrow
template: template-landing-label.html
blurb: All pages relating to the Escrow feature.
targets:
- en
- ja
- name: Smart Contracts
html: label-smart-contracts.html
parent: by-label.html
landing_for: Smart Contracts
template: template-landing-label.html
blurb: Build smart contracts using these advanced on-ledger features.
targets:
- en
- ja
- name: Security
html: label-security.html
parent: by-label.html
landing_for: Security
template: template-landing-label.html
blurb: Protect your digital assets with powerful security.
targets:
- en
- ja
- name: Topics By Label
html: by-label.html
parent: docs.html
template: template-all-labels.html
blurb: Browse by topic.
targets:
- en
- ja
# --------------- end "Docs" section ------------------------------------------- # --------------- end "Docs" section -------------------------------------------

View File

@@ -0,0 +1,15 @@
{% extends "template-base.html" %}
{% block main %}
<section class="content">
<h1 id="main-page-header">{{ currentpage.name }}</h1>
<ul class="tag-cloud">
{% for page in pages %}
{% if page.landing_for is defined %}
<li><a href="{% if "//" not in page.html %}{{target.prefix}}{% endif %}{{page.html}}" class="badge badge-primary">{{page.name}}</a></li>
{% endif %}
{% endfor %}
</ul>
</section>
{% endblock %}

View File

@@ -31,6 +31,7 @@
{% block right_sidebar %} {% block right_sidebar %}
<div id="page-toc-wrapper"> <div id="page-toc-wrapper">
{% include 'template-label-list.html' %}
<div class="toc-header"> <div class="toc-header">
<h4>{% trans %}In this document{% endtrans %}</h4> <h4>{% trans %}In this document{% endtrans %}</h4>
</div> </div>

View File

@@ -0,0 +1,20 @@
{% if use_page is undefined %}{% set use_page = currentpage %}{% endif %}
{% if use_page.labels %}
<div class="labels-wrap">
<ul class="list-inline">
{% for label in use_page.labels %}
{% set label_landing = pages|selectattr("landing_for", "defined_and_equalto", label)|first %}
{% if label_landing %}
<li class="list-inline-item">
<a href="{% if "//" not in label_landing.html %}{{target.prefix}}{% endif %}{{label_landing.html}}" class="badge badge-primary">{{label}}</a>
</li>
{% else %}
<li class="list-inline-item">
<span class="badge badge-secondary">{{label}}</span>
<!-- TEMPLATE WARNING: no label landing found for "{{label}}" -->
</li>
{% endif %}
{% endfor %}
</ul>
</div><!--/.labels-wrap-->
{% endif %}

View File

@@ -0,0 +1,24 @@
{% extends "template-base.html" %}
{% block main %}
<section class="content">
{% if content %}
{{ content}}
{% else %}
<h1 id="main-page-header">Label: {{ currentpage.name }}</h1>
{% if currentpage.blurb %}<p class="blurb">{{currentpage.blurb}}</p>{% endif %}
{% endif %}
<div class="curated-links">
<ul>
{% for page in pages %}
{% if page.labels is defined and currentpage.landing_for in page.labels %}
<li class="level1"><a href="{% if "//" not in page.html %}{{currentpage.prefix}}{% endif %}{{page.html}}">{{page.name}}</a>
<p class="blurb child-blurb">{{page.blurb}}</p>
</li>
{% endif %}
{% endfor %}
<ul>
</div>
</section>
{% endblock %}