Skip to content

Commit

Permalink
Updated Contact card
Browse files Browse the repository at this point in the history
  • Loading branch information
budcribar committed Feb 18, 2024
1 parent 735c61b commit 8bdaa37
Showing 1 changed file with 34 additions and 17 deletions.
51 changes: 34 additions & 17 deletions src/RemoteWebViewService/Pages/HtmlPageGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class ContactInfo
{
public string Name { get; set; } = string.Empty;
public string Company { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Name { get; set; }
public string Company { get; set; }
public string Email { get; set; }
}

public static class HtmlPageGenerator
Expand All @@ -21,22 +21,36 @@ public static string GenerateContactPage(ContactInfo contact, string version)
<style>
body {{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 40px;
color: #333;
margin: 0;
padding: 0;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}}
.card {{
background: #ffffff;
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
width: 40%;
min-width: 300px;
}}
.card:hover {{
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}}
.container {{
max-width: 600px;
margin: auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
padding: 2px 16px;
}}
h1 {{
color: #0056b3;
font-size: 24px;
text-align: center;
margin-top: 16px;
}}
p {{
font-size: 16px;
line-height: 1.6;
}}
.label {{
Expand All @@ -45,17 +59,20 @@ public static string GenerateContactPage(ContactInfo contact, string version)
</style>
</head>
<body>
<div class=""container"">
<h1>Contact Information</h1>
<p><span class=""label"">Name:</span> {contact.Name}</p>
<p><span class=""label"">Company:</span> {contact.Company}</p>
<p><span class=""label"">Email:</span> {contact.Email}</p>
<p><span class=""label"">Version:</span> {version}</p>
<div class=""card"">
<div class=""container"">
<h1>Contact Information</h1>
<p><span class=""label"">Name:</span> {contact.Name}</p>
<p><span class=""label"">Company:</span> {contact.Company}</p>
<p><span class=""label"">Email:</span> {contact.Email}</p>
<p><span class=""label"">Version:</span> {version}</p>
</div>
</div>
</body>
</html>";
return htmlTemplate;
}
}


}

0 comments on commit 8bdaa37

Please sign in to comment.