Skip to content

Commit 9c7385b

Browse files
committed
Initial structure for cv
1 parent 55178ab commit 9c7385b

File tree

8 files changed

+136
-1
lines changed

8 files changed

+136
-1
lines changed

LinkDotNet.Blog.UnitTests/Web/AppConfigurationFactoryTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public void ShouldMapFromAppConfiguration()
2222
{ "Introduction:ProfilePictureUrl", "anotherurl" },
2323
{ "Introduction:Description", "desc" },
2424
{ "BlogPostsPerPage", "5" },
25+
{ "IsAboutMeEnabled", "true" },
2526
};
2627
var configuration = new ConfigurationBuilder()
2728
.AddInMemoryCollection(inMemorySettings)
@@ -40,6 +41,7 @@ public void ShouldMapFromAppConfiguration()
4041
appConfiguration.Introduction.ProfilePictureUrl.Should().Be("anotherurl");
4142
appConfiguration.Introduction.Description.Should().Be("desc");
4243
appConfiguration.BlogPostsPerPage.Should().Be(5);
44+
appConfiguration.IsAboutMeEnabled.Should().BeTrue();
4345
}
4446

4547
[Fact]

LinkDotNet.Blog.Web/AppConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@ public record AppConfiguration
2121
public string DatabaseName { get; init; }
2222

2323
public int BlogPostsPerPage { get; init; }
24+
25+
public bool IsAboutMeEnabled { get; set; }
2426
}
2527
}

LinkDotNet.Blog.Web/AppConfigurationFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public static AppConfiguration Create(IConfiguration config)
1616
ConnectionString = config["ConnectionString"],
1717
DatabaseName = config["DatabaseName"],
1818
BlogPostsPerPage = int.Parse(config["BlogPostsPerPage"]),
19+
IsAboutMeEnabled = bool.Parse(config["IsAboutMeEnabled"]),
1920
};
2021
return configuration;
2122
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@page "/AboutMe"
2+
@inject AppConfiguration appConfiguration
3+
/* TODO: Meta Tags About Me - [Name here] */
4+
5+
<div class="page">
6+
<div class="container">
7+
<div class="row">
8+
<div class="col-lg-3 col-md-4">
9+
<Profile ProfileImageUrl="@appConfiguration.Introduction.ProfilePictureUrl"/>
10+
</div>
11+
<div class="col-lg-9 col-md-8 tab-container">
12+
<div class="row">
13+
<em>Stuff</em>
14+
</div>
15+
</div>
16+
</div>
17+
</div>
18+
</div>

LinkDotNet.Blog.Web/Shared/NavMenu.razor

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
fa-github"></i>
2323
Github</a></li>
2424
}
25+
@if (configuration.IsAboutMeEnabled)
26+
{
27+
<li class="nav-item">
28+
<a class="nav-link" href="AboutMe"><i class="far fa-address-card"></i> About
29+
me</a></li>
30+
}
31+
2532
<AccessControl></AccessControl>
2633
<li class="nav-item d-flex">
2734
<SearchInput SearchEntered="NavigateToSearchPage"></SearchInput>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@inherits MarkdownComponentBase
2+
<div class="profile">
3+
<div class="profile-name">
4+
<span>Steven Giesel</span>
5+
<br/>
6+
<span>Software Engineer</span>
7+
</div>
8+
<div class="profile-image">
9+
<img src="@ProfileImageUrl" alt="Profile Picture" />
10+
</div>
11+
<ul class="profile-keypoints">
12+
@foreach (var (key, value) in cv)
13+
{
14+
<li><bold> @RenderMarkupString(key)</bold>: @RenderMarkupString(value)</li>
15+
}
16+
</ul>
17+
</div>
18+
@code {
19+
[Parameter]
20+
public string ProfileImageUrl { get; set; }
21+
22+
private readonly Dictionary<string, string> cv = new()
23+
{
24+
{"<i class=\"fas fa-birthday-cake\"></i> Birthday", "17.05.1991"},
25+
{"E-Mail", "[[email protected]](mailto:[email protected])"},
26+
{"Telephone", "+1234567890"},
27+
{"LinkedIn", "[Steven Giesel](https://www.linkedin.com/in/steven.giesel)"},
28+
{"Github", "<i class=\"fab fa-github \"></i>[linkdotnet](https://github.com/linkdotnet)"},
29+
};
30+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.profile {
2+
display: inline-block;
3+
box-shadow: 0 3px 7px -1px rgba(0, 0, 0, 0.1);
4+
width: 100%;
5+
/* TODO: BETTER COLOR */
6+
background: var(--background-gradient-start);
7+
}
8+
9+
.profile-name {
10+
padding: 20px;
11+
font-size: 1.25em;
12+
}
13+
14+
.profile-name:first-child {
15+
color: var(--header1);
16+
}
17+
18+
.profile-name:last-child {
19+
color: var(--header2);
20+
}
21+
22+
.profile-image {
23+
clip-path: polygon(0 9%, 100% 0, 100% 94%, 0% 100%);
24+
}
25+
26+
.profile-image img {
27+
width: 100%;
28+
}
29+
30+
.profile-keypoints {
31+
padding-top: 10px;
32+
list-style: none;
33+
}
34+
35+
.profile-keypoints li {
36+
position: relative;
37+
padding-bottom: 0.6em;
38+
39+
}
40+
41+
.profile-keypoints li:before {
42+
border-color: var(--header1);
43+
content: "";
44+
border-left: solid 2px;
45+
height: 100%;
46+
width: 1px;
47+
left: -16px;
48+
position: absolute;
49+
display: block;
50+
}
51+
52+
.profile-keypoints li:after {
53+
content: "";
54+
position: absolute;
55+
left: -19.5px;
56+
top: 8px;
57+
height: 8px;
58+
width: 8px;
59+
border-radius: 50%;
60+
display: inline-block;
61+
background-color: var(--header2);
62+
}
63+
64+
.profile-keypoints li:first-child:before {
65+
top: 8px;
66+
}
67+
68+
.profile-keypoints li:last-child:before {
69+
height: 8px;
70+
}
71+
72+
/* As the Markupcomponent is a base class we have to use deep */
73+
::deep .profile-keypoints li p {
74+
display: inline;
75+
}

LinkDotNet.Blog.Web/wwwroot/css/basic.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ html {
5050

5151
body {
5252
margin: 0;
53-
background-image: linear-gradient(to bottom, var(--background-gradient-start) 60%, var(--background-gradient-end));
53+
background-image: linear-gradient(to bottom, var(--background-gradient-start) 40%, var(--background-gradient-end));
5454
background-repeat: no-repeat;
5555
background-attachment: fixed;
5656
font-family: 'Quicksand', sans-serif;

0 commit comments

Comments
 (0)