Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust to_html to bootstrap 5 #217

Merged
merged 4 commits into from
Jun 14, 2022
Merged

adjust to_html to bootstrap 5 #217

merged 4 commits into from
Jun 14, 2022

Conversation

achimgaedke
Copy link
Contributor

Hi Oege!

Regarding conversion of static HTML output to bootstrap-5:

Most of it is done, there is one problem left: The tab function needs fixing and I don't understand how it works/worked. Do you have an idea?

I have removed some functions from to_html, as I discovered in the process that they are unused. This probably means that I actually don't need the equal_height parameter - which stretches cards to be aligned in height.

I am still a bit distracted by aio-libs/aiobotocore#934 and #901 - let's see when I come back to this.

@oegedijk oegedijk deleted the branch oegedijk:master May 6, 2022 08:20
@oegedijk oegedijk closed this May 6, 2022
@oegedijk oegedijk reopened this May 6, 2022
@achimgaedke achimgaedke changed the base branch from bootstrap-5 to master May 6, 2022 09:09
"""


def card_deck(*cards)->str:
Copy link
Owner

@oegedijk oegedijk May 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is no longer supported in bootstrap 5 I guess, so need to do something along these lines:

https://stackoverflow.com/questions/64311368/bootstrap-5-alpha-2-card-deck-example-not-showing-like-it-is-in-documentation

(or just use a row?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need to configure the card widths a bit more, most will need a simple width=6 or 12 to fill half or the full space.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, but idea is that this should be automatic and responsive. So you can't just hard code it at 6 or 12. Just not specifying the width of the cols should do the trick though I guess (bootstrap will divide the cols evenly).

@@ -281,14 +219,3 @@ def input(feature:str, value, disabled:bool=False)->str:
<input id="{feature}" type="text" value="{value}" name="{feature}" {'disabled' if disabled else ''}>
</div>
"""

def jumbotron(title:str, description:str)->str:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

against is used by ExplainerHub static html export, so need to create a replacement...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the preferred way to test the layout/s? Could you point me to a good test routine?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

euhhh, not being a webdev, I think my routine when I originally developed it was

  1. export to .html
  2. open in browser
  3. see if it looks good or if there are any errors.

(also need to include the static exports to the testing battery. In general working on updating the tests to pytest now, and need to extend the coverage)

@achimgaedke
Copy link
Contributor Author

Just pushed a new commit, there's still something wrong with the tabs. Will try again later.

@oegedijk
Copy link
Owner

made a few tweaks and now the card rows seem pretty nicely spaced

@oegedijk
Copy link
Owner

Give it a test run and see if you notice anything odd, otherwise I think it's ready to merge!

@achimgaedke
Copy link
Contributor Author

Tried it out again and looks good to me.

@oegedijk
Copy link
Owner

cool, thanks again for all the work on this!

@oegedijk oegedijk merged commit f0a3427 into oegedijk:master Jun 14, 2022
@oegedijk
Copy link
Owner

just released it as version 0.4.0

@achimgaedke achimgaedke deleted the to-html-to-bs-5 branch November 24, 2022 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants