Error compiling template "/Designs/Forslag_01/Paragraph/Banner.cshtml"
Line 661: ; expected
Line 661: Unexpected character '\'
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: Invalid expression term '='
Line 661: ; expected
Line 661: Invalid expression term '='
Line 661: ; expected
Line 661: Too many characters in character literal
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: Invalid expression term '='
Line 661: ; expected
Line 661: ; expected
Line 661: } expected
Line 661: Invalid expression term '='
Line 661: ; expected
Line 661: Invalid expression term '='
Line 661: ; expected
Line 661: ; expected
Line 661: } expected
Line 661: Invalid expression term '='
Line 661: ; expected
Line 661: ; expected
Line 661: ; expected
Line 661: Unexpected character '\'
Line 661: ; expected
Line 680: ; expected
Line 680: Unexpected character '\'
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: Invalid expression term '='
Line 680: ; expected
Line 680: Invalid expression term '='
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: Invalid expression term '='
Line 680: ; expected
Line 680: ; expected
Line 680: } expected
Line 680: Invalid expression term '='
Line 680: ; expected
Line 680: ; expected
Line 680: ; expected
Line 680: Unexpected character '\'
Line 680: ; expected
Line 661: The left-hand side of an assignment must be a variable, property or indexer
Line 661: The name 'item' does not exist in the current context
Line 661: The name 'px' does not exist in the current context
Line 661: The name 'important' does not exist in the current context
Line 661: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 661: The name 'url' does not exist in the current context
Line 661: The name 'repeat' does not exist in the current context
Line 661: The name 'no' does not exist in the current context
Line 661: The left-hand side of an assignment must be a variable, property or indexer
Line 661: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 661: The name 'position' does not exist in the current context
Line 661: The name 'background' does not exist in the current context
Line 661: The name 'center' does not exist in the current context
Line 661: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 661: The name 'bottom' does not exist in the current context
Line 661: The name 'margin' does not exist in the current context
Line 661: The name 'px' does not exist in the current context
Line 661: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 680: The left-hand side of an assignment must be a variable, property or indexer
Line 680: The name 'item' does not exist in the current context
Line 680: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 680: The name 'item' does not exist in the current context
Line 680: The name 'px' does not exist in the current context
Line 680: The name 'important' does not exist in the current context
Line 680: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 680: The name 'bottom' does not exist in the current context
Line 680: The name 'margin' does not exist in the current context
Line 680: The name 'px' does not exist in the current context
Line 680: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
Line 661: This label has not been referenced
Line 680: This label has not been referenced

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 2 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 17 using System.Text.RegularExpressions; 18 19 #line default 20 #line hidden 21 22 #line 3 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 23 using System.Web; 24 25 #line default 26 #line hidden 27 28 29 public class RazorEngine_093724354a0144fab29b3b40bad229c0 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 30 31 #line hidden 32 33 #line 6 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 34 35 public class WrapMethods 36 { 37 //Gets the contrasting color 38 public static string getContrastYIQ(string hexcolor) 39 { 40 if (hexcolor != "") 41 { 42 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 43 44 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 45 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 46 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 47 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 48 49 if (yiq >= 128) 50 { 51 return "black"; 52 } 53 else 54 { 55 return "white"; 56 } 57 } 58 else 59 { 60 return "black"; 61 } 62 } 63 64 65 //Truncate text 66 public static string Truncate (string value, int count, bool strip=true) 67 { 68 if (strip == true){ 69 value = StripHtmlTagByCharArray(value); 70 } 71 72 if (value.Length > count) 73 { 74 value = value.Substring(0, count - 1) + "..."; 75 } 76 77 return value; 78 } 79 80 81 //Strip text from HTML 82 public static string StripHtmlTagByCharArray(string htmlString) 83 { 84 char[] array = new char[htmlString.Length]; 85 int arrayIndex = 0; 86 bool inside = false; 87 88 for (int i = 0; i < htmlString.Length; i++) 89 { 90 char let = htmlString[i]; 91 if (let == '<') 92 { 93 inside = true; 94 continue; 95 } 96 if (let == '>') 97 { 98 inside = false; 99 continue; 100 } 101 if (!inside) 102 { 103 array[arrayIndex] = let; 104 arrayIndex++; 105 } 106 } 107 return new string(array, 0, arrayIndex); 108 } 109 110 //Make the correct count of columns 111 public static string ColumnMaker(int Col, string ScreenSize) 112 { 113 string Columns = ""; 114 115 switch (Col) 116 { 117 case 1: 118 Columns = "col-"+ScreenSize+"-12"; 119 break; 120 121 case 2: 122 Columns = "col-"+ScreenSize+"-6"; 123 break; 124 125 case 3: 126 Columns = "col-"+ScreenSize+"-4"; 127 break; 128 129 case 4: 130 Columns = "col-"+ScreenSize+"-3"; 131 break; 132 133 default: 134 Columns = "col-"+ScreenSize+"-3"; 135 break; 136 } 137 138 return Columns; 139 } 140 141 142 private string Custom(string firstoption, string secondoption) 143 { 144 if (firstoption == "custom") 145 { 146 return secondoption; 147 } 148 else 149 { 150 return firstoption; 151 } 152 } 153 } 154 155 #line default 156 #line hidden 157 158 159 #line 129 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 160 public RazorEngine.Templating.TemplateWriter DivBreakout() 161 { 162 #line default 163 #line hidden 164 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 165 166 #line 130 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 167 168 string rawstring = ""; 169 170 171 172 #line default 173 #line hidden 174 WriteLiteralTo(__razor_helper_writer, "\t<!-- Fluid settings -->\n"); 175 176 177 #line 134 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 178 if (GetBoolean("Item.Fluid")) 179 { 180 rawstring = "</div></div></div></div>"; 181 182 183 #line default 184 #line hidden 185 WriteLiteralTo(__razor_helper_writer, "\t "); 186 187 188 #line 137 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 189 WriteTo(__razor_helper_writer, rawstring); 190 191 192 #line default 193 #line hidden 194 WriteLiteralTo(__razor_helper_writer, "\n"); 195 196 197 #line 138 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 198 199 if (GetBoolean("ParagraphContainerIsLast")) 200 { 201 202 203 #line default 204 #line hidden 205 WriteLiteralTo(__razor_helper_writer, "\t\t\t<!-- Makes the banner stick to the bottom -->\n"); 206 207 208 #line 142 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 209 rawstring = "<div class=\"container-fluid\" style=\"position: relative !important; margin-bottom: -30px; \"><div class=\"row\">"; 210 } 211 else if (GetBoolean("ParagraphContainerIsFirst")) 212 { 213 214 215 #line default 216 #line hidden 217 WriteLiteralTo(__razor_helper_writer, "\t \t<!-- Makes the banner stick to the top -->\n"); 218 219 220 #line 147 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 221 if (Pageview.Area.Item["HeaderLayoutMode"].ToString() != "solid") 222 { 223 rawstring = "<div class=\"container-fluid\" style=\"position: relative !important; top: -30px; \"><div class=\"row\">"; 224 } 225 else 226 { 227 rawstring = "<div class=\"container-fluid\" style=\"position: relative !important; top: -31px; \"><div class=\"row\">"; 228 } 229 } 230 else 231 { 232 rawstring = "<div class=\"container-fluid\"><div class=\"row\">"; 233 } 234 235 236 #line default 237 #line hidden 238 WriteLiteralTo(__razor_helper_writer, "\t "); 239 240 241 #line 160 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 242 WriteTo(__razor_helper_writer, rawstring); 243 244 245 #line default 246 #line hidden 247 WriteLiteralTo(__razor_helper_writer, "\n"); 248 249 250 #line 161 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 251 } else { 252 var layoutwidth = GetString("Item.LayoutWidth"); 253 rawstring = "<div class=\"col-md-" + @layoutwidth + " col-xs-" + @layoutwidth + "\">"; 254 255 256 #line default 257 #line hidden 258 259 #line 164 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 260 WriteTo(__razor_helper_writer, rawstring); 261 262 263 #line default 264 #line hidden 265 WriteLiteralTo(__razor_helper_writer, "\n"); 266 267 268 #line 165 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 269 } 270 271 272 #line default 273 #line hidden 274 }); 275 276 #line 166 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 277 } 278 #line default 279 #line hidden 280 281 282 #line 168 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 283 public RazorEngine.Templating.TemplateWriter DivBreakbackin() 284 { 285 #line default 286 #line hidden 287 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 288 289 #line 169 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 290 291 string rawstring = ""; 292 293 if (!GetBoolean("Item.Fluid")) 294 { 295 rawstring = "</div>"; 296 297 298 #line default 299 #line hidden 300 WriteLiteralTo(__razor_helper_writer, "\t "); 301 302 303 #line 175 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 304 WriteTo(__razor_helper_writer, rawstring); 305 306 307 #line default 308 #line hidden 309 WriteLiteralTo(__razor_helper_writer, "\n"); 310 311 312 #line 176 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 313 } 314 else 315 { 316 rawstring = "</div></div>"; 317 318 319 #line default 320 #line hidden 321 WriteLiteralTo(__razor_helper_writer, "\t "); 322 323 324 #line 180 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 325 WriteTo(__razor_helper_writer, rawstring); 326 327 328 #line default 329 #line hidden 330 WriteLiteralTo(__razor_helper_writer, "\n"); 331 332 333 #line 181 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 334 335 336 337 #line default 338 #line hidden 339 WriteLiteralTo(__razor_helper_writer, "\t <!-- Makes the rest of the page work proberly -->\n"); 340 341 342 #line 183 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 343 if (!GetBoolean("ParagraphContainerIsLast")) 344 { 345 rawstring = "<div class=\"container\"><div class=\"row\"><div class=\"col-md-12 col-sm-12 col-xs-12\"><div class=\"row\" id=\"maincontent\" title=\"Content area\">"; 346 347 348 #line default 349 #line hidden 350 WriteLiteralTo(__razor_helper_writer, "\t\t\t"); 351 352 353 #line 186 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 354 WriteTo(__razor_helper_writer, rawstring); 355 356 357 #line default 358 #line hidden 359 WriteLiteralTo(__razor_helper_writer, "\n"); 360 361 362 #line 187 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 363 } 364 } 365 366 367 #line default 368 #line hidden 369 }); 370 371 #line 189 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 372 } 373 #line default 374 #line hidden 375 376 377 #line 194 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 378 379 private int columnsWritten { get; set; } 380 private int columns { get; set; } 381 382 public void init() 383 { 384 columnsWritten = Dynamicweb.Input.FormatInteger(System.Web.HttpContext.Current.Items["currentColumns"]); 385 columns = GetInteger("Item.Width"); 386 System.Web.HttpContext.Current.Items["currentColumns"] = columnsWritten + GetInteger("Item.Width"); 387 } 388 389 public void Fluid() 390 { 391 columnsWritten = Dynamicweb.Input.FormatInteger(System.Web.HttpContext.Current.Items["currentColumns"]); 392 columns = 12; 393 System.Web.HttpContext.Current.Items["currentColumns"] = columnsWritten + 12; 394 } 395 396 public string ColumnClass() 397 { 398 if (GetString("Item.WidthMobile") == "hide"){ 399 return "col-md-" + GetString("Item.Width") + " hidden-xs"; 400 } else { 401 return "col-md-" + GetString("Item.Width") + " col-xs-" + GetString("Item.WidthMobile"); 402 } 403 } 404 405 public string NewRow() 406 { 407 if (columns + columnsWritten > 12) 408 { 409 System.Web.HttpContext.Current.Items["currentColumns"] = columns; 410 return "</div><div class=\"row\">"; 411 } 412 else 413 { 414 return string.Empty; 415 } 416 417 } 418 419 #line default 420 #line hidden 421 422 423 #line 362 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 424 425 private string CustomFont (string firstfont, string secondfont) 426 { 427 if (firstfont == "custom") 428 { 429 return secondfont; 430 } 431 else 432 { 433 return firstfont; 434 } 435 } 436 437 private string CheckExistence (string stringitem, string defaultvalue) 438 { 439 if (!string.IsNullOrWhiteSpace(stringitem)) { 440 return stringitem; 441 } else { 442 return defaultvalue; 443 } 444 } 445 446 #line default 447 #line hidden 448 449 450 public RazorEngine_093724354a0144fab29b3b40bad229c0() { 451 } 452 453 public override void Execute() { 454 WriteLiteral("\r\n"); 455 456 WriteLiteral("\r\n\r\n"); 457 458 WriteLiteral("\n\n"); 459 460 WriteLiteral("\n"); 461 462 463 #line 190 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 464 465 init(); 466 467 468 #line default 469 #line hidden 470 WriteLiteral("\n\n"); 471 472 WriteLiteral("\r\n"); 473 474 475 #line 236 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 476 477 string rawstring = ""; 478 string image = ""; 479 480 if (GetString("Item.Background.Image.Image") == "custom") 481 { 482 image = GetString("Item.Background.Image.CustomImage"); 483 } 484 else if (GetString("Item.Background.Image.Image") == "no-image") 485 { 486 image = ""; 487 } 488 else 489 { 490 image = "/Templates/Designs/Dwsimple/images/background/" + GetString("Item.Background.Image.Image"); 491 } 492 493 494 495 #line default 496 #line hidden 497 WriteLiteral("\t<!-- FONT SETTINGS -->\r\n"); 498 499 500 #line 254 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 501 string TitleFont = CustomFont(GetString("Item.TitleFont.Font"), GetString("Item.TitleFont.CustomFont")); 502 string TitleSize = GetString("Item.TitleFont.Size") + "px"; 503 string TitleColor = GetString("Item.TitleFont.Color.Color"); 504 string TitleLineHeight = CheckExistence(GetString("Item.TitleFont.LineHeight"), "1"); 505 string TitleSpacing = CheckExistence(GetString("Item.TitleFont.LetterSpacing"), "0"); 506 string TitleCasing = GetString("Item.TitleFont.Casing"); 507 string TitleWeight = CheckExistence(GetString("Item.TitleFont.Weight"), "300"); 508 509 string SubFont = CustomFont(GetString("Item.SubtitleFont.Font"), GetString("Item.TitleFont.CustomFont")); 510 string SubSize = GetString("Item.SubtitleFont.Size") + "px"; 511 string SubColor = GetString("Item.SubtitleFont.Color.Color"); 512 string SubLineHeight = CheckExistence(GetString("Item.SubtitleFont.LineHeight"), "1"); 513 string SubtitleSpacing = CheckExistence(GetString("Item.SubtitleFont.LetterSpacing"), "0"); 514 string SubCasing = GetString("Item.SubtitleFont.Casing"); 515 string SubtitleWeight = CheckExistence(GetString("Item.SubtitleFont.Weight"), "300"); 516 517 string textpos = "0px"; 518 519 if (GetString("Item.Mode") == "shadow") { 520 521 522 #line default 523 #line hidden 524 WriteLiteral(" \t<style>\r\n \t\t.dw-carousel-caption {\r\n \t\t\ttext-shadow: 0px 0px 8px #333;" + 525 "\r\n \t\t}\r\n \t</style>\r\n"); 526 527 528 #line 278 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 529 } 530 531 if (GetString("Item.Mode") == "boxed") { 532 533 534 #line default 535 #line hidden 536 WriteLiteral("\t\t<style>\r\n \t\t.dw-carousel-caption {\r\n \t\t\tbackground-color: "); 537 538 539 #line 283 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 540 Write(GetString("Item.CaptionBackgroundColor.Color")); 541 542 543 #line default 544 #line hidden 545 WriteLiteral(";\r\n \t\t}\r\n \t</style>\r\n"); 546 547 548 #line 286 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 549 } 550 551 552 553 #line default 554 #line hidden 555 WriteLiteral(" <!-- COLUMNS + FLUID CONTROLS-->\r\n"); 556 557 558 #line 289 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 559 string column = ""; 560 561 if (!GetBoolean("Item.Fluid")){ 562 NewRow(); 563 564 column = ColumnClass(); 565 } 566 else 567 { 568 Fluid(); 569 } 570 571 572 string TextClass = ""; 573 574 if (GetString("Item.Position") == "left"){ 575 TextClass = "container"; 576 } 577 578 if (GetString("Item.Position") == "center"){ 579 TextClass = "text-center"; 580 } 581 582 if (GetString("Item.Position") == "right"){ 583 TextClass = "container text-right"; 584 } 585 586 if (!GetBoolean("Item.Fluid")){ 587 TextClass += " extra-padding"; 588 } 589 590 591 #line default 592 #line hidden 593 WriteLiteral("\r\n\r\n<link"); 594 595 WriteLiteral(" rel=\"stylesheet\""); 596 597 WriteLiteral(" type=\"text/css\""); 598 599 WriteAttribute("href", Tuple.Create(" href=\"", 7879), Tuple.Create("\"", 7971) 600 , Tuple.Create(Tuple.Create("", 7886), Tuple.Create("http://fonts.googleapis.com/css?family=", 7886), true) 601 602 #line 321 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 603 , Tuple.Create(Tuple.Create("", 7925), Tuple.Create<System.Object, System.Int32>(TitleFont 604 605 #line default 606 #line hidden 607 , 7925), false) 608 , Tuple.Create(Tuple.Create("", 7935), Tuple.Create(":100,200,300,400,500,600,700,800,900", 7935), true) 609 ); 610 611 WriteLiteral(" />\r\n<link"); 612 613 WriteLiteral(" rel=\"stylesheet\""); 614 615 WriteLiteral(" type=\"text/css\""); 616 617 WriteAttribute("href", Tuple.Create(" href=\"", 8015), Tuple.Create("\"", 8105) 618 , Tuple.Create(Tuple.Create("", 8022), Tuple.Create("http://fonts.googleapis.com/css?family=", 8022), true) 619 620 #line 322 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 621 , Tuple.Create(Tuple.Create("", 8061), Tuple.Create<System.Object, System.Int32>(SubFont 622 623 #line default 624 #line hidden 625 , 8061), false) 626 , Tuple.Create(Tuple.Create("", 8069), Tuple.Create(":100,200,300,400,500,600,700,800,900", 8069), true) 627 ); 628 629 WriteLiteral(" />\r\n\r\n<!-- Fluid settings --> \r\n"); 630 631 632 #line 325 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 633 Write(DivBreakout()); 634 635 636 #line default 637 #line hidden 638 WriteLiteral("\r\n\r\n<div"); 639 640 WriteAttribute("class", Tuple.Create(" class=\"", 8161), Tuple.Create("\"", 8176) 641 642 #line 327 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 643 , Tuple.Create(Tuple.Create("", 8169), Tuple.Create<System.Object, System.Int32>(column 644 645 #line default 646 #line hidden 647 , 8169), false) 648 ); 649 650 WriteLiteral(">\r\n"); 651 652 653 #line 328 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 654 655 656 #line default 657 #line hidden 658 659 #line 328 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 660 if (!string.IsNullOrWhiteSpace(@image)){ 661 rawstring = "<section style="\" height:"="" "="" +="" @getstring("item.height")="" +="" "px="" !important;="" background:="" url('/admin/public/getimage.ashx?width="1920&compression=75&Crop=5&image=" "="" +="" @image="" +="" "')="" no-repeat="" 0="" 0;="" background-position:="" center;="" margin-bottom:="" 30px\"="">"; 662 663 664 #line default 665 #line hidden 666 WriteLiteral("\t "); 667 668 669 #line 330 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 670 Write(rawstring); 671 672 673 #line default 674 #line hidden 675 WriteLiteral("\r\n"); 676 677 678 #line 331 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 679 } else { 680 rawstring = "<section style="\" background-color:"="" "="" +="" @getstring("item.background.color.color")="" +="" ";="" height:="" "="" +="" @getstring("item.height")="" +="" "px="" !important;="" margin-bottom:="" 30px="" \"="">"; 681 682 683 #line default 684 #line hidden 685 WriteLiteral("\t "); 686 687 688 #line 333 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 689 Write(rawstring); 690 691 692 #line default 693 #line hidden 694 WriteLiteral("\r\n"); 695 696 697 #line 334 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 698 } 699 700 701 #line default 702 #line hidden 703 WriteLiteral("\r\n"); 704 705 706 #line 336 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 707 708 709 #line default 710 #line hidden 711 712 #line 336 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 713 714 textpos = ((GetInteger("Item.Height")/2)-(GetInteger("Item.TitleFont.Size") + GetInteger("Item.SubtitleFont.Size"))).ToString() + "px"; 715 716 717 #line default 718 #line hidden 719 WriteLiteral("\r\n\r\n\t<div"); 720 721 WriteAttribute("class", Tuple.Create(" class=\"", 9020), Tuple.Create("\"", 9038) 722 723 #line 340 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 724 , Tuple.Create(Tuple.Create("", 9028), Tuple.Create<System.Object, System.Int32>(TextClass 725 726 #line default 727 #line hidden 728 , 9028), false) 729 ); 730 731 WriteLiteral(">\r\n\t\t<div"); 732 733 WriteAttribute("style", Tuple.Create(" style=\"", 9048), Tuple.Create("\"", 9077) 734 , Tuple.Create(Tuple.Create("", 9056), Tuple.Create("padding-top:", 9056), true) 735 736 #line 341 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 737 , Tuple.Create(Tuple.Create(" ", 9068), Tuple.Create<System.Object, System.Int32>(textpos 738 739 #line default 740 #line hidden 741 , 9069), false) 742 ); 743 744 WriteLiteral(">\r\n\t\t <div><span"); 745 746 WriteLiteral(" class=\"title dw-carousel-caption\""); 747 748 WriteAttribute("style", Tuple.Create(" style=\"", 9131), Tuple.Create("\"", 9325) 749 , Tuple.Create(Tuple.Create("", 9139), Tuple.Create("font-family:", 9139), true) 750 751 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 752 , Tuple.Create(Tuple.Create(" ", 9151), Tuple.Create<System.Object, System.Int32>(TitleFont 753 754 #line default 755 #line hidden 756 , 9152), false) 757 , Tuple.Create(Tuple.Create("", 9162), Tuple.Create(";", 9162), true) 758 , Tuple.Create(Tuple.Create(" ", 9163), Tuple.Create("font-size:", 9164), true) 759 760 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 761 , Tuple.Create(Tuple.Create(" ", 9174), Tuple.Create<System.Object, System.Int32>(TitleSize 762 763 #line default 764 #line hidden 765 , 9175), false) 766 , Tuple.Create(Tuple.Create("", 9185), Tuple.Create(";", 9185), true) 767 , Tuple.Create(Tuple.Create(" ", 9186), Tuple.Create("color:", 9187), true) 768 769 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 770 , Tuple.Create(Tuple.Create(" ", 9193), Tuple.Create<System.Object, System.Int32>(TitleColor 771 772 #line default 773 #line hidden 774 , 9194), false) 775 , Tuple.Create(Tuple.Create("", 9205), Tuple.Create(";", 9205), true) 776 , Tuple.Create(Tuple.Create(" ", 9206), Tuple.Create("line-height:", 9207), true) 777 778 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 779 , Tuple.Create(Tuple.Create(" ", 9219), Tuple.Create<System.Object, System.Int32>(TitleLineHeight 780 781 #line default 782 #line hidden 783 , 9220), false) 784 , Tuple.Create(Tuple.Create("", 9236), Tuple.Create(";", 9236), true) 785 , Tuple.Create(Tuple.Create(" ", 9237), Tuple.Create("text-transform:", 9238), true) 786 787 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 788 , Tuple.Create(Tuple.Create(" ", 9253), Tuple.Create<System.Object, System.Int32>(TitleCasing 789 790 #line default 791 #line hidden 792 , 9254), false) 793 , Tuple.Create(Tuple.Create("", 9266), Tuple.Create(";", 9266), true) 794 , Tuple.Create(Tuple.Create(" ", 9267), Tuple.Create("font-weight:", 9268), true) 795 796 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 797 , Tuple.Create(Tuple.Create(" ", 9280), Tuple.Create<System.Object, System.Int32>(TitleWeight 798 799 #line default 800 #line hidden 801 , 9281), false) 802 , Tuple.Create(Tuple.Create("", 9293), Tuple.Create(";", 9293), true) 803 , Tuple.Create(Tuple.Create(" ", 9294), Tuple.Create("letter-spacing:", 9295), true) 804 805 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 806 , Tuple.Create(Tuple.Create(" ", 9310), Tuple.Create<System.Object, System.Int32>(TitleSpacing 807 808 #line default 809 #line hidden 810 , 9311), false) 811 , Tuple.Create(Tuple.Create("", 9324), Tuple.Create(";", 9324), true) 812 ); 813 814 WriteLiteral(">&nbsp;"); 815 816 817 #line 342 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 818 Write(GetString("Item.Title")); 819 820 821 #line default 822 #line hidden 823 WriteLiteral("&nbsp;</span></div>\r\n"); 824 825 826 #line 343 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 827 828 829 #line default 830 #line hidden 831 832 #line 343 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 833 if (!string.IsNullOrWhiteSpace(@GetString("Item.Subtitle"))){ 834 835 836 #line default 837 #line hidden 838 WriteLiteral("\t\t\t\t<div>\r\n\t\t\t\t <span"); 839 840 WriteLiteral(" class=\"subtitle dw-carousel-caption\""); 841 842 WriteAttribute("style", Tuple.Create(" style=\"", 9509), Tuple.Create("\"", 9698) 843 , Tuple.Create(Tuple.Create("", 9517), Tuple.Create("font-family:", 9517), true) 844 845 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 846 , Tuple.Create(Tuple.Create(" ", 9529), Tuple.Create<System.Object, System.Int32>(SubFont 847 848 #line default 849 #line hidden 850 , 9530), false) 851 , Tuple.Create(Tuple.Create("", 9538), Tuple.Create(";", 9538), true) 852 , Tuple.Create(Tuple.Create(" ", 9539), Tuple.Create("font-size:", 9540), true) 853 854 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 855 , Tuple.Create(Tuple.Create(" ", 9550), Tuple.Create<System.Object, System.Int32>(SubSize 856 857 #line default 858 #line hidden 859 , 9551), false) 860 , Tuple.Create(Tuple.Create("", 9559), Tuple.Create(";", 9559), true) 861 , Tuple.Create(Tuple.Create(" ", 9560), Tuple.Create("color:", 9561), true) 862 863 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 864 , Tuple.Create(Tuple.Create(" ", 9567), Tuple.Create<System.Object, System.Int32>(SubColor 865 866 #line default 867 #line hidden 868 , 9568), false) 869 , Tuple.Create(Tuple.Create("", 9577), Tuple.Create(";", 9577), true) 870 , Tuple.Create(Tuple.Create(" ", 9578), Tuple.Create("line-height:", 9579), true) 871 872 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 873 , Tuple.Create(Tuple.Create(" ", 9591), Tuple.Create<System.Object, System.Int32>(SubLineHeight 874 875 #line default 876 #line hidden 877 , 9592), false) 878 , Tuple.Create(Tuple.Create("", 9606), Tuple.Create(";", 9606), true) 879 , Tuple.Create(Tuple.Create(" ", 9607), Tuple.Create("text-transform:", 9608), true) 880 881 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 882 , Tuple.Create(Tuple.Create(" ", 9623), Tuple.Create<System.Object, System.Int32>(SubCasing 883 884 #line default 885 #line hidden 886 , 9624), false) 887 , Tuple.Create(Tuple.Create("", 9634), Tuple.Create(";", 9634), true) 888 , Tuple.Create(Tuple.Create(" ", 9635), Tuple.Create("font-weight:", 9636), true) 889 890 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 891 , Tuple.Create(Tuple.Create(" ", 9648), Tuple.Create<System.Object, System.Int32>(SubtitleWeight 892 893 #line default 894 #line hidden 895 , 9649), false) 896 , Tuple.Create(Tuple.Create("", 9664), Tuple.Create(";", 9664), true) 897 , Tuple.Create(Tuple.Create(" ", 9665), Tuple.Create("letter-spacing:", 9666), true) 898 899 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 900 , Tuple.Create(Tuple.Create(" ", 9681), Tuple.Create<System.Object, System.Int32>(SubtitleSpacing 901 902 #line default 903 #line hidden 904 , 9682), false) 905 ); 906 907 WriteLiteral(">&nbsp;&nbsp;&nbsp;"); 908 909 910 #line 345 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 911 Write(GetString("Item.Subtitle")); 912 913 914 #line default 915 #line hidden 916 WriteLiteral("&nbsp;&nbsp;&nbsp;</span>\r\n\t\t\t\t</div>\r\n"); 917 918 919 #line 347 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 920 } 921 922 923 #line default 924 #line hidden 925 WriteLiteral("\t\t\t<span"); 926 927 WriteLiteral(" class=\"clearfix\""); 928 929 WriteLiteral("></span>\r\n\r\n"); 930 931 932 #line 350 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 933 934 935 #line default 936 #line hidden 937 938 #line 350 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 939 if (!string.IsNullOrWhiteSpace(GetString("Item.Link"))){ 940 string link = @GetString("Item.Link"); 941 942 943 944 #line default 945 #line hidden 946 WriteLiteral("<a"); 947 948 WriteAttribute("href", Tuple.Create(" href=\"", 9947), Tuple.Create("\"", 9959) 949 950 #line 353 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 951 , Tuple.Create(Tuple.Create("", 9954), Tuple.Create<System.Object, System.Int32>(link 952 953 #line default 954 #line hidden 955 , 9954), false) 956 ); 957 958 WriteLiteral(" class=\"btn btn-dw-primary\""); 959 960 WriteLiteral(">"); 961 962 963 #line 353 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 964 Write(GetString("Item.LinkText")); 965 966 967 #line default 968 #line hidden 969 WriteLiteral("</a>\r\n"); 970 971 972 #line 354 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 973 } 974 975 976 #line default 977 #line hidden 978 WriteLiteral("\t\t</div>\r\n\t</div>\r\n</section></section></div>\r\n\r\n<!-- Fluid settings --> \r\n"); 979 980 981 #line 360 "E:\dynamicweb.net\solutions\EGDataHealthcare\74423355.dw9.dynamicweb-cms.com\files\Templates\Designs\Forslag_01\Paragraph\Banner.cshtml" 982 Write(DivBreakbackin()); 983 984 985 #line default 986 #line hidden 987 WriteLiteral("\r\n\r\n"); 988 989 } 990 } 991 } 992

1 2 @using System.Text.RegularExpressions 3 @using System.Web 4 5 6 @functions{ 7 public class WrapMethods 8 { 9 //Gets the contrasting color 10 public static string getContrastYIQ(string hexcolor) 11 { 12 if (hexcolor != "") 13 { 14 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 15 16 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 17 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 18 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 19 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 20 21 if (yiq >= 128) 22 { 23 return "black"; 24 } 25 else 26 { 27 return "white"; 28 } 29 } 30 else 31 { 32 return "black"; 33 } 34 } 35 36 37 //Truncate text 38 public static string Truncate (string value, int count, bool strip=true) 39 { 40 if (strip == true){ 41 value = StripHtmlTagByCharArray(value); 42 } 43 44 if (value.Length > count) 45 { 46 value = value.Substring(0, count - 1) + "..."; 47 } 48 49 return value; 50 } 51 52 53 //Strip text from HTML 54 public static string StripHtmlTagByCharArray(string htmlString) 55 { 56 char[] array = new char[htmlString.Length]; 57 int arrayIndex = 0; 58 bool inside = false; 59 60 for (int i = 0; i < htmlString.Length; i++) 61 { 62 char let = htmlString[i]; 63 if (let == '<') 64 { 65 inside = true; 66 continue; 67 } 68 if (let == '>') 69 { 70 inside = false; 71 continue; 72 } 73 if (!inside) 74 { 75 array[arrayIndex] = let; 76 arrayIndex++; 77 } 78 } 79 return new string(array, 0, arrayIndex); 80 } 81 82 //Make the correct count of columns 83 public static string ColumnMaker(int Col, string ScreenSize) 84 { 85 string Columns = ""; 86 87 switch (Col) 88 { 89 case 1: 90 Columns = "col-"+ScreenSize+"-12"; 91 break; 92 93 case 2: 94 Columns = "col-"+ScreenSize+"-6"; 95 break; 96 97 case 3: 98 Columns = "col-"+ScreenSize+"-4"; 99 break; 100 101 case 4: 102 Columns = "col-"+ScreenSize+"-3"; 103 break; 104 105 default: 106 Columns = "col-"+ScreenSize+"-3"; 107 break; 108 } 109 110 return Columns; 111 } 112 113 114 private string Custom(string firstoption, string secondoption) 115 { 116 if (firstoption == "custom") 117 { 118 return secondoption; 119 } 120 else 121 { 122 return firstoption; 123 } 124 } 125 } 126 } 127 128 129 @helper DivBreakout() 130 { 131 string rawstring = ""; 132 133 <!-- Fluid settings --> 134 if (GetBoolean("Item.Fluid")) 135 { 136 rawstring = "</div></div></div></div>"; 137 <text>@rawstring</text> 138 139 if (GetBoolean("ParagraphContainerIsLast")) 140 { 141 <!-- Makes the banner stick to the bottom --> 142 rawstring = "<div class=\"container-fluid\" style=\"position: relative !important; margin-bottom: -30px; \"><div class=\"row\">"; 143 } 144 else if (GetBoolean("ParagraphContainerIsFirst")) 145 { 146 <!-- Makes the banner stick to the top --> 147 if (Pageview.Area.Item["HeaderLayoutMode"].ToString() != "solid") 148 { 149 rawstring = "<div class=\"container-fluid\" style=\"position: relative !important; top: -30px; \"><div class=\"row\">"; 150 } 151 else 152 { 153 rawstring = "<div class=\"container-fluid\" style=\"position: relative !important; top: -31px; \"><div class=\"row\">"; 154 } 155 } 156 else 157 { 158 rawstring = "<div class=\"container-fluid\"><div class=\"row\">"; 159 } 160 <text>@rawstring</text> 161 } else { 162 var layoutwidth = GetString("Item.LayoutWidth"); 163 rawstring = "<div class=\"col-md-" + @layoutwidth + " col-xs-" + @layoutwidth + "\">"; 164 <text>@rawstring</text> 165 } 166 } 167 168 @helper DivBreakbackin() 169 { 170 string rawstring = ""; 171 172 if (!GetBoolean("Item.Fluid")) 173 { 174 rawstring = "</div>"; 175 <text>@rawstring</text> 176 } 177 else 178 { 179 rawstring = "</div></div>"; 180 <text>@rawstring</text> 181 182 <!-- Makes the rest of the page work proberly --> 183 if (!GetBoolean("ParagraphContainerIsLast")) 184 { 185 rawstring = "<div class=\"container\"><div class=\"row\"><div class=\"col-md-12 col-sm-12 col-xs-12\"><div class=\"row\" id=\"maincontent\" title=\"Content area\">"; 186 <text>@rawstring</text> 187 } 188 } 189 } 190 @{ 191 init(); 192 } 193 194 @functions { 195 private int columnsWritten { get; set; } 196 private int columns { get; set; } 197 198 public void init() 199 { 200 columnsWritten = Dynamicweb.Input.FormatInteger(System.Web.HttpContext.Current.Items["currentColumns"]); 201 columns = GetInteger("Item.Width"); 202 System.Web.HttpContext.Current.Items["currentColumns"] = columnsWritten + GetInteger("Item.Width"); 203 } 204 205 public void Fluid() 206 { 207 columnsWritten = Dynamicweb.Input.FormatInteger(System.Web.HttpContext.Current.Items["currentColumns"]); 208 columns = 12; 209 System.Web.HttpContext.Current.Items["currentColumns"] = columnsWritten + 12; 210 } 211 212 public string ColumnClass() 213 { 214 if (GetString("Item.WidthMobile") == "hide"){ 215 return "col-md-" + GetString("Item.Width") + " hidden-xs"; 216 } else { 217 return "col-md-" + GetString("Item.Width") + " col-xs-" + GetString("Item.WidthMobile"); 218 } 219 } 220 221 public string NewRow() 222 { 223 if (columns + columnsWritten > 12) 224 { 225 System.Web.HttpContext.Current.Items["currentColumns"] = columns; 226 return "</div><div class=\"row\">"; 227 } 228 else 229 { 230 return string.Empty; 231 } 232 233 } 234 } 235 236 @{ 237 string rawstring = ""; 238 string image = ""; 239 240 if (GetString("Item.Background.Image.Image") == "custom") 241 { 242 image = GetString("Item.Background.Image.CustomImage"); 243 } 244 else if (GetString("Item.Background.Image.Image") == "no-image") 245 { 246 image = ""; 247 } 248 else 249 { 250 image = "/Templates/Designs/Dwsimple/images/background/" + GetString("Item.Background.Image.Image"); 251 } 252 253 <!-- FONT SETTINGS --> 254 string TitleFont = CustomFont(GetString("Item.TitleFont.Font"), GetString("Item.TitleFont.CustomFont")); 255 string TitleSize = GetString("Item.TitleFont.Size") + "px"; 256 string TitleColor = GetString("Item.TitleFont.Color.Color"); 257 string TitleLineHeight = CheckExistence(GetString("Item.TitleFont.LineHeight"), "1"); 258 string TitleSpacing = CheckExistence(GetString("Item.TitleFont.LetterSpacing"), "0"); 259 string TitleCasing = GetString("Item.TitleFont.Casing"); 260 string TitleWeight = CheckExistence(GetString("Item.TitleFont.Weight"), "300"); 261 262 string SubFont = CustomFont(GetString("Item.SubtitleFont.Font"), GetString("Item.TitleFont.CustomFont")); 263 string SubSize = GetString("Item.SubtitleFont.Size") + "px"; 264 string SubColor = GetString("Item.SubtitleFont.Color.Color"); 265 string SubLineHeight = CheckExistence(GetString("Item.SubtitleFont.LineHeight"), "1"); 266 string SubtitleSpacing = CheckExistence(GetString("Item.SubtitleFont.LetterSpacing"), "0"); 267 string SubCasing = GetString("Item.SubtitleFont.Casing"); 268 string SubtitleWeight = CheckExistence(GetString("Item.SubtitleFont.Weight"), "300"); 269 270 string textpos = "0px"; 271 272 if (GetString("Item.Mode") == "shadow") { 273 <style> 274 .dw-carousel-caption { 275 text-shadow: 0px 0px 8px #333; 276 } 277 </style> 278 } 279 280 if (GetString("Item.Mode") == "boxed") { 281 <style> 282 .dw-carousel-caption { 283 background-color: @GetString("Item.CaptionBackgroundColor.Color"); 284 } 285 </style> 286 } 287 288 <!-- COLUMNS + FLUID CONTROLS--> 289 string column = ""; 290 291 if (!GetBoolean("Item.Fluid")){ 292 NewRow(); 293 294 column = ColumnClass(); 295 } 296 else 297 { 298 Fluid(); 299 } 300 301 302 string TextClass = ""; 303 304 if (GetString("Item.Position") == "left"){ 305 TextClass = "container"; 306 } 307 308 if (GetString("Item.Position") == "center"){ 309 TextClass = "text-center"; 310 } 311 312 if (GetString("Item.Position") == "right"){ 313 TextClass = "container text-right"; 314 } 315 316 if (!GetBoolean("Item.Fluid")){ 317 TextClass += " extra-padding"; 318 } 319 } 320 321 <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=@TitleFont:100,200,300,400,500,600,700,800,900" /> 322 <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=@SubFont:100,200,300,400,500,600,700,800,900" /> 323 324 <!-- Fluid settings --> 325 @DivBreakout() 326 327 <div class="@column"> 328 @if (!string.IsNullOrWhiteSpace(@image)){ 329 rawstring = "<section style="\" height:"="" "="" +="" @getstring("item.height")="" +="" "px="" !important;="" background:="" url('/admin/public/getimage.ashx?width="1920&compression=75&Crop=5&image=" "="" +="" @image="" +="" "')="" no-repeat="" 0="" 0;="" background-position:="" center;="" margin-bottom:="" 30px\"="">"; 330 <text>@rawstring</text> 331 } else { 332 rawstring = "<section style="\" background-color:"="" "="" +="" @getstring("item.background.color.color")="" +="" ";="" height:="" "="" +="" @getstring("item.height")="" +="" "px="" !important;="" margin-bottom:="" 30px="" \"="">"; 333 <text>@rawstring</text> 334 } 335 336 @{ 337 textpos = ((GetInteger("Item.Height")/2)-(GetInteger("Item.TitleFont.Size") + GetInteger("Item.SubtitleFont.Size"))).ToString() + "px"; 338 } 339 340 <div class="@TextClass"> 341 <div style="padding-top: @textpos"> 342 <div><span class="title dw-carousel-caption" style="font-family: @TitleFont; font-size: @TitleSize; color: @TitleColor; line-height: @TitleLineHeight; text-transform: @TitleCasing; font-weight: @TitleWeight; letter-spacing: @TitleSpacing;">&nbsp;@GetString("Item.Title")&nbsp;</span></div> 343 @if (!string.IsNullOrWhiteSpace(@GetString("Item.Subtitle"))){ 344 <div> 345 <span class="subtitle dw-carousel-caption" style="font-family: @SubFont; font-size: @SubSize; color: @SubColor; line-height: @SubLineHeight; text-transform: @SubCasing; font-weight: @SubtitleWeight; letter-spacing: @SubtitleSpacing">&nbsp;&nbsp;&nbsp;@GetString("Item.Subtitle")&nbsp;&nbsp;&nbsp;</span> 346 </div> 347 } 348 <span class="clearfix"></span> 349 350 @if (!string.IsNullOrWhiteSpace(GetString("Item.Link"))){ 351 string link = @GetString("Item.Link"); 352 353 <a href="@link" class="btn btn-dw-primary">@GetString("Item.LinkText")</a> 354 } 355 </div> 356 </div> 357 </section></section></div> 358 359 <!-- Fluid settings --> 360 @DivBreakbackin() 361 362 @functions{ 363 private string CustomFont (string firstfont, string secondfont) 364 { 365 if (firstfont == "custom") 366 { 367 return secondfont; 368 } 369 else 370 { 371 return firstfont; 372 } 373 } 374 375 private string CheckExistence (string stringitem, string defaultvalue) 376 { 377 if (!string.IsNullOrWhiteSpace(stringitem)) { 378 return stringitem; 379 } else { 380 return defaultvalue; 381 } 382 } 383 }