Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>0.0.9</Version>
<Version>0.1.0</Version>
<Company>Code Happy, LLC</Company>
<Authors>Code Happy, LLC</Authors>
<Product>HTML/CSS To Image API</Product>
Expand Down
16 changes: 16 additions & 0 deletions src/HtmlCssToImage/Models/MediaType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace HtmlCssToImage.Models;

/// <summary>
/// Represents the different types of media for rendering purposes.
/// </summary>
public enum MediaType
{
/// <summary>
/// Directs the browser to render the content for printing.
/// </summary>
print,
/// <summary>
/// Directs the browser to render the content on a screen.
/// </summary>
screen
}
19 changes: 19 additions & 0 deletions src/HtmlCssToImage/Models/Requests/CreateImageCommonOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,23 @@ public abstract class CreateImageCommonOptions
/// </summary>
public string? Timezone { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device.
/// </summary>
public bool? ViewportMobile { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the viewport should be in landscape orientation.
/// </summary>
public bool? ViewportLandscape { get; set; }

/// <summary>
/// Gets or sets a value indicating whether touch interactions are enabled within the viewport.
/// </summary>
public bool? ViewportTouch { get; set; }
/// <summary>
/// Gets or sets the media type to use for rendering.
/// </summary>
public MediaType? MediaType { get; set; }

}
19 changes: 19 additions & 0 deletions src/HtmlCssToImage/Models/Requests/CreateTemplateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,23 @@ public class CreateTemplateRequest
/// </summary>
[JsonConverter(typeof(GoogleFontsJsonConverter))]
public string[]? GoogleFonts { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device.
/// </summary>
public bool? ViewportMobile { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the viewport should be in landscape orientation.
/// </summary>
public bool? ViewportLandscape { get; set; }

/// <summary>
/// Gets or sets a value indicating whether touch interactions are enabled within the viewport.
/// </summary>
public bool? ViewportTouch { get; set; }
/// <summary>
/// Gets or sets the media type to use for rendering.
/// </summary>
public MediaType? MediaType { get; set; }
}
21 changes: 21 additions & 0 deletions src/HtmlCssToImage/Models/Template.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,25 @@ public class Template
/// typically provided in standard IANA timezone format (e.g., "America/New_York").
/// </summary>
public string? Timezone { get; init; }

/// <summary>
/// Gets or sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device.
/// </summary>
public bool? ViewportMobile { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the viewport should be in landscape orientation.
/// </summary>
public bool? ViewportLandscape { get; set; }

/// <summary>
/// Gets or sets a value indicating whether touch interactions are enabled within the viewport.
/// </summary>
public bool? ViewportTouch { get; set; }
/// <summary>
/// Gets or sets the media type to use for rendering.
/// </summary>
public MediaType? MediaType { get; set; }


}
Loading