Skip to content

Commit

Permalink
Added dark and lightmode for card-item (#39)
Browse files Browse the repository at this point in the history
Added dark and lightmode for card-item

Reviewed-by: Tino Schr
  • Loading branch information
SebastianGode authored Jul 10, 2024
1 parent 7e7e690 commit fd5f24e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
10 changes: 10 additions & 0 deletions doc/source/_static/images/dark/ansible.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions doc/source/_static/images/light/ansible.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions doc/source/examples/card_item.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Card Item Test

.. card_item::
:title: Ansible
:image: ../_static/images/ansible.svg
:image: ansible.svg
:description: Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

- OTC Ansible Collection|https://docs.otc-service.com/ansible-collection-cloud
Expand All @@ -15,35 +15,35 @@ Card Item Test

.. card_item::
:title: Ansible
:image: ../_static/images/ansible.svg
:image: ansible.svg
:description: Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

- Ansible Collection|https://docs.otc-service.com/ansible-collection-cloud

.. card_item::
:title: Ansible
:image: ../_static/images/ansible.svg
:image: ansible.svg
:description: Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

- Ansible Collection|https://docs.otc-service.com/ansible-collection-cloud

.. card_item::
:title: Ansible
:image: ../_static/images/ansible.svg
:image: ansible.svg
:description: Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

- Ansible Collection|https://docs.otc-service.com/ansible-collection-cloud

.. card_item::
:title: Ansible
:image: ../_static/images/ansible.svg
:image: ansible.svg
:description: Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

- Ansible Collection|https://docs.otc-service.com/ansible-collection-cloud

.. card_item::
:title: Ansible
:image: ../_static/images/ansible.svg
:image: ansible.svg
:description: Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality.

- Ansible Collection|https://docs.otc-service.com/ansible-collection-cloud
9 changes: 4 additions & 5 deletions otc_sphinx_directives/card_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ def card_item_html(self, node):
data = f'''
<div class="card-item">
<div>
<img
class="card-item-img"
src="{node['image']}"
alt="{node['title']}"
</img>
<picture>
<source alt="{node['title']}" srcSet="/_static/images/dark/{node['image']}" media="(prefers-color-scheme: dark)" />
<img class="card-item-img" alt="{node['title']}" src="/_static/images/light/{node['image']}">
</picture>
<div class="card-item-content">
<h4 style="margin: 0px 0 1rem 0; font: var(--telekom-text-style-heading-4);">{node['title']}</h4>
<div style="padding-bottom: 1rem;">
Expand Down
1 change: 0 additions & 1 deletion otc_sphinx_directives/directive_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def run(self):
node['id'] = self.options.get('id', '')
node['wrapper_type'] = self.options.get('wrapper_type', 'div')
node['style'] = self.options.get('style', '')
print(self.options)
self.state.nested_parse(self.content, self.content_offset, node)
return [node]

Expand Down

0 comments on commit fd5f24e

Please sign in to comment.