• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

High-ho it's another website rebuild. First, a question regarding sidebars

Participant ,
Mar 03, 2024 Mar 03, 2024

Copy link to clipboard

Copied

Okay, my site has developed a serious glitch which seems to be related to my using way too many dropdown menus. Or at any rate that's where things started glitching first. I knew that the site was a stop-gap when I uploaded it, so I'm not too surprised to be back at square #1 again. I'm not a web developer and don't especially enjoy it, but I've had the site for 20 years, and don't feel like giving it up. However, at present it's next to unusable.

 

It's a largish site with something on the order of a couple of hundred pages. So it needs a lot of navigation assistance. It is split up into a number of different collections and sub-collections, but a couple of those contain up to something like 80+ pages, and thats a lot of links.  

 

The current site uses dropdowns from a fixed-position header. But that doesn't seem to be working out at all. It wasn't *quite* as bad before I split the menus up into many more dropdowns to shorten the menus, keeping fully visible on a laptop screen. But it was already glitching.

 

The previous iteration of the site used a classic left sidebar with fly-out menus. That site was built in CS6 which included Spry assets and it worked very well for most of a decade. Couldn't handle small screens, because the fly-outs extended beyond what the screen would show, and they weren't exactly scrollable.

 

I'd really prefer not to have to build a permanent sidebar, since that takes up additional screen real estate. I have been browsing the W3 Schools site, and have seen a number of things that might be helpful, if they worked. Unfortunately, attempting to insert their W3 proprietary code into a test template hasn't been going well.

 

One example, which looked promising was a sidebar which could be invoked by clicking on a button, and which went away by clicking a 'close' button on the sidebar. I was not able to get it to work in my Dreamweaver CC2021 test site. This was one of the propritary W3.css examples. 

 

So. Does plain vanila .css, such as I know is used in a Dreamweaver site, do anything like that? Which is to say, invoke a panel, overlaying part of a page containing navigation buttons, and will go away by clicking a 'close' command?

 

It wouldn't necessarily have to be a sidebar. It could come in from any direction that's visible onscreen. But it shouldn't cover the whole page. At least part of the basic page should be visible, so it's obvious that we've not just moved to a different page. 

 

So, can anyone point me at some possibilities regarding sidebars? I'll be posting some other questions about some other navigation methods. But having been bitten by dropdown menus, I'm not especially eager to try another attempt at using those. Or, not unless they could be opened with a click, and *stay* open until clicked closed, so one could scroll down to see the whole thing. I do know that W3.css has some code for doing those. But, like I say, I'm not having a lt of luck in incorporating their code into my base pages.

 

Views

467

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

With Boostrap v 5.3, you can create a responsive sidebar.

 

I have created a video using a different IDE to Dreamweaver.

 

 

 

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

Okay, this moves the discussion into one of my other potential inqueries (not posted yet). At present, the site is static. Not responsive at all. Dealing with bootstrap was just one too many when I needed to move the site into a version of the code that I would be able to edit if I needed to replace a computer. Otherwise I'd happily sstill be using CS6.

 

Given that nothing in any of the templates that came with the program came close to looked anything like what I wanted the site to look like, I ended up taking the simplest of the page templates and stripping pretty much everything out, and starting over from a blank page. It's a hobby site, not commercial at all. It mainly consists of pages of essays,  or graphics to show off, or .pdfs to either display or download. It has no need for most of the commercially-oriented elements that the templates come loaded with.

 

I am comfortable enough with working with the current version of the program to consider putting the responsiveness back. Dreamweaver does definitely support Bootstrap. But I'm not at all looking forward to it. (Still, it can't be worse than working in GoLive where everything on a page was in a table cel. Tables, inside of tables, inside of tables, ack!)

 

