Docs x - how to make sidebar move into burger-menu?

Post Reply
bnetz
Ssr. Bludit
Posts: 18
Joined: Sun Aug 16, 2020 6:38 pm

Hi,

I downloaded the Docs X theme from https://themes.bludit.com/de/ (same problem when downloading it from Github https://github.com/bludit-themes/docs-x ).
The versions from there are not really responsive - the sidebar on the left does not vanish on narrow resolutions.

With https://docs.bludit.com/en/ this works perfectly. I leeched the styles.css from there and now my sidebar vanishes, but it does not move to the burger-menu - please see attachment.

I want the behaviour like on https://docs.bludit.com/en/ - is it possible to get this theme? Maybe it would be nice to update the theme on the Bludit-theme-page and perhaps on Github also.

Thanks in advance!
bludit-docsx-responsive-problem.png
bludit-docsx-responsive-problem.png (117.52 KiB) Viewed 4226 times
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

The documentation has some more functions than the theme. Please see the following topic:

viewtopic.php?f=6&t=1843
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
bnetz
Ssr. Bludit
Posts: 18
Joined: Sun Aug 16, 2020 6:38 pm

Hi Edi,

thanks! So perhaps Diego will update the theme, I really would appreciate this.

For now I did a fix (which I don't know if it's safe):
- In the template navbar.php I added

Code: Select all

<div class="b-burger-btn"><i></i><b></b></div>
and removed the button instead.

- In the template index.php I changed the TOC-generator section with the TOC-generator-script from the docs-page:

Code: Select all

<!-- TOC generator -->
	<script>
		$(document).ready(function () {
			var enableToc = false;
			if ($('#page-content > h2').length > 1) {
				$('#page-content > h2').each(function () {
					if ($(this).attr('id')) {
						enableToc = true;
						$('#toc-content').append('<li><a href="#' + $(this).attr('id') + '">' + $(this).text() + '</a></li>');
					}
				});
			}
			if (enableToc) {
				$('#toc').show();
			}

			$('.b-burger-btn').on('click', function () {
				if ($(this).hasClass('open')) {
					$('body').removeClass('stop-scrolling');
				} else {
					$('body').addClass('stop-scrolling');
				}
				$(this).toggleClass('open');
				$('#sidebar').toggleClass('open');
				$('#backdrop').toggleClass('open');
			});
			$('#backdrop').on('click', function () {
				$(this).toggleClass('open');
				$('body').removeClass('stop-scrolling');
				$('#sidebar').toggleClass('open');
				$('.b-burger-btn').toggleClass('open');
			});

			//smooth scroll to id
			$('a[href^="#"]').on('click', function (e) {
				e.preventDefault();
				var target = this.hash;
				var $target = $(target);
				$('html, body').stop().animate({
					scrollTop: $target.offset().top - 60
				}, 900
				);
			});
		});
	</script>
Also I think I used the styles.css from the docs, but I don't remember quite well if this plays a role (was some days ago).

Thanks again for your help, Edi.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Beside your modifications are two more <div> in the template index.php.

The theme is now updated:

https://themes.bludit.com/theme/docs-x
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
janiekmulder
Master Bludit
Posts: 88
Joined: Sun Jun 28, 2020 2:21 pm

Edi wrote: Mon Aug 17, 2020 11:29 pm The theme is now updated:

https://themes.bludit.com/theme/docs-x
In the moment I am working on the theme.

The metadata aren't updated to the news version and it is confusig to the users maybe.

The view in the theme management is shown to the Version 2.1 by installed and activated version 2.2

And this is shown in the JSON-file:
{
"author": "Bludit",
"email": "",
"website": "https://themes.bludit.com",
"version": "2.1",
"releaseDate": "2019-06-02",
"license": "MIT",
"compatible": "3.9",
"notes": ""
}
Attachments
bludit_docsx_version_2_2_03.png
bludit_docsx_version_2_2_03.png (8.59 KiB) Viewed 4129 times
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

janiekmulder wrote: Fri Aug 21, 2020 9:59 am The metadata aren't updated to the news version and it is confusig to the users maybe.
Sorry, I forgot to update the metadata file. It's now done.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
janiekmulder
Master Bludit
Posts: 88
Joined: Sun Jun 28, 2020 2:21 pm

Edi wrote: Fri Aug 21, 2020 11:20 am
janiekmulder wrote: Fri Aug 21, 2020 9:59 am The metadata aren't updated to the news version and it is confusig to the users maybe.
Sorry, I forgot to update the metadata file. It's now done.
Hi Edi,

the downloadfile on the official downloadpage contains actually the old version of metadata (v2.1).

You only updated on github?
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

This is weird. But in the meantime there is v2.3 with a small fix.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
janiekmulder
Master Bludit
Posts: 88
Joined: Sun Jun 28, 2020 2:21 pm

Edi wrote: Sat Aug 22, 2020 2:19 pm This is weird. But in the meantime there is v2.3 with a small fix.
Weird? Yes, it was.

But now v2.3 is showing that, what I expected. Thank you! :P
bnetz
Ssr. Bludit
Posts: 18
Joined: Sun Aug 16, 2020 6:38 pm

Edi, you are the best - thanks a lot!!
Post Reply