Position glow arrow with CSS
This commit is contained in:
parent
7e32c81358
commit
aacd7639a3
6 changed files with 157 additions and 199 deletions
10
main.tmpl
10
main.tmpl
|
|
@ -33,13 +33,6 @@
|
|||
</div>
|
||||
</header>
|
||||
|
||||
<!--- #neck --->
|
||||
<section id="neck">
|
||||
<div class="wide-layout tall">
|
||||
<div style="right: 131px;" id="glow-arrow" class="forum"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!--- #body --->
|
||||
<section id="body" class="forum">
|
||||
<div id="body-border"></div>
|
||||
|
|
@ -171,9 +164,6 @@
|
|||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
|
||||
<script src="${frontQuery}js/arrow.js"></script>
|
||||
<script src="${frontQuery}js/forum.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
#end proc
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
function positionGlowArrow() {
|
||||
var headLinks = document.getElementById("head-links");
|
||||
var activeLink = headLinks.getElementsByClassName("active")[0]
|
||||
if (activeLink == undefined || activeLink == null)
|
||||
return;
|
||||
|
||||
var offset = (headLinks.offsetWidth - activeLink.offsetLeft) - (activeLink.offsetWidth / 2) - 133;
|
||||
var glowArrow = document.getElementById("glow-arrow");
|
||||
glowArrow.style.right = offset + "px";
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
window.onload = function() {
|
||||
positionGlowArrow();
|
||||
};
|
||||
|
|
@ -34,7 +34,10 @@ pre .EscapeSequence
|
|||
.talk-layout { margin:0 40px; }
|
||||
.wide-layout { margin:0 auto; }
|
||||
|
||||
#head { height:100px; background:url("/images/head.png") repeat-x bottom; }
|
||||
#head {
|
||||
height:100px;
|
||||
margin-bottom: 40px;
|
||||
background:url("/images/head.png") repeat-x bottom; }
|
||||
#head.docs { margin-left:280px; background:rgba(0,0,0,.25) url("/images/head-fade.png") no-repeat right top; }
|
||||
#head > div { position:relative }
|
||||
|
||||
|
|
@ -76,24 +79,23 @@ pre .EscapeSequence
|
|||
text-shadow 0.4s ease-in-out; }
|
||||
#head-links > a:hover,
|
||||
#head-links > a.active {
|
||||
position: relative;
|
||||
color:#1cb3ec;
|
||||
text-shadow:0 0 4px rgba(28,179,236,.8);
|
||||
background-image:url("/images/head-link_hover.png"); }
|
||||
|
||||
#head-banner { width:200px; height:100px; background:#000; }
|
||||
|
||||
#neck { z-index:0; height:40px; }
|
||||
#neck.home { height:370px; }
|
||||
#neck > div { position:relative }
|
||||
|
||||
#glow-arrow {
|
||||
#head-links > a.active:after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 771px;
|
||||
background: url("/images/glow-arrow.png") no-repeat left;
|
||||
height: 41px;
|
||||
position: absolute;
|
||||
top:-9px;
|
||||
left:0;
|
||||
right:-16px;
|
||||
height:48px;
|
||||
background:url("/images/glow-arrow.png") no-repeat right; }
|
||||
glow-arrow.docs { left:280px; }
|
||||
left: 50%;
|
||||
bottom: -49px;
|
||||
transform: translateX(-618px); }
|
||||
|
||||
#head-banner { width:200px; height:100px; background:#000; }
|
||||
|
||||
#glow-line-vert {
|
||||
position:fixed;
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
function positionGlowArrow() {
|
||||
var headLinks = document.getElementById("head-links");
|
||||
var activeLink = headLinks.getElementsByClassName("active")[0]
|
||||
if (activeLink == undefined || activeLink == null)
|
||||
return;
|
||||
|
||||
var offset = (headLinks.offsetWidth - activeLink.offsetLeft) - (activeLink.offsetWidth / 2) - 133;
|
||||
var glowArrow = document.getElementById("glow-arrow");
|
||||
glowArrow.style.right = offset + "px";
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
window.onload = function() {
|
||||
positionGlowArrow();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue