Skip to content

Instantly share code, notes, and snippets.

  • Save pafnuty/4947036 to your computer and use it in GitHub Desktop.
Save pafnuty/4947036 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body { padding-top: 60px; padding-bottom: 40px; }
</style>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="http://twitter.github.com/bootstrap/assets/images/favicon.ico">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="http://twitter.github.com/bootstrap/assets/images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="http://twitter.github.com/bootstrap/assets/images/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<div id="trololo">HelloWorld</div>
<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit">
<h1>Hello, world!</h1>
<p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
</div>
<!-- Example row of columns -->
<div class="row">
<div class="span4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p>
</div>
<div class="span4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
<p><a class="btn" href="#">View details &raquo;</a></p>
</div>
<div class="span4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
</div>
</div>
<hr>
<footer>
<p>&copy; Company 2012</p>
</footer>
</div> <!-- /container -->
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-transition.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-alert.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-modal.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-dropdown.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-scrollspy.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-tab.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-tooltip.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-popover.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-button.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-collapse.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-carousel.js"></script>
<script src="https://raw.github.com/twitter/bootstrap/master/js/bootstrap-typeahead.js"></script>
<script>
function ShowModal(id,opt){
opt=$.extend({id:$('#'+id),title:'',close:true},opt||{});
opt.title=opt.title||opt.id.attr('title')||'';
opt.isButtons=(opt.buttons);
opt.buttons=opt.buttons||{};
opt.elButtons=$('<div>').addClass('modal-footer');
if(opt.close) $('<a href="#" class="btn" data-dismiss="modal" aria-hidden="true">Close</a>').appendTo(opt.elButtons);
var el=$('<div tabindex="-1" role="dialog" aria-hidden="true"></div>').attr('id','modalDialog-'+id).addClass('modal hide fade').appendTo('body');
$.each(opt.buttons,function(a,b){ $('<a href="#" class="btn">'+a+'</a>').data('d',[b,el]).click(function(){var a=$(this).data('d');a[0].apply(a[1].get(0))}).appendTo(opt.elButtons)})
if(opt.close||opt.title)el.append( $('<div>').addClass('modal-header').append((opt.close?'<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>':'')+(opt.title?'<h3>'+opt.title+'</h3>':'')));
el.append( $('<div>').addClass('modal-body').append(opt.id) );
if(opt.close||opt.isButtons)el.append( opt.elButtons );
el.modal('show');
return el
}
$(document).ready(function(){
ShowModal('trololo',{title:'Тестовой заголовок',buttons:{
'Привет':function(){
alert('123');
$(this).modal('hide')
}
}})
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment