mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Feature: Added post sharing options.
Also added a license statement at the bottom of the posts.
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
--tb-odd-bg: rgba(52, 53, 42, 0.52); /* odd rows of the posts' table */
|
||||
--tb-even-bg: rgb(31, 31, 34); /* even rows of the posts' table */
|
||||
--footnote-target-bg: rgb(63, 81, 181);
|
||||
--btn-sharing: #6c757d;
|
||||
|
||||
hr {
|
||||
border-color: var(--main-border);
|
||||
|
||||
@@ -720,6 +720,7 @@ p>a, span>a,
|
||||
.post a:hover code,
|
||||
footer a:hover,
|
||||
#post-wrapper .post-content a:hover,
|
||||
.license-wrapper .license-text a:hover,
|
||||
#page .post-content a:hover,
|
||||
#access-lastmod a:hover {
|
||||
color: #d2603a;
|
||||
@@ -798,11 +799,14 @@ table tbody td {
|
||||
background: var(--tag-bg, rgba(0, 0, 0, 0.075));
|
||||
border-radius: .34rem;
|
||||
padding: 0 .4rem;
|
||||
margin: 0 .1rem;
|
||||
color: #818182;
|
||||
line-height: 1.6rem;
|
||||
}
|
||||
|
||||
.post-tag:not(:first-child) {
|
||||
margin-left: .2rem;
|
||||
}
|
||||
|
||||
.tag:hover,
|
||||
.post-tag:hover {
|
||||
background: var(--tag-hover, rgb(222, 226, 230));
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.post-tail {
|
||||
.post-tail-wrapper {
|
||||
margin-top: 3.5rem;
|
||||
border-bottom: 1px double var(--main-border, #e9ecef);
|
||||
font-size: 0.85rem;
|
||||
@@ -196,6 +196,80 @@
|
||||
min-height: 2rem;
|
||||
}
|
||||
|
||||
.post-tail-bottom a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.share-wrapper a:hover,
|
||||
.share-wrapper i:hover {
|
||||
text-decoration: none;
|
||||
color: var(--link-color, #2a408e)!important;
|
||||
}
|
||||
|
||||
.share-wrapper {
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.share-label {
|
||||
font-family: 'Oswald', sans-serif;
|
||||
}
|
||||
|
||||
.share-label::after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
.share-wrapper .share-icon {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.share-wrapper .share-icon .fab.fa-twitter {
|
||||
color: var(--btn-sharing, rgba(29,161,242,1.00));
|
||||
}
|
||||
|
||||
.share-wrapper .share-icon .fab.fa-facebook-square {
|
||||
color: var(--btn-sharing, rgb(66, 95, 156));
|
||||
}
|
||||
|
||||
.share-wrapper .share-icon .fab.fa-telegram {
|
||||
color: var(--btn-sharing, rgb(39, 159, 217));
|
||||
}
|
||||
|
||||
.share-wrapper .share-icon .fab.fa-weibo {
|
||||
color: var(--btn-sharing, rgb(229, 20, 43));
|
||||
}
|
||||
|
||||
.share-wrapper .fas.fa-link {
|
||||
color: var(--btn-sharing, rgb(171, 171, 171));
|
||||
}
|
||||
|
||||
.license-wrapper .license-text>a {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.license-wrapper {
|
||||
line-height: 1.2rem;
|
||||
}
|
||||
|
||||
.license-wrapper i {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.license-wrapper span:last-child {
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
@media all and (max-width: 576px) {
|
||||
.post-tail-bottom {
|
||||
-ms-flex-wrap: wrap!important;
|
||||
flex-wrap: wrap!important;
|
||||
}
|
||||
|
||||
.post-tail-bottom>div:first-child {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 768px) {
|
||||
.post img {
|
||||
max-width: calc(100% + 1rem);
|
||||
@@ -241,6 +315,7 @@
|
||||
margin-left: -.5rem;
|
||||
margin-right: -.5rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
19
assets/js/_src/_commons/copy-link.js
Normal file
19
assets/js/_src/_commons/copy-link.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copy current page url to clipboard.
|
||||
* v2.1
|
||||
* https://github.com/cotes2020/jekyll-theme-chirpy
|
||||
* © 2020 Cotes Chung
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
function copyLink() {
|
||||
var url = window.location.href;
|
||||
var $temp = $("<input>");
|
||||
|
||||
$("body").append($temp);
|
||||
$temp.val(url).select();
|
||||
document.execCommand("copy");
|
||||
$temp.remove();
|
||||
|
||||
alert("Link copied successfully!");
|
||||
}
|
||||
1
assets/js/dist/_commons/copy-link.min.js
vendored
Normal file
1
assets/js/dist/_commons/copy-link.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function copyLink(){var a=window.location.href;var b=$("<input>");$("body").append(b);b.val(a).select();document.execCommand("copy");b.remove();alert("Link copied successfully!")};
|
||||
3
assets/js/dist/commons.js
vendored
3
assets/js/dist/commons.js
vendored
@@ -9,4 +9,5 @@
|
||||
{% include_relative _commons/sidebar.min.js %}
|
||||
{% include_relative _commons/topbar-switch.min.js %}
|
||||
{% include_relative _commons/topbar-title.min.js %}
|
||||
{% include_relative _commons/tooltip.min.js %}
|
||||
{% include_relative _commons/tooltip.min.js %}
|
||||
{% include_relative _commons/copy-link.min.js %}
|
||||
Reference in New Issue
Block a user