Skip to content

Commit e358a00

Browse files
committed
Index / Home page: Built home page design and content
Home page design is built to be a clean interface with minimalist look Social media icons used from font-awesome library included in head.html
1 parent ead92e7 commit e358a00

File tree

8 files changed

+118
-35
lines changed

8 files changed

+118
-35
lines changed

_data/social.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
email:
2+
id: 'deepsukhwani@gmail.com'
3+
href: 'mailto:'
4+
title: 'Email'
5+
fa-icon: 'fa-envelope-square'
6+
7+
github:
8+
id: 'proprogrammer'
9+
href: 'https://github.com/'
10+
title: 'GitHub'
11+
fa-icon: 'fa-github-square'
12+
13+
stackoverflow:
14+
id: '2661238'
15+
href: 'https://stackoverflow.com/users/'
16+
title: 'StackOverflow'
17+
fa-icon: 'fa-stack-overflow'
18+
19+
linkedin:
20+
id: 'deepsukhwani'
21+
href: 'https://linkedin.com/in/'
22+
title: 'LinkedIn'
23+
fa-icon: 'fa-linkedin'
24+
25+
twitter:
26+
id: 'deepsukhwani'
27+
href: 'https://www.twitter.com/'
28+
title: 'Twitter'
29+
fa-icon: 'fa-twitter-square'
30+

_includes/head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ '/assets/apple-touch-icon-precomposed.png' | relative_url }}">
1515
<link rel="shortcut icon" href="{{ '/assets/favicon.ico' | relative_url }}">
1616
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ 'atom.xml' | relative_url }}">
17+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
1718

1819
{% seo title=false %}
1920
</head>

_layouts/default.html

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55

66
<body>
77

8-
<div class="container content">
9-
<header class="masthead">
10-
<h3 class="masthead-title">
11-
<a href="{{ site.baseurl }}/" title="Home">{{ site.title }}</a>
12-
<small>{{ site.tagline }}</small>
13-
</h3>
14-
</header>
8+
<div id="spotlight">
9+
{% if page.title != "Home" %}
10+
<header class="masthead">
11+
<h3 class="masthead-title">
12+
<a href="{{ site.baseurl }}/" title="Home">{{ site.title }}</a>
13+
<small>{{ site.tagline }}</small>
14+
</h3>
15+
</header>
16+
{% endif %}
1517

16-
<main>
17-
{{ content }}
18-
</main>
18+
{{ content }}
1919

20-
<footer class="footer">
21-
<small>
22-
&copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
23-
</small>
24-
</footer>
20+
<div id="home-footer">
21+
<p>
22+
&copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>.
23+
All rights reserved. <a href="{{ site.baseurl }}">{{ site.author.name }}</a>
24+
</p>
25+
</div>
2526
</div>
2627

2728
{% if site.ga_analytics %}

_sass/_base.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ body {
1111
font-family: var(--body-font);
1212
font-size: var(--body-font-size);
1313
line-height: var(--body-line-height);
14+
letter-spacing: .04em;
1415
color: var(--body-color);
1516
background-color: var(--body-bg);
1617
-webkit-text-size-adjust: 100%;
@@ -68,3 +69,36 @@ mark {
6869
background-color: var(--yellow-100);
6970
border-radius: .125rem;
7071
}
72+
73+
#home-center {
74+
display: flex;
75+
flex-grow: 1;
76+
flex-direction: column;
77+
justify-content: center;
78+
}
79+
80+
#home-title {
81+
margin: 0;
82+
text-align: center;
83+
}
84+
85+
#home-social {
86+
font-size: 1.4em;
87+
text-align: center;
88+
opacity: .8;
89+
90+
a {
91+
margin: 0 .2em;
92+
}
93+
}
94+
95+
#home-footer {
96+
text-align: center;
97+
font-size: .6em;
98+
line-height: normal;
99+
@include dimmed;
100+
101+
p {
102+
margin-top: 0;
103+
}
104+
}

_sass/_layout.scss

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
//
33
// Styles for managing the structural hierarchy of the site.
44

5-
.container {
6-
max-width: 45rem;
7-
padding-left: var(--spacer-2);
8-
padding-right: var(--spacer-2);
9-
margin-left: auto;
10-
margin-right: auto;
11-
}
12-
13-
footer {
14-
margin-top: var(--spacer-3);
15-
margin-bottom: var(--spacer-3);
5+
#spotlight {
6+
display: flex;
7+
min-height: 100vh;
8+
flex-direction: column;
9+
align-items: center;
10+
justify-content: center;
11+
max-width: 93%;
12+
margin: auto;
13+
font-size: 1.5rem;
1614
}

_sass/_type.scss

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
h1, h2, h3, h4, h5, h6 {
66
margin-bottom: .5rem;
77
font-weight: 600;
8-
line-height: 1.25;
8+
line-height: inherit;
99
color: var(--heading-color);
1010
}
1111

1212
h1 {
13-
font-size: 2rem;
13+
font-size: 2em;
1414
}
1515

1616
h2 {
@@ -28,11 +28,6 @@ h4, h5, h6 {
2828
font-size: 1rem;
2929
}
3030

31-
p {
32-
margin-top: 0;
33-
margin-bottom: 1rem;
34-
}
35-
3631
ul, ol, dl {
3732
margin-top: 0;
3833
margin-bottom: 1rem;

_sass/_variables.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@
6464
--code-bg: var(--gray-900);
6565
}
6666
}
67+
68+
// Mixins
69+
//
70+
@mixin dimmed {
71+
opacity: .6;
72+
}

index.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1-
<div id="spotlight" class="animated fadeIn">
2-
Deep Sukhwani
1+
---
2+
layout: default
3+
title: Home
4+
---
5+
6+
<div id="home-center">
7+
<h1 id="home-title">{{ site.author.name }}</h1>
8+
<div id="home-social">
9+
{% if site.data.social %}
10+
{% assign sm = site.data.social %}
11+
{% for entry in sm %}
12+
{% assign key = entry | first %}
13+
{% if sm[key].id %}
14+
<a href="{{ sm[key].href }}{{ sm[key].id }}" title="{{ sm[key].title }}" target="_blank"><i
15+
class="fa {{ sm[key].fa-icon }}"></i></a>
16+
{% endif %}
17+
{% endfor %}
18+
{% endif %}
19+
20+
</div>
321
</div>

0 commit comments

Comments
 (0)