Created
February 21, 2015 16:24
-
-
Save tagr/0b520a3ebf75ba8c4c35 to your computer and use it in GitHub Desktop.
KwRKYw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul | |
each val in [1, 2, 3, 4, 5, 6, 7] | |
li | |
a(href='#'+val)= val |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var currentPage = parseInt(location.hash.replace('#',''), 10) | 0; | |
var applyEllipsis = function() { | |
$('a').each(function(){ | |
$(this).addClass('ellipsis ellipsis-after'); | |
}); | |
}(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$baseSize: 1rem; | |
$color: #ccc; | |
$ellipsis: '...'; | |
ul { | |
list-style: none; | |
li { | |
display: table-cell; | |
padding: $baseSize; | |
&:nth-child(-n+2) a, | |
&:nth-last-child(-n+2) a { | |
display: inline-block; | |
} | |
} | |
} | |
a { | |
//border: $baseSize*0.1 solid $color; | |
color: $color; | |
display: none; | |
font: 700 $baseSize sans-serif; | |
padding: 0.3rem $baseSize; | |
text-decoration: none; | |
} | |
.ellipsis { | |
} | |
.ellipsis-before { | |
&::before { | |
border: none; | |
content: $ellipsis; | |
} | |
} | |
.ellipsis-after { | |
&::after { | |
border: none; | |
content: $ellipsis; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment