Kodeks for kvalitet i skolemad
Et frivilligt branchekodeks vi i dén grad tror på – og selv har været med til at skabe. Ikke som en formalitet, men som et fælles løfte om at gøre tingene ordentligt. For børn fortjener ikke bare mad i maven – de fortjener mad, der er gennemtænkt, nærende og lavet med respekt for både dem og deres hverdag.
Hvad er "Kodeks for kvalitet i skolemad?"
Det frivillige kodeks for skolemad er et fælles sæt af retningslinjer, principper og ambitioner for god skolemad – som skolemadsleverandører kan sigte efter at leve op til, bl.a. med fokus på
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_aaebe9563ef2480eaf3c7369e15ee87f.Execute() in D:\dynamicweb.net\Solutions\composeit\FruHansensKaelder\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 20 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @{ 5 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 6 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 7 contentPadding = contentPadding == "none" ? "" : contentPadding; 8 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 9 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 10 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 11 12 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 13 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 14 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 15 16 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 17 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 18 19 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 20 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 21 string flexGrowClass = string.Empty; 22 23 switch (layout) 24 { 25 case "icon-left": 26 case "icon-right": 27 flexGrowClass = "flex-grow-0"; 28 break; 29 } 30 31 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 32 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 33 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 34 35 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 36 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 37 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 38 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 39 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 40 string headingLevelStop = $"</{headingLevel}>"; 41 42 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 43 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 44 } 45 46 <div class="h-100 @(contentPadding)@(theme) item_@Model.Item.SystemName.ToLower()"> 47 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 48 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 49 { 50 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 51 } 52 53 @switch (layout) 54 { 55 case "icon-top": 56 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 57 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 58 {<div class="@flexGrowClass"> 59 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 60 { 61 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 62 } 63 else 64 { 65 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 66 } 67 </div> 68 } 69 70 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 71 { 72 <div class="mb-0-last-child"> 73 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 74 { 75 @headingLevelStart 76 @Model.Item.GetString("Title") 77 @headingLevelStop 78 } 79 80 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 81 { 82 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 83 } 84 </div> 85 } 86 </div> 87 break; 88 case "icon-left": 89 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 90 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 91 {<div class="@flexGrowClass"> 92 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 93 { 94 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 95 } 96 else 97 { 98 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 99 } 100 </div> 101 } 102 103 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 104 { 105 <div class="d-flex flex-column flex-grow-1"> 106 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 107 { 108 @headingLevelStart 109 @Model.Item.GetString("Title") 110 @headingLevelStop 111 } 112 113 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 114 { 115 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 116 } 117 </div> 118 } 119 120 </div> 121 break; 122 case "icon-right": 123 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 124 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 125 { 126 <div class="d-flex flex-column flex-grow-1"> 127 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 128 { 129 @headingLevelStart 130 @Model.Item.GetString("Title") 131 @headingLevelStop 132 } 133 134 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 135 { 136 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 137 } 138 </div> 139 } 140 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 142 {<div class="@flexGrowClass"> 143 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 144 { 145 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 146 } 147 else 148 { 149 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 150 } 151 </div> 152 } 153 </div> 154 break; 155 } 156 157 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 158 { 159 @:</a> 160 } 161 </div> 162
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_aaebe9563ef2480eaf3c7369e15ee87f.Execute() in D:\dynamicweb.net\Solutions\composeit\FruHansensKaelder\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 20 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @{ 5 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 6 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 7 contentPadding = contentPadding == "none" ? "" : contentPadding; 8 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 9 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 10 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 11 12 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 13 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 14 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 15 16 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 17 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 18 19 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 20 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 21 string flexGrowClass = string.Empty; 22 23 switch (layout) 24 { 25 case "icon-left": 26 case "icon-right": 27 flexGrowClass = "flex-grow-0"; 28 break; 29 } 30 31 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 32 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 33 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 34 35 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 36 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 37 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 38 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 39 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 40 string headingLevelStop = $"</{headingLevel}>"; 41 42 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 43 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 44 } 45 46 <div class="h-100 @(contentPadding)@(theme) item_@Model.Item.SystemName.ToLower()"> 47 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 48 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 49 { 50 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 51 } 52 53 @switch (layout) 54 { 55 case "icon-top": 56 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 57 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 58 {<div class="@flexGrowClass"> 59 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 60 { 61 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 62 } 63 else 64 { 65 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 66 } 67 </div> 68 } 69 70 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 71 { 72 <div class="mb-0-last-child"> 73 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 74 { 75 @headingLevelStart 76 @Model.Item.GetString("Title") 77 @headingLevelStop 78 } 79 80 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 81 { 82 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 83 } 84 </div> 85 } 86 </div> 87 break; 88 case "icon-left": 89 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 90 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 91 {<div class="@flexGrowClass"> 92 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 93 { 94 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 95 } 96 else 97 { 98 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 99 } 100 </div> 101 } 102 103 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 104 { 105 <div class="d-flex flex-column flex-grow-1"> 106 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 107 { 108 @headingLevelStart 109 @Model.Item.GetString("Title") 110 @headingLevelStop 111 } 112 113 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 114 { 115 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 116 } 117 </div> 118 } 119 120 </div> 121 break; 122 case "icon-right": 123 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 124 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 125 { 126 <div class="d-flex flex-column flex-grow-1"> 127 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 128 { 129 @headingLevelStart 130 @Model.Item.GetString("Title") 131 @headingLevelStop 132 } 133 134 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 135 { 136 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 137 } 138 </div> 139 } 140 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 142 {<div class="@flexGrowClass"> 143 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 144 { 145 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 146 } 147 else 148 { 149 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 150 } 151 </div> 152 } 153 </div> 154 break; 155 } 156 157 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 158 { 159 @:</a> 160 } 161 </div> 162
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_aaebe9563ef2480eaf3c7369e15ee87f.Execute() in D:\dynamicweb.net\Solutions\composeit\FruHansensKaelder\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 20 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @{ 5 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 6 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 7 contentPadding = contentPadding == "none" ? "" : contentPadding; 8 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 9 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 10 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 11 12 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 13 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 14 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 15 16 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 17 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 18 19 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 20 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 21 string flexGrowClass = string.Empty; 22 23 switch (layout) 24 { 25 case "icon-left": 26 case "icon-right": 27 flexGrowClass = "flex-grow-0"; 28 break; 29 } 30 31 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 32 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 33 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 34 35 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 36 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 37 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 38 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 39 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 40 string headingLevelStop = $"</{headingLevel}>"; 41 42 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 43 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 44 } 45 46 <div class="h-100 @(contentPadding)@(theme) item_@Model.Item.SystemName.ToLower()"> 47 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 48 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 49 { 50 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 51 } 52 53 @switch (layout) 54 { 55 case "icon-top": 56 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 57 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 58 {<div class="@flexGrowClass"> 59 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 60 { 61 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 62 } 63 else 64 { 65 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 66 } 67 </div> 68 } 69 70 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 71 { 72 <div class="mb-0-last-child"> 73 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 74 { 75 @headingLevelStart 76 @Model.Item.GetString("Title") 77 @headingLevelStop 78 } 79 80 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 81 { 82 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 83 } 84 </div> 85 } 86 </div> 87 break; 88 case "icon-left": 89 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 90 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 91 {<div class="@flexGrowClass"> 92 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 93 { 94 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 95 } 96 else 97 { 98 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 99 } 100 </div> 101 } 102 103 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 104 { 105 <div class="d-flex flex-column flex-grow-1"> 106 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 107 { 108 @headingLevelStart 109 @Model.Item.GetString("Title") 110 @headingLevelStop 111 } 112 113 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 114 { 115 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 116 } 117 </div> 118 } 119 120 </div> 121 break; 122 case "icon-right": 123 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 124 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 125 { 126 <div class="d-flex flex-column flex-grow-1"> 127 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 128 { 129 @headingLevelStart 130 @Model.Item.GetString("Title") 131 @headingLevelStop 132 } 133 134 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 135 { 136 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 137 } 138 </div> 139 } 140 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 142 {<div class="@flexGrowClass"> 143 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 144 { 145 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 146 } 147 else 148 { 149 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 150 } 151 </div> 152 } 153 </div> 154 break; 155 } 156 157 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 158 { 159 @:</a> 160 } 161 </div> 162
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_aaebe9563ef2480eaf3c7369e15ee87f.Execute() in D:\dynamicweb.net\Solutions\composeit\FruHansensKaelder\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 20 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @{ 5 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 6 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 7 contentPadding = contentPadding == "none" ? "" : contentPadding; 8 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 9 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 10 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 11 12 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 13 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 14 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 15 16 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 17 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 18 19 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 20 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 21 string flexGrowClass = string.Empty; 22 23 switch (layout) 24 { 25 case "icon-left": 26 case "icon-right": 27 flexGrowClass = "flex-grow-0"; 28 break; 29 } 30 31 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 32 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 33 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 34 35 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 36 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 37 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 38 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 39 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 40 string headingLevelStop = $"</{headingLevel}>"; 41 42 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 43 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 44 } 45 46 <div class="h-100 @(contentPadding)@(theme) item_@Model.Item.SystemName.ToLower()"> 47 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 48 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 49 { 50 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 51 } 52 53 @switch (layout) 54 { 55 case "icon-top": 56 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 57 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 58 {<div class="@flexGrowClass"> 59 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 60 { 61 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 62 } 63 else 64 { 65 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 66 } 67 </div> 68 } 69 70 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 71 { 72 <div class="mb-0-last-child"> 73 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 74 { 75 @headingLevelStart 76 @Model.Item.GetString("Title") 77 @headingLevelStop 78 } 79 80 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 81 { 82 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 83 } 84 </div> 85 } 86 </div> 87 break; 88 case "icon-left": 89 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 90 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 91 {<div class="@flexGrowClass"> 92 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 93 { 94 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 95 } 96 else 97 { 98 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 99 } 100 </div> 101 } 102 103 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 104 { 105 <div class="d-flex flex-column flex-grow-1"> 106 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 107 { 108 @headingLevelStart 109 @Model.Item.GetString("Title") 110 @headingLevelStop 111 } 112 113 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 114 { 115 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 116 } 117 </div> 118 } 119 120 </div> 121 break; 122 case "icon-right": 123 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 124 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 125 { 126 <div class="d-flex flex-column flex-grow-1"> 127 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 128 { 129 @headingLevelStart 130 @Model.Item.GetString("Title") 131 @headingLevelStop 132 } 133 134 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 135 { 136 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 137 } 138 </div> 139 } 140 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 142 {<div class="@flexGrowClass"> 143 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 144 { 145 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 146 } 147 else 148 { 149 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 150 } 151 </div> 152 } 153 </div> 154 break; 155 } 156 157 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 158 { 159 @:</a> 160 } 161 </div> 162
I arbejdet med at sætte skolemad på dagsordenen, er vi stolte af at have bidraget til et fælles skriv, der deler vores mål og drømme for skolemad. Det er blevet til i samarbejde med 33 andre aktører som deler samme passion som os!
Vi sætter barren højt
Så får vi ikke bare bedre mad, vi får også gladere børn og stærkere fællesskaber.
Og det er præcis dét, vi kæmper for – hver eneste dag!
Det forpligter – på den gode måde
For os handler kodekset ikke om nye krav, men om at sætte ord på det, vi allerede tror på og arbejder ud fra
Vi arbejder hver dag for at skabe måltider, der bl.a. følger kostrådene, er lavet af gode råvarer og har masser af variation – med plads til både det velkendte og det, der kan vække nysgerrigheden. Samtidig tænker vi bæredygtighed ind i både råvarer og menu, bruger som minimum 90% økologiske råvarer - og vi gør os umage for, at alle børn kan være med omkring bordet.
Det er sådan, vi altid har arbejdet.
Vores måltidskasser bygger på de samme principper: høj økologi, gennemtænkte menuplaner udviklet sammen med kokke og ernæringseksperter – og ikke mindst mad, der smager godt og fungerer i en travl hverdag.
For vi ved, at en stor del af børns energi bliver tanket i løbet af dagen. Og derfor betyder det noget, hvad der ligger på tallerkenen.
Kodekset er en retning som vi allerede går i, og som vi bliver ved med at udvikle os i - og vi bliver aldrig helt færdige. Heldigvis!