Skip to content

Commit 396ca67

Browse files
committed
feat: adding share button (issue: #21)
1 parent 1a55f87 commit 396ca67

File tree

6 files changed

+125
-9
lines changed

6 files changed

+125
-9
lines changed

.liquidrc

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"ignore": [],
3+
"wrap": 0,
4+
"commentIndent": true,
5+
"crlf": false,
6+
"indentSize": 2,
7+
"preserveComment": false,
8+
"preserveLine": 2,
9+
"endNewline": true,
10+
"markup": {
11+
"correct": false,
12+
"quoteConvert": "double",
13+
"selfCloseSpace": true,
14+
"commentNewline": true,
15+
"forceIndent": false,
16+
"attributeSort": true,
17+
"attributeSortList": [],
18+
"delimiterTrims": "preserve",
19+
"attributeCasing": "preserve",
20+
"lineBreakSeparator": "before",
21+
"normalizeSpacing": true,
22+
"valueForce": "intent",
23+
"forceAttribute": 3,
24+
"forceLeadAttribute": false,
25+
"preserveAttributes": false,
26+
"preserveText": false
27+
},
28+
"json": {
29+
"bracePadding": false,
30+
"braceAllman": true,
31+
"arrayFormat": "indent",
32+
"objectIndent": "indent",
33+
"objectSort": false
34+
},
35+
"style": {
36+
"correct": false,
37+
"sortProperties": true,
38+
"sortSelectors": true,
39+
"noLeadZero": true,
40+
"quoteConvert": "single",
41+
"classPadding": true,
42+
},
43+
"script": {
44+
"correct": true,
45+
"arrayFormat": "indent",
46+
"objectIndent": "indent",
47+
"braceAllman": false,
48+
"methodChain": 3,
49+
"caseSpace": true,
50+
"endComma": "never",
51+
"quoteConvert": "single",
52+
"elseNewline": true,
53+
"functionNameSpace": true,
54+
"functionSpace": true,
55+
"ternaryLine": true,
56+
"braceNewline": false,
57+
"bracePadding": false,
58+
"braceStyle": "none",
59+
"commentNewline": true,
60+
"neverFlatten": false,
61+
"noCaseIndent": true,
62+
"noSemicolon": false,
63+
"objectSort": false,
64+
"vertical": false,
65+
"variableList": false
66+
}
67+
}

.vscode/settings.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"[liquid]": {
3+
"editor.quickSuggestions": {
4+
"other": "on",
5+
"comments": "off",
6+
"strings": "off"
7+
},
8+
"editor.formatOnSave": true,
9+
"editor.wordWrap": "on",
10+
"editor.renderWhitespace": "all",
11+
"editor.acceptSuggestionOnEnter": "off"
12+
},
13+
"files.associations": {
14+
"*.md": "liquid",
15+
"*.markdown": "liquid",
16+
"*.html": "liquid",
17+
"*.liquid": "liquid",
18+
},
19+
}

_includes/footer_custom.html

Whitespace-only changes.

_includes/head_custom.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% if page.url contains 'stories' %}
2+
<link href="https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.min.css" rel="stylesheet" />
3+
<script src="https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.iife.js" defer init></script>
4+
{% endif %}

_layouts/post.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@ <h1>{{ page.title }}</h1>
66

77
<div class="post-metadata-highlight">
88
<img src="https://github.com/{{ page.author }}.png" alt="{{ page.author }}" class="post-author-profile-picture">
9-
<span>Author: <a href="https://github.com/{{ page.author }}" target="_blank">{{ page.author }}</a> &mdash; Created At: {{ page.created_at | date: "%Y-%m-%d %H:%M" }} &mdash; Language: <strong>{{ page.language }}</strong></span>
9+
<span>Author: <a href="https://github.com/{{ page.author }}" target="_blank">{{ page.author }}</a> &mdash; Created
10+
At: {{ page.created_at | date: "%Y-%m-%d %H:%M" }} &mdash; Language: <strong>{{ page.language }}</strong></span>
1011
</div>
1112

1213
{{ content | markdownify }}
1314

14-
<script src="https://utteranc.es/client.js"
15-
repo="streetcommunityprogrammer/metaphore"
16-
issue-term="title"
17-
label="story::comment 💬"
18-
theme="preferred-color-scheme"
19-
crossorigin="anonymous"
20-
async>
21-
</script>
15+
<div class="shareon">
16+
<strong>Share this story</strong>
17+
<a class="facebook"></a>
18+
<a class="linkedin"></a>
19+
<a class="mastodon"></a>
20+
<a class="odnoklassniki"></a>
21+
<a class="pinterest"></a>
22+
<a class="pocket"></a>
23+
<a class="reddit"></a>
24+
<a class="telegram"></a>
25+
<a class="twitter"></a>
26+
<a class="viber"></a>
27+
<a class="vkontakte"></a>
28+
<a class="whatsapp"></a>
29+
</div>
30+
31+
<script src="https://utteranc.es/client.js" repo="streetcommunityprogrammer/metaphore" issue-term="title"
32+
label="story::comment 💬" theme="preferred-color-scheme" crossorigin="anonymous" async>
33+
</script>

_sass/custom/custom.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,18 @@
1616
color: white;
1717
text-decoration: none;
1818
font-style: italic;
19+
}
20+
21+
.shareon {
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
strong {
26+
background-color: transparent;
27+
color: black;
28+
text-align: left !important;
29+
&:hover {
30+
cursor: default;
31+
}
32+
}
1933
}

0 commit comments

Comments
 (0)