Skip to content

Commit 2c3edcf

Browse files
committed
2 parents 621fe93 + caee0af commit 2c3edcf

86 files changed

Lines changed: 721 additions & 928 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/dotnet-core.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
branches: [ master ]
1010

11+
env:
12+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
13+
1114
jobs:
1215
build:
1316

.github/workflows/lighthouse.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [ gh-pages ]
66

7+
env:
8+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
9+
710
jobs:
811
lighthouse:
912
runs-on: ubuntu-latest

Models/ContentTypes/Article.Generated.cs

Lines changed: 0 additions & 51 deletions
This file was deleted.

Models/ContentTypes/Article.cs

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
1-
using Kontent.Ai.Delivery.Abstractions;
21
using System;
32
using System.Collections.Generic;
4-
using System.Linq;
3+
using PetrSvihlik.Com.Models;
54

65
namespace PetrSvihlik.Com.Models.ContentTypes
76
{
8-
public partial class Article : ITwitterCard, IOpenGraphArticle
7+
public class Article : ITitleProvider
98
{
10-
public Author ArticleAuthor => Author.OfType<Author>().FirstOrDefault();
11-
12-
public IEnumerable<Tag> TagObjects => Tags.OfType<Tag>();
13-
14-
public Category SelectedCategory => Category.OfType<Category>().First();
15-
16-
string ITwitterCard.TwitterCard => TwitterCard?.FirstOrDefault()?.Codename;
17-
18-
public string TwitterTitle => OgTitle.Cascade(Title);
19-
20-
public string TwitterDescription => OgDescription.Cascade(Description);
21-
22-
public DateTime OgPublishedTime => PublishDate.Value;
23-
24-
public DateTime OgModifiedTime => System.LastModified;
25-
26-
public IEnumerable<string> OgAuthor => Author.OfType<Author>().Select(a => a.Name);
27-
28-
public string OgSection => SelectedCategory.Title;
29-
30-
public IEnumerable<string> OgTag => TagObjects.Select(t => t.Title);
31-
32-
IAsset ITwitterCard.TwitterImage => TwitterImage?.FirstOrDefault().Cascade(OgImage?.FirstOrDefault());
9+
public string Title { get; set; }
10+
public string Description { get; set; }
11+
public string Slug { get; set; }
12+
public DateTime? PublishDate { get; set; }
13+
public string CanonicalUrl { get; set; }
14+
public string ContentHtml { get; set; }
15+
public Category SelectedCategory { get; set; }
16+
public List<Tag> TagObjects { get; set; } = new();
17+
public Author ArticleAuthor { get; set; }
18+
19+
string ITitleProvider.Title => Title;
20+
string ITitleProvider.ElementCodename => "title";
3321
}
34-
}
22+
}

Models/ContentTypes/Author.Generated.cs

Lines changed: 0 additions & 29 deletions
This file was deleted.

Models/ContentTypes/Author.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
using System.Collections.Generic;
2-
using System.Linq;
32

43
namespace PetrSvihlik.Com.Models.ContentTypes
54
{
6-
public partial class Author
5+
public class Author
76
{
8-
public IEnumerable<Contact> ContactsTyped => Contacts.OfType<Contact>();
7+
public string Name { get; set; }
8+
public string Bio { get; set; }
9+
public List<Contact> Contacts { get; set; } = new();
910
}
10-
}
11+
}

Models/ContentTypes/Category.Generated.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.

Models/ContentTypes/Category.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
namespace PetrSvihlik.Com.Models.ContentTypes
44
{
5-
public partial class Category : ITitleProvider
5+
public class Category : ITitleProvider
66
{
7-
public string ElementCodename => TitleCodename;
7+
public string Title { get; set; }
8+
public string Slug { get; set; }
9+
10+
string ITitleProvider.Title => Title;
11+
string ITitleProvider.ElementCodename => "title";
812
}
9-
}
13+
}

Models/ContentTypes/Contact.Generated.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)