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

Make main col width dynamic #458

Merged
merged 6 commits into from
Apr 21, 2023
Merged

Make main col width dynamic #458

merged 6 commits into from
Apr 21, 2023

Conversation

crftwrk
Copy link
Member

@crftwrk crftwrk commented Apr 19, 2023

Main content col must have a fixed width <div class="col-md-8 col-lg-9">. Dynamic col class isn't enough, because if content has e.g. a larger image col uses the entire screen width and sidebar is pushed to bottom.

This PR replaces the fixed col width classes with function <div class="<?php echo bootscore_main_col_class(); ?>">, which returns to <div class="col-md-8 col-lg-9"> if sidebar is active and to <div class="col"> if no sidebar is active. In conclusion, if no sidebar is active, content uses entire width. No empty whitespace anymore.

Adds a sidebar to *-full-width-image.php templates.

@justinkruit if you like it, merge it.

@justinkruit
Copy link
Member

Just for cleanness, do we want to use <?php echo [] ?> or <?= [] ?>? My personal preference is always <?= because it looks cleaner to me and is still a clear indication something is echoing.

@crftwrk
Copy link
Member Author

crftwrk commented Apr 20, 2023

Your ideas are always better than mine. Want to change that quickly?

@justinkruit
Copy link
Member

Sure! I'll do it tomorrow though, going out for the evening 😉

@justinkruit
Copy link
Member

Will do it in a seperate PR, as there are more places this can be done.

@justinkruit justinkruit merged commit b35a627 into main Apr 21, 2023
@justinkruit justinkruit deleted the Make-main-col-width-dynamic branch April 21, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants