Samarbejde


I vores samarbejde med erhvervsliv og partnerinstitutioner, har vi konstant fokus på gensidig værdiskabelse og udvikling. 
Vi er altid på udkig efter nye partnerskaber og ideer.

Samarbejde


UCN er en uddannelses- og vidensinstitution, der i tæt samspil med aftagerne i Nordjylland tilbyder et forpligtende og udviklende læringsmiljø for de studerende. Med udgangspunkt det virkelige livs udfordringer løser vi problemer i praksis.

Exception in template (Designs\ucn2015\Paragraph\pageModule.cshtml): System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at CompiledRazorTemplates.Dynamic.ccdcdcbcfffb.b__7(TextWriter __razor_helper_writer)
   at CompiledRazorTemplates.Dynamic.ccdcdcbcfffb.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@using System.Collections @using System.IO; @{ var item = GetString("Item.SystemName"); } @functions { public static class StringTool { /// <summary> /// Get a substring of the first N characters. /// </summary> public static string Truncate(string source, int length) { if (source.Length > length) { source = source.Substring(0, length); } return source; } /// <summary> /// Get a substring of the first N characters. [Slow] /// </summary> public static string Truncate2(string source, int length) { return source.Substring(0, Math.Min(length, source.Length)); } } // Convert a page navigation tag to an page id public string randomBackgroundPosition(System.Random rnd, int startW, int maxW, int startH, int maxH ) { string posX = (startW+rnd.Next(0, maxW)).ToString(); string posY = (startH+rnd.Next(0, maxH)).ToString(); return "background-position-x:"+posX+"px;background-position-y:"+posY+"px;"; } public string GenerateRgba(string backgroundColor, string backgroundOpacity) { System.Drawing.Color color = System.Drawing.ColorTranslator.FromHtml(backgroundColor); int r = Convert.ToInt16(color.R); int g = Convert.ToInt16(color.G); int b = Convert.ToInt16(color.B); return string.Format("rgba({0}, {1}, {2}, {3});", r, g, b, backgroundOpacity); } } @*@helper RenderGoodToKnow() { var BackgroundColor = "background-color:" + GetString("Item.Baggrundsfarve") + "; "; var TextColor = "color:" + GetString("Item.Tekstfarve") + ";"; var HeaderColor= "color:" + GetString("Item.Overskriftsfarve") + ";"; <div class="top-spacing gray content-container" style="@(BackgroundColor)"> <div class="seperator-arrow"></div> <div class="container top-padding bot-padding extra good-to-know"> <div class="row headline catch"> <div class="col-md-12 "> <h2 style="@(HeaderColor)">@(GetValue("Item.Overskrift"))</h2> </div> </div> @foreach(LoopItem gtk in GetLoop("Item.GoodToKnows") ) { var addIcon =""; var addContent = ""; if( gtk.GetString("Item.GoodToKnows.Justering") == "right" ) { addIcon = "col-md-push-6"; addContent="col-md-pull-6"; } <div class="row to-know"> <div class="col-md-6 @(addIcon) icon"> <img src='/Admin/Public/getImage.ashx?Image=@(gtk.GetValue("Item.GoodToKnows.Billede"))&Format=jpg&Width=330' class="img-responsive"/> </div> <div class="col-md-6 @(addContent)"> <div class="content" style="@(TextColor)"> <h2>@(gtk.GetValue("Item.GoodToKnows.Overskrift"))</h2> <p> @(gtk.GetValue("Item.GoodToKnows.Tekst")) </p> </div> </div> </div> } </div> </div> }*@ @helper RenderActualItem() { // Style var BackgroundColor = ""; var TextColor = ""; var ButtonColor = ""; var ButtonTextColor = ""; // Content var Title = GetString("Item.Overskrift"); var Text = GetString("Item.Tekst"); var ButtonStyle = GetString("Item.Kanpstyle"); var BackgroundStyle = GetString("Item.Baggrundsstyle"); var ArrowC = "actual_arrow_down"; var ArrowU = "actual_arrow_up"; switch( ButtonStyle ) { case "orangewhite": ButtonColor = "#FF6000"; ButtonTextColor = "#ffffff"; break; case "darkwhite": ButtonColor = "#776F65"; ButtonTextColor = "#ffffff"; break; case "whitedark": ButtonColor = "#ffffff"; ButtonTextColor = "#776F65"; break; default: ButtonColor = "#FF6000"; ButtonTextColor = "#ffffff"; break; } switch( BackgroundStyle ) { case "yellow": BackgroundColor = "#FF6000"; TextColor = "#ffffff"; break; case "dark": BackgroundColor = "#776F65"; TextColor = "#ffffff"; break; case "green": BackgroundColor = "#5BBBB7"; TextColor = "#ffffff"; break; case "darkblue": BackgroundColor = "#7d9aaa"; TextColor = "#ffffff"; break; case "lightblue": BackgroundColor = "#0094B3"; TextColor = "#ffffff"; break; default: BackgroundColor = "#FF6000"; TextColor = "#ffffff"; break; } // Link var Link = ( !string.IsNullOrEmpty( GetString("Item.Link") ) ? GetString("Item.Link") : "" ); var ButtonText = ( !string.IsNullOrEmpty( GetString("Item.KnapTekst") ) ? GetString("Item.KnapTekst") : "" ); var Alt = ( !string.IsNullOrEmpty( GetString("Item.Alt") ) ? GetString("Item.Alt") : "" ); var Target = ( !string.IsNullOrEmpty( GetString("Item.Target") ) ? GetString("Item.Target") : "_SELF" ); <text> <div class="actual-module" style="background-color:@(BackgroundColor);"> <div class="container"> <div class="row"> <div class="col-xs-12"> <div class="actual-headline closed" style="color:@(TextColor)">@(Title) <img class="actual-arrow" src="/Files/Templates/Designs/ucn2015/img/@(ArrowC).png" data-open="@(ArrowC)" data-close="@(ArrowU)" /></div> <div class="hidden-content"> <div class="actual-content" style="color:@(TextColor)">@(Text)</div> @if( !string.IsNullOrEmpty(Link) ) { <text> <div class="inline-link" style="margin-top:0px !important;"> <a style="margin-top:0px !important; background-color:@(ButtonColor); color:@(ButtonTextColor);" alt="@(Alt)" title="@(Alt)" href="@(Link)" target="@(Target)" class="button">@(ButtonText)</a> </div> </text> } </div> </div> </div> </div> </div> </text> } @helper RenderIndexItem() { var col1Links = GetLoop("Item.Links"); var col2Links = GetLoop("Item.Links2"); var col3Links = GetLoop("Item.Links3"); var col4Links = GetLoop("Item.Links4"); var col1Count = col1Links.Count(); var col2Count = col2Links.Count(); var col3Count = col3Links.Count(); var col4Count = col4Links.Count(); var DivCol = ""; var ObjectList = new Dictionary< string, List<LoopItem> >(); if( col1Count > 0 && col2Count > 0 && col3Count > 0 && col4Count > 0 ) { DivCol = "col-md-3"; ObjectList.Add("Links",col1Links); ObjectList.Add("Links2",col2Links); ObjectList.Add("Links3",col3Links); ObjectList.Add("Links4",col4Links); } else if( col1Count > 0 && col2Count > 0 && col3Count > 0 && col4Count <= 0 ) { DivCol = "col-md-4"; ObjectList.Add("Links",col1Links); ObjectList.Add("Links2",col2Links); ObjectList.Add("Links3",col3Links); } else if( col1Count > 0 && col2Count > 0 && ( col3Count <= 0 || col4Count <= 0 ) ) { DivCol = "col-md-6"; ObjectList.Add("Links",col1Links); ObjectList.Add("Links2",col2Links); } else if( col1Count > 0 && ( col2Count <= 0 || col3Count <= 0 || col4Count <= 0 ) ) { DivCol = "col-md-12"; ObjectList.Add("Links",col1Links); } var classes = ""; if( GetBoolean("Item.Topmargin") ) { classes = classes + " top-spacing"; } if( GetBoolean("Item.Bundmargin") ) { classes = classes + " bot-spacing"; } @:<div class="container custom-education-list @(classes)"> if( !string.IsNullOrEmpty( GetString("Item.Overskrift") ) ) { <text> <div class="row"> <div class="col-xs-12 headline"> @if( GetBoolean("Item.OverskriftSom_H1") ) { <text> <h1 class="h2">@( GetValue("Item.Overskrift") )</h1> </text> } else { <text> <h2>@( GetValue("Item.Overskrift") )</h2> </text> } </div> </div> </text> } if( !string.IsNullOrEmpty( GetString("Item.Tekst") ) ) { <text> <div class="row bot-spacing"> <div class="col-xs-12 textContent no-padding"> <br /> @( GetValue("Item.Tekst") ) </div> </div> </text> } <text> <div class="search-page"> @if(!string.IsNullOrEmpty( GetString("Item.Filter") ) ) { <div class="sort-nav"> <ul> <li> <span class="active">@(GetValue("Item.Filter"))</span> </li> </ul> </div> } <div class="row"> @foreach(var Item in ObjectList ) { <div class="@(DivCol)"> @{ var amount = Item.Value.Count(); var i = 0; } @("<div class='education-list'>") @if( !Item.Value[0].GetBoolean("Item." + Item.Key+ ".Overskrift") ) { @("<ul style='margin-bottom:25px;'>") } @foreach(var link in Item.Value) { bool hidden = false; if( link.GetBoolean("Item." + Item.Key+ ".Skjul") ) { //amount = amount-1; //continue; hidden = true; } if( !hidden ) { if( link.GetBoolean("Item." + Item.Key+ ".Overskrift") ) { if( i != 0 ) { @:</ul> } <text> @if( !string.IsNullOrEmpty( link.GetString("Item." + Item.Key + ".Link" ) ) ) { @:<a href="@(link.GetString("Item." + Item.Key + ".Link" ))" target='@(link.GetString("Item." + Item.Key + ".Target" ))' alt='@(link.GetString("Item." + Item.Key + ".Alt" ))' title='@(link.GetString("Item." + Item.Key + ".Alt" ))'> } <b>@(link.GetValue("Item." + Item.Key+ ".LinkTekst"))</b> @if( !string.IsNullOrEmpty( link.GetString("Item." + Item.Key + ".Link" ) ) ) { @:</a> } </text> @:<ul style='margin-bottom:25px;'> } else { <text> <li class="education" attr-name='@(link.GetValue("Item." + Item.Key+ ".LinkTekst"))'> @if( !string.IsNullOrEmpty( link.GetString("Item." + Item.Key + ".Link" ) ) ) { @:<a href="@(link.GetString("Item." + Item.Key + ".Link" ))" target='@(link.GetString("Item." + Item.Key + ".Target" ))' alt='@(link.GetString("Item." + Item.Key + ".Alt" ))' title='@(link.GetString("Item." + Item.Key + ".Alt" ))'> } else { @:<p> } @(link.GetValue("Item." + Item.Key+ ".LinkTekst")) @if( !string.IsNullOrEmpty( link.GetString("Item." + Item.Key + ".Link" ) ) ) { @:</a> } else { @:</p> } </li> </text> } } i++; if( i >= amount ) { @:</ul> @:</div> } } </div> } </div> </div> </text> @:</div data-help="end"> } @helper RenderLinksbox() { var ulStart = "<ul class='links-box'>"; var ulEnd = "</ul>"; <text> @ulStart @foreach(LoopItem i in GetLoop("Item.Links") ) { if( i.GetBoolean("Item.Links.Skjul") ) { continue; } <text> <li> <a href="@(i.GetValue("Item.Links.Link"))" alt="@(i.GetValue("Item.Links.Alt"))" title="@(i.GetValue("Item.Links.Alt"))" target="@(i.GetValue("Item.Links.Target"))">@(i.GetValue("Item.Links.LinkTekst"))</a> </li> </text> } @ulEnd </text> } @helper RenderAccordion() { <div class="accordions"> @foreach(LoopItem i in GetLoop("Item.Elementer").Where(x => x.GetBoolean("Item.Elementer.Skjult") != true ) ) { <text> <div class="row accordion"> <div class="col-md-12"> <div class="header"> @(i.GetValue("Item.Elementer.Overskrift")) </div> <div class="content harmonika"> @(i.GetValue("Item.Elementer.Tekst")) </div> </div> </div> </text> } </div> } @helper RenderNewsModule() { var BackgroundColor = "background-color:" + GetString("Item.Baggrund") + "; "; <text> <div class="dwmodule news-module-container" style="@(BackgroundColor)"> <div class="container news-module"> <div class="row"> @foreach(LoopItem i in GetLoop("Item.Nyhedskategorier") ) { <div class="col-md-4 col-sm-6 col-xs-12 news-item"> <div class="news-image"> <img src="/Admin/Public/getImage.ashx?Image=@(i.GetValue("Item.Nyhedskategorier.Billede"))&Format=jpg&Width=350&Height=163" /> </div> <div class="news-text"> @{ DateTime s = i.GetDate("Item.Nyhedskategorier.Dato"); } <div class="date">@(s.ToString("MMMM dd",new System.Globalization.CultureInfo("da-DK")))</div> @(i.GetValue("Item.Nyhedskategorier.Overskrift")) </div> </div> } </div> </div> @if( !string.IsNullOrEmpty( GetString("Item.Link") ) ) { <text> <div class="inline-link" style="padding-bottom:4em;"> <a href="@(GetValue("Item.Link"))" alt="@(GetValue("Item.Alt"))" title="@(GetValue("Item.Alt"))" class="button orange">Alle nyheder</a> </div> </text> } </div> </text> } @helper RenderImageModule() { var BackgroundColor = "background-color:" + GetString("Item.Baggrundsfarve") + "; "; var TextColor = "color:" + GetString("Item.Tekstfarve") + ";"; var LinkColor = GetString("Item.LinkkasseLinkfarve"); var LinkBGColor = GetString("Item.LinkkasseBaggrundsfarve"); if( string.IsNullOrEmpty(LinkColor) ) { LinkColor = "#000000"; } if( string.IsNullOrEmpty(LinkBGColor) ) { LinkBGColor = "#ffffff"; } var InvertBackgroundColor = "background-color:" + LinkBGColor + "; "; var InvertTextColor = "color:" + LinkColor + ";"; var addIcon =""; var addContent = ""; if( GetString("Item.Justering") == "right" ) { addIcon = "col-md-push-6"; addContent="col-md-pull-6"; } if( GetString("Item.Justering") != "background" ) { <div class="pupil-orange fullscreen content-container" style="@(BackgroundColor)"> <div class="row no-margin" style="@(BackgroundColor)"> <div class="col-md-6 @(addIcon)"> <img src='@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Billedefil"))' class="img-responsive real"/> </div> <div class="col-md-6 uppercase-h2 @(addContent)"> <div class="total-center holder @(GetValue("Item.Tekstst_rrelse"))" style="@(TextColor)"> <h2 class="teaser-text-headline">@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Overskrift"))</h2> <div class="teaser-text-setting">@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Tekst"))</div> @if( !string.IsNullOrEmpty( GetLoop("Item.Billede").First().GetString("Item.Billede.Link") ) ) { <text> <div class="inline-link"> <a style="@(InvertBackgroundColor) @(InvertTextColor)" target='@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Target"))' alt="@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Alt"))" title="@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Alt"))" href="@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Link"))" class="button">@(GetLoop("Item.Billede").First().GetValue("Item.Billede.Linktekst"))</a> </div> </text> } </div> </div> </div> </div> } else { var images = GetLoop("Item.Billede"); var BackgroundImage = "background-image:url(" + (images.Any() ? images.First().GetValue("Item.Billede.Billedefil") : "") + "); "; var FullScreenTextColor = "color:" + GetString("Item.Tekstfarve") + ";"; var Padding = "padding-top:" + GetString("Item.Padding") + "px; padding-bottom:" + GetString("Item.Padding") + "px;"; <div class="starry" style="@(BackgroundImage) @(Padding)"> <div class="container"> <div class="row"> <div class="col-md-6 col-md-offset-3" style="@(FullScreenTextColor)"> <center> <h2 class="teaser-text-headline">@(images.Any() ? images.First().GetValue("Item.Billede.Overskrift") : "")</h2><br /> <div class="teaser-text-setting"> @(images.Any() ? images.First().GetValue("Item.Billede.Tekst") : "") </div> @if(images.Any() && !string.IsNullOrEmpty( images.First().GetString("Item.Billede.Link") ) ) { <text> <div class="inline-link"> <a style="@(InvertBackgroundColor) @(InvertTextColor)" href="@(images.First().GetValue("Item.Billede.Link"))" alt="@(images.First().GetValue("Item.Billede.Alt"))" target='@(images.First().GetValue("Item.Billede.Target"))' title="@(images.First().GetValue("Item.Billede.Alt"))" class="button">@(images.First().GetValue("Item.Billede.Linktekst"))</a> </div> </text> } </center> </div> </div> </div> </div> } } @helper RenderContact(LoopItem product, string Type = "") { var Image = product.GetString("Item.Kontaktpersoner.Billede"); // product.GetString("Ecom:Product.ImageSmall.Clean"); var Headline = product.GetString("Item.Kontaktpersoner.Navn"); // product.GetString("Ecom:Product.Name"); var Text = product.GetString("Item.Kontaktpersoner.Tr_ffetider"); // product.GetString("Ecom:Product.LongDescription"); <div class="image square-image"> @if(!string.IsNullOrEmpty(Type) && Type.Equals("kdesc") ) { <div class="img"> <img class="img-responsive img-circle" src="/Admin/Public/GetImage.ashx?Image=@( Image )&Format=jpg&Width=308&Height=308&Crop=0" border="0" /> </div> <div class="contact-details-icons square-image"> <div class="img-label" style="text-align:center;"> @(Headline) </div> <div class="img-description square-image" style="text-align:center;"> <div class="i-do" style="text-align:center;">@( product.GetValue("Item.Kontaktpersoner.Stilling") )</div> @( StringTool.Truncate( product.GetString("Item.Kontaktpersoner.Beskrivelse").Replace("<p>","").Replace("</p>","").Trim(), 450) ) @*<br /><br />*@ @( product.GetValue("Item.Kontaktpersoner.Telefon") )<br /> <a href="mailto:@( product.GetValue("Item.Kontaktpersoner.Email") )" alt="@( product.GetValue("Item.Kontaktpersoner.Email") )">@( product.GetValue("Item.Kontaktpersoner.Email") )</a> </div> </div> if( !string.IsNullOrEmpty( product.GetString("Item.Kontaktpersoner.KnapLink") ) ) { <text> <div class="inline-link" style="text-align:center !important;"> <a href="@(product.GetValue("Item.Kontaktpersoner.KnapLink"))" target="@(product.GetValue("Item.Kontaktpersoner.KnapTarget"))" alt="@(product.GetValue("Item.Kontaktpersoner.Knap_Alt"))" title="@(product.GetValue("Item.Kontaktpersoner.Knap_Alt"))" class="button orange">@(product.GetValue("Item.Kontaktpersoner.KnapTekst"))</a> </div> </text> } } else { <div class="col-xs-6"> <div class="img"> <img class="img-responsive img-circle" style="width:100%;" src="/Admin/Public/GetImage.ashx?Image=@( Image )&Format=jpg&Width=208&Height=208&Crop=0" border="0" /> </div> </div> <div class="col-xs-6 contact-details-icons"> <div class="img-label"> @(Headline) </div> <div class="img-description"> @( product.GetValue("Item.Kontaktpersoner.Stilling") )<br /> @( product.GetValue("Item.Kontaktpersoner.Afdeling") )<br /> @( product.GetValue("Item.Kontaktpersoner.Telefon") )<br /> <a href="mailto:@( product.GetValue("Item.Kontaktpersoner.Email") )" alt="@( product.GetValue("Item.Kontaktpersoner.Email") )">@( product.GetValue("Item.Kontaktpersoner.Email") )</a> @* @( product.GetValue("Ecom:Product.CategoryField.Medarbejdere.ucnJobTitleDK.Value") )<br /> @( product.GetValue("Ecom:Product.CategoryField.Medarbejdere.Afdeling.Value") )<br /> @( product.GetValue("Ecom:Product.CategoryField.Medarbejdere.ucnPhone.Value") )<br /> @( product.GetValue("Ecom:Product.CategoryField.Medarbejdere.ucnEmail.Value") )*@ </div> <div class="appointment-times" > @(Text) </div> </div> } </div> } @helper RenderImageSimple() { <text> <img src="@(GetValue("Item.Billedefil"))" class="img-responsive" /> </text> } @helper RenderImage(LoopItem image, string Part, bool ShowHeadline, bool ShowDescription, bool ShowImage) { var Link = image.GetString("Item." + Part + ".Link"); var Target = image.GetString("Item." + Part + ".Target"); var Alt = image.GetString("Item." + Part + ".Alt"); var Image = image.GetString("Item." + Part + ".Billedefil"); var Headline = image.GetString("Item." + Part + ".Overskrift"); var Text = image.GetString("Item." + Part + ".Tekst"); <div class="image"> @if( ShowImage ) { <div class="img"> @if( !string.IsNullOrEmpty(Link) ) { <text> <a href="@(Link)" alt="@(Alt)" title="@(Alt)" target="@(Target)"> <img class="img-responsive" src="@( Image )" border="0" /> </a> </text> } else { <img class="img-responsive" src="@( Image )" border="0" /> } </div> } @if( ShowHeadline && !string.IsNullOrEmpty( Headline ) ) { <div class="img-label"> @if( !string.IsNullOrEmpty(Link) ) { <text> @*<a href="@(Link)" alt="@(Alt)" title="@(Alt)">*@ @(Headline) @*</a>*@ </text> } else { @(Headline) } </div> } @if( ShowDescription && !string.IsNullOrEmpty(Text) ) { <div class="img-description"> @(Text) </div> } </div> } @helper RenderBoard() { string boardBackground = GetString("Item.Baggrundsfarve"); bool noMargins = GetBoolean("Item.UdenMarginer"); string addToPackery = ""; if( noMargins ) { addToPackery = "no-margin"; } <div class="pin-board @(addToPackery)" style="background-color:@(boardBackground);"> <div class="row packery-container"> @foreach(LoopItem gtk in GetLoop("Item.Opslag") ) { string MainClass = ""; string MainStyle = ""; string MainAdditions = ""; bool HasFile = ( !string.IsNullOrEmpty( gtk.GetString("Item.Opslag.Fil") ) ? true : false ); bool FullBackground = gtk.GetBoolean("Item.Opslag.FuldBaggrund"); bool IsYoutube = ( !string.IsNullOrEmpty( gtk.GetString("Item.Opslag.YoutubeId") ) ? true : false ); string BackgroundColor = gtk.GetString("Item.Opslag.Baggrundsfarve"); bool ShowBackgroundColor = true; if( HasFile && FullBackground ) { ShowBackgroundColor = false; } if( !string.IsNullOrEmpty(BackgroundColor) && ShowBackgroundColor ) { MainStyle = MainStyle + "background-color:" + BackgroundColor + ";"; } if( FullBackground ) { if( HasFile ) { string File = gtk.GetString("Item.Opslag.Fil"); string Extension = Path.GetExtension( File ).ToLower(); if( Extension.Equals(".png") || Extension.Equals(".jpg") || Extension.Equals(".jpeg") ) { MainStyle = MainStyle + "background-image:url('" + File + "'); background-repeat:no-repeat; background-size:100% auto;"; } } } if( IsYoutube ) { MainClass = MainClass + " video-link"; MainAdditions = MainAdditions + " data-video-id='" + gtk.GetString("Item.Opslag.YoutubeId") + "'"; } if( !string.IsNullOrEmpty( gtk.GetString("Item.Opslag.Link") ) && !IsYoutube ) { var linkAddition = ""; if( gtk.GetBoolean("Item.Opslag.BenINytVindue") ) { linkAddition = "target='_BLANK'"; MainAdditions = MainAdditions + " onclick='window.open(\"" + gtk.GetString("Item.Opslag.Link") + "\",\"_blank\");'"; } else { MainAdditions = MainAdditions + " onclick='location.href=\"" + gtk.GetString("Item.Opslag.Link") + "\";'"; } MainStyle = MainStyle + "cursor:pointer;"; <text> <a href="@(gtk.GetString("Item.Opslag.Link"))" @(linkAddition) alt="@(gtk.GetString("Item.Opslag.Alt"))" title="@(gtk.GetString("Item.Opslag.Alt"))"></a> </text> } <div class="pin col-md-3 col-sm-4 col-xs-12 item s"> <div class="content h@(gtk.GetString("Item.Opslag.Hoejde")) @(MainClass)" style="@(MainStyle)" @(MainAdditions)> @if( FullBackground ) { <text> <div class="item-content-full @(gtk.GetValue("Item.Opslag.Tekstjustering")) @(gtk.GetValue("Item.Opslag.Tekstfarve")) @(gtk.GetValue("Item.Opslag.Skriftst_rrelse"))"> @(gtk.GetValue("Item.Opslag.Tekst")) </div> </text> } else { string FirstBoxStyle = ""; string FirstBoxClass = ""; string Media = ""; if( HasFile ) { string File = gtk.GetString("Item.Opslag.Fil"); string Extension = Path.GetExtension( File ).ToLower(); if( Extension.Equals(".png") || Extension.Equals(".jpg") || Extension.Equals(".jpeg") ) { Media = "<img src='" + File + "' class='img-responsive' style='width:100%;' />"; } } <text> <div class="item-header @(FirstBoxClass)" style="@(FirstBoxStyle)"> @(Media) </div> <div class="item-description @(gtk.GetValue("Item.Opslag.Tekstfarve")) @(gtk.GetValue("Item.Opslag.Skriftst_rrelse"))"> @(gtk.GetValue("Item.Opslag.Tekst")) </div> </text> } </div> </div> } </div> </div> } @helper RenderCollage() { IEnumerable<LoopItem> elements = GetLoop("Item.Elementer_New"); string addToPackery = "collage"; if (elements.Any()) { <div class="pin-board @(addToPackery)"> <div class="row packery-container"> @foreach(LoopItem gtk in elements) { string MainClass = ""; string MainStyle = ""; string MainAdditions = ""; string File = gtk.GetString("Item.Elementer_New.Billede"); bool HasFile = !string.IsNullOrEmpty(File); string BackgroundColor = gtk.GetString("Item.Elementer_New.Baggrundsfarve"); string Retning = gtk.GetString("Item.Elementer_New.Retning"); string Stoerrelse = gtk.GetString("Item.Elementer_New.St_rrelse"); string Link = gtk.GetString("Item.Elementer_New.Link"); string Text = gtk.GetString("Item.Elementer_New.Tekst"); bool HasLink = !string.IsNullOrEmpty(Link); string AltText = gtk.GetString("Item.Elementer_New.Alt"); string TextColorClass = gtk.GetString("Item.Elementer_New.Skriftfarve"); string defaultClasses = "col-md-3 col-sm-4 col-xs-12"; if( !string.IsNullOrEmpty(Retning) && !string.IsNullOrEmpty(Stoerrelse) ) { if(Retning == "horizontal") { if(Stoerrelse == "size2") { defaultClasses = "col-xs-12 col-sm-8 col-md-6"; } } else { if(Stoerrelse == "size2") { defaultClasses = defaultClasses + " height2"; } } } //string Extension = Path.GetExtension(File).ToLower(); //if (Extension.Equals(".png") || Extension.Equals(".jpg") || Extension.Equals(".jpeg")) //{ // MainStyle += "background-image:url('" + File + "'); background-repeat:no-repeat; background-size:100% auto;"; //} if (!HasFile) { if (!string.IsNullOrEmpty(BackgroundColor)) { MainStyle += "background-color:" + BackgroundColor + ";"; } else { MainStyle += "background-color:#ffffff;"; } } else { string Media = ""; string CropWidth = string.Empty; string CropHeight = string.Empty; int BaseSize = 300; string Extension = Path.GetExtension(File).ToLower(); if (Extension.Equals(".png") || Extension.Equals(".jpg") || Extension.Equals(".jpeg")) { if (Retning == "vertical" && Stoerrelse == "size2") { CropHeight = (2 * BaseSize).ToString(); CropWidth = BaseSize.ToString(); } else if (Retning == "horizontal" && Stoerrelse == "size2") { CropHeight = BaseSize.ToString(); CropWidth = (2 * BaseSize).ToString(); } else { CropHeight = BaseSize.ToString(); CropWidth = BaseSize.ToString(); } if (!string.IsNullOrEmpty(CropWidth) && !string.IsNullOrEmpty(CropHeight)) { File = "/Admin/Public/GetImage.ashx?Image=" + File + "&Format=png&Width=" + CropWidth + "&Height=" + CropHeight + "&Crop=0"; } MainStyle += "background-image:url('" + File + "'); background-repeat:no-repeat; background-position:center center; background-size:cover;"; //Media = "<img src='" + File + "' class='img-responsive' style='width:100%;' />"; } } if(HasLink) { var linkAddition = ""; if(gtk.GetBoolean("Item.Elementer_New.BenINytVindue") ) { linkAddition = "target='_BLANK'"; MainAdditions = MainAdditions + " onclick='window.open(\"" + Link + "\",\"_blank\");'"; } else { MainAdditions = MainAdditions + " onclick='location.href=\"" + Link + "\";'"; } MainStyle = MainStyle + "cursor:pointer;"; @*<text> <a href="@Link" @(linkAddition) alt="@AltText" title="@AltText"></a> </text>*@ } <div class="pin @(defaultClasses) item @(HasLink ? "link" : "")" title="@AltText"> <div class="content @(Stoerrelse) @(MainClass) @(TextColorClass)" style="@(MainStyle)" @(MainAdditions)> @if (HasFile) { string FirstBoxStyle = ""; string FirstBoxClass = ""; <text> @*<div class="item-header @( FirstBoxClass)" style="@( FirstBoxStyle)"> @( Media) </div>*@ @if (!string.IsNullOrEmpty(Text)) { <div class="item-description" style="font-weight: 600; font-weight: bold;"> @Text </div> } </text> } else { <text> <div class="item-content-full"> @if (!string.IsNullOrEmpty(Text)) { @Text } </div> </text> } </div> </div> } </div> </div> } } @helper Render3RowModule() { var BackgroundColor = "background-color:" + GetString("Item.Baggrundsfarve") + "; "; var TextColor = "color:" + GetString("Item.Tekstfarve") + ";"; <text> <div class="icon-holder" style="@(BackgroundColor) @(TextColor)"> <div class="container"> <div class="row row-centered icons" > <div class="headline"> <h2>@GetValue("Item.Overskrift")</h2> </div> @foreach(LoopItem gtk in GetLoop("Item.Ikoner") ) { if( !string.IsNullOrEmpty( gtk.GetString("Item.Ikoner.Billedefil") ) && string.IsNullOrEmpty( gtk.GetString("Item.Ikoner.Tekst") ) ) { <text> <div class="col-sm-4 col-xs-6 col-centered"> @RenderImage(gtk, "Ikoner", true, false, true) </div> </text> } else if( string.IsNullOrEmpty( gtk.GetString("Item.Ikoner.Billedefil") ) && !string.IsNullOrEmpty( gtk.GetString("Item.Ikoner.Tekst") ) ) { <text> <div class="col-sm-4 col-xs-12 just-text col-centered"> @RenderImage(gtk, "Ikoner", true, true, false) </div> </text> } else { <text> <div class="col-sm-4 col-xs-12 just-text col-centered"> @RenderImage(gtk, "Ikoner", true, true, false) </div> </text> } } </div> @if( !string.IsNullOrEmpty( GetString("Item.Link") ) ) { <text> <div class="inline-link" style="padding-bottom:4em;margin-top:2em !important;"> <a href="@(GetValue("Item.Link"))" alt="@(GetValue("Item.Alt"))" title="@(GetValue("Item.Alt"))" class="button orange">@(GetValue("Item.Linktekst"))</a> </div> </text> } </div> </div> </text> } @helper RenderVideo() { <text> @if(!string.IsNullOrEmpty( GetString("Item.YoutubeId") ) ) { if( !string.IsNullOrEmpty( GetString("Item.Overskrift") ) ) { string ContClass = "container"; if( GetBoolean("Item.VisITekstmodul") ) { ContClass = "container-fluid"; } <text> <div class="@(ContClass) top-padding bot-padding"> <div class="row"> <div class="col-xs-12 headline"> <h2 style="margin-bottom:0px;padding-bottom:0px;">@(GetValue("Item.Overskrift"))</h2> </div> </div> @if( !string.IsNullOrEmpty( GetString("Item.Tekst") ) ) { <div class="row"> <div class="col-xs-12 textContent no-padding"> @(GetValue("Item.Tekst")) </div> </div> } </div> </text> } } <div class="video site-video"> @if(!string.IsNullOrEmpty( GetString("Item.YoutubeId") ) ) { if( !string.IsNullOrEmpty( GetString("Item.StatiskBillede") ) ) { <text> <div class="the_player youtube hidden-sm hidden-xs" id="@(GetString("Item.YoutubeId"))" src="@(GetString("Item.StatiskBillede"))" style="width:100%; height:auto;"></div> <script type="text/javascript"> function param(t) { return null !== t.getAttribute("data-params") ? t.getAttribute("data-params") : '?autoplay=1&rel=0&controls=0&showinfo=0@(GetBoolean("Item.Undertekster")?"&yt:cc=on&cc_load_policy=1":"")' } var i, c, y, v, s, n, im = new Array; for (v = document.getElementsByClassName("youtube"), n = 0; n < v.length; n++) im[n] = v[n].hasAttribute("src") ? v[n].getAttribute("src") : "http://i.ytimg.com/vi/" + v[n].id + "/hqdefault.jpg"; for (v.length > 0 && (s = document.createElement("style"), s.type = "text/css", s.innerHTML = '.youtube{background-color:#000;display:block;max-width:100%;overflow:hidden;position:relative;cursor:hand;cursor:pointer}.youtube .thumb{bottom:0;display:block;left:0;margin:0px;max-width:100%;position:absolute;right:0;top:0;width:100%;height:100%}.youtube .play{filter:alpha(opacity=80);opacity:.8;height:77px;left:50%;margin-left:-38px;margin-top:-38px;position:absolute;top:50%;width:77px;background:url("https://lh3.ggpht.com/vo4W82YNfpJDsttqn-22YsLtEJjmOtIB-54yIxR5wQA0Ucs5leNIu-W8iEmyY8-Pf7RWHk4=w64") no-repeat}', document.body.appendChild(s)), n = 0; n < v.length; n++) { y = v[n]; i = document.createElement("img"); i.setAttribute("src", im[n]); i.setAttribute("class", "thumb"); c = document.createElement("div"); c.setAttribute("class", "play"); y.appendChild(i); y.appendChild(c); function addFrame(ele) { if( typeof(ele) == "undefined" ) { ele = this; } var t = document.createElement("iframe"); t.setAttribute("frameborder", "0"); t.setAttribute("class", "the_player youtube"); t.setAttribute("src", "https://www.youtube-nocookie.com/embed/" + ele.id + param(ele)), t.style.width = ele.style.width, t.style.height = ele.style.height, ele.parentNode.replaceChild(t, ele) } y.onclick = function() { addFrame(this); } if( parseInt( window.outerWidth ) <= 974 ) { console.log("Less."); addFrame(y); } else { console.log("More."); } } </script> <div class="clearfix"></div> </text> } else { <text> <iframe width="100%" height="auto" class="youtube the_player" src="https://www.youtube-nocookie.com/embed/@(GetString("Item.YoutubeId"))?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe> </text> } } else { <div class="inner-content"> <img src="/Files/Templates/Designs/ucn2015/img/video_play_icon.png" class="play_video" /> <div style="color:@(GetValue("Item.Tekstfarve"));"> <h2>@(GetValue("Item.Overskrift"))</h2> <p>@(GetString("Item.Tekst").Replace("<p>","").Replace("</p>",""))</p> </div> </div> <video width="100%" height="auto" class="the_player" poster="/Files/Templates/Designs/ucn2015/img/transparency.png" style='background-image:url(@(GetValue("Item.StatiskBillede")));'> <source src='@(GetValue("Item.Billedefil"))' type='video/mp4' /> Your browser does not support the video tag. </video> } </div> <br/> </text> } @helper RenderModule() { int setMT = GetInteger("Item.MarginTop"); int setMB = GetInteger("Item.MarginBund"); var marginT = ""; var marginB = ""; if( setMT != 0 ) { if( setMT > 0 ) { marginT = "padding-top:" + GetValue("Item.MarginTop").ToString() + "px;"; } else { marginT = "padding-top:0px;"; } } if( setMB != 0 ) { if( setMB > 0 ) { marginB = "padding-bottom:" + GetValue("Item.MarginBund").ToString() + "px;"; } else { marginB = "padding-bottom:0px;"; } } var BackgroundColor = "background-color:" + GetString("Item.Baggrund") + "; "; <text> @if( GetBoolean("Item.IndlejretTekst") ) {} else { <text> @(GetValue("Item.Tekst")) </text> } @{ var searchpagecheck = GetBoolean("Item.Formonsearchpage.Value"); var searchpagevar = ""; if(searchpagecheck) { searchpagevar = searchpagevar + "container"; } } <div class="dwmodule @(searchpagevar)" style="@(BackgroundColor) @(marginT) @(marginB)"> @if( GetBoolean("Item.IndlejretTekst") ) { <text> <div class="container"><div class="row"><div class="col-xs-12"> @(GetValue("Item.Tekst"))<br/> </div></div></div> </text> } else {} @GetValue("ParagraphModule") @if( !string.IsNullOrEmpty( GetString("Item.Link") ) ) { <text> <div class="inline-link" style="padding-bottom:4em;"> <a href="@(GetValue("Item.Link"))" alt="@(GetValue("Item.Alt"))" title="@(GetValue("Item.Alt"))" class="button orange">@(GetValue("Item.Linktekst"))</a> </div> </text> } </div> </text> } @helper RenderContactBox() { var BackgroundColor = "background-color:" + GetString("Item.Baggrundsfarve") + "; "; var TextColor = "color:" + GetString("Item.Tekstfarve") + ";"; if(!string.IsNullOrEmpty( GetString("Item.Visning") ) && GetString("Item.Visning").Equals("rdesc") ) { <div class="icon-holder contacts round-desc" style="@(BackgroundColor) @(TextColor)"> <div class="container"> @if( !string.IsNullOrEmpty( GetString("Item.Overskrift") ) ) { <text> <div class="row"> <div class="headline"> <h2>@GetValue("Item.Overskrift")</h2> </div> </div> </text> } @foreach( LoopItem cp in GetLoop("Item.Kontaktpersoner") ) { var Image = cp.GetString("Item.Kontaktpersoner.Billede"); // product.GetString("Ecom:Product.ImageSmall.Clean"); var Headline = cp.GetString("Item.Kontaktpersoner.Navn"); // product.GetString("Ecom:Product.Name"); var Text = cp.GetString("Item.Kontaktpersoner.Tr_ffetider"); // product.GetString("Ecom:Product.LongDescription"); <text> <div class="row icons contact"> <div class="col-md-push-2 col-md-2 col-xs-6 col-xs-push-3 image"> <img class="img-responsive img-circle" style="width:100%;" src="/Admin/Public/GetImage.ashx?Image=@( Image )&Format=jpg&Width=208&Height=208&Crop=0" border="0" /> </div> <div class="col-md-10 col-xs-12 col-md-6 col-md-push-2"> <div class="contact-details-icons square-image round-desc"> <div class="img-label"> @(Headline) </div> <div class="img-description square-image"> <div class="i-do">@( cp.GetValue("Item.Kontaktpersoner.Stilling") )</div> @( StringTool.Truncate( cp.GetString("Item.Kontaktpersoner.Beskrivelse").Replace("<p>","").Replace("</p>","").Trim(), 450 ) ) @if( !string.IsNullOrEmpty( cp.GetString("Item.Kontaktpersoner.KnapLink") ) ) { <text> <a href="@(cp.GetString("Item.Kontaktpersoner.KnapLink"))" target="@(cp.GetValue("Item.Kontaktpersoner.KnapTarget"))" alt="@(cp.GetValue("Item.Kontaktpersoner.Knap_Alt"))" title="@(cp.GetValue("Item.Kontaktpersoner.Knap_Alt"))">@(cp.GetValue("Item.Kontaktpersoner.KnapTekst"))</a> </text> } @*<br /><br />*@ @( cp.GetValue("Item.Kontaktpersoner.Telefon") )<br /> <a href="mailto:@( cp.GetValue("Item.Kontaktpersoner.Email") )" alt="@( cp.GetValue("Item.Kontaktpersoner.Email") )">@( cp.GetValue("Item.Kontaktpersoner.Email") )</a> </div> </div> </div> </div> </text> } </div> </div> } else { <text> <div class="icon-holder contacts" style="@(BackgroundColor) @(TextColor)"> <div class="container"> <div class="row icons row-centered" > <div class="headline"> <h2>@GetValue("Item.Overskrift")</h2> </div> @{ int TotalRun = 0; int i = 0; int count = GetLoop("Item.Kontaktpersoner").Count(); } @foreach( LoopItem cp in GetLoop("Item.Kontaktpersoner") ) { int ItemsLeft = count - TotalRun; string offset = ""; /*if( ItemsLeft == 1 && i == 0 ) { offset = "col-sm-offset-4 col-xs-offset-0"; } else if( ItemsLeft == 2 && i == 0 ) { offset = "col-sm-offset-2 col-xs-offset-0"; }*/ @* if( i == 0 ) { @:<div> }*@ <text> <div class="col-sm-6 col-md-6 col-xs-12 just-text contact @(offset) col-centered"> @RenderContact( cp, GetString("Item.Visning") @*cp.GetLoop("Item.Kontaktpersoner.Kontakt").First()*@ ) </div> </text> i++; @* if( i == 3 || ( TotalRun +1 ) == count) { @:</div> i = 0; } *@ TotalRun++; } </div> </div> </div> </text> } } @helper RenderNavigationBoxes() { string background = "background-color:" + GetString("Item.BaggrundsfarveBox") + ";"; string Overskrift = GetString("Item.OverskriftBox"); string Billede = GetString("Item.BilledeBox"); bool hasFour = ( !string.IsNullOrEmpty( GetString("Item.Overskrift4") ) || !string.IsNullOrEmpty( GetString("Item.Billede4") ) ? true : false ); bool hasTwo = (string.IsNullOrEmpty( GetString("Item.Overskrift3") ) && string.IsNullOrEmpty( GetString("Item.Billede3") ) ? true : false ); bool hasOne = (string.IsNullOrEmpty( GetString("Item.Overskrift2") ) && string.IsNullOrEmpty( GetString("Item.Billede2") ) ? true : false ); int i = 1; int countTo = ( hasFour ? 4 : 3 ); countTo = ( hasTwo ? 2 : countTo ); countTo = ( hasOne ? 1 : countTo ); string colSet = ( hasFour ? "col-md-3 col-lg-3 col-lg-height col-md-height col-xs-12" : "col-md-4 col-lg-4 col-lg-height col-md-height col-xs-12"); colSet = ( hasTwo ? "col-md-6 col-lg-6 col-lg-height col-md-height col-xs-12" : colSet); colSet = ( hasOne ? "col-md-12 col-lg-12 col-lg-height col-md-height col-xs-12" : colSet); string classExtra = " "; if( GetBoolean("Item.AfstandTop") == true ) { classExtra = classExtra + " top-padding"; } if( GetBoolean("Item.AfstandBund") == true ) { classExtra = classExtra + " bottom-padding"; } bool HasHeadline = true; if( string.IsNullOrEmpty( GetString("Item.BilledeBox") ) && string.IsNullOrEmpty( Overskrift ) ) { HasHeadline = false; } <text> <div class="navigationbox @(classExtra)" style="@(background)"> <div class="container"> @if( HasHeadline == false ) { } else { <div class="row"> <div class="col-xs-12 headline"> @if( !string.IsNullOrEmpty( GetString("Item.BilledeBox") ) ) { <text> <img src="@(Billede)" /> </text> } else { if( !string.IsNullOrEmpty( GetString("Item.Tekst") ) ) { <text> <h2 style="margin-bottom:0px;padding-bottom:0px;">@(Overskrift)</h2> </text> } else { <text> <h2>@(Overskrift)</h2> </text> } } </div> </div> } @if( !string.IsNullOrEmpty( GetString("Item.Tekst") ) ) { <text> <div class="row bot-spacing"> <div class="col-xs-12 textContent no-padding"> <br /> @( GetValue("Item.Tekst") ) </div> </div> </text> } <div class="row row-same-height boxes"> @{ while( i <= countTo ) { string append = ( i == 1 ? "" : i.ToString() ); string Title = "Item.Overskrift" + append; string Image = "Item.Billede" + append; string Background = "Item.Baggrundsfarve" + append; string Links = "Item.Links" + append; string HeadingColor = "Item.Overskriftfarve" + append; string HeadingLink = "Item.OverskriftLink" + append; string HeadingLinkAlt = "Item.OverskriftLinkAlt" + append; string HeadingLinkTarget = "Item.OverskriftLinkTarget" + append; List<LoopItem> item = null; switch( i ) { case 1: item = GetLoop("Item.Links"); break; case 2: item = GetLoop("Item.Links2"); break; case 3: item = GetLoop("Item.Links3"); break; case 4: item = GetLoop("Item.Links4"); break; case 5: item = GetLoop("Item.Links5"); break; } string LinkText = Links + ".LinkTekst"; string Link = Links + ".Link"; string Alt = Links + ".Alt"; string Target = Links + ".Target"; string Skjul = Links + ".Skjul"; <div class="single-box @(colSet)"> @{ var headstyle = ""; } @if( !string.IsNullOrEmpty( GetString("Item.Overskriftsh_jde") ) ) { headstyle = "height:" + GetString("Item.Overskriftsh_jde") + "px;"; } @if( !string.IsNullOrEmpty( GetString(HeadingLink) ) ) { <a href="@GetString(HeadingLink)" @if( !string.IsNullOrEmpty( GetString(HeadingLinkAlt) ) ) {<text>alt='@GetString(HeadingLinkAlt)' title='@GetString(HeadingLinkAlt)'</text>} @if( !string.IsNullOrEmpty( GetString(HeadingLinkTarget) ) ) {<text>target='@GetString(HeadingLinkTarget)'</text>} > <div class="heading" style="background-color:@(GetValue(Background)); @(headstyle)"> @if( !string.IsNullOrEmpty( GetString(Image) ) ) { <text><img src="@(GetValue(Image))" /></text> } else { <text><h3 style="color:@(GetValue(HeadingColor));">@(GetValue(Title))</h3></text> } </div> </a> } else { <div class="heading" style="background-color:@(GetValue(Background)); @(headstyle)"> @if( !string.IsNullOrEmpty( GetString(Image) ) ) { <text><img src="@(GetValue(Image))" /></text> } else { <text><h3 style="color:@(GetValue(HeadingColor));">@(GetValue(Title))</h3></text> } </div> } <div class="body"> <ul> @foreach( LoopItem link in item ) { if( link.GetBoolean(Skjul) ) { continue; } bool MissingLink = string.IsNullOrEmpty( link.GetString(Link) ); if( MissingLink ) { <text> <li class="overskrift"> @(link.GetValue(LinkText)) </li> </text> } else { <text> <li> <a href="@(link.GetValue(Link))" alt="@(link.GetValue(Alt))" title="@(link.GetValue(Alt))" target="@(link.GetValue(Target))">@(link.GetValue(LinkText))</a> </li> </text> } } </ul> </div> </div> i++; } } </div> </div> </div> </text> } @helper RenderCatalog() { string Billede1 = ( !string.IsNullOrEmpty( GetString("Item.Billede_link") ) ? GetString("Item.Billede_link") : GetString("Item.Billede") ); string Billede2 = ( !string.IsNullOrEmpty( GetString("Item.Billede_link2") ) ? GetString("Item.Billede_link2") : GetString("Item.Billede2") ); string divClass = "container"; if( GetBoolean("Item.ErITekstfelt") ) { divClass = divClass + "-fluid"; } <text> <div class="@(divClass)"> <div class="row catalogues"> @if( string.IsNullOrEmpty( GetString("Item.Overskrift2") ) ) { <text> <div class="col-md-6 col-md-push-3 col-xs-12 catalogue"> <h2>@(GetValue("Item.Overskrift") )</h2> <a href="@(GetValue("Item.Link") )" target="@(GetValue("Item.Target"))" alt="@(GetValue("Item.Alt"))" title="@(GetValue("Item.Alt"))"><img src="@(Billede1)" class="img-responsive" /></a> </div> </text> } else { <text> <div class="col-md-4 catalogue"> <h2>@(GetValue("Item.Overskrift") )</h2> <a href="@(GetValue("Item.Link") )" target="@(GetValue("Item.Target"))" alt="@(GetValue("Item.Alt"))" title="@(GetValue("Item.Alt"))"><img src="@(Billede1)" class="img-responsive" /></a> </div> <div class="col-md-4 catalogue"> <h2>@(GetValue("Item.Overskrift2") )</h2> <a href="@(GetValue("Item.Link2") )" target="@(GetValue("Item.Target2"))" alt="@(GetValue("Item.Alt2"))" title="@(GetValue("Item.Alt2"))"><img src="@(Billede2)" class="img-responsive" /></a> </div> </text> } </div> </div> </text> } @helper RenderSeperator() { var justify = GetString("Item.JusteringTop"); var add=""; if( !string.IsNullOrEmpty(justify) ) { add=" style='top:" + justify + "px' "; } <text><div style="position:relative;"><div class="seperator-arrow @(GetValue("Item.Placering"))" @(add) ></div></div></text> } @helper RenderButton() { var bgc = "background-color:" + GetString("Item.Baggrunds") + ";"; var fgc = "color:" + GetString("Item.Tekstfarve") + ";"; <text> <div class="inline-link" style="text-align:@(GetValue("Item.Justering")) !important; margin-bottom: 2em !important;margin-top:2em !important;"> <a @if( !String.IsNullOrEmpty( GetString("Item.Link") )) { <text>href="</text>@GetValue("Item.Link")<text>"</text> } target="@(GetValue("Item.Target"))" alt="@(GetValue("Item.Titel_Alt"))" title="@(GetValue("Item.Titel_Alt"))" class="button" style="@(bgc) @(fgc) margin-top:0px !important;"> @(GetValue("Item.Tekst")) </a> </div> </text> } @helper RenderActButtons() { var rnd = new Random(); <text> <div class="container"> <div class="row"> <div class="col-xs-12"> <div class="sort-collection as-button"> <h3>@(GetValue("Item.Overskrift"))</h3><hr> <ul class="sort-option row" data-name="Type"> @foreach(var item in GetLoop("Item.Knapper")) { var add = ""; if( !string.IsNullOrEmpty( item.GetString("Item.Knapper.KnapTekst") ) ) { add = "height:121px;"; } <li class="col-md-3 col-sm-6 col-xs-12"> <a href="@(item.GetValue("Item.Knapper.Link"))" alt='@(item.GetValue("Item.Knapper.Alt"))' title='@(item.GetValue("Item.Knapper.Link_Titel"))' target='_@(item.GetValue("Item.Knapper.LinkTarget"))'> <div class="study-button @(GetValue("Item.Knapfarve"))" style="background-image:none; @(add)"> <b @if(string.IsNullOrEmpty( item.GetString("Item.Knapper.KnapTekst") ) ) { <text>style="height:auto;display:block;margin-bottom:0px;line-height:0px;"</text> } ><span>@(item.GetValue("Item.Knapper.Knaptitel"))</span></b> @if( !string.IsNullOrEmpty( item.GetString("Item.Knapper.KnapTekst") ) ) { <p> @(item.GetValue("Item.Knapper.KnapTekst")) </p> } </div> </a> </li> } </ul> </div> </div> </div> </div> </text> } @helper RenderNavTile() { // We get colors in HEX, so must be converted to RGB. string ActualColor1 = GetString("Item.Farve"); string ActualColor2 = GetString("Item.Farve2"); // Probably contains #, so lets remove it. //ActualColor1 = ActualColor1.Replace("#",""); //ActualColor2 = ActualColor2.Replace("#",""); // Lets get them RGB's string BoxOneHeading = GenerateRgba(ActualColor1, "1"); string BoxOneBody = GenerateRgba(ActualColor1,"0.8"); string BoxTwoHeading = GenerateRgba(ActualColor2, "1"); string BoxTwoBody = GenerateRgba(ActualColor2,"0.8"); // Heights string BoxOneHeadPixels = GetString("Item.OverskriftH_jde"); string BoxTwoHeadPixels = GetString("Item.OverskriftH_jde2"); // Targets string BoxOneTarget = GetString("Item.LinkTarget"); string BoxTwoTarget = GetString("Item.LinkTarget2"); // Titles string BoxOneTitle = GetString("Item.LinkHover"); string BoxTwoTitle = GetString("Item.LinkHover2"); <text> <div class="container-fluid tile-list"> <div class="row"> <div class="col-md-6"> <a class="tile-link" target='@(BoxOneTarget)' href="@(GetValue("Item.Link"))" alt='@(GetValue("Item.LinkAlt"))'>@(GetValue("Item.Overskrift"))</a> <div class="tile" title="@(BoxOneTitle)" onclick="doTileClick(this);"> <div class="heading" style='background-color:@(BoxOneHeading) @(!string.IsNullOrEmpty(BoxOneHeadPixels) ? "height:" + BoxOneHeadPixels + "px" : "");'> <span>@(GetValue("Item.Overskrift"))</span> </div> <div class="body" style="background-color:@(BoxOneBody)"> <span>@(GetValue("Item.Tekst"))</span> </div> </div> </div> @if( !string.IsNullOrEmpty(GetString("Item.Overskrift2"))) { <div class="col-md-6"> <a class="tile-link" target='@(BoxTwoTarget)' href="@(GetValue("Item.Link2"))" alt='@(GetValue("Item.LinkAlt2"))'>@(GetValue("Item.Overskrift2"))</a> <div class="tile" title="@(BoxTwoTitle)" onclick="doTileClick(this);"> <div class="heading" style='background-color:@(BoxTwoHeading) @(!string.IsNullOrEmpty(BoxTwoHeadPixels) ? "height:" + BoxTwoHeadPixels + "px" : "")'> <span>@(GetValue("Item.Overskrift2"))</span> </div> <div class="body" style="background-color:@(BoxTwoBody)"> <span>@(GetValue("Item.Tekst2"))</span> </div> </div> </div> } </div> </div> </text> } @switch( item ) { @*case "GoodToKnow" : @RenderGoodToKnow(); break;*@ case "BilledeOgTekst" : @RenderImageModule(); break; case "3P_Stribe" : @Render3RowModule(); break; case "Opslagstavle" : @RenderBoard(); break; case "Video": @RenderVideo(); break; case "Billede": @RenderImageSimple() break; case "Nyheder_3P_Stribe": @RenderNewsModule() break; case "Kontaktkasse": case "RelativKontaktkasse": @RenderContactBox() break; case "Collage": @RenderCollage(); break; case "Navigationskasser": @RenderNavigationBoxes(); break; case "DynamicwebModul": @RenderModule() break; case "Seperatorpil": @RenderSeperator() break; case "Harmonika": @RenderAccordion() break; case "Mange_Links": @RenderLinksbox() break; case "Knap": @RenderButton() break; case "Bladrekatalog": @RenderCatalog() break; case "IndexItem": @RenderIndexItem() break; case "Aktuelt": @RenderActualItem() break; case "Act2LearnKnapper": @RenderActButtons() break; case "Navigationsfliser": @RenderNavTile() break; default: @GetValue("ParagraphText") break; }