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>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!--- #neck --->
|
|
||||||
<section id="neck">
|
|
||||||
<div class="wide-layout tall">
|
|
||||||
<div style="right: 131px;" id="glow-arrow" class="forum"></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!--- #body --->
|
<!--- #body --->
|
||||||
<section id="body" class="forum">
|
<section id="body" class="forum">
|
||||||
<div id="body-border"></div>
|
<div id="body-border"></div>
|
||||||
|
|
@ -171,9 +164,6 @@
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="${frontQuery}js/arrow.js"></script>
|
|
||||||
<script src="${frontQuery}js/forum.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
#end proc
|
#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; }
|
.talk-layout { margin:0 40px; }
|
||||||
.wide-layout { margin:0 auto; }
|
.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.docs { margin-left:280px; background:rgba(0,0,0,.25) url("/images/head-fade.png") no-repeat right top; }
|
||||||
#head > div { position:relative }
|
#head > div { position:relative }
|
||||||
|
|
||||||
|
|
@ -76,24 +79,23 @@ pre .EscapeSequence
|
||||||
text-shadow 0.4s ease-in-out; }
|
text-shadow 0.4s ease-in-out; }
|
||||||
#head-links > a:hover,
|
#head-links > a:hover,
|
||||||
#head-links > a.active {
|
#head-links > a.active {
|
||||||
|
position: relative;
|
||||||
color:#1cb3ec;
|
color:#1cb3ec;
|
||||||
text-shadow:0 0 4px rgba(28,179,236,.8);
|
text-shadow:0 0 4px rgba(28,179,236,.8);
|
||||||
background-image:url("/images/head-link_hover.png"); }
|
background-image:url("/images/head-link_hover.png"); }
|
||||||
|
|
||||||
#head-banner { width:200px; height:100px; background:#000; }
|
#head-links > a.active:after {
|
||||||
|
display: block;
|
||||||
#neck { z-index:0; height:40px; }
|
content: "";
|
||||||
#neck.home { height:370px; }
|
width: 771px;
|
||||||
#neck > div { position:relative }
|
background: url("/images/glow-arrow.png") no-repeat left;
|
||||||
|
height: 41px;
|
||||||
#glow-arrow {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:-9px;
|
left: 50%;
|
||||||
left:0;
|
bottom: -49px;
|
||||||
right:-16px;
|
transform: translateX(-618px); }
|
||||||
height:48px;
|
|
||||||
background:url("/images/glow-arrow.png") no-repeat right; }
|
#head-banner { width:200px; height:100px; background:#000; }
|
||||||
glow-arrow.docs { left:280px; }
|
|
||||||
|
|
||||||
#glow-line-vert {
|
#glow-line-vert {
|
||||||
position:fixed;
|
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