%nojs-filetype-icons {
padding: 1px 0 1px 20px;
margin: 0 0 0 5px;
content: "";
background-repeat: no-repeat;
}
a[href$=".doc"]:after,
a[href$=".docx"]:after,
a[href$=".dot"]:after,
a[href$=".dotx"]:after {
@extend %nojs-filetype-icons;
background-image: url('#{$imgPath}/bg_file_doc.png');
}
a[href$=".pdf"]:after {
@extend %nojs-filetype-icons;
background-image: url('#{$imgPath}/bg_file_pdf.png');
}
a[href$=".ppt"]:after,
a[href$=".pptx"]:after,
a[href$=".pptm"]:after {
@extend %nojs-filetype-icons;
background-image: url('#{$imgPath}/bg_file_ppt.png');
}
a[href$=".xls"]:after,
a[href$=".xlsx"]:after,
a[href$=".xlsm"]:after,
a[href$=".xltx"]:after {
@extend %nojs-filetype-icons;
background-image: url('#{$imgPath}/bg_file_xls.png');
}
a[href$=".zip"]:after,
a[href$=".7z"]:after,
a[href$=".rar"]:after {
@extend %nojs-filetype-icons;
background-image: url('#{$imgPath}/bg_file_zip.png');
}
Show filetype icons on links for 'common office documents'.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.