So, back to the original question. I am to assume that there is no way that plain .css will enable me to create an openable and closable sidebar? (Thank you for the video. At the tiny size I wasn't really able to see what you were doing, but it did confirm that the procedure is doable.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

quote

 

So, back to the original question. I am to assume that there is no way that plain .css will enable me to create an openable and closable sidebar?


By @JoyceOdell

 

Wrong - sort of. I expect it can be done with plain css but usually it's done with a bit of javascript too!

Might not be exactly what you want but copy the code below and insert it into a new Dreamweaver document, view in a browser, click onto the burger icon then 'Link 4' - its scrollable, however many links you include:

 

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Off Canvas Sidebar Navigation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style>
* {
box-sizing: border-box;
}
body {
font-family: helvetica, sans-serif;
margin: 0;
}
header {
display: flex;
background-color: #000;
justify-content: space-between;
align-items: center;
padding: 15px 30px;
position: fixed;
width: 100%;
top: 0;
}
.siteName h2 {
margin: 0;
padding: 0;
color: #fff;
}
.navIcon {
display: flex;
flex-direction: column;
border: 1px solid #fff;
border-radius: 6px;
width: 40px;
padding: 5px 8px;
cursor: pointer;
}
.navIcon div {
height: 1px;
margin: 3px 0;
background-color: #fff;
}

.mainNav {
position: fixed;
height: 100%;
top: 0;
width: 30%;
padding: 100px 0;
background-color: #262626;
transform: translateX(-100%);
transition: transform 500ms ease-in-out;
overflow: auto;
}
.mainNav h3 {
font-size: 30px;
margin: 0 0 25px 100px;
padding: 0;
color: #fff;
}
.mainNav ul {
list-style: none;
margin: 0;
padding: 0;
}
.mainNav li {
list-style: none;
margin: 15px 0;
padding: 0;
}
.mainNav.slideInOut {
transform: translateX(0)
}
.mainNav > ul {
background-color: #262626;
padding: 0 50px 0 100px;
}
.mainNav a {
text-decoration: none;
color: #fff;
font-size: 20px;
margin: 0;
padding: 0;
}
.mainNav a:hover {
color: #737373;
}
.topLevelLink {
display: flex;
justify-content: space-between;
}
.subLevelLinks {
margin: 0 0 0 20px!important;
padding: 0;
display: none;
}
.currentLink {
color: #e68a00!important;
}
.mainContent {
width: 90%;
margin: 100px auto 0 auto;
}
.fa-arrow-right {
color: #fff!important;
}
</style>
</head>
<body>

<header>
<div class="siteName"><h2>SomeSite</h2></div>
<div class="navIcon">
<div></div>
<div></div>
<div></div>
</div>
</header>

<nav class="mainNav">
<h3>Contents</h3>
<ul>
<li><a href="#" class="topLevelLink"><span>Link 1</span><i class="fa-solid fa-angle-down"></i></a>

<ul class="subLevelLinks">
<li><a href="#"> SubLink 1.1</a><li>
<li><a href="#"> SubLink 1.2</a><li>
<li><a href="#"> SubLink 1.3</a><li>
<li><a href="#"> SubLink 1.4</a><li>
<li><a href="#"> SubLink 1.5</a><li>
</ul>

</li>

<li><a href="#" class="topLevelLink"><span>Link 2</span><i class="fa-solid fa-angle-down"></i></a>

<ul class="subLevelLinks">
<li><a href="#"> SubLink 2.1</a><li>
<li><a href="#"> SubLink 2.2</a><li>
<li><a href="#"> SubLink 2.3</a><li>
<li><a href="#"> SubLink 2.4</a><li>
<li><a href="#"> SubLink 2.5</a><li>
</ul>

</li>
<li><a href="#" class="topLevelLink"><span>Link 3</span><i class="fa-solid fa-angle-down"></i></a>
<ul class="subLevelLinks">
<li><a href="#"> SubLink 3.1</a><li>
<li><a href="#"> SubLink 3.2</a><li>
<li><a href="#"> SubLink 3.3</a><li>
<li><a href="#"> SubLink 3.4</a><li>
<li><a href="#"> SubLink 3.5</a><li>
</ul>

</li>
<li><a href="#" class="topLevelLink"><span>Link 4</span><i class="fa-solid fa-angle-down"></i></a>

<ul class="subLevelLinks">
<li><a href="#"> SubLink 4.1</a><li>
<li><a href="#"> SubLink 4.2</a><li>
<li><a href="#"> SubLink 4.3</a><li>
<li><a href="#"> SubLink 4.4</a><li>
<li><a href="#"> SubLink 4.5</a><li>
<li><a href="#"> SubLink 4.6</a><li>
<li><a href="#"> SubLink 4.7</a><li>
<li><a href="#"> SubLink 4.8</a><li>
<li><a href="#"> SubLink 4.9</a><li>
<li><a href="#"> SubLink 4.10</a><li>
<li><a href="#"> SubLink 4.11</a><li>
<li><a href="#"> SubLink 4.12</a><li>
<li><a href="#"> SubLink 4.13</a><li>
<li><a href="#"> SubLink 4.14</a><li>
<li><a href="#"> SubLink 4.15</a><li>
<li><a href="#"> SubLink 4.16</a><li>
<li><a href="#"> SubLink 4.17</a><li>
<li><a href="#"> SubLink 4.18</a><li>
<li><a href="#"> SubLink 4.19</a><li>
<li><a href="#"> SubLink 4.20</a><li>
<li><a href="#"> SubLink 4.21</a><li>
<li><a href="#"> SubLink 4.22</a><li>
<li><a href="#"> SubLink 4.23</a><li>
<li><a href="#"> SubLink 4.24</a><li>
<li><a href="#"> SubLink 4.25</a><li>
</ul>

</li>
<li><a href="#" class="topLevelLink"><span>Link 5</span><i class="fa-solid fa-angle-down"></i></a>

<ul class="subLevelLinks">
<li><a href="#"> SubLink 5.1</a><li>
<li><a href="#"> SubLink 5.2</a><li>
<li><a href="#"> SubLink 5.3</a><li>
<li><a href="#"> SubLink 5.4</a><li>
<li><a href="#"> SubLink 5.5</a><li>
</ul>

</li>


<li><a href="#" class="topLevelLink"><span>Link 6</span><i class="fa-solid fa-angle-down"></i></a>

<ul class="subLevelLinks">
<li><a href="#"> SubLink 6.1</a><li>
<li><a href="#"> SubLink 6.2</a><li>
<li><a href="#"> SubLink 6.3</a><li>
<li><a href="#"> SubLink 6.4</a><li>
<li><a href="#"> SubLink 6.5</a><li>
</ul>

</li>


<li><a href="#" class="topLevelLink"><span>Link 7</span><i class="fa-solid fa-angle-down"></i></a>

<ul class="subLevelLinks">
<li><a href="#"> SubLink 7.1</a><li>
<li><a href="#"> SubLink 7.2</a><li>
<li><a href="#"> SubLink 7.3</a><li>
<li><a href="#"> SubLink 7.4</a><li>
<li><a href="#"> SubLink 7.5</a><li>
</ul>

</li>

</ul>

</nav>


<main class="mainContent">
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
<p>Main Content</p>
</main>


<script>
const mainNav = document.querySelector('.mainNav');
const navIcon = document.querySelector('.navIcon');
navIcon.onclick = function() {
mainNav.classList.toggle('slideInOut')
}

let topLevelLink = document.querySelectorAll('.topLevelLink');

const subLevelLinks = document.querySelectorAll('.subLevelLinks');

topLevelLink.forEach(function(topLevelLink, index) {
topLevelLink.onclick = function() {
topLevelLink = document.querySelectorAll('.topLevelLink');
topLevelLink.forEach(function(topLevelLink) {
topLevelLink.classList.remove('currentLink')
})
this.classList.add('currentLink')

if(subLevelLinks[index]) {
subLevelLinks.forEach(function(subLevelLink) {
subLevelLink.style.display = "none";
})
subLevelLinks[index].style.display = "block";
}
}
})

</script>
</body>
</html>

 

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

That's... very promising. Thank you! 

It certainly works in a blank page. The trick is to get it to work in *my* pages.

I'm having fairly mixed results. If I can get it working I'll probably have to modify my design somewhat, but that's not a deal-breaker. Right now the issue is trying to get the NavIcon into *my* header -- and to get it to function. The header already has a button bar, and I can put the navIcon to the end of it, and it does function. But it's lost its internal lines, so it just looks like an empty round cornered box, and you can't tell what it is. I'm not at all certain what's going on there.

It also crowds up against the last button of the group, and adding 'margin-left' doesn't reposition it. It just ignores it. I'd also like to add a top margin to bring it in line with the button group, but it ignores that, too. 

 

I'm trying to retain most of the visual elements of the present site, with narrower pages, and without the problematic dropdown menus. This looks like a viable possibility. But there are some bugs to be worked out. Right now, getting the internal lines back into the navIcon seems to be the most pressing issue. Have you any sufggestions as to what may be going on, there?

 

 

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

quote

Right now, getting the internal lines back into the navIcon seems to be the most pressing issue. Have you any sufggestions as to what may be going on, there?

 


By @JoyceOdell

 

Without seeing your code I cant tell, no-one can. If you're prepared to upload your page and share a link I'm sure one of us can provide further suggestions.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

So far, I'm finding this solution a bit fragile. I have my work page saved, and the (blank)icon does function, in that it makes the sidebar move in or go away on a click. But if I make any further change at all, even just the color of the sidebar text, and it stops functioning until I undo it. My last couple of attempts I've needed to just close the template and re-open it to get back to the beginning.

 

I tend to suspect that part of this may have to do with the import of the code that you posted. It produced a new .css page with no line breaks and no returns. Just a wall of text. Even though I copied the relevant parts of the code and put them into what appeared to be the proper areas of my base template's .css file as well as into the source code page with the main design elements included. 

 

I suspect that I need to edit that weird .css sheet and reformat it into proper groups where you can find the different elements. It seems a bit premature to start flailing about things as they stand right now. 

 

Which brings up a seperate question. Is there a limit to how many different .css sheets a page or template should be linked to? I know that it's not limited to one, since there are things like the fancybox plug-in which comes with its own .css style sheet, too. So attaching additional style sheets isn't necessesarily a problem in itself. But conflicts between style sheets may very well be.

 

So, once I've reformatted the .all_main.css (or whatever it's named itself) should I go in and remove the duplicates of those elements from my base page's .css so they are not in a position to conflict with one another, which I suspect could be what is happening.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

 

quote

So far, I'm finding this solution a bit fragile. I have my work page saved, and the (blank)icon does function, in that it makes the sidebar move in or go away on a click. But if I make any further change at all, even just the color of the sidebar text, and it stops functioning until I undo it. My last couple of attempts I've needed to just close the template and re-open it to get back to the beginning.

 

By @JoyceOdell

 

That's really nothing to do with the solution. You're most likely struggling to deploy it amongst your existing code and that unless you know what you are doing can bring some teething problems.

 

quote

I tend to suspect that part of this may have to do with the import of the code that you posted. It produced a new .css page with no line breaks and no returns. Just a wall of text. Even though I copied the relevant parts of the code and put them into what appeared to be the proper areas of my base template's .css file as well as into the source code page with the main design elements included. 

 

By @JoyceOdell

 

I have no idea what you are doing, it's a simple case of copying and pasting and that doesnt generate new css files. All this should be executed whilst in code view.

 

quote

I suspect that I need to edit that weird .css sheet and reformat it into proper groups where you can find the different elements. It seems a bit premature to start flailing about things as they stand right now. 

 

Which brings up a seperate question. Is there a limit to how many different .css sheets a page or template should be linked to? I know that it's not limited to one, since there are things like the fancybox plug-in which comes with its own .css style sheet, too. So attaching additional style sheets isn't necessesarily a problem in itself. But conflicts between style sheets may very well be.

 


By @JoyceOdell

 

No there is no limit to how many css files you can have attached to the page. Infact these days GEN Z says the more the merrier and in your case its probably wise to isolate the off-canvas navigation css which will avoid any potential copy and pasting issues.

 

Yes its true that when using sources acquired from  ABC & D there could well be css conflicts. You just need to be aware and keep your eye on the ball.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

I'll have a better idea of what I'm dealing with once I finish the reformatting and clear out the duplicates.. 

2nd half of the question; is there a way to *detach* a .css style sheet from a page or a template?  The Tools menu helps you attach a new one. But I don't see a command to allow you to get rid of one. Or does just saving one under a new name, and deleting the original get rid of the link?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

quote

 

2nd half of the question; is there a way to *detach* a .css style sheet from a page or a template?  The Tools menu helps you attach a new one. But I don't see a command to allow you to get rid of one. Or does just saving one under a new name, and deleting the original get rid of the link?


By @JoyceOdell

 

Can you just not open the file in code view and comment out or delete the link to the css file? Its a long time since I last used the DW editor so I forget how it works in cases of template (.dwt) files if that is what you are using as I think it locks you out of non-editing regions, in some instances. Have a go at tackling it in code view to see if you have editing access to remove the link. If the link is not accessible in a child page of a template you can get rid of it from its parent .dwt file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

