public void EnableStyleSheetsForSet(String name) { if (name != null) { StyleSheets.EnableStyleSheetSet(name); } }
public static GlobalSetup UseCssStyles <TControl>(this GlobalSetup setup) { StyleSheets.RegisterStyle("background", typeof(TControl), nameof(GradientControl.GradientSourceProperty)); StyleSheets.RegisterStyle("background-size", typeof(TControl), nameof(GradientControl.GradientSizeProperty)); StyleSheets.RegisterStyle("background-repeat", typeof(TControl), nameof(GradientControl.GradientRepeatProperty)); return(setup); }
public virtual void initialisation() { PageTitle = "CoreUI - Open Source Bootstrap Admin Template"; Metas.Add("viewport", "width=device-width, initial-scale=1, shrink-to-fit=no"); Metas.Add("description", "CoreUI - Open Source Bootstrap Admin Template"); Metas.Add("author", "Łukasz Holeczek / Labaste Hugues"); Metas.Add("keyword", "Bootstrap,Admin,Template,Open,Source,AngularJS,Angular,Angular2,Angular 2,Angular4,Angular 4,jQuery,CSS,HTML,RWD,Dashboard,React,React.js,Vue,Vue.js"); StyleSheets.Add("/content/core-ui/css/font-awesome.min.css"); StyleSheets.Add("/content/core-ui/css/simple-line-icons.css"); StyleSheets.Add("/content/core-ui/css/style.css"); Javascripts.Add("/scripts/core-ui/bower_components/jquery/dist/jquery.min.js"); Javascripts.Add("/scripts/core-ui/bower_components/tether/dist/js/tether.min.js"); Javascripts.Add("/scripts/core-ui/bower_components/bootstrap/dist/js/bootstrap.min.js"); Javascripts.Add("/scripts/core-ui/bower_components/pace/pace.min.js"); Javascripts.Add("/scripts/core-ui/bower_components/chart.js/dist/Chart.min.js"); Javascripts.Add("/scripts/core-ui/js/app.js"); Javascripts.Add("/scripts/core-ui/js/views/main.js"); ShortcutIcon = "img/favicon.png"; }
public virtual void Compose(IGraphScene <TItem, TEdge> scene, IGraphItemRenderer <TItem, TEdge> itemRenderer) { this.Scene = scene; Func <IGraphScene <TItem, TEdge> > fScene = () => this.Scene; if (StyleSheet == null) { StyleSheet = new StyleSheets().Compose().DefaultStyleSheet; StyleSheet.BackColor = Colors.WhiteSmoke; // maybe created with wrong toolkit! Registry.Pooled<StyleSheets>().DefaultStyleSheet; } if (Layout == null) { Layout = Registry.Factory.Create <IGraphSceneLayout <TItem, TEdge> >(fScene, StyleSheet); Layout.Dimension = Limaki.Drawing.Dimension.X; } if (Painter == null) { Painter = new GraphSceneContextPainter <TItem, TEdge>(Scene, Layout, itemRenderer); } if (Modeller == null) { var modelReceiver = new GraphItemModeller <TItem, TEdge>(); Modeller = new GraphSceneModeller <TItem, TEdge>(); Modeller.GraphScene = fScene; Modeller.Layout = () => Layout; Modeller.Camera = () => Painter.Viewport.Camera; Modeller.Clipper = () => Painter.Clipper; Modeller.Modeller = () => modelReceiver; } if (Folder == null) { Folder = new GraphSceneFacade <TItem, TEdge>(fScene, Layout); } }
/// <summary> /// Writes all stylesheet source. /// </summary> /// <param name="writer">The writer.</param> protected virtual void Write(TextWriter writer) { IList <string> mergedList = new List <string>(); bool isSecured = ViewContext.HttpContext.Request.IsSecureConnection; bool canCompress = ViewContext.HttpContext.Request.CanCompress(); Action <WebAssetItemCollection> append = assets => { IList <string> result = AssetMerger.Merge("text/css", AssetHandlerPath, isSecured, canCompress, assets); if (!result.IsNullOrEmpty()) { mergedList.AddRange(result); } }; if (!DefaultGroup.Items.IsEmpty()) { append(new WebAssetItemCollection(DefaultGroup.DefaultPath) { DefaultGroup }); } if (!StyleSheets.IsEmpty()) { append(StyleSheets); } if (!mergedList.IsEmpty()) { foreach (string stylesheet in mergedList) { writer.WriteLine("<link type=\"text/css\" href=\"{0}\" rel=\"stylesheet\"/>".FormatWith(stylesheet)); } } }
internal void Add(StyleSheets.StyleSheet styleSheet) { StyleSheets = StyleSheets ?? new List <StyleSheets.StyleSheet>(2); StyleSheets.Add(styleSheet); ValuesChanged?.Invoke(this, ResourcesChangedEventArgs.StyleSheets); }
public ServerPropertiesModel(NancyContext context) : base(context) { StyleSheets.Add("/static/serverproperties.css"); Scripts.Add("/static/serverproperties.js"); }
protected override void OnInit(EventArgs e) { base.OnInit(e); AdamManager.GetCurrent(this).RequireStyleSheet(StyleSheets.Get(Css.Inheritance)); InitializeContentIn(this); }
public void ToStringShouldOutputLinkTag() { var script = new StyleSheets(); script.AddStyleSheet("jquery.js"); Assert.Equal(@"<link href=""jquery.js"" rel=""stylesheet"" type=""text/css"" />", script.Render()); }
public void ToStringShouldReturnsEmptyIfStyleSheetsIsEmpty() { var script = new StyleSheets(); Assert.Empty(script.Render()); }
/// <summary> /// Add a CSS style sheet that will be applied to each input document. /// </summary> /// <param name="styleSheet">The CSS style sheet as a byte array.</param> public void AddStyleSheet(byte[] styleSheet) { _resources.Add(styleSheet); StyleSheets.Add("job-resource:" + (_resources.Count - 1)); }
private string GetJobJson() { Json json = new Json(); json.BeginObj(); json.BeginObj("input"); json.BeginList("src"); _inputPaths.ForEach(i => json.Value(i)); json.EndList(); if (InputType != null) { json.Field("type", InputType.ToString()); } if (BaseUrl != null) { json.Field("base", BaseUrl); } if (Media != null) { json.Field("media", Media); } json.BeginList("styles"); StyleSheets.ForEach(s => json.Value(s)); json.EndList(); json.BeginList("scripts"); Scripts.ForEach(s => json.Value(s)); json.EndList(); json.Field("default-style", !NoDefaultStyle); json.Field("author-style", !NoAuthorStyle); json.Field("javascript", JavaScript); if (MaxPasses > 0) { json.Field("max-passes", MaxPasses); } json.Field("xinclude", XInclude); json.Field("xml-external-entities", XmlExternalEntities); json.EndObj(); json.BeginObj("pdf"); json.Field("embed-fonts", !NoEmbedFonts); json.Field("subset-fonts", !NoSubsetFonts); json.Field("artificial-fonts", !NoArtificialFonts); json.Field("force-identity-encoding", ForceIdentityEncoding); json.Field("compress", !NoCompress); json.Field("object-streams", !NoObjectStreams); json.BeginObj("encrypt"); if (KeyBits != null) { json.Field("key-bits", (int)KeyBits); } if (UserPassword != null) { json.Field("user-password", UserPassword); } if (OwnerPassword != null) { json.Field("owner-password", OwnerPassword); } json.Field("disallow-print", DisallowPrint); json.Field("disallow-modify", DisallowModify); json.Field("disallow-copy", DisallowCopy); json.Field("disallow-annotate", DisallowAnnotate); json.Field("allow-copy-for-accessibility", AllowCopyForAccessibility); json.Field("allow-assembly", AllowAssembly); json.EndObj(); if (PdfProfile != null) { json.Field("pdf-profile", PdfProfile.ToString()); } if (PdfOutputIntent != null) { json.Field("pdf-output-intent", PdfOutputIntent); } if (FallbackCmykProfile != null) { json.Field("fallback-cmyk-profile", FallbackCmykProfile); } json.Field("color-conversion", ConvertColors ? "output-intent" : "none"); if (PdfId != null) { json.Field("pdf-id", PdfId); } if (PdfLang != null) { json.Field("pdf-lang", PdfLang); } if (Xmp != null) { json.Field("pdf-xmp", Xmp); } json.Field("tagged-pdf", TaggedPdf); json.Field("pdf-forms", PdfForms); json.BeginList("attach"); foreach (FileAttachment fa in FileAttachments) { json.BeginObj(); json.Field("url", fa.Url); if (fa.FileName != null) { json.Field("filename", fa.FileName); } if (fa.Description != null) { json.Field("description", fa.Description); } json.EndObj(); } json.EndList(); json.EndObj(); json.BeginObj("metadata"); if (PdfTitle != null) { json.Field("title", PdfTitle); } if (PdfSubject != null) { json.Field("subject", PdfSubject); } if (PdfAuthor != null) { json.Field("author", PdfAuthor); } if (PdfKeywords != null) { json.Field("keywords", PdfKeywords); } if (PdfCreator != null) { json.Field("creator", PdfCreator); } json.EndObj(); json.Field("job-resource-count", _resources.Count); json.EndObj(); return(json.ToString()); }