Bitcoin.org/_templates/developer-glossary.md
2018-04-17 12:32:34 +02:00

2.9 KiB

layout id breadcrumbs show_fragments show_toc
devdoc-category developer-glossary
bitcoin
dev docs
dev docs glossary
false true
{% translate subsummary %}

{% comment %}

The following single-space-indented code (sorry, whitespace

sensitive) takes the alphabetized array of individual hash objects

and puts them in a list sorted by the first character of each term

characters (case insensitive). E.g.:

Alpha

Apropos

Beta

Gamma

Gnu

The current style sheet gives each item a certain width and then

floats them so terms starting with the same character are grouped

together. Hopefully this strikes the right balance between

information density and too much whitespace.

{% endcomment %}

{% translate categorynumbers developer-glossary %}

{% for item in site.devsearches.Glossary[page.lang] %} {% if forloop.first %}{% assign first_term = true %}{% else %}{% assign first_term = false %}{% endif %} {% for term in item %} {% capture text_and_link %}{{term[0]}}{% endcapture %} {% capture first_character %}{{term[0] | downcase | truncate: 1, '' }}{% endcapture %} {% if first_character != '0' || first_character != '1' || first_character != '2' || first_character != '3' || first_character != '4' || first_character != '5' || first_character != '6' || first_character != '7' || first_character != '8' || first_character != '9' %} {% assign finished_with_numbers = true %} {% endif %} {% if first_character == last_first_character %}

  • {{text_and_link}}
  • {% else %} {% unless first_term %}
    {% endunless %}

    {% if finished_with_numbers %}

    {{ first_character | upcase }}

    {% endif %}

    {% case first_character %} {% when 'b' %} See also: Bitcoin Improvement Proposals (BIPs) {% when 'o' %} See also: Opcodes {% when 'p' %} See also: P2P protocol messages {% when 'r' %} See also: Bitcoin Core RPCs {% endcase %}

    • {{text_and_link}}
    • {% endif %} {% capture last_first_character %}{{first_character}}{% endcapture %} {% endfor %} {% endfor %} {% comment %}Close off last list and end the float: {% endcomment %}

    {% translate suggestnewterm %}