Ah. Of course. Yes, that would probably do it. 

The mystery of the prculiar "wall of text" .css file appears to be provisionally solved. It appears to be from a free online resource called Font Awesome Free,  and although there is a fair amount of other mysterious code, it's largely composed of an extensive list of what I suspect are web icons. And, as such, unlikely to be the source of any conflicts.

 

If you subscrive be to that resource, it probably got included with the code you posted inadvertantly. I'll try deleting the link from the .css of my working file. (I'll keep the sample file from the posted code for reference.) The only thing that is likely to be affected is the navIcon, which is being hinky anyway.

 

I'll go through the .css file of my working templateand see about getting rid of duplicates. I know that I'm not using the header that was included in the posted code. So with any luck deleting the referece (which I'd already renamed to avoid conflicting) can be done without fouling everything up.

 

I may not get back here  until tomorrow.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Copy link to clipboard

Copied

On the other hand, quite a bit of the mysterious other code in that .css file has to do with animations. So deleting it might disable the sidebar. But we'll see. 

Q: is there any way to edit a post once posted, or do you just have to add corrections, like this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2024 Mar 05, 2024

Copy link to clipboard

Copied

quote

On the other hand, quite a bit of the mysterious other code in that .css file has to do with animations. So deleting it might disable the sidebar. But we'll see. 

Q: is there any way to edit a post once posted, or do you just have to add corrections, like this?


By @JoyceOdell

 

No it won't disable the sidebar as the little bit of javascript at the end of the page and the css l provided is responsible for that working correctly.

 

The font awesome css is a linked file from a content delivery network CDN. You dont really need to open/view that file at all. The only item on the page that's linked to the font awesome css is the down angle alongside of the top level links in the sidebar. Removing the css will result in the down angles not appearing.

 

As for editing posts after they have been posted  l believe you need to convince the forum management that you are a genuine nice person by posting frequently then l think you get to have certain privileges, like editing your posts. I'm not a moderator, they would have more accurate information about posting  lm sure.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 05, 2024 Mar 05, 2024

Copy link to clipboard

Copied

Ah. Okay, that down symbol is highly useful, and dosen't exist in most character sets. Thank you. 

 

Well I went through everything yesterday evening. Hoo boy did I ever find duplicates. Somehow the .css for my basic template got duplicated about six times in the same file, so any modification only got applied to one of them. No wonder it was being screwy. So that got sorted out.

 

I also spun off the styling code from your post into a seperate .css file, deleted the code from the practice page, and re-attached the new .css. I'm finding that things tend to stop working when modified, but if saved and re-opened they're working again. Seems a bit breakable, but it *does* appear to work.

 

Since the sidebar code lives in the editable area of the page, I probably won't end up with different template for each collection the way I did when there was a whole different button arangement in the header for each of them. It will make updating a bit more tedious since I'll have to open and update each page instead of updating and saving a template. But apart from the publications and graphics collections, which may still get some new pages added, eventually, most of the site probably won't need collection-wide updating once built.

 

I'll have a better idea what I'm dealing with later on this afternoon. I probably am still going to have questions regarding that navIcon, but first I want to get a basic sidebar positioned and styled.

 

Thanks for your help. I do apreciate it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 05, 2024 Mar 05, 2024

Copy link to clipboard

Copied

Well. Update. I've incorporated the sidebar code into my base template page. It works, and I like the look of it. The navIcon still doesn't show its division lines. And I don't know why not. That's going to need to be fixed next. It also still crowds up against the button bar, but I can live with that.

 

I haven't added links yet, but then, I haven't built the pages they link to yet.  I'll try saving one of the opener pages as a template, building the pages of one of the collections from it, and see whether updating that template will enable the program to update all the child pages. But since the sidebar isn't in a non-editable area, I suspect that it isn't going to work. Which is a bit of a bummer, But, hey, I can build pages, link them on the opener page and then copy/paste that sidebar to all of the child pages if I have to. It's tedious, but no worse than that. And only needs to be done again if I add a new page later.

 

So, right now I'm adding sidebars to the opener pages and editing the text for each collection. That will keep me busy for this eveing and into tomorrow.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

"I did it my way ' comes to mind, which is fine because you feel comfortable in doing that and thats what we all did at some stage in our learning journey. There are more streamlined ways, like using server side include files for the navigation where by you would just update the one file and that file would be consumed into the pages that adopt it. However its most likely going to fall outside of your present comfort zone and knowledge for the time being.........so continue doing what you are doing and see if it satisfies your needs.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Well, the provisionary vertdict is that this is going to work. It turns out that the "breakable" behavior that I was concerned about only exists inside of Dreamweaver. The sidebare flashes but doesn't stay open, which makes editing its content a bit like flying blind. In a browser preview, however, everything works fine.

And, no, as things stand I *won't* be able to update all child pages and have them update the sidebar as well.

Or, quite possibly, I could if I just change where the editable portion of the template begins. At present the sidebar is outside the <article> which is where just about where all of the individual page content starts. There's an image in the Title area above that, but that would also be shared by all of the child pages. I'll need to double-check whether there is anything that needs to be editable above the sidebar code and see whether that would be a viable direction to go in.

 

The navIcon's division lines flatly refuse to display in anything other than the example page that I built with the code you posted. Once that .css sheet is linked to my template page they disappear and nothing brings them back. (I've also lost the .fa_icon. Presumably the hover behavior will be enough of a clue to indicate that clicking on that text will do *something*) I *can*, however put text into the navIcon's box. I first just stuck an equal sign in there. The icon still worked in a browser preview. It looks similar, but possibly not similar enough. I may be able to steal enough space from the button bar to have it say 'sidebar', out in the open for everyone to see. 

 

