mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 12:15:50 +00:00
merged and fixed branch conflicts
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,35 +1,29 @@
|
||||
# Contribute Code to the XRP Ledger
|
||||
|
||||
The software that powers the XRP Ledger is open-source, so anyone can download, modify, extend, or explore it. Some repositories you may want to consider include the following:
|
||||
The software that powers the XRP Ledger is open-source, so anyone can download, modify, extend, or explore it. Community involvement makes it better. Look for "[Source]" links in the [documentation](docs.html) to jump directly into the related source code, or browse the source code on GitHub:
|
||||
|
||||
| Repository | Language | Description |
|
||||
|:--------------------------------|:---------------|:--------------------------|
|
||||
| [rippled][] | C++ | The core XRP Ledger server. |
|
||||
| [ripple-lib][] | TypeScript | JavaScript client library. |
|
||||
| [ripple-address-codec][] | TypeScript | XRP Ledger address encoding/decoding library. |
|
||||
| [ripple-binary-codec][] | TypeScript | XRP Ledger binary data encoding/decoding library. |
|
||||
| [ripple-keypairs][] | TypeScript | XRP Ledger elliptic curve cryptography library. |
|
||||
| [rippled-historical-database][] | JavaScript | Data API server and XRPCharts backend. |
|
||||
| [standards-drafts][] | N/A | Standards and specifications for XRP Ledger software. |
|
||||
| [Xpring4j][] | Java | Java SDK for XRP Ledger, Interledger, and PayID. |
|
||||
| [XpringKit][] | Swift | Swift SDK for XRP Ledger, Interledger, and PayID. |
|
||||
| [Xpring-JS][] | TypeScript | JavaScript SDK for XRP Ledger, Interledger, and PayID.
|
||||
| [XRP-API][] | TypeScript | REST API to the XRP Ledger. |
|
||||
| [xrpl-dev-portal][] | HTML, Markdown | This website. |
|
||||
| [XUMM-App][] | TypeScript | Client application and developer platform for XRP Ledger. (Not freely licensed for all purposes.) |
|
||||
| XRP Ledger Source Code | |
|
||||
|:-----------------------|:----------------------------------------------------|
|
||||
| Repository | <https://github.com/ripple/rippled/> |
|
||||
| License | [Multiple; ISC (permissive)](https://github.com/ripple/rippled/blob/develop/LICENSE) |
|
||||
| Programming Language | C++ |
|
||||
|
||||
[rippled]: https://github.com/ripple/rippled
|
||||
[ripple-lib]: https://github.com/ripple/ripple-lib
|
||||
[ripple-address-codec]: https://github.com/ripple/ripple-address-codec
|
||||
[ripple-binary-codec]: https://github.com/ripple/ripple-binary-codec
|
||||
[ripple-keypairs]: https://github.com/ripple/ripple-keypairs
|
||||
[rippled-historical-database]: https://github.com/ripple/rippled-historical-database
|
||||
[standards-drafts]: https://github.com/xrp-community/standards-drafts
|
||||
[Xpring4j]: https://github.com/xpring-eng/xpring4j
|
||||
[XpringKit]: https://github.com/xpring-eng/xpringkit
|
||||
[Xpring-JS]: https://github.com/xpring-eng/xpring-js
|
||||
[XRP-API]: https://github.com/xpring-eng/xrp-api
|
||||
[xrpl-dev-portal]: https://github.com/ripple/xrpl-dev-portal
|
||||
[XUMM-App]: https://github.com/XRPL-Labs/XUMM-App
|
||||
If you're not sure where to start, Dev Null Productions provides a detailed and thorough [**Source Code Guide**](https://xrpintel.com/source) that describes the structure and functions of the `rippled` XRP Ledger server implementation.
|
||||
|
||||
## Standards Drafts
|
||||
|
||||
When developing amendments to the XRP Ledger protocol or interoperability between XRP Ledger applications, it's best to discuss the proposed changes with the community.
|
||||
|
||||
The [**Community Standards Drafts**](https://github.com/xrp-community/standards-drafts/) project is a great place to share your plans and collect suggestions on a proposed standard. This feedback can help to balance trade-offs, design for greater efficiency, and address potential security implications before you share your actual source code with others.
|
||||
|
||||
|
||||
## Related Repositories
|
||||
|
||||
You can find various XRP Ledger-related projects under these and other GitHub organizations:
|
||||
|
||||
- [Ripple](https://github.com/ripple/)
|
||||
- [Xpring](https://github.com/xpring-eng/)
|
||||
- [XRP Community](https://github.com/xrp-community/)
|
||||
- [XRPL Labs](https://github.com/XRPL-Labs/)
|
||||
|
||||
Be sure to look at each repository's license and contributing guidelines before contributing to that repository.
|
||||
|
||||
@@ -170,10 +170,21 @@ pages:
|
||||
category: Uses
|
||||
template: template-learn-overview.html
|
||||
html: overview.html
|
||||
name_in_top_nav: Overview
|
||||
top_nav_level: 1
|
||||
top_nav_name: Overview
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
|
||||
- name: 学ぶ
|
||||
funnel: Learn
|
||||
category: Uses
|
||||
template: template-learn-overview.html
|
||||
html: overview.html
|
||||
top_nav_level: 1
|
||||
top_nav_name: オーバービュー
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- ja
|
||||
|
||||
- name: Uses
|
||||
@@ -181,6 +192,7 @@ pages:
|
||||
category: Uses
|
||||
template: template-learn-uses.html
|
||||
html: uses.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -191,6 +203,7 @@ pages:
|
||||
category: History
|
||||
template: template-learn-history.html
|
||||
html: history.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -201,6 +214,7 @@ pages:
|
||||
category: Impact
|
||||
template: template-learn-impact.html
|
||||
html: impact.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -211,6 +225,7 @@ pages:
|
||||
category: Carbon Calculator
|
||||
template: template-calculator.html
|
||||
html: carbon-calculator.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -224,24 +239,21 @@ pages:
|
||||
funnel: Explore
|
||||
targets:
|
||||
- en
|
||||
- ja
|
||||
|
||||
# News page isn't ready at the moment
|
||||
# - name: News
|
||||
# funnel: Explore
|
||||
# category: News
|
||||
# template: template-explore-news.html
|
||||
# html: news.html
|
||||
# sidebar: disabled
|
||||
# targets:
|
||||
# - en
|
||||
# - ja
|
||||
- name: 探る
|
||||
html: explore.html
|
||||
template: template-redirect.html
|
||||
redirect_url: businesses.html
|
||||
funnel: Explore
|
||||
targets:
|
||||
- ja
|
||||
|
||||
- name: Wallets
|
||||
funnel: Explore
|
||||
category: Wallets
|
||||
template: template-explore-wallets.html
|
||||
html: wallets.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -252,6 +264,7 @@ pages:
|
||||
category: Exchanges
|
||||
template: template-explore-exchanges.html
|
||||
html: exchanges.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -262,6 +275,7 @@ pages:
|
||||
category: Businesses
|
||||
template: template-explore-businesses.html
|
||||
html: businesses.html
|
||||
top_nav_level: 1
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- en
|
||||
@@ -273,13 +287,17 @@ pages:
|
||||
template: template-landing-docs.html
|
||||
html: docs.html
|
||||
sidebar: disabled
|
||||
top_nav_level: 1
|
||||
top_nav_name: Docs
|
||||
targets:
|
||||
- en
|
||||
|
||||
- name: ドキュメント
|
||||
- name: 作る
|
||||
funnel: Build
|
||||
template: template-landing-docs.html
|
||||
html: docs.html
|
||||
top_nav_level: 1
|
||||
top_nav_name: ドキュメント
|
||||
sidebar: disabled
|
||||
targets:
|
||||
- ja
|
||||
@@ -290,6 +308,7 @@ pages:
|
||||
funnel: Build
|
||||
doc_type: Concepts
|
||||
html: concepts.html
|
||||
top_nav_level: 2
|
||||
template: template-landing-children.html
|
||||
blurb: Learn the "what" and "why" behind fundamental aspects of the XRP Ledger.
|
||||
targets:
|
||||
@@ -299,6 +318,7 @@ pages:
|
||||
funnel: Build
|
||||
doc_type: Concepts
|
||||
html: concepts.html
|
||||
top_nav_level: 2
|
||||
template: template-landing-children.html
|
||||
blurb: XRP Ledgerの基本的な部分の背景に「何があるか」、「なぜなのか」を学びましょう。
|
||||
targets:
|
||||
@@ -1434,6 +1454,7 @@ pages:
|
||||
html: tutorials.html
|
||||
funnel: Build
|
||||
doc_type: Tutorials
|
||||
top_nav_level: 2
|
||||
template: template-landing-children.html
|
||||
blurb: Get step-by-step guidance to perform common tasks with the XRP Ledger.
|
||||
targets:
|
||||
@@ -1443,6 +1464,7 @@ pages:
|
||||
html: tutorials.html
|
||||
funnel: Build
|
||||
doc_type: Tutorials
|
||||
top_nav_level: 2
|
||||
template: template-landing-children.html
|
||||
blurb: XRP Ledgerで一般的なタスクを実行するためのステップバイステップのガイダンスを紹介します。
|
||||
targets:
|
||||
@@ -3025,6 +3047,7 @@ pages:
|
||||
doc_type: References
|
||||
template: template-landing-references.html
|
||||
html: references.html
|
||||
top_nav_level: 2
|
||||
sidebar: disabled
|
||||
blurb: Complete references for different interfaces to the XRP Ledger.
|
||||
targets:
|
||||
@@ -3036,6 +3059,7 @@ pages:
|
||||
doc_type: References
|
||||
template: template-landing-references.html
|
||||
html: references.html
|
||||
top_nav_level: 2
|
||||
sidebar: disabled
|
||||
blurb: XRP Ledgerへのさまざまなインターフェイスの包括的なリファレンスです。
|
||||
targets:
|
||||
@@ -6300,6 +6324,7 @@ pages:
|
||||
html: dev-tools.html
|
||||
funnel: Build
|
||||
doc_type: Dev Tools
|
||||
top_nav_level: 1
|
||||
targets:
|
||||
- en
|
||||
|
||||
@@ -6307,6 +6332,7 @@ pages:
|
||||
html: dev-tools.html
|
||||
funnel: Build
|
||||
doc_type: Dev Tools
|
||||
top_nav_level: 1
|
||||
targets:
|
||||
- ja
|
||||
|
||||
@@ -6314,8 +6340,6 @@ pages:
|
||||
html: dev-tools-dev-tools.html
|
||||
template: template-redirect.html
|
||||
redirect_url: dev-tools.html
|
||||
funnel: Build
|
||||
doc_type: Dev Tools
|
||||
targets:
|
||||
- en
|
||||
- ja
|
||||
@@ -6463,6 +6487,7 @@ known_broken_links:
|
||||
- https://bitcoinexchangeguide.com/cryptographic-puzzle-creator-xrpuzzler-offers-137-xrp-reward-to-anyone-who-can-solve-it/
|
||||
- https://www.coinbase.com/
|
||||
- https://www.forte.io/
|
||||
- https://www.kraken.com/
|
||||
|
||||
# Style Checker Config ------------------------------------------------------ #
|
||||
|
||||
|
||||
@@ -57,8 +57,8 @@ p + .readmore {
|
||||
.jump-to-top {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 15px;
|
||||
right: 30px;
|
||||
bottom: 36px;
|
||||
right: 36px;
|
||||
font-weight: 700;
|
||||
z-index: 1000;
|
||||
color: white;
|
||||
@@ -66,9 +66,4 @@ p + .readmore {
|
||||
&::after {
|
||||
content: " ↑"
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
bottom: 40px;
|
||||
right: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Top navigation ----------------------------------------------------------- */
|
||||
.top-nav {
|
||||
margin-top: 20px;
|
||||
margin: 20px 4px 0 4px;
|
||||
|
||||
// Logo
|
||||
.navbar-brand {
|
||||
@@ -97,6 +97,10 @@
|
||||
line-height: 262%;
|
||||
padding: 0 .875rem;
|
||||
|
||||
&.top-level-2 {
|
||||
padding-left: 2rem
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $primary;
|
||||
}
|
||||
|
||||
@@ -174,11 +174,11 @@
|
||||
</div>
|
||||
</section>
|
||||
<section class="min-vh100 mb-40 section2 clearfix">
|
||||
<h4>{% trans %}C02 Emissions from Airline Flights{% endtrans %}</h4>
|
||||
<h4>{% trans %}CO<sub>2</sub> Emissions from Airline Flights{% endtrans %}</h4>
|
||||
|
||||
<p class="grey-400 text-small my-4">{% trans %}Comparing <span class="slider-amt"></span> Million Transactions in 2019{% endtrans %}</p>
|
||||
|
||||
<p class="calculator-section-description">{% trans %}A 12-hour flight from London to Hong Kong releases 3 tons of Carbon dioxide (C02). Discover how much C02 different forms of currency release in comparison to emissions from airline flights.{% endtrans %}</p>
|
||||
<p class="calculator-section-description">{% trans %}A 12-hour flight from London to Hong Kong releases 3 tons of carbon dioxide (CO<sub>2</sub>). Discover how much CO<sub>2</sub> different forms of currency release in comparison to emissions from airline flights.{% endtrans %}</p>
|
||||
|
||||
<div class="mt-10" id="co2Animation"></div>
|
||||
|
||||
@@ -186,32 +186,32 @@
|
||||
<li class="d-output d-crypto active" data-comp="tons" data-type="btc">
|
||||
<p class="h6 mt-3 mb-1">Bitcoin</p>
|
||||
<h5 class="h4 normal mb-0" id="tons-btc"></h5>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO2{% endtrans %}</p>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO<sub>2</sub>{% endtrans %}</p>
|
||||
</li>
|
||||
<li class="d-output d-crypto active" data-comp="tons" data-type="eth">
|
||||
<p class="h6 mt-3 mb-1">Ethereum</p>
|
||||
<h5 class="h4 normal mb-0" id="tons-eth"></h5>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO2{% endtrans %}</p>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO<sub>2</sub>{% endtrans %}</p>
|
||||
</li>
|
||||
<li class="d-output d-cash" data-comp="tons" data-type="pap">
|
||||
<p class="h6 mt-3 mb-1">Cash</p>
|
||||
<h5 class="h4 normal mb-0" id="tons-pap"></h5>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO2{% endtrans %}</p>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO<sub>2</sub>{% endtrans %}</p>
|
||||
</li>
|
||||
<li class="d-output d-crypto d-credit d-cash active" data-comp="tons" data-type="xrp">
|
||||
<p class="h6 mt-3 mb-1">XRP</p>
|
||||
<h5 class="h4 normal mb-0" id="tons-xrp"></h5>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO2{% endtrans %}</p>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO<sub>2</sub>{% endtrans %}</p>
|
||||
</li>
|
||||
<li class="d-output d-credit" data-comp="tons" data-type="vsa">
|
||||
<p class="h6 mt-3 mb-1">Visa</p>
|
||||
<h5 class="h4 normal mb-0" id="tons-vsa"></h5>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO2{% endtrans %}</p>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO<sub>2</sub>{% endtrans %}</p>
|
||||
</li>
|
||||
<li class="d-output d-credit" data-comp="tons" data-type="mst">
|
||||
<p class="h6 mt-3 mb-1">Mastercard</p>
|
||||
<h5 class="h4 normal mb-0" id="tons-mst"></h5>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO2{% endtrans %}</p>
|
||||
<p class="text-small black-90">{% trans %}metric tons of CO<sub>2</sub>{% endtrans %}</p>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -267,7 +267,7 @@
|
||||
<section class="row last-section">
|
||||
<div class="col-sm-7 col-sm-offset-5">
|
||||
<h4>{% trans %}Breaking Down Individual Transactions{% endtrans %}</h4>
|
||||
<p>{% trans %}Looking at individual transactions below, compare how a single transaction across each form of currency equates to KWh, gallons of gas and C02 emissions.{% endtrans %}</p>
|
||||
<p>{% trans %}Looking at individual transactions below, compare how a single transaction across each form of currency equates to KWh, gallons of gas and CO<sub>2</sub> emissions.{% endtrans %}</p>
|
||||
</div>
|
||||
<div class="col-sm-12 mt-14 overflow-x-xs">
|
||||
<table id="calculator-table">
|
||||
@@ -311,14 +311,14 @@
|
||||
<td class="fs-6 text-right">0.00005<span class="ratio"> gal/tx</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fs-5-5 bold"><div class="w48 mr-3 text-center d-inline-block"><img class="w40" src="assets/img/icons/paper-money@2x.png"></div>Paper</td>
|
||||
<td class="fs-5-5 bold"><div class="w48 mr-3 text-center d-inline-block"><img class="w40" src="assets/img/icons/paper-money@2x.png"></div>{% trans %}Paper Currency{% endtrans %}</td>
|
||||
<td class="fs-6 text-right">0.044<span class="dblue">0</span><span class="ratio"> KWh/tx</span></td>
|
||||
<td class="fs-6 text-right">2.32<sup>-11</sup><span class="ratio"> Mt/tx</span></td>
|
||||
<td class="fs-6 text-right">0.0035<span class="dblue">0</span><span class="ratio"> gal/tx</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="text-smallest mt-10">*Calculations in million tonne (Mt)</p>
|
||||
<p class="text-smallest mt-10">{% trans %}*Calculations in million tonne (Mt){% endtrans %}</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
{% block main %}
|
||||
<section class="container-fluid card-grid card-grid-2x2">
|
||||
<div class="section-hero card">
|
||||
<h1 class="main-page-header">XRP Ledger Documentation</h1>
|
||||
<p class="blurb">Dive into our documentation and start integrating with the XRP Ledger.</p>
|
||||
<p class="blurb">Browse by category, or skip straight to the <a href="#full-doc-index">full documentation index</a>.</p>
|
||||
<h1 class="main-page-header">{% trans %}XRP Ledger Documentation{% endtrans %}</h1>
|
||||
<p class="blurb">{% trans %}Dive into our documentation and start integrating with the XRP Ledger.{% endtrans %}</p>
|
||||
<p class="blurb">{% trans %}Browse by category, or skip straight to the <a href="#full-doc-index">full documentation index</a>.{% endtrans %}</p>
|
||||
</div>
|
||||
|
||||
{% set doc_types = [] %}
|
||||
@@ -15,10 +15,10 @@
|
||||
{% for page in pages %}
|
||||
{% if page.doc_type is defined and page.doc_type not in doc_types %}
|
||||
{% set doc_type_top = pages|selectattr('doc_type', 'defined_and_equalto', page.doc_type)|first %}
|
||||
|
||||
{% set doc_type_name = doc_type_top.name %}
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><a href="{{doc_type_top.html}}">{{doc_type_top.name}}</a></h3>
|
||||
<h3 class="card-title"><a href="{{doc_type_top.html}}">{{doc_type_name}}</a></h3>
|
||||
</div><!--/.card-header-->
|
||||
<div class="card-body">
|
||||
{% if page.blurb is defined %}
|
||||
@@ -30,7 +30,7 @@
|
||||
</div><!--/.card-body-->
|
||||
<div class="card-footer">
|
||||
<div class="readmore">
|
||||
<a class="btn btn-outline-secondary" href="{{doc_type_top.html}}">View All {{doc_type_top.name}}</a>
|
||||
<a class="btn btn-outline-secondary" href="{{doc_type_top.html}}">{% trans %}View All {{doc_type_name}}{% endtrans %}</a>
|
||||
</div>
|
||||
</div><!--/.card-footer-->
|
||||
</div><!--/.card-->
|
||||
@@ -42,7 +42,7 @@
|
||||
</section>
|
||||
|
||||
<section class="container-fluid doc-index">
|
||||
<h2 id="full-doc-index">Full Documentation Index</h2>
|
||||
<h2 id="full-doc-index">{% trans %}Full Documentation Index{% endtrans %}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{% set parent_page = currentpage %}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
{% block main %}
|
||||
<section class="container-fluid section-hero">
|
||||
<h1 class="main-page-header">References</h1>
|
||||
<h1 class="main-page-header">{{currentpage.name}}</h1>
|
||||
<p class="blurb">{{currentpage.blurb}}</p>
|
||||
<p class="blurb">Or, skip ahead to the <a href="#full-reference-index">Full Reference Index</a>.</p>
|
||||
<p class="blurb">{% trans %}Or, skip ahead to the <a href="#full-reference-index">Full Reference Index</a>.{% endtrans %}</p>
|
||||
</section>
|
||||
|
||||
{% set flag_n = cycler(* range(1,99)) %}
|
||||
@@ -59,7 +59,7 @@
|
||||
</section>
|
||||
|
||||
<section class="container-fluid doc-index">
|
||||
<h2 id="full-reference-index">Full Reference Index</h2>
|
||||
<h2 id="full-reference-index">{% trans %}Full Reference Index{% endtrans %}</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{% set parent_page = currentpage %}
|
||||
|
||||
@@ -1,37 +1,35 @@
|
||||
<div class="container">
|
||||
<div class="container-fluid">
|
||||
<nav class="top-nav navbar navbar-expand-lg navbar-dark row">
|
||||
<a href="{% if target.prefix %}{{target.prefix}}{% else %}/{% endif %}" class="navbar-brand"><img src="{{currentpage.prefix}}assets/img/XRPLedger_DevPortal-white.svg" class="logo" height="44" alt="{{target.display_name}}" /></a>
|
||||
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarHolder" aria-controls="navbarHolder" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse justify-content-center" id="navbarHolder">
|
||||
<div class="collapse navbar-collapse justify-content-end" id="navbarHolder">
|
||||
<ul class="nav navbar-nav">
|
||||
{% macro dropdown(links) %}
|
||||
{% macro dropdown(funnel, appendpages=[]) %}
|
||||
<li class="nav-item dropdown">
|
||||
{% set funnelhead = links|first %}
|
||||
<a class="nav-link dropdown-toggle" href="#" id="topnav_{{funnelhead.html}}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{funnelhead.name}}</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav_{{funnelhead.html}}">
|
||||
{% for link in links %}{% if not loop.first %}
|
||||
<a class="dropdown-item{% if currentpage == link %} active{% endif %}" href="{{link.html}}">{% if link.name_in_top_nav is defined %}{{link.name_in_top_nav}}{% else %}{{link.name}}{% endif %}</a>
|
||||
{% endif %}{% endfor %}
|
||||
{% set links = pages|selectattr('funnel','defined_and_equalto',funnel)|
|
||||
selectattr('top_nav_level', 'defined')|list +
|
||||
appendpages %}
|
||||
{% set funneltop = pages|selectattr('funnel','defined_and_equalto',funnel)|first %}
|
||||
<a class="nav-link dropdown-toggle" href="#" id="topnav_{{funneltop.html}}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{funneltop.name}}</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav_{{funneltop.html}}">
|
||||
{% for link in links %}
|
||||
<a class="dropdown-item {% if link.top_nav_level is undefined %}top-level-1{% else %}top-level-{{link.top_nav_level}}{% endif %}{% if currentpage == link %} active{% endif %}" href="{{link.html}}">{% if link.top_nav_name is defined %}{{link.top_nav_name}}{% else %}{{link.name}}{% endif %}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
{% set learn_links = [{"name":"Learn", "html": "learn.html"}] + pages|selectattr('funnel', 'defined_and_equalto','Learn')|list %}
|
||||
{{ dropdown(learn_links) }}
|
||||
{{ dropdown("Learn") }}
|
||||
|
||||
{% set explore_links = pages|selectattr('funnel', 'defined_and_equalto','Explore')|list + [{"name":"Ledger Explorer", "html": "https://livenet.xrpl.org/"}] %}
|
||||
{{ dropdown(explore_links) }}
|
||||
{{ dropdown("Explore", [{"name":"Ledger Explorer", "html": "https://livenet.xrpl.org/"}]) }}
|
||||
|
||||
{% set build_links = [
|
||||
{"name": "Build", "html": "docs.html"},
|
||||
{"name": "Get Started", "html":"get-started.html"},
|
||||
{"name": "Docs", "html": "docs.html"},
|
||||
{"name": "Tools", "html": "dev-tools.html"},
|
||||
{"name": "Dev Blog", "html": "/blog/"}
|
||||
] %}
|
||||
{{ dropdown(build_links) }}
|
||||
{% if target.lang == "ja" %}
|
||||
{{ dropdown("Build", [{"name": "ブログ", "html": "/blog/"}]) }}
|
||||
{% else %}
|
||||
{{ dropdown("Build", [{"name": "Dev Blog", "html": "/blog/"}]) }}
|
||||
{% endif %}
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="contribute.html">{% trans %}Contribute{% endtrans %}</a>
|
||||
|
||||
Reference in New Issue
Block a user