Skip to content

Commit

Permalink
Apply several changes
Browse files Browse the repository at this point in the history
  • Loading branch information
monambike committed Feb 27, 2024
1 parent ced1fb2 commit 5c8e15e
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Monambike.Core.Data
/// <summary>
/// Class that provides basic information about Monambike.
/// </summary>
public static class Monambike
public static class BasicInfo
{
/// <summary>
/// Monambike's first name.
Expand Down
2 changes: 1 addition & 1 deletion src/Monambike.Core/Data/Links.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Monambike.Core.Data
/// </summary>
public static class Links
{
private static readonly string monambike = Monambike.Username.ToLower();
private static readonly string monambike = BasicInfo.Username.ToLower();

/// <summary>
/// Represents a link for my Personal Website.
Expand Down
10 changes: 5 additions & 5 deletions src/Monambike.Core/Entities/Email.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ public class Email(string emailAddress)
/// <summary>
/// Gets the email address.
/// </summary>
public string EmailAddress => new($"{emailAddress}");
public string Address => new($"{emailAddress}");

/// <summary>
/// Gets the MailTo URL of the email address.
/// Gets the URL of the email address with the prefix "mailto:".
/// </summary>
public string MailTo => new($"mailto:{EmailAddress}");
public string Link => new($"mailto:{Address}");

/// <summary>
/// Returns the email address as string.
/// </summary>
/// <returns>The email address as <see cref="string"/>.</returns>
public override string ToString() => EmailAddress.ToString();
public override string ToString() => Address.ToString();
}
}
96 changes: 96 additions & 0 deletions src/Monambike.Core/Entities/Game.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
namespace Monambike.Web.Models
{
/// <summary>
/// Represents a video game.
/// </summary>
public class Game
{
/// <summary>
/// Gets the title of the game.
/// </summary>
public string Title { get; }

/// <summary>
/// Gets a brief comment about the game.
/// </summary>
public string BriefComment { get; }

/// <summary>
/// Gets the list of tags associated with the game.
/// </summary>
public List<Tag> Tags { get; }

/// <summary>
/// Gets the list of platforms the game was consumed on.
/// </summary>
public List<Platform> Platforms { get; }

/// <summary>
/// Gets the list of achievements highlighted together within the game.
/// </summary>
public List<Achievement> Achievements { get; }

/// <summary>
/// Gets the image path for the game's cover image.
/// </summary>
public string ImagePath { get; }

/// <summary>
/// Gets the total time played for the game.
/// </summary>
public TimeSpan TimePlayed { get; }

/// <summary>
/// Represents a tag associated with a game.
/// </summary>
public class Tag
{
/// <summary>
/// Gets the name of the tag.
/// </summary>
public string Name { get; }
}

/// <summary>
/// Represents a platform on which the game is available.
/// </summary>
public class Platform
{
/// <summary>
/// Gets the name of the platform.
/// </summary>
public string Name { get; }

/// <summary>
/// Gets the color associated with the platform.
/// </summary>
public string Color { get; }
}

/// <summary>
/// Represents an achievement within the game.
/// </summary>
public class Achievement
{
/// <summary>
/// Gets the name of the achievement.
/// </summary>
public string Name { get; }

/// <summary>
/// Gets the description of the achievement.
/// </summary>
public string Description { get; }

/// <summary>
/// Gets the date and time when the achievement was awarded.
/// </summary>
public DateTime AwardedAt { get; }

/// <summary>
/// Gets the percentage of players who achieved this achievement.
/// </summary>
public float AchievedBy { get; }
}
}
}
12 changes: 6 additions & 6 deletions src/Monambike.Core/Models/GithubLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,35 @@ internal static async Task<List<LanguageColor>> GetLanguageColors()
/// <summary>
/// Represents the JSON structure for language colors retrieved from GitHub.
/// </summary>
public class JsonColor
internal class JsonColor
{
/// <summary>
/// Gets or initializes the hexadecimal color code.
/// </summary>

[JsonProperty("color")]
public required string Color { get; init; }
internal required string Color { get; init; }
}

/// <summary>
/// Represents a programming language with its corresponding color.
/// </summary>
public class LanguageColor
internal class LanguageColor
{
/// <summary>
/// Gets or initializes the name of the programming language.
/// </summary>
public required string Name { get; init; }
internal required string Name { get; init; }

/// <summary>
/// Gets or initializes the hexadecimal color code.
/// </summary>
public required string HexColor { get; init; }
internal required string HexColor { get; init; }

/// <summary>
/// Gets the RGB color equivalent of the hexadecimal color code.
/// </summary>
public Color RgbColor => ColorTranslator.FromHtml(HexColor);
internal Color RgbColor => ColorTranslator.FromHtml(HexColor);
}
}
}
6 changes: 6 additions & 0 deletions src/Monambike.Core/Models/Steam.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Monambike.Core.Models
{
internal class Steam
{
}
}
2 changes: 1 addition & 1 deletion src/Monambike.Core/Monambike.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Copyright>Copyright © 2024-2024</Copyright>
<PackageTags>monambike;github;certificate;social-media;links</PackageTags>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<PackageReleaseNotes>- Added patreon link
- Created email support and added a new e-mail entry
- Added age
Expand Down

0 comments on commit 5c8e15e

Please sign in to comment.