So I've got no shortage of formatting tweaks and twiddles to deal with, but I'm pretty sure that I'll end up with a website. Which may still be static, but more porportioned for laptop screens than desktops. I suspect that I'll need to pay somebody else if I ever want to have it be fully responsive.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

quote

Well, the provisionary vertdict is that this is going to work. It turns out that the "breakable" behavior that I was concerned about only exists inside of Dreamweaver. The sidebare flashes but doesn't stay open, which makes editing its content a bit like flying blind. In a browser preview, however, everything works fine.


By @JoyceOdell

 

I imagined that might be the case. I forget how DW renders pages in design view, live view etc as I dont use it any longer - you should always test in a real browser to see the results.

 

A tip for you whilst editing: Change transform: translateX(-100%); to transform: translateX(0); That should make the div visible.

.mainNav {
position: fixed;
height: 100%;
top: 0;
width: 30%;
padding: 100px 0;
background-color: #262626;
transform: translateX(-100%);
transition: transform 500ms ease-in-out;
overflow: auto;
}

 

You should not really lose any font awesome icon if the library link is correctly attached to the page. If you can get that to work it has a hamburger icon you could use in place of those 3 lines in the navIcon <div>.

 

<i class="fa-solid fa-bars"></i> 

 

However try this initially -

Add the class of 'bar' to the 3 divs inside the navIcon <div>:

 

 

<div class="navIcon">
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
</div>

 

Then add the below css to your stylesheet:

 

.navIcon .bar {
height: 1px;
margin: 3px 0;
background-color: #fff!important;
}

 

