mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
lol tabs
This commit is contained in:
62
HTML/css/tabs.css
Normal file
62
HTML/css/tabs.css
Normal file
@@ -0,0 +1,62 @@
|
||||
* { margin: 0; padding: 0; }
|
||||
body { font: 12px "Lucida Grande", Helvetica, Arial, serif; }
|
||||
iframe { border: 0; }
|
||||
|
||||
.clearfix:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
content: " ";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#EEEEEE), to(#D8D7D8));
|
||||
padding: 3px 0 0 0;
|
||||
}
|
||||
|
||||
#tabs ul {
|
||||
list-style: none;
|
||||
border-bottom: 1px solid #a0a0a0;
|
||||
|
||||
}
|
||||
#tabs ul li { display: inline; }
|
||||
|
||||
#tabs ul li.active a {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
height: 8px;
|
||||
margin-top: -2px;
|
||||
margin-bottom: -4px;
|
||||
background: #eee;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
#tabs ul li a {
|
||||
display: block;
|
||||
float: left;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
height: 8px;
|
||||
|
||||
padding: 3px 50px 7px;
|
||||
margin: 0 -5px 0 0;
|
||||
color: #222;
|
||||
background: #d8d7d8;
|
||||
|
||||
-webkit-border-top-right-radius: 10px 20px;
|
||||
-webkit-border-top-left-radius: 10px 20px;
|
||||
|
||||
-webkit-box-shadow: inset 1px 1px 0 white;
|
||||
|
||||
border: 1px solid #a0a0a0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
-webkit-box-shadow: inset 0 1px 0 white;
|
||||
-moz-box-shadow: inset 0 1px 0 white;
|
||||
height: 97%;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<frameset cols="0%,*" frameborder=no framespacing=0 border=0>
|
||||
<frameset cols="0%,100%" frameborder=no framespacing=0 border=0>
|
||||
<frame src="project.html">
|
||||
<frame src="editor.html">
|
||||
<frame src="tabs.html">
|
||||
</frameset>
|
||||
</html>
|
||||
|
||||
26
HTML/lib/tabs.coffee
Normal file
26
HTML/lib/tabs.coffee
Normal file
@@ -0,0 +1,26 @@
|
||||
# {$} = require 'jQuery'
|
||||
|
||||
# awesome hover effect
|
||||
if false
|
||||
$('#tabs ul li:not(".active") a').mousemove (e) ->
|
||||
originalBG = $(this).css("background-color")
|
||||
x = e.pageX - @offsetLeft
|
||||
y = e.pageY - @offsetTop
|
||||
xy = x + " " + y
|
||||
|
||||
bgWebKit = "-webkit-gradient(radial, #{xy}, 0, #{xy}, 100, from(rgba(255,255,255,0.8)), to(rgba(255,255,255,0.0))), #{originalBG}"
|
||||
|
||||
$(this).css background: bgWebKit
|
||||
|
||||
$('#tabs ul li:not(".active") a').mouseleave (e) ->
|
||||
$(this).removeAttr 'style'
|
||||
|
||||
# events
|
||||
$('#tabs ul a').click ->
|
||||
$('#tabs ul .active').removeClass()
|
||||
$(this).parents('li').addClass 'active'
|
||||
|
||||
idx = $('#tabs ul a').index this
|
||||
$('.content iframe').hide().eq(idx).show().focus()
|
||||
|
||||
false
|
||||
26
HTML/tabs.html
Normal file
26
HTML/tabs.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<head>
|
||||
<link href="css/tabs.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="tabs">
|
||||
<ul class="clearfix">
|
||||
<li class="active"><a href="#">untitled</a></li>
|
||||
<li><a href="#">untitled 2</a></li>
|
||||
<li><a href="#">untitled 3</a></li>
|
||||
<li><a href="#">untitled 4</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<iframe src="editor.html" width="100%" height="100%"></iframe>
|
||||
<iframe src="editor.html" width="100%" height="100%" style="display:none"></iframe>
|
||||
<iframe src="editor.html" width="100%" height="100%" style="display:none"></iframe>
|
||||
<iframe src="editor.html" width="100%" height="100%" style="display:none"></iframe>
|
||||
</div>
|
||||
|
||||
<script src="vendor/jquery.js"></script>
|
||||
<script src="lib/tabs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user