Skip to content

Commit

Permalink
CSS stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianGode committed Dec 9, 2024
1 parent 3004281 commit 7013059
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions otc_sphinx_directives/service_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def service_card_html(self, node):
else:
link = doc['link']

data = '<div style="display: flex; flex-direction: column" class="card item-sbv">'
data = '<div class="card item-sbv item-sbv-flex">'
data += (f'<a href="{link}">')
data += (
'<div class="card-body">'
Expand All @@ -128,16 +128,13 @@ def service_card_html(self, node):
f'<p>{node[doc["type"]]}</p>'
)
data += '</div></a>'
try:
if doc["pdf_name"]:
data += (f'''
<scale-button variant="secondary" style="align-self: end;margin-right: 1rem;margin-bottom: 1rem;">
<scale-icon-user-file-pdf-file accessibility-title="pdf-file"></scale-icon-user-file-pdf-file> Download PDF
</scale-button>
''')

except Exception as e:
print("Service " + node['service_type'] + " exception: " + str(e))
if doc["pdf_enabled"]:
data += (f'''
<scale-button variant="secondary" class="pdf-button-sbv" href="/{node['service_type']}-{doc["type"]}.pdf" target="_blank">
<scale-icon-user-file-pdf-file accessibility-title="pdf-file"></scale-icon-user-file-pdf-file>
<span style="font-weight: normal;">Download PDF</span>
</scale-button>
''')

Check warning on line 138 in otc_sphinx_directives/service_card.py

View check run for this annotation

otc-zuul / eco/check

otc_sphinx_directives/service_card.py#L138

pep8: W293 blank line contains whitespace
data += '</div>'

Expand Down

0 comments on commit 7013059

Please sign in to comment.