Obviously get rid of the original css which styles those bars:

 

.navIcon div {
height: 1px;
margin: 3px 0;
background-color: #fff;
}

 

See if that helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Thank you! I've copied it out to try later. Right at the moment I'm liking the look of using an actual 'sidebar' button, but I may end up wanting to go back to using an icon insted.

 

The idea of changing the editable region so the sidebar is outside it is probably not going to work. The title and meta info are in the area which would be stuck behind the non-editable barier, and those need to be editable for each page. However, I was able to cut/paste the collapsed sidebar code into the point between <header> and the start of the editable region, and it still worked in a browser preview. So that looks like something that I might be able to do in the child pages spun off from my base template which will be saved as templates for the various collections. It that does work, the base template will probably not get used for general maintenance and upkeep of the finished site. Probably won't be touched again until the next time I end up needing to do a rebuild.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 08, 2024 Mar 08, 2024

Copy link to clipboard

Copied

Well, with a bit of tweaking and stuborness I've got it looking very much as I'd prefer, and am finding that moving the page content from the current version of the site is about as painless as it's likely to get. The sidebar isn't precisely "off canvas", but it is off the .container portion of the page. Since this harks back to a design element of my 2013 site rebuild, I'm just as glad to see it, and don't consider it a trouble that needs shooting.

 

Thank you again for all of your help! I'll post again once the site goes up.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 08, 2024 Mar 08, 2024

Copy link to clipboard

Copied

quote

 

Thank you again for all of your help! I'll post again once the site goes up.


By @JoyceOdell

 

No problem. There is no reason why the sidebar should not be completely off canvas if you implement it correctly. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 11, 2024 Mar 11, 2024

Copy link to clipboard

Copied

The main container which holds all the page content "floats" on a pattened bacground of the page 'body'. The sidebar when not deployed butts up against the edge of the  container. Since the container is not at the edge of the screen there's a small gap where the sidebar's color is visible. Like I say, this is reminiscent of a design feature of the 2013 site, so I'm not complaining. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 11, 2024 Mar 11, 2024

Copy link to clipboard

Copied

quote

The main container which holds all the page content "floats" on a pattened bacground of the page 'body'. The sidebar when not deployed butts up against the edge of the  container. Since the container is not at the edge of the screen there's a small gap where the sidebar's color is visible. Like I say, this is reminiscent of a design feature of the 2013 site, so I'm not complaining. 


By @JoyceOdell

 

 

Right, the side bar should not really be inside the main container, it should sit outside of it in the <body> </body> container as its designed to work independently of everything else on the page by having a position of fixed.

 

If you want it to disappear completely and dont want to move the code then try amending the css to -120%:

 

.mainNav {
position: fixed;
height: 100%;
top: 0;
width: 30%;
padding: 100px 0;
background-color: #262626;
transform: translateX(-120%);
transition: transform 500ms ease-in-out;
overflow: auto;
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 11, 2024 Mar 11, 2024

Copy link to clipboard

Copied

Thank you! I'll add that to the page of code regarding the sidebar. Like I say, at present I like the effect. But I may change my mind down the road.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 16, 2024 Mar 16, 2024

Copy link to clipboard

Copied

I'm coming into the home stretch here and have encountered someting unexpected. Everything works just fine as long as the pages are 120kb or less.  There are a few of the pages in the collection that are larger than that, and when testing the sidebar links in Live Preview those pages refuse to load. They load fine when I test them directly in Live preview from Dreamweaver, But if I open up another page in Live Preview, open up the sidebar, and chosing them from there, I get a blank white page where nothing will load.

 

This didn't happen with the current site (althoughn it might have something to do with what caused the glitch which is making that site unusable). But none of the three browsers that i have access to will load those pages. Or at least not in anything like a timely manner. They *might* eventually load if I let them just sit and chew on them. But people aren't going to wait that long for a page to load.

 

Is there an actual limit to the size of a page that will load from these sidebar links?  The 8 pages that are balking range from 134kb to 180kb. None of these files were significantly smaller in the 2013 site, and they loaded without issue then, too. Do ou know of a work-around that might deal with this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines