Skip to content

Commit af81255

Browse files
committed
Create initial stack. #134
1 parent 24fa263 commit af81255

File tree

5 files changed

+109
-2
lines changed

5 files changed

+109
-2
lines changed

_data/stack.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
message: >
2+
This is my message.
3+
4+
links:
5+
- title: Twitter
6+
icon: twitter
7+
url: https://twitter.com/BenJetson # TODO use site.yml
8+
- title: Instagram
9+
icon: instagram
10+
url: https://instagram.com/bfgodfr # TODO use site.yml
11+
- title: GitHub
12+
icon: github
13+
url: https://github.com/BenJetson # TODO use site.yml
14+
- title: LinkedIn
15+
icon: linkedin
16+
url: https://linkedin.com # TODO use site.yml

_sass/custom/overrides/vars.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ $primary: $brand-color;
1818
$chip-size: 30px;
1919

2020
// Enable background gradient classes.
21+
$gradient-max: rgba(#fff, 15%);
22+
$gradient-min: rgba(#fff, 0%);
23+
2124
$gradient: linear-gradient(
2225
0deg /* must be 0deg for home page gradient */,
23-
rgba(#fff, 0.15),
24-
rgba(#fff, 0)
26+
$gradient-max,
27+
$gradient-min
2528
);

_sass/custom/styles/_stack.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.stack {
2+
@extend .bg-primary;
3+
@extend .text-light;
4+
@extend .p-3;
5+
6+
text-align: center;
7+
8+
// Make the stack have the same color as the bottom of the gradient from the
9+
// introduction banner at the top of the viewport.
10+
//
11+
// Using a linear gradient here to ensure:
12+
// - the color is a perfect match since browser gradient calculation
13+
// algorithms might differ, best to use same algorithm to calc.
14+
// - ensure that browsers that do not support the gradient for the banner
15+
// will have the same color as banner for the stack.
16+
background-image: linear-gradient(0deg, $gradient-max, $gradient-max);
17+
}
18+
19+
.stack-item {
20+
@extend .my-3;
21+
@extend .mx-auto;
22+
@extend .p-3;
23+
@extend .text-dark;
24+
25+
position: relative;
26+
27+
a {
28+
color: inherit;
29+
text-decoration: none;
30+
}
31+
32+
max-width: 400px;
33+
34+
text-align: center;
35+
36+
border: 1px solid #fff;
37+
border-radius: 15px;
38+
39+
background-color: rgba($white, 85%);
40+
41+
font-weight: bold;
42+
font-size: $font-size-lg;
43+
}

_sass/custom/styles/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
@import "octicons";
1818
@import "preview";
1919
@import "projects";
20+
@import "stack";
2021
@import "usercontent";
2122
@import "utilities";

stack/index.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
layout: boilerplate
3+
title: Links
4+
---
5+
6+
{% include introduction.html %}
7+
8+
<section class="stack">
9+
{% assign stack = site.data.stack %}
10+
11+
<p>{{stack.message | markdownify}}</p>
12+
13+
{% for item in stack.links %}
14+
15+
<div class="stack-item">
16+
<a href="{{link.url}}" class="stretched-link">
17+
{% comment %}
18+
<!-- prettier-ignore -->
19+
{% endcomment %}
20+
21+
{% if item.icon %}
22+
23+
{% comment %}
24+
<!-- prettier-ignore -->
25+
{% endcomment %}
26+
27+
<i class="bi bi-{{item.icon}}"></i>
28+
29+
{% comment %}
30+
<!-- prettier-ignore -->
31+
{% endcomment %}
32+
33+
{% endif %}
34+
35+
{{item.title}}
36+
37+
{% comment %}
38+
<!-- prettier-ignore -->
39+
{% endcomment %}
40+
</a>
41+
</div>
42+
43+
{% endfor %}
44+
</section>

0 commit comments

Comments
 (0)