mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-06 17:27:57 +00:00
Testing moving back sidebar to left nav
This commit is contained in:
@@ -3926,9 +3926,10 @@ pages:
|
|||||||
# Code Samples page (final location TBD)
|
# Code Samples page (final location TBD)
|
||||||
- name: Code Samples
|
- name: Code Samples
|
||||||
html: code-samples.html
|
html: code-samples.html
|
||||||
# parent: docs.html
|
parent: docs.html
|
||||||
template: page-code-samples.html.jinja
|
template: page-code-samples.html.jinja
|
||||||
sidebar: disabled
|
sidebar: left_only
|
||||||
|
codesamples: true
|
||||||
filters:
|
filters:
|
||||||
- code_samples
|
- code_samples
|
||||||
top_nav_grouping: Online Tools
|
top_nav_grouping: Online Tools
|
||||||
|
|||||||
@@ -109,6 +109,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% include "component-tree-nav.html.jinja" %}
|
{% include "component-tree-nav.html.jinja" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% if currentpage.codesamples is defined %}
|
||||||
|
{% include "component-code-sample-filter.html.jinja" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</aside>
|
</aside>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div><!--/.row (main layout)-->
|
</div><!--/.row (main layout)-->
|
||||||
|
|||||||
21
template/component-code-sample-filter.html.jinja
Normal file
21
template/component-code-sample-filter.html.jinja
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<div class="p-2 mt-30">
|
||||||
|
<form >
|
||||||
|
<p>Code Language</p>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="langs" id="langs_javascript" value="JavaScript" checked> <label for="langs_javascript">JavaScript</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="langs" id="langs_Python" value="Python"> <label for="langs_Python">Python</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="langs" id="langs_Java" value="Java" checked> <label for="langs_Java">Java</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" name="langs" id="langs_Websocket" value="Websocket"> <label for="langs_Websocket">HTTP/Websocket</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{# <input type="submit" name="submit" value="Submit"/> #}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
{% block main %}
|
{% block main %}
|
||||||
<div class="overflow-hidden">
|
<div class="overflow-hidden">
|
||||||
|
|
||||||
<div class="position-relative">
|
{# <div class="position-relative">
|
||||||
<img src="./img/backgrounds/xrpl-overview-purple.svg" class="landing-bg" id="xrpl-overview-purple">
|
<img src="./img/backgrounds/xrpl-overview-purple.svg" class="landing-bg" id="xrpl-overview-purple">
|
||||||
</div>
|
</div> #}
|
||||||
|
|
||||||
<section class="py-26 text-center">
|
<section class="py-26 text-center">
|
||||||
<div class="col-lg-8 mx-auto text-center">
|
<div class="col-lg-8 mx-auto text-center">
|
||||||
@@ -21,9 +21,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="position-relative d-none-sm">
|
{# <div class="position-relative d-none-sm">
|
||||||
<img src="./img/backgrounds/xrpl-overview-orange.svg" id="xrpl-overview-orange">
|
<img src="./img/backgrounds/xrpl-overview-orange.svg" id="xrpl-overview-orange">
|
||||||
</div>
|
</div> #}
|
||||||
|
|
||||||
<section class="container-new py-26">
|
<section class="container-new py-26">
|
||||||
<div class="d-flex flex-column col-sm-8 p-0">
|
<div class="d-flex flex-column col-sm-8 p-0">
|
||||||
@@ -31,36 +31,8 @@
|
|||||||
<h6 class="eyebrow mb-3">{% trans %}Explore Code Samples{% endtrans %}</h6>
|
<h6 class="eyebrow mb-3">{% trans %}Explore Code Samples{% endtrans %}</h6>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row col-12 card-deck mt-10" id="code-samples-deck">
|
<div class="row col-12 card-deck mt-10" id="code-samples-deck">
|
||||||
|
|
||||||
<div class="row col-md-4">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="p-2">
|
|
||||||
<form >
|
|
||||||
<p>Code Language</p>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" name="langs" id="langs_javascript" value="JavaScript" checked> <label for="langs_javascript">JavaScript</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" name="langs" id="langs_perl" value="Perl"> <label for="langs_perl">Python</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" name="langs" id="langs_php" value="PHP" checked> <label for="langs_php">Java</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" name="langs" id="langs_ruby" value="Ruby"> <label for="langs_ruby">HTTP/Websocket</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{# <input type="submit" name="submit" value="Submit"/> #}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
{# {% set code_samples = [
|
{# {% set code_samples = [
|
||||||
{ "href": "https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/checks",
|
{ "href": "https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples/checks",
|
||||||
@@ -74,6 +46,7 @@
|
|||||||
"description": _("Create, cash, and cancel Checks for exact or flexible amounts.")
|
"description": _("Create, cash, and cancel Checks for exact or flexible amounts.")
|
||||||
},
|
},
|
||||||
] %} #}
|
] %} #}
|
||||||
|
|
||||||
{% set code_samples = all_code_samples() %}
|
{% set code_samples = all_code_samples() %}
|
||||||
|
|
||||||
{% set lang_icons = {
|
{% set lang_icons = {
|
||||||
@@ -84,7 +57,8 @@
|
|||||||
"py": "assets/img/logos/python.svg",
|
"py": "assets/img/logos/python.svg",
|
||||||
"http": "assets/img/logos/globe.svg",
|
"http": "assets/img/logos/globe.svg",
|
||||||
} %}
|
} %}
|
||||||
<div class="row col-md-8 px-0">
|
|
||||||
|
<div class="row col-md-12 px-0">
|
||||||
{% for card in code_samples %}
|
{% for card in code_samples %}
|
||||||
<a class="card cardtest col-12 col-lg-5" href="{{target.github_forkurl}}/tree/{{target.github_branch}}/{{card.href}}">
|
<a class="card cardtest col-12 col-lg-5" href="{{target.github_forkurl}}/tree/{{target.github_branch}}/{{card.href}}">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
@@ -96,7 +70,9 @@
|
|||||||
<h4 class="card-title h5">{{card.title}}</h4>
|
<h4 class="card-title h5">{{card.title}}</h4>
|
||||||
<p class="card-text">{{card.description}}</p>
|
<p class="card-text">{{card.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer"> </div>
|
<div class="card-footer">
|
||||||
|
<span class="label label-accounts" href="label-accounts.html" title="Pages relating to accounts in the XRP Ledger.">Accounts</span>
|
||||||
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
@@ -106,18 +82,21 @@
|
|||||||
|
|
||||||
<section class="py-26 container">
|
<section class="py-26 container">
|
||||||
<div class="col-lg-12 mx-auto ">
|
<div class="col-lg-12 mx-auto ">
|
||||||
<div class="d-flex flex-column-reverse">
|
|
||||||
|
<div class="d-flex flex-column">
|
||||||
<h6 class="eyebrow mb-3">{% trans %}Help the XRPL community by submitting your own code samples{% endtrans %}</h6>
|
<h6 class="eyebrow mb-3">{% trans %}Help the XRPL community by submitting your own code samples{% endtrans %}</h6>
|
||||||
<h3 class="h4 h2-sm">{% trans %}Contribute Code Samples{% endtrans %}</h3>
|
<h3 class="h4 h2-sm">{% trans %}Contribute Code Samples{% endtrans %}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class=" col-lg-3 "><h5 class="pb-4">Fork and clone</h5><p>Fork the xrpl-dev-portal repo. Using git, clone the fork to your computer.</p></div>
|
<div class="row">
|
||||||
<div class=" col-lg-3 "><h5 class="pb-4">Add to folder</h5><p>Add your sample code to the content/_code-samples folder. Be sure to include a README.md that summarizes what it does and anything else people should know about it.</p></div>
|
<div class=" col-lg-3 "><h5 class="pb-4">Fork and clone</h5><p>Fork the xrpl-dev-portal repo. Using git, clone the fork to your computer.</p></div>
|
||||||
<div class=" col-lg-3 "><h5 class="pb-4">Commit and push</h5><p>Commit your changes and push them to your fork on GitHub.</p></div>
|
<div class=" col-lg-3 "><h5 class="pb-4">Add to folder</h5><p>Add your sample code to the content/_code-samples folder. Be sure to include a README.md that summarizes what it does and anything else people should know about it.</p></div>
|
||||||
<div class=" col-lg-3 "><h5 class="pb-4">Open a pull request</h5><p>Open a pull request to the original repo. Maintainers will review your submission and suggest changes if necessary. If the code sample is helpful, it’ll be merged and added to XRPL.org!</p></div>
|
<div class=" col-lg-3 "><h5 class="pb-4">Commit and push</h5><p>Commit your changes and push them to your fork on GitHub.</p></div>
|
||||||
</div>
|
<div class=" col-lg-3 "><h5 class="pb-4">Open a pull request</h5><p>Open a pull request to the original repo. Maintainers will review your submission and suggest changes if necessary. If the code sample is helpful, it’ll be merged and added to XRPL.org!</p></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a class="mt-12 btn btn-primary btn-arrow" href="#">Submit Code Samples</a>
|
<a class="mt-12 btn btn-primary btn-arrow" href="#">Submit Code Samples</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user