javascript - Twitter bootstrap on Node.js and Express -
how can use twitter bootstrap on node.js , express?
i know have put css , javascript files in ./public
directory (if it's set default). when how use twitter bootstrap on node.js , express, know there many variants on using twitter bootstrap.
for example, put bootstrap css , js files in appropriate directories, or specify :
<link rel='stylesheet' href='assets/css/bootstrap-responsive.css'> <link rel='stylesheet' href='https://d396qusza40orc.cloudfront.net/startup%2fcode%2fbootstrap.js'>
etc, , there 2 sources, normal , .min.css
file, each css , js. how can serve appropriate bootstrap file in node.js , express?
here's first few lines of current code (is necessary?), not working responsive design (it doesn't stack vertically when narrow screen mimic size of smartphones, , instead scale down size each ratio being same).
<!doctype html> <html lang='en'> <head> <meta charset='utf-8'> <title><%= title %></title> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <link rel='stylesheet' href='/stylesheets/bootstrap.min.css'> <link rel='stylesheet' href='assets/css/bootstrap-responsive.css'> <script src='/javascripts/jquery-2.0.2.min.js'></script> <style type='text/css'> /* large desktop */ @media (min-width: 980px) { body { padding-top: 60px; } } /* smartphones */ @media (max-width: 480px) { body { padding-top: 30px; } } </style> </head>
create 1 sub folder in public folder , name stylesheets.then put twiter bootstraper css files in stylesheets folder.then can link file below.follow same js files also.
<link rel='stylesheet' href='stylesheets/bootstrap.min.css'> <link rel='stylesheet' href='stylesheets/bootstrap-responsive.css'> <script src='javascripts/jquery-2.0.2.min.js'></script>
Comments
Post a Comment