I'm using Django to handle my templates. From the picture I am trying to explain what I want in the web page. For convenience I have given the number for the blocks in the picture. I have created blocks 3,4 5,6, and 7 in one .html file.
I actually want navbar1 and navbar2 to display in every page of my project, and that's why I have to create one separate .html file for each. The problem is that I'm not able to apply two navbars in one html file. I also tried with the sidebar (for navbar2), but have faced some issues.
Dropdown button doesn't work on the sidebar and,
When I reload the page, the menu of the side bar will display first and then the sidebar will overwrite the menu and then visualize properly.
Please suggest to me how I can design the page for navbar1 and navbar2 in one html file.
Creating a base.html template that all other templates inherit/extend from should do the trick. Here's a website post going in depth upon how to accomplish this: https://tutorial.djangogirls.org/en/template_extending/
Related
I'm building a simple personal static webpage. It'll be 4-5 pages (maybe more later) that all share a nav bar and header design at the top of the page.
I don't want to repeat the HTML and CSS for the navbar/header at the top of every page - ideally I'd like it all in one place.
If I were creating this using a web framework like Django, Sinatra, Rails, etc... I could use templates and partials to build the page using shared components like the navbar/header.
But I'm trying to keep things as simple as possible since it's a small set of static pages.
Is there a way to keep all the HTML in one file and reference it from the other files?
If not, is there a simple tool that will let me leverage the functionality that partials and templates provide, and just "compile" the final product into a series of HTML pages?
Thanks!
Use a one main Html file with all navigation bars, footer, menu and etc.
Keep a blank place, for example a blank div in the main page.
Keep other html pages in a separate place.
Load the contents dynamically to the blank div in the main page using javascripts.
acausedesbrunettes.com and I am trying to change the HTML code for the navigation bar (home - category) into the individual pages "events" "fashion" "food" "travel" so that my posts using the #events, #fashion, #food, #travel appear on these individual pages. Can anyone help me in how I have to entry this in the template's HTML?
I would also like for the thumbnails to be bigger; how can I adjust this?
And if you place your mouse on a post you see the "comments" section, I would also want to delete this so that the text of the post istelf only shows.
To change the navigation bar, you'll want to use your WordPress admin area, instead of changing HTML code (you could change the HTML code, but you would have to dig and dig to find where it is in the PHP files in your site's directory). Hover over "Appearance" and select "Menus".
For the size of thumbnails, use CSS in the style.css file (hopefully you're using a child theme). And to remove comments, try a plugin called "disable comments".
I am new to CSS and trying to find out how to keep the state of a css based menu over multiple pages.
The situation is like this
I am working on an intranet site.
There is a set structure of the website. I have content files and a left menu file. The left menu file is used for creating links to other pages and it is imported in all the content files. (these are ASP files and I am not sure what we call it technically for using the content of one file in all the other files).
So the task is that I have a site map and I want to translate it into the links in the left menu file so that they appear in all the content pages.
I am using this example and adjusted it for my needs. The problem is when I go from one page to the other the state of the expanded and collapsed nodes does not stay the same. What is the best way to achieve this.
I made a drop down menu using HTML and CSS. Something like this: http://sneznipark-kg.si/
How can i put a menu in external file(so that i don't need to make changes to it on every page individually)?
I could use iframes, but the problem there is, that elements that "drop down", are only visible in iframe, not on the main page.
I found some solutions using PHP, but i cant use those, because contract with my server provider doesn't include databases (so i cant use PHP, right?).
I think you are looking for:
How to Make Website Navigations with PHP Includes:
http://www.youtube.com/watch?v=IMh2cGIX41g
Simple PHP/HTML navbar for a static website:
http://www.youtube.com/watch?v=v8PUIVn3NFE
As mentioned above, you should be able to use PHP.
If you're not opposed to jquery AND both files are on the same domain. You can use .load().
http://api.jquery.com/load/
You can use any container as a place holder. Like a div, then load the html page into the div. It will put the entire page into the div. So you probably just need to add the menu part, and not the entire html markup.
I am using squarespace developer kit and going well. I am wanting to integrate some queries to display some very simple data form my blogs that will appear on my home page ONLY.
Not being very fluent in JSON, I am struggling to implement the query on the home page. I have it set up to display the data from the selected blog but it displays the data through each page.
I only want the data to be visible on the home page at the top. Not in the header but inside where all the content is.
Here is my query that works perfectly well
<squarespace:query collection="feature-articles" limit="10">
<li>
{.repeated section items}
<li>{title}</li>
{.end}
</li>
</squarespace:query>
Can the data be inserted into a code block via the content manager so I can then insert into within the content or am I totally wrong in thinking that.
What I will then do is style/ add or edit the UI of the data into either a carousel or whatever is needed for the project.
I just need to know where to store the query so that it fits in with the content.
Appreciate any time.
Review the following link to see how you can edit a template file, to make different pages use different templates.
http://developers.squarespace.com/template-configuration/
Make a completely custom template just for your homepage then paste you code within your custom .region file as outlin ed in the above guide.
Here is the page about working with template pages:
http://developers.squarespace.com/layouts-regions/
Seeing as you know about , I have a feeling you might already know this, so you might want to be a bit more specific about how your displaying your code and I will gladly update my answer.