Created
June 24, 2017 15:24
-
-
Save x35a/bfa29b777847d2d95881e2aca054096f to your computer and use it in GitHub Desktop.
Project map
This file contains 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
// npm run add map | |
// gulp addmap | |
function addMap(cb){ | |
var files = fs.readdirSync('./build'); | |
var links = 'ul.project__map\n'; | |
var path = './dev/components/map/_map.jade' | |
for(var i in files) { | |
if( files[i].split('.').pop() == 'html'){ | |
links = links + '\tli\n\t\ta(href="/' + files[i] + '") ' + files[i].slice(0, -5)+'\n' | |
} | |
} | |
fs.writeFile( path , links); | |
cb(); | |
} | |
gulp.task('addmap', function(cb){ | |
addMap(cb) | |
}) |
This file contains 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
.project__map | |
position fixed | |
z-index 1000 | |
bottom 100% | |
left 0 | |
padding 10px | |
transition .3s | |
background-color white | |
border 1px solid #ccc | |
@extend $list-reset | |
&:after | |
content 'All pages' | |
position absolute | |
left 10% | |
top 100% | |
padding 10px | |
color black | |
border 1px solid #ccc | |
border-bottom-left-radius 5px | |
border-bottom-right-radius 5px | |
background-color white | |
&:hover | |
bottom auto | |
top 0 | |
&:after | |
display none | |
li | |
list-style none | |
display block | |
padding 3px 10px | |
a | |
font-size 20px | |
color #26818e | |
text-decoration none | |
&:visited | |
color #ef7d0b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment