Skip to content

Commit

Permalink
Extra fix for card paths (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis authored Aug 7, 2024
1 parent f92e892 commit f4da503
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/cards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Cards
******

.. custom-card:: Stuart Mumford
:img_name: Stuart-Mumford.png
:img_name: _static/img/Stuart-Mumford.png
:github: cadair
:title: Lead Developer
:aff_name: Sheffield University
Expand Down
4 changes: 2 additions & 2 deletions src/sunpy_sphinx_theme/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def visit_card_node(self, node) -> None:
body = f"""<div class="column {col_extra_class}">
{title}
<div class="card">
<img class="dark-light" src="_static/img/{node['img_name']}" alt="{node['name']}">
<img class="dark-light" src="{node['img_name']}" alt="{node['name']}">
<p>{node['name']}</p>
<p><button type="button" class="btn btn-sunpy btn-sunpy1" data-bs-toggle="modal" data-bs-target="#{key}">More Info</button></p>
<p><button type="button" class="btn btn-sunpy btn-sunpy1 stretched-link" data-bs-toggle="modal" data-bs-target="#{key}">More Info</button></p>
<div class="modal fade" id="{key}" tabindex=-1>
<div class="modal-dialog modal-lg">
<div class="modal-content">
Expand Down
4 changes: 4 additions & 0 deletions src/sunpy_sphinx_theme/theme/sunpy/static/sunpy_cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
margin: 0 auto;
}

.card[data-clickable="true"] {
cursor: pointer;
}

html[data-theme="light"] .card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
background-color: var(--pst-color-table-row-zebra-low-bg);
Expand Down

0 comments on commit f4da503

Please sign in to comment.