Converting Bootstrap theme.
Permalink
Hi All
I am just starting out trying to convert a bootstrap html them to C5.
I want at this stage to only part convert it so in essence the Text areas and the navigation and leave the rest working as html.
My question is this:
I currently have converted these and created a header for them:
But I also have these and I am not sure if I should themepath them also?:
Also all the .js scripts are currently in the footer section of the html template looking like this:
Should I leave them in the footer and keep the javascripts folder in the root or should I bring them into the theme?
If I do bring them into the theme do I use the getthemepath and map accordingly?
Any advice greatly appreciated.
I am just starting out trying to convert a bootstrap html them to C5.
I want at this stage to only part convert it so in essence the Text areas and the navigation and leave the rest working as html.
My question is this:
I currently have converted these and created a header for them:
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getThemePath() ?>/css/bootstrap.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getThemePath() ?>/css/responsive.css" /> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getStylesheet('/css/theme.css') ?>" />
But I also have these and I am not sure if I should themepath them also?:
<link href="stylesheets/font-awesome-all.css" media="screen" rel="stylesheet" type="text/css" /> <link href="stylesheets/fancybox.css" media="screen" rel="stylesheet" type="text/css" /> <link href="stylesheets/fonts.css" media="screen" rel="stylesheet" type="text/css" />
Also all the .js scripts are currently in the footer section of the html template looking like this:
<script src="javascripts/jquery.min.js" type="text/javascript"></script> <script src="javascripts/bootstrap.js" type="text/javascript"></script> <script src="javascripts/jquery.flexslider-min.js" type="text/javascript"></script> <script src="javascripts/jquery.tweet.js" type="text/javascript"></script> <script src="javascripts/jquery.fancybox.pack.js" type="text/javascript"></script> <script src="javascripts/jquery.fancybox-media.js" type="text/javascript"></script> <script src="javascripts/script.js" type="text/javascript"></script>
Should I leave them in the footer and keep the javascripts folder in the root or should I bring them into the theme?
If I do bring them into the theme do I use the getthemepath and map accordingly?
Any advice greatly appreciated.
Hi Rony
Thank you for your quick reply.
I will try out as you suggest and let you know how I get on.
I am guessing as I am leaving the images and sliders in place I just add the images used in the root in a images folder?
Thank you for your quick reply.
I will try out as you suggest and let you know how I get on.
I am guessing as I am leaving the images and sliders in place I just add the images used in the root in a images folder?
Sorry forgot to ask something.
Do you think it is best to leave the js calls in the footer or move them to the header?
Am I right in thinking that my new .js call would look like this?
edit, forgot a / but its added now
Do you think it is best to leave the js calls in the footer or move them to the header?
Am I right in thinking that my new .js call would look like this?
<link rel="stylesheet" media="screen" type="text/css" href="<?php echo $this->getThemePath() ?>/javascripts/bootstrap.js" />
edit, forgot a / but its added now
It is good to call all the js file in footer, so that it won't take too much time to initialize the page and loads it faster. Also the syntax is fine. Go ahead.
Rony
Rony
You don't need to move you js files, just put the theme path before that.
Rony