Skip to content

Commit

Permalink
2sxc 14 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
getBlup committed Jun 30, 2022
1 parent 4748beb commit bb86aae
Show file tree
Hide file tree
Showing 7 changed files with 2,577 additions and 987 deletions.
6 changes: 3 additions & 3 deletions .data/app.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SexyContent FileVersion="07.00.00" MinimumRequiredVersion="07.04.02" ModuleVersion="13.10.02" ExportDate="2022-05-10T12:31:01.0748475+02:00">
<SexyContent FileVersion="07.00.00" MinimumRequiredVersion="07.04.02" ModuleVersion="14.07.00" ExportDate="2022-06-30T15:53:36.8279317+02:00">
<Header>
<App Guid="5ec60d62-9ff6-4850-a9fe-e196fefe2a25" />
<Language Default="en-us" />
Expand Down Expand Up @@ -641,13 +641,13 @@
<Value Key="RequiredOqtaneVersion" Value="03.01.00" Type="String">
<Dimension DimensionID="194" ReadOnly="false" />
</Value>
<Value Key="RequiredVersion" Value="13.10.00" Type="String">
<Value Key="RequiredVersion" Value="14.07.00" Type="String">
<Dimension DimensionID="194" ReadOnly="false" />
</Value>
<Value Key="SupportsAjaxReload" Value="True" Type="Boolean">
<Dimension DimensionID="194" ReadOnly="false" />
</Value>
<Value Key="Version" Value="02.01.00" Type="String">
<Value Key="Version" Value="02.02.00" Type="String">
<Dimension DimensionID="194" ReadOnly="false" />
</Value>
</Entity>
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ If you want to customize the CSS, you will usually follow the ["Create Custom St
* switched to typescript
* enabled data-optimizations
* 2022-04 Version 2.01.00
* Replaced data-enableoptimizations with pageSvc.AssetAttributes()
* Replaced data-enableoptimizations with pageSvc.AssetAttributes()
* 2022-06 Version 02.02.00
* Changed all base classes to their 2sxc 14 equivalents
* Replaced all GetService<> with the new ServiceKit14
* Updated webpack
17 changes: 6 additions & 11 deletions _Timeline.PartAssets.cshtml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
@inherits Custom.Hybrid.Razor12
@inherits Custom.Hybrid.Razor14
@using ToSic.Razor.Blade;
@using ToSic.Sxc.Services;
@{
// 1. Get Services for Css and Page
var pageCss = GetService<Connect.Koi.ICss>(); // Service to get CSS information about the current Theme
var pageSvc = GetService<IPageService>(); // Service to set titles etc. on the page
// 2. Include Bootstrap4 if the framework isn't known
if (pageCss.IsUnknown) {
pageSvc.Activate("Bootstrap4");
if (Kit.Css.IsUnknown) {
Kit.Page.Activate("Bootstrap4");
}

// Activate font-Awesome 5 from the global resources and activate https://r.2sxc.org/turnon
pageSvc.Activate("FontAwesome5", "turnOn", "2sxc.JsCore");
Kit.Page.Activate("FontAwesome5", "turnOn", "2sxc.JsCore");
}

<link rel="stylesheet" type="text/css" href="@App.Path/dist/styles.min.css" @pageSvc.AssetAttributes()/>
<script type="text/javascript" src="@App.Path/dist/scripts.min.js" @pageSvc.AssetAttributes()></script>
<link rel="stylesheet" type="text/css" href="@App.Path/dist/styles.min.css" @Kit.Page.AssetAttributes()/>
<script type="text/javascript" src="@App.Path/dist/scripts.min.js" @Kit.Page.AssetAttributes()></script>
<turnOn turn-on='{
"run": "window.appTimelineJs2.init()",
"data": {
Expand Down
2 changes: 1 addition & 1 deletion _Timeline.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inherits Custom.Hybrid.Razor12
@inherits Custom.Hybrid.Razor14
@{
var timelineJsAttribute = "app-timelinejs2-" + CmsContext.Module.Id;
}
Expand Down
Loading

0 comments on commit bb86aae

Please sign in to comment.