Skip to content

Commit

Permalink
Updated the collapsible containers and minor changes (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
iSOLveIT authored Jan 24, 2023
1 parent 1f554ae commit 36c0bb8
Show file tree
Hide file tree
Showing 16 changed files with 147 additions and 257 deletions.
17 changes: 14 additions & 3 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ div.need_container {
div.wy-table-responsive {
width: 100% !important;
}
table.need {
table.need, .md-typeset table.data:not(.plain) {
display: table !important;
width: 100% !important;
}

.md-typeset, .md-nav, .md-typeset table:not([class]) {
.md-typeset, .md-nav, .md-typeset table:not([class]),
.md-typeset table.data:not(.plain){
font-size: 16px !important;
line-height: 1.5 !important;
}

table {
border: 1px solid #e1e4e5 !important;
}

h1, h2, h3 {
font-family: 'Recursive', sans-serif !important;
Expand All @@ -46,6 +50,10 @@ h3 {
margin-bottom: 10px !important;
}

.md-typeset :is(.admonition,details) {
font-size: 14px;
}

.underline {
text-decoration: underline;
}
Expand All @@ -58,7 +66,7 @@ h3 {
--img-filter: brightness(0) invert(1);
}

img.needs-logo-big {
img.needs-logo-big, img.sn_collapse_img {
filter: var(--img-filter);
}

Expand Down Expand Up @@ -170,4 +178,7 @@ div.dt-button-collection button.dt-button.active:not(.disabled) {

.md-header__button.md-logo :is(img, png) {
height: 2.2rem !important;
}
details.sd-dropdown .sd-summary-up, details.sd-dropdown .sd-summary-down {
display: none;
}
6 changes: 3 additions & 3 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ custom css definitions you need to update them.

0.2.0
-----
* Deprecated: :ref:`needfilter` is replaced by :ref:`needlist`, :ref:`needtable` or :ref:`needflow`. Which support additional options for related layout.
* Deprecated: ``needfilter`` is replaced by :ref:`needlist`, :ref:`needtable` or :ref:`needflow`. Which support additional options for related layout.
* Improvement: Added :ref:`needtable` directive.
* Improvement: Added `DataTables <https://datatables.net/>`_ support for :ref:`needtable` (including table search, excel/pdf export and dynamic column selection).
* Improvement: Added :ref:`needs_id_regex`, which takes a regular expression and which is used to validate given IDs of needs.
Expand Down Expand Up @@ -727,7 +727,7 @@ custom css definitions you need to update them.

0.1.37
------
* Bugfix: Implemented 0.1.36 bugfix also for :ref:`needfilter` and :ref:`needimport`.
* Bugfix: Implemented 0.1.36 bugfix also for ``needfilter`` and :ref:`needimport`.

0.1.36
------
Expand Down Expand Up @@ -831,7 +831,7 @@ custom css definitions you need to update them.
* Added configuration parameter :ref:`needs_id_required`.
* Backwards compatibility changes:

* Reimplemented **needlist** as alias for :ref:`needfilter`
* Reimplemented **needlist** as alias for ``needfilter``
* Added *need* directive/need as part of the default :ref:`needs_types` configuration.

0.1.18
Expand Down
13 changes: 5 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@
.. rst-class:: need
.. rst-class:: need_{{type_name}}
.. container:: need
.. container:: toggle
.. container:: header
.. dropdown::
:class: need
:needs_type:`{{type_name}}`: {% if title %}:needs_title:`{{title}}`{% endif %} :needs_id:`{{id}}`
Expand Down Expand Up @@ -457,9 +454,9 @@ def custom_defined_func():
html_favicon = "./_static/sphinx-needs-logo-favicon.png"
# material theme options (see theme.conf for more information)
html_theme_options = {
# "icon": {
# "repo": "fontawesome/brands/github-square",
# },
"icon": {
"repo": "fontawesome/brands/github",
},
"site_url": "https://sphinxcontrib-needs.readthedocs.io/",
"repo_url": "https://github.com/useblocks/sphinxcontrib-needs",
"repo_name": "Sphinx-Needs",
Expand Down
43 changes: 12 additions & 31 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,7 @@ By using :ref:`needs_hide_options` the output of such options can be hidden.
must use the :ref:`filter` option.


.. container:: toggle

.. container:: header

**Show example**
.. dropdown:: Show example

**conf.py**

Expand Down Expand Up @@ -633,11 +629,8 @@ If you do not set ``needs_report_template``, the default template used is:
{# Output for needs_types #}
{% if types|length != 0 %}
.. container:: toggle needs_report_table
.. container:: header
**Need Types**
.. dropdown:: Need Types
:class: needs_report_table
.. list-table::
:widths: 40 20 20 20
Expand All @@ -658,11 +651,8 @@ If you do not set ``needs_report_template``, the default template used is:
{# Output for needs_extra_links #}
{% if links|length != 0 %}
.. container:: toggle needs_report_table
.. container:: header
**Need Extra Links**
.. dropdown:: Need Extra Links
:class: needs_report_table
.. list-table::
:widths: 10 30 30 5 20
Expand All @@ -685,11 +675,8 @@ If you do not set ``needs_report_template``, the default template used is:
{# Output for needs_options #}
{% if options|length != 0 %}
.. container:: toggle needs_report_table
.. container:: header
**Need Extra Options**
.. dropdown:: Need Extra Options
:class: needs_report_table
{% for option in options %}
* {{ option }}
Expand All @@ -699,11 +686,7 @@ If you do not set ``needs_report_template``, the default template used is:
{# Output for needs metrics #}
{% if usage|length != 0 %}
.. container:: toggle
.. container:: header
**Need Metrics**
.. dropdown:: Need Metrics
.. list-table::
:widths: 40 40
Expand Down Expand Up @@ -2204,7 +2187,8 @@ If nothing is set, the following default template is used:
.. rst-class:: need
.. rst-class:: need_{{type_name}}
.. container:: need
.. dropdown::
:class: need
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
{%- if status and status|upper != "NONE" and not hide_status %}
Expand Down Expand Up @@ -2265,11 +2249,8 @@ Default value:
.. rst-class:: need
.. rst-class:: need_{{type_name}}
.. container:: need
.. container:: toggle
.. container:: header
.. dropdown::
:class: need
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
Expand Down
36 changes: 6 additions & 30 deletions docs/directives/needgantt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ needgantt
:tags: gantt_example
:milestone_filter: type == 'milestone'

.. container:: toggle

.. container:: header

**Show used needs for above example**
.. dropdown:: Show used needs for above example

.. action:: Find & Report bug
:id: ACT_BUG
Expand Down Expand Up @@ -139,11 +135,7 @@ Default: None
:tags: gantt_ex_starts_with
:starts_with_links: starts_with

.. container:: toggle

.. container:: header

**Show the needs used in the above example**
.. dropdown:: Show used needs for above example

.. action:: Create example
:id: ACT_CREATE_EX_SW
Expand Down Expand Up @@ -185,11 +177,7 @@ Default: links
:tags: gantt_ex_starts_after
:starts_after_links: starts_after

.. container:: toggle

.. container:: header

**Show the needs used in the above example**
.. dropdown:: Show the needs used in the above example

.. action:: Create example
:id: ACT_CREATE_EX_SA
Expand Down Expand Up @@ -225,11 +213,7 @@ Default: None
:tags: gantt_ex_ends_with
:ends_with_links: ends_with

.. container:: toggle

.. container:: header

**Show the needs used in the above example**
.. dropdown:: Show the needs used in the above example

.. action:: Create example
:id: ACT_CREATE_EX_EW
Expand Down Expand Up @@ -339,11 +323,7 @@ Default: :ref:`need_duration`
:tags: gantt_ex_duration
:duration_option: hours

.. container:: toggle

.. container:: header

**Show the needs used in the above example**
.. dropdown:: Show the needs used in the above example

.. action:: Create example
:id: ACT_CREATE_EX
Expand Down Expand Up @@ -387,11 +367,7 @@ Default: :ref:`need_completion`
:tags: gantt_ex_completion
:completion_option: amount

.. container:: toggle

.. container:: header

**Show the needs used in the above example**
.. dropdown:: Show the needs used in the above example

.. action:: Create example
:id: ACT_CREATE_EX_C
Expand Down
2 changes: 1 addition & 1 deletion docs/directives/needimport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ hide
~~~~

You can use the ``:hide:`` option to set the **hide** tag for all imported needs.
So they do not show up but are available in :ref:`needfilter`.
So they do not show up but are available in ``needfilter``.

collapse
~~~~~~~~
Expand Down
18 changes: 3 additions & 15 deletions docs/directives/needlist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ Flag for adding status information to the needs list results filtered.

If a filtered need has no status information, we write no status output for the need.

.. container:: toggle

.. container:: header

**Show example**
.. dropdown:: Show example

|ex|

Expand All @@ -64,11 +60,7 @@ Flag for adding tag information to the needs list results filtered.

If a filtered need has no tag information, we write no tag output for the need.

.. container:: toggle

.. container:: header

**Show example**
.. dropdown:: Show example

|ex|

Expand All @@ -92,11 +84,7 @@ show_filters

If set, we add the used filter below the needlist results:

.. container:: toggle

.. container:: header

**Show example**
.. dropdown:: Show example

|ex|

Expand Down
Loading

0 comments on commit 36c0bb8

Please sign in to comment.