Comments (3)
Hi,
this is roughly hard-coded in top-nav widget position and header.php. Because there is not enough space in navbar to show buttons in mobile view, they moved to offcanvas while dark-mode switch is always in top-nav widget using display utilities.
Top-nav widget
Use a custom HTML widget in top-nav widget position:
<div class="d-flex">
<div class="d-flex align-items-center me-2 me-lg-3">
[bs-dark-mode]
</div>
<a class="btn btn-outline-primary d-none d-lg-block"href="https://bootscore.me/#download">Download</a>
<a class="btn btn-dark ms-2 d-none d-lg-block" href="https://github.com/bootscore" target="_blank" title="bootScore @ GitHub" rel="noopener"><i class="fab fa-github"></i><span class="d-none"> GitHub</span></a>
</div>
header.php
You can show everything what you want in offcanvas, but hide it above the breakpoints using d-*-none
class. Paste following HTML to your header.php in offcanvas direct after <!-- Bootstrap 5 Nav Walker Main Menu End -->
.
<!-- Bootstrap 5 Nav Walker Main Menu End -->
<div class="d-lg-none mt-3 pt-4 pb-4 border-top">
<div class="row">
<div class="col-6">
<a class="btn btn-outline-primary w-100 btn-download" href="https://bootscore.me/#download">Download</a>
</div>
<div class="col-6">
<a class="btn btn-dark w-100" href="https://github.com/bootscore" target="_blank" title="bootScore @ GitHub" rel="noopener"><i class="fab fa-github"></i> GitHub</a>
</div>
</div>
</div>
Does this help?
from bootscore.
It does and it doesn't. It solved the question but I just wonder... why? Seems a little silly to have to custom coding it in. How come you never put it as a new widget type like Offset bottom widget? I am sure a lot of people would find use out of it to be there by default. Seems like something overlooked a bit
from bootscore.
bootScore is a starter theme for developers. You must code and edit it by yourself. We are here to help you and solve issues.
In my opinion, adding a widget in the offcanvas menu by default doesn't make sense. Some use the collapse menu instead offcanvas and you can't see widget in expanded navbar. In this case you have to deal with two different widget positions to show same content. One in offcanvas and one in expanded navbar.
This is something what you should do in your child. You can simply register as many widgets as you want and show them where you want.
from bootscore.
Related Issues (20)
- Overwrite SCSS variables
- [BUG] Woocommerce Products Shortcode HOT 3
- Unable to style an active navbar item
- Unable to close a photo from the media gallery when enlarged or go back HOT 9
- Create assets folder HOT 4
- [BUG] Potential Woocommerce Bug in the Slide out Basket HOT 2
- [BUG/Help Wanted] Pagination for Post HOT 3
- [BUG] Double eye in account offcanvas HOT 1
- Reason of using fixed-top HOT 1
- <header><footer> inside <main>
- [BUG] Dark Mode Plugin HOT 3
- [BUG] Edit single product page
- Wrong Isotope usage HOT 5
- Please reopen Issue 759 as it is not resolved HOT 1
- [Feature Request] A solution for a "Drill Down Menu" HOT 4
- Translation HOT 1
- Translate HOT 4
- my-account/edit-address/
- [BUG] WooCommerce Legacy REST API HOT 2
- [Feature Request] Dynamic footer columns based on active footer widgets HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootscore.