Skip to content

Commit

Permalink
Updating changes to be in sync with Sites
Browse files Browse the repository at this point in the history
  • Loading branch information
wAsnk committed Jan 19, 2024
1 parent b36575c commit babac87
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 21 deletions.
12 changes: 12 additions & 0 deletions src/Themes/Sample.Theme/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"lombiq.hosting.mediatheme.deployer": {
"version": "3.0.0-alpha.5.nest-407",
"commands": [
"media-theme-deploy"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "DotNest.Core.SDK.MediaTheme",
"displayName": "Media Theme",
"description": "A recipe created with the media-theme-deployment tool.",
"author": "",
"website": "",
"version": "",
"issetuprecipe": false,
"categories": [],
"tags": [],
"steps": [
{
"name": "Feature",
"enable": [
"Lombiq.Hosting.MediaTheme.Bridge",
"Lombiq.Hosting.MediaTheme"
]
},
{
"name": "Themes",
"Site": "Lombiq.Hosting.MediaTheme"
},
{
"name": "mediatheme",
"ClearMediaThemeFolder": true,
"BaseThemeId": "TheTheme"
},
{
"name": "media",
"Files": [
{
"SourcePath": "_MediaTheme/Assets/example-local.png",
"TargetPath": "_MediaTheme/Assets/example-local.png"
},
{
"SourcePath": "_MediaTheme/Assets/example.png",
"TargetPath": "_MediaTheme/Assets/example.png"
},
{
"SourcePath": "_MediaTheme/Templates/Example.liquid",
"TargetPath": "_MediaTheme/Templates/Example.liquid"
},
{
"SourcePath": "_MediaTheme/Templates/Widget__LayoutInjection.liquid",
"TargetPath": "_MediaTheme/Templates/Widget__LayoutInjection.liquid"
}
]
}
]
}
17 changes: 4 additions & 13 deletions src/Themes/Sample.Theme/Recipes/DotNest.Core.SDK.Setup.recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,26 +143,17 @@
{
"executionid": "DotNest.Core.SDK.Web",
"name": "Lombiq.BaseTheme.LayersAndZones"
},
{
"executionid": "DotNest.Core.SDK.Web",
"name": "DotNest.Core.SDK.MediaTheme"
}
]
},
{
"name": "mediatheme",
"ClearMediaThemeFolder": false,
"BaseThemeId": "Lombiq.BaseTheme"
},
{
"name": "media",
"Files": [
{
"SourcePath": "_MediaTheme/Assets/example.png",
"TargetPath": "_MediaTheme/Assets/example.png"
},
{
"SourcePath": "_MediaTheme/Templates/Example.liquid",
"TargetPath": "_MediaTheme/Templates/Example.liquid"
}
]
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% zone "Header" %}

<p>This is a template rendered from your custom theme. Once deployed to the Media Theme, it'll be hosted from there.</p>
<p>Below is an image also stored in the theme's wwwroot folder. Note that the URL of the image starts with <code>/mediatheme</code>.
Once it's deployed to the Media Theme, the URL can stay the same, but it'll be served from the Media Library.</p>
<img src="/mediatheme/example-local.png" alt="example local" />

<p>Now let's render a shape that's actually coming from the Media Theme.</p>

{{ "Example" | shape_new | shape_render }}

{% endzone %}
20 changes: 12 additions & 8 deletions src/Themes/Sample.Theme/Sample.Theme.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App"/>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Theme.Targets" Version="1.7.0"/>
<PackageReference Include="OrchardCore.ContentManagement" Version="1.7.0"/>
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.7.0"/>
<PackageReference Include="OrchardCore.ResourceManagement" Version="1.7.0"/>
<PackageReference Include="Lombiq.BaseTheme" Version="5.0.0"/>
<PackageReference Include="Lombiq.Hosting.MediaTheme" Version="5.0.0"/>
<PackageReference Include="Lombiq.Hosting.MediaTheme.Targets" Version="5.0.0"/>
<PackageReference Include="OrchardCore.Theme.Targets" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="1.7.0" />
<PackageReference Include="Lombiq.BaseTheme" Version="5.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme" Version="5.0.0" />
<PackageReference Include="Lombiq.Hosting.MediaTheme.Targets" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<Content Include=".config\dotnet-tools.json" />
</ItemGroup>

<PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Themes/Sample.Theme/Views/Example.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>This is an example template hosted in Media Theme.</p>
<p>Below is an image also hosted in Media Theme:</p>
<img src="/mediatheme/example.png" alt="example" />
12 changes: 12 additions & 0 deletions src/Themes/Sample.Theme/Views/Widget__LayoutInjection.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% zone "Header" %}

<p>This is a template rendered from your custom theme. Once deployed to the Media Theme, it'll be hosted from there.</p>
<p>Below is an image also stored in the theme's wwwroot folder. Note that the URL of the image starts with <code>/mediatheme</code>.
Once it's deployed to the Media Theme, the URL can stay the same, but it'll be served from the Media Library.</p>
<img src="/mediatheme/example-local.png" alt="example local" />

<p>Now let's render a shape that's actually coming from the Media Theme.</p>

{{ "Example" | shape_new | shape_render }}

{% endzone %}
Binary file added src/Themes/Sample.Theme/wwwroot/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit babac87

Please sign in to comment.