Skip to content

Commit 55c5584

Browse files
author
Stuart Reilly
committed
Add inital socials
1 parent 792c124 commit 55c5584

File tree

8 files changed

+86
-41
lines changed

8 files changed

+86
-41
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,18 @@ root named after your Scott Logic username. Within this you will need a set of f
5353
be obvious what needs changing. Then add yourself to `_data/authors.yml`, again using an existing author as a template.
5454
You will need to add
5555

56-
- an entry under `authors`
56+
- an entry under `authors` with the following fields where _italic_ fields are required
57+
- _name_
58+
- _picture_
59+
- author-summary
60+
- twitter-url
61+
- twitter-handle
62+
- linkedin-url
63+
- linkedin-handle
5764
- your username under `active-authors`
5865

66+
If both _social_-url and _social_-handle are provided, _social_-url is used.
67+
5968
Finally, if you performed a _sparse checkout_ as recommended, you will need to add directory `_posts` in the root of
6069
your local copy.
6170

@@ -160,7 +169,7 @@ npm run scripts
160169
npm run style
161170
```
162171

163-
##### Useful Command Line Flags
172+
##### Useful Command Line Flags for Jekyll
164173
* `--livereload` - trigger a build on file change (excluding SCSS or JS) and refresh the brower once built
165174
* `--incremental` - use the experimental incremental build mode which after the initial build, only builds changed files
166175

_includes/featured_post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h3 class="cell">
1515
</div>
1616
</div>
1717
<div class="shape cell large-3 medium-2 small-1 grid-y align-center">
18-
<!-- Allow shape to be overridden during include -->
18+
{% comment %} Allow shape to be overridden during include {% endcomment %}
1919
{% if shape == nil %}
2020
{% capture shape %}{% include post_shape.html post=post %}{% endcapture %}
2121
{% assign shape = shape | strip %}

_includes/social.html

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
{% capture url %}{{ site.canonical.url }}{{ page.url }}{% endcapture %}
2-
<div class="social">
3-
<applause-button color="{% include post_colour_hex.html post=page %}"
4-
url="{{ site.canonical.url }}{{ page.url }}"
5-
api="{{ site.applause-button-api.url }}"
6-
multiclap="true"/>
2+
<div class="social-wrapper">
3+
<div class="social">
4+
<applause-button color="{% include post_colour_hex.html post=page %}"
5+
url="{{ site.canonical.url }}{{ page.url }}"
6+
api="{{ site.applause-button-api.url }}"
7+
multiclap="true"></applause-button>
8+
<hr/>
9+
<div class="social-list">
10+
{% if author.linkedin-url != nil %}
11+
{% assign linkedin_url = author.linkedin-url %}
12+
{% elsif author.linkedin-handle != nil %}
13+
{% assign linkedin_url = "https://linkedin.com/in/ | append: author.linkedin-handle %}
14+
{% endif %}
15+
{% if linkedin_url != nil %}
16+
<a href="{{linkedin_url}}">LINK</a>
17+
{% endif %}
18+
19+
{% if author.twitter-url != nil %}
20+
{% assign twitter_url = author.twitter-url %}
21+
{% elsif author.twitter-handle != nil %}
22+
{% assign twitter_url = "https://twitter.com/" | append: author.twitter-handle %}
23+
{% endif %}
24+
{% if twitter_url != nil %}
25+
<a href="{{twitter_url}}">TWIT</a>
26+
{% endif %}
27+
</div>
28+
</div>
729
</div>

_layouts/default_post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% assign author = site.data.authors.authors[page.author] %}
66
{% assign authorUsername = page.author %}
77
<div class="default-post {% include post_colour.html post=page %} grid-container">
8-
<div class="hero grid-x">
8+
<div class="hero grid-x large-offset-1">
99
<div class="content cell large-7 medium-9 small-11 grid-y grid-padding-y">
1010
<div class="cell large-offset-2 medium-offset-1 small-offset-1">
1111
{% include category_display.html post = page %}

scss/_applause-button.scss

Lines changed: 0 additions & 30 deletions
This file was deleted.

scss/_social.scss

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.social {
2+
display: block;
3+
position: sticky;
4+
top: 6rem;
5+
width: 4rem;
6+
z-index: 100; /* always on top */
7+
8+
hr {
9+
width: 95%;
10+
}
11+
12+
.social-list {
13+
text-align: center;
14+
a {
15+
line-height: 3rem;
16+
}
17+
}
18+
19+
applause-button {
20+
.clap-count {
21+
border-radius: 50%;
22+
padding-inline: 0.5rem;
23+
background-color: white;
24+
font-size: 1.25rem;
25+
}
26+
27+
&.clap .clap-count {
28+
animation-name: hideThenShow !important;
29+
}
30+
31+
.style-root {
32+
gap: 0.25rem;
33+
flex-direction: column-reverse;
34+
}
35+
36+
button.shockwave {
37+
background-color: white;
38+
39+
svg {
40+
overflow: visible;
41+
}
42+
}
43+
}
44+
}

scss/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
@use "code";
2626
@use "video-post";
2727
@use "read-more";
28-
@use "applause-button";
28+
@use "social";
2929
@use "cookie-consent";
3030
@use "table";

style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)