Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
chanan committed Jul 21, 2019
1 parent 7770ae4 commit a556fe0
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion docs/_content/BlazorStyled/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,25 @@ window.styledJsFunctions = {
},
clearAllRules: function () {
const head = document.head;
head.removeChild(styleEl);
if (styleEl !== undefined) head.removeChild(styleEl);
createStylesheet();
return true;
},
addGoogleFont: function (fontlink) {
const head = document.head;
var found = false;
var links = head.getElementsByTagName("link");
for (let tag of links) {
if (trimHref(tag.href) === trimHref(fontlink)) found = true;
}
if (!found) {
link = document.createElement('link');
head.insertBefore(link, document.head.firstChild);
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = fontlink;
}
return true;
}
};

Expand All @@ -39,4 +55,8 @@ function createStylesheet() {
head.appendChild(styleEl);
}
styleSheet = styleEl.sheet;
}

function trimHref(href) {
return href.substring(href.indexOf("//") + 2);
}
Binary file modified docs/_framework/_bin/BlazorPrettyCode.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorStyled.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorStyled.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/Mono.Security.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Sample.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Sample.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Core.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Data.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Net.Http.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Numerics.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Runtime.Serialization.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Xml.Linq.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Xml.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/mscorlib.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion src/BlazorStyled/BlazorStyled.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>BlazorStyled</PackageId>
<Version>1.0.0-preview6-08</Version>
<Version>1.0.0-preview6-09</Version>
<Authors>Chanan Braunstein</Authors>
<Title>BlazorStyled</Title>
<Description>CSS in Blazor Components</Description>
Expand Down

0 comments on commit a556fe0

Please sign in to comment.