Skip to content

ibrahimozgon/Asp.net-View-Inline-Content-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InlineContentHelper

Adds inline content files to html output You can use this library to draw critical css or js files to html output in asp.net mvc projects You can find details about critical css here

Usage

	@using InlineContentHelper.Helpers
	<html>
	<head>
		@Html.InlineStyles("critical-style")
		@Html.InlineScripts("critical-script")
	</head>
	</html>

Path

You need to add your files under Contents folder Contents

	 => script
		=>critical-script.js
		=>critical-script.mobile.js
	 => style
		=>critical-style.js
		=>critical-style.mobile.js

Mobile View Support

Like ASP.NET MVC Dislay Mode support, InlineContentHelper also support different files in different display mode. If you use

	@Html.InlineStyles("critical-style")

library adds .mobile extension for mobile page rendering.

Caching

Library cache inline-files after first fetch. It uses dictionary to cache string items. You can look at FirstLevelCacheManager

About

Adds inline content files to html output

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages