Skip to content

Instantly share code, notes, and snippets.

@x35a
Created June 24, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save x35a/bfa29b777847d2d95881e2aca054096f to your computer and use it in GitHub Desktop.
Save x35a/bfa29b777847d2d95881e2aca054096f to your computer and use it in GitHub Desktop.
Project map
// 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)
})
.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