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
<div class="image"> | |
image | |
</div> | |
.image { | |
text-indent: -9999px; | |
width: 100px; | |
height: 50px; | |
background-image: url("image.svg"); | |
background-size: 100px 50px; |
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
<div class="image"> | |
image | |
</div> | |
.image { | |
text-indent: -9999px; | |
width: 100px; | |
height: 50px; | |
background-image: url("image.svg"); | |
background-size: 100px 50px; |
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
<body> | |
<svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> | |
<path d="M24 10.935v2.131l-8 3.947v-2.23l5.64-2.783-5.64-2.79v-2.223l8 3.948zm-16 3.848l-5.64-2.783 5.64-2.79v-2.223l-8 3.948v2.131l8 3.947v-2.23zm7.047-10.783h-2.078l-4.011 16h2.073l4.016-16z"/> | |
</svg> | |
</body> |
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
.icon { | |
width: 50px; | |
height 50px; | |
fill: red; | |
} | |
.icon:hover { | |
fill: blue; | |
} |
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
<body> | |
<!-- svg file --> | |
<svg style="display: none;" aria-hidden="true"> | |
<symbol id="icon-twitter" ...><path ...></path></symbol> | |
<symbol id="icon-instagram" ...><path ...></path></symbol> | |
</svg> | |
<!-- svg use case, twitter icon --> | |
<svg xmlns="http://www.w3.org/2000/svg" class="icon-twitter"> | |
<use xlink:href="#icon-twitter"></use> |
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 ajax = new XMLHttpRequest(); | |
ajax.open("GET", "svg/sprite.svg", true); | |
ajax.send(); | |
ajax.onload = function(e) { | |
var div = document.createElement("div"); | |
div.innerHTML = ajax.responseText; | |
document.body.insertBefore(div, document.body.childNodes[0]); | |
}; |
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
<body> | |
<!-- svg use case, twitter icon --> | |
<svg xmlns="http://www.w3.org/2000/svg" class="icon-twitter"> | |
<use xlink:href="#icon-twitter"></use> | |
</svg> | |
<!-- svg use case, instagram icon --> | |
<svg xmlns="http://www.w3.org/2000/svg" class="icon-instagram"> | |
<use xlink:href="#icon-instagram"></use> | |
</svg> |
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
.icon { | |
width: 50px; | |
height 50px; | |
fill: red; | |
} | |
.no-svg .icon { | |
background-image: url("icon.png"); | |
background-repeat: no-repeat; | |
background-size: 50px 50px; |
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
@using Contensis.Framework.Web | |
@using Contensis.Framework.Web.Search | |
@using System.Collections | |
@using System.Collections.ObjectModel | |
@using System.Text.RegularExpressions; | |
@{ | |
if (CurrentNode.Data.Property_SynchronisationSourceMasterContentID >= 0) | |
{ | |
int masterPageContentID = CurrentNode.Data.Property_SynchronisationSourceMasterContentID; | |
Node masterPage = null; |
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
//Something like this | |
@{ | |
var RelatedDocuments = CurrentNode.RelatedNodes("Related Documents"); | |
} | |
@foreach(var item in RelatedDocuments) { | |
var itemSize = SizeSuffix(item.Size); | |
@itemSize |