Skolemad - en ekstra glæde i hverdagen
De første tallerkener er serveret - skolemaden lever, og vi kan næsten ikke få armene ned af begejstring! Det er bare fedt at komme i gang! Vi vil helt vildt gerne dele begejstringen med jer, og derfor vil I herinde kunne følge med i, hvordan hverdagen med skolemad folder sig ud.
En god start på skolemad
Her i den spæde opstart, må vi bare sige, at det har simpelthen fungeret over al forventning!
Alt det praktiske i baggrunden fyldte ikke spor ved bordene. Børnene spiste bare sammen og nød maden – præcis sådan, som det skal være.
Jeg kan ikke lide boller i karry. I hvert fald ikke min mors – men den her er sindssyg.”
- Elev i 1 klasse, Seden Skole
Med Heidi i køkkenet
Sådan her, kan en typisk dag i køkkenet på Nordals Skolen se ud
Og ungerne er vilde med Heidi
Samtidig med, at skolemaden også viser sig at have en ekstra bonus i ærmet
Heidi spiser selv også med hver dag - og oplever simpelthen, at hun på de her få måneder kan mærke en forskel i hvordan hun har det i kroppen. Hun siger, at det nok "er alt det der grønne noget”. Og dét, kan vi jo kun synes er en virkelig dejlig utilsigtet ekstra bonus!!
Det er også bare et godt eksempel på, at god mad kan spises af alle - ikke kun ungerne.
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
”Jeg giver maden 10 ud af 10, fordi det smager godt.”
- Elev i 1 klasse, Nordals Skolen
Rammerne omkring måltidet
- er mindst ligeså vigtige, som selve maden. Maden er kun én del af ligningen. Skolemad skal også fungere i hverdagen, ellers nytter selv de bedste intentioner ikke.
Et fælles måltid er ikke bare mad på en tallerken – det er en vigtig del af skoledagen, hvor børn får ro til at spise, snakke og opleve maden som noget, der samler dem. Når rammerne er trygge og inspirerende, styrker vi børns madmod, nysgerrighed og lyst til at smage nyt – og det kan være netop det, der gør, at sund mad finder vej ned i maven.
På de skoler, vi samarbejder med, findes der ikke én løsning, der passer til alle. Derfor har vi sammen med hver skole fundet den måde at gøre det på, som passer bedst til netop deres hverdag. Det hele aftales ud fra skolens ønsker og de praktiske rammer og virkeligheden.
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
”Dét her, det er bedre end min gamle livret.”
- Elev i 0 klasse, Seden Skole
Lav skolemadsretterne derhjemme
Nemme, lækre opskrifter
Vi har samlet en række favoritopskrifter til jer, så I og ungerne kan prøve jeres madlavningsskills af derhjemme. De er super lette at gå til - det lover vi.