feat: Add comprehensive documentation suite and reorganize project structure
- Created complete documentation in docs/ directory - Added PROJECT_OVERVIEW.md with feature highlights and getting started guide - Added ARCHITECTURE.md with system design and technical details - Added SECURITY.md with comprehensive security implementation guide - Added DEVELOPMENT.md with development workflows and best practices - Added DEPLOYMENT.md with production deployment instructions - Added API.md with complete REST API documentation - Added CONTRIBUTING.md with contribution guidelines - Added CHANGELOG.md with version history and migration notes - Reorganized all documentation files into docs/ directory for better organization - Updated README.md with proper documentation links and quick navigation - Enhanced project structure with professional documentation standards
This commit is contained in:
132
f_scripts/shared/jssocials/jssocials-theme-classic.css
Normal file
132
f_scripts/shared/jssocials/jssocials-theme-classic.css
Normal file
@@ -0,0 +1,132 @@
|
||||
.jssocials-share-twitter .jssocials-share-link {
|
||||
background: #00aced;
|
||||
border: 1px solid #0099d4; }
|
||||
.jssocials-share-twitter .jssocials-share-link:hover {
|
||||
background: #0087ba; }
|
||||
|
||||
.jssocials-share-facebook .jssocials-share-link {
|
||||
background: #3b5998;
|
||||
border: 1px solid #344e86; }
|
||||
.jssocials-share-facebook .jssocials-share-link:hover {
|
||||
background: #2d4373; }
|
||||
|
||||
.jssocials-share-googleplus .jssocials-share-link {
|
||||
background: #dd4b39;
|
||||
border: 1px solid #d73925; }
|
||||
.jssocials-share-googleplus .jssocials-share-link:hover {
|
||||
background: #c23321; }
|
||||
|
||||
.jssocials-share-linkedin .jssocials-share-link {
|
||||
background: #007bb6;
|
||||
border: 1px solid #006a9d; }
|
||||
.jssocials-share-linkedin .jssocials-share-link:hover {
|
||||
background: #005983; }
|
||||
|
||||
.jssocials-share-pinterest .jssocials-share-link {
|
||||
background: #cb2027;
|
||||
border: 1px solid #b51d23; }
|
||||
.jssocials-share-pinterest .jssocials-share-link:hover {
|
||||
background: #9f191f; }
|
||||
|
||||
.jssocials-share-email .jssocials-share-link {
|
||||
background: #3490F3;
|
||||
border: 1px solid #1c83f2; }
|
||||
.jssocials-share-email .jssocials-share-link:hover {
|
||||
background: #0e76e6; }
|
||||
|
||||
.jssocials-share-stumbleupon .jssocials-share-link {
|
||||
background: #eb4823;
|
||||
border: 1px solid #e03a14; }
|
||||
.jssocials-share-stumbleupon .jssocials-share-link:hover {
|
||||
background: #c93412; }
|
||||
|
||||
.jssocials-share-whatsapp .jssocials-share-link {
|
||||
background: #29a628;
|
||||
border: 1px solid #249123; }
|
||||
.jssocials-share-whatsapp .jssocials-share-link:hover {
|
||||
background: #1f7d1e; }
|
||||
|
||||
.jssocials-share-telegram .jssocials-share-link {
|
||||
background: #2ca5e0;
|
||||
border: 1px solid #1f98d3; }
|
||||
.jssocials-share-telegram .jssocials-share-link:hover {
|
||||
background: #1c88bd; }
|
||||
|
||||
.jssocials-share-line .jssocials-share-link {
|
||||
background: #25af00;
|
||||
border: 1px solid #209600; }
|
||||
.jssocials-share-line .jssocials-share-link:hover {
|
||||
background: #1a7c00; }
|
||||
|
||||
.jssocials-share-viber .jssocials-share-link {
|
||||
background: #7b519d;
|
||||
border: 1px solid #6e488c; }
|
||||
.jssocials-share-viber .jssocials-share-link:hover {
|
||||
background: #61407b; }
|
||||
|
||||
.jssocials-share-pocket .jssocials-share-link {
|
||||
background: #ef4056;
|
||||
border: 1px solid #ed2841; }
|
||||
.jssocials-share-pocket .jssocials-share-link:hover {
|
||||
background: #e9132e; }
|
||||
|
||||
.jssocials-share-messenger .jssocials-share-link {
|
||||
background: #0084ff;
|
||||
border: 1px solid #0077e6; }
|
||||
.jssocials-share-messenger .jssocials-share-link:hover {
|
||||
background: #006acc; }
|
||||
|
||||
.jssocials-share-vkontakte .jssocials-share-link {
|
||||
background: #45668e;
|
||||
border: 1px solid #3d5a7d; }
|
||||
.jssocials-share-vkontakte .jssocials-share-link:hover {
|
||||
background: #344d6c; }
|
||||
|
||||
.jssocials-share-link {
|
||||
padding: .5em .6em;
|
||||
border-radius: 0.3em;
|
||||
box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||
color: #fff;
|
||||
-webkit-transition: background 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out; }
|
||||
.jssocials-share-link:hover, .jssocials-share-link:focus, .jssocials-share-link:active {
|
||||
color: #fff; }
|
||||
|
||||
.jssocials-share-count-box {
|
||||
position: relative;
|
||||
height: 2.5em;
|
||||
padding: 0 .3em;
|
||||
margin-left: 6px;
|
||||
border-radius: 0.3em;
|
||||
border: 1px solid #dcdcdc;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
|
||||
.jssocials-share-count-box:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: -9px;
|
||||
display: block;
|
||||
width: 0;
|
||||
border-style: solid;
|
||||
border-width: 6px 6px 0;
|
||||
border-color: #dcdcdc transparent;
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
.jssocials-share-count-box:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: -7px;
|
||||
display: block;
|
||||
width: 0;
|
||||
border-style: solid;
|
||||
border-width: 5px 5px 0;
|
||||
border-color: #fff transparent;
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
.jssocials-share-count-box .jssocials-share-count {
|
||||
line-height: 2.75em;
|
||||
color: #444;
|
||||
font-size: .9em; }
|
||||
109
f_scripts/shared/jssocials/jssocials-theme-flat.css
Normal file
109
f_scripts/shared/jssocials/jssocials-theme-flat.css
Normal file
@@ -0,0 +1,109 @@
|
||||
.jssocials-share-twitter .jssocials-share-link {
|
||||
background: #00aced; }
|
||||
.jssocials-share-twitter .jssocials-share-link:hover {
|
||||
background: #0087ba; }
|
||||
|
||||
.jssocials-share-facebook .jssocials-share-link {
|
||||
background: #3b5998; }
|
||||
.jssocials-share-facebook .jssocials-share-link:hover {
|
||||
background: #2d4373; }
|
||||
|
||||
.jssocials-share-googleplus .jssocials-share-link {
|
||||
background: #dd4b39; }
|
||||
.jssocials-share-googleplus .jssocials-share-link:hover {
|
||||
background: #c23321; }
|
||||
|
||||
.jssocials-share-linkedin .jssocials-share-link {
|
||||
background: #007bb6; }
|
||||
.jssocials-share-linkedin .jssocials-share-link:hover {
|
||||
background: #005983; }
|
||||
|
||||
.jssocials-share-pinterest .jssocials-share-link {
|
||||
background: #cb2027; }
|
||||
.jssocials-share-pinterest .jssocials-share-link:hover {
|
||||
background: #9f191f; }
|
||||
|
||||
.jssocials-share-email .jssocials-share-link {
|
||||
background: #3490F3; }
|
||||
.jssocials-share-email .jssocials-share-link:hover {
|
||||
background: #0e76e6; }
|
||||
|
||||
.jssocials-share-stumbleupon .jssocials-share-link {
|
||||
background: #eb4823; }
|
||||
.jssocials-share-stumbleupon .jssocials-share-link:hover {
|
||||
background: #c93412; }
|
||||
|
||||
.jssocials-share-whatsapp .jssocials-share-link {
|
||||
background: #29a628; }
|
||||
.jssocials-share-whatsapp .jssocials-share-link:hover {
|
||||
background: #1f7d1e; }
|
||||
|
||||
.jssocials-share-telegram .jssocials-share-link {
|
||||
background: #2ca5e0; }
|
||||
.jssocials-share-telegram .jssocials-share-link:hover {
|
||||
background: #1c88bd; }
|
||||
|
||||
.jssocials-share-line .jssocials-share-link {
|
||||
background: #25af00; }
|
||||
.jssocials-share-line .jssocials-share-link:hover {
|
||||
background: #1a7c00; }
|
||||
|
||||
.jssocials-share-viber .jssocials-share-link {
|
||||
background: #7b519d; }
|
||||
.jssocials-share-viber .jssocials-share-link:hover {
|
||||
background: #61407b; }
|
||||
|
||||
.jssocials-share-pocket .jssocials-share-link {
|
||||
background: #ef4056; }
|
||||
.jssocials-share-pocket .jssocials-share-link:hover {
|
||||
background: #e9132e; }
|
||||
|
||||
.jssocials-share-messenger .jssocials-share-link {
|
||||
background: #0084ff; }
|
||||
.jssocials-share-messenger .jssocials-share-link:hover {
|
||||
background: #006acc; }
|
||||
|
||||
.jssocials-share-vkontakte .jssocials-share-link {
|
||||
background: #45668e; }
|
||||
.jssocials-share-vkontakte .jssocials-share-link:hover {
|
||||
background: #344d6c; }
|
||||
|
||||
.jssocials-share-link {
|
||||
padding: .5em .6em;
|
||||
color: #fff;
|
||||
-webkit-transition: background 200ms ease-in-out, border-color 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out, border-color 200ms ease-in-out; }
|
||||
.jssocials-share-link:hover, .jssocials-share-link:focus, .jssocials-share-link:active {
|
||||
color: #fff; }
|
||||
|
||||
.jssocials-share-count-box {
|
||||
position: relative;
|
||||
height: 2.5em;
|
||||
padding: 0 .3em;
|
||||
margin-left: 0.3em;
|
||||
background: #f5f5f5;
|
||||
-webkit-transition: background 200ms ease-in-out, border-color 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out, border-color 200ms ease-in-out; }
|
||||
.jssocials-share-count-box:hover {
|
||||
background: gainsboro; }
|
||||
.jssocials-share-count-box:hover:after {
|
||||
border-color: transparent gainsboro transparent transparent; }
|
||||
.jssocials-share-count-box:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0.85em;
|
||||
left: -0.3em;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 0.4em 0.4em 0.4em 0;
|
||||
border-style: solid;
|
||||
border-color: transparent #f5f5f5 transparent transparent;
|
||||
-webkit-transform: rotate(360deg);
|
||||
-ms-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
-webkit-transition: background 200ms ease-in-out, border-color 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out, border-color 200ms ease-in-out; }
|
||||
.jssocials-share-count-box .jssocials-share-count {
|
||||
line-height: 2.5em;
|
||||
color: #444; }
|
||||
146
f_scripts/shared/jssocials/jssocials-theme-minima.css
Normal file
146
f_scripts/shared/jssocials/jssocials-theme-minima.css
Normal file
@@ -0,0 +1,146 @@
|
||||
.jssocials-share-twitter .jssocials-share-link {
|
||||
color: #00aced; }
|
||||
.jssocials-share-twitter .jssocials-share-link .jssocials-share-label {
|
||||
color: #00aced; }
|
||||
.jssocials-share-twitter .jssocials-share-link:hover, .jssocials-share-twitter .jssocials-share-link:focus, .jssocials-share-twitter .jssocials-share-link:active {
|
||||
color: #0087ba; }
|
||||
.jssocials-share-twitter .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-twitter .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-twitter .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #0087ba; }
|
||||
|
||||
.jssocials-share-facebook .jssocials-share-link {
|
||||
color: #3b5998; }
|
||||
.jssocials-share-facebook .jssocials-share-link .jssocials-share-label {
|
||||
color: #3b5998; }
|
||||
.jssocials-share-facebook .jssocials-share-link:hover, .jssocials-share-facebook .jssocials-share-link:focus, .jssocials-share-facebook .jssocials-share-link:active {
|
||||
color: #2d4373; }
|
||||
.jssocials-share-facebook .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-facebook .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-facebook .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #2d4373; }
|
||||
|
||||
.jssocials-share-googleplus .jssocials-share-link {
|
||||
color: #dd4b39; }
|
||||
.jssocials-share-googleplus .jssocials-share-link .jssocials-share-label {
|
||||
color: #dd4b39; }
|
||||
.jssocials-share-googleplus .jssocials-share-link:hover, .jssocials-share-googleplus .jssocials-share-link:focus, .jssocials-share-googleplus .jssocials-share-link:active {
|
||||
color: #c23321; }
|
||||
.jssocials-share-googleplus .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-googleplus .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-googleplus .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #c23321; }
|
||||
|
||||
.jssocials-share-linkedin .jssocials-share-link {
|
||||
color: #007bb6; }
|
||||
.jssocials-share-linkedin .jssocials-share-link .jssocials-share-label {
|
||||
color: #007bb6; }
|
||||
.jssocials-share-linkedin .jssocials-share-link:hover, .jssocials-share-linkedin .jssocials-share-link:focus, .jssocials-share-linkedin .jssocials-share-link:active {
|
||||
color: #005983; }
|
||||
.jssocials-share-linkedin .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-linkedin .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-linkedin .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #005983; }
|
||||
|
||||
.jssocials-share-pinterest .jssocials-share-link {
|
||||
color: #cb2027; }
|
||||
.jssocials-share-pinterest .jssocials-share-link .jssocials-share-label {
|
||||
color: #cb2027; }
|
||||
.jssocials-share-pinterest .jssocials-share-link:hover, .jssocials-share-pinterest .jssocials-share-link:focus, .jssocials-share-pinterest .jssocials-share-link:active {
|
||||
color: #9f191f; }
|
||||
.jssocials-share-pinterest .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-pinterest .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-pinterest .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #9f191f; }
|
||||
|
||||
.jssocials-share-email .jssocials-share-link {
|
||||
color: #3490F3; }
|
||||
.jssocials-share-email .jssocials-share-link .jssocials-share-label {
|
||||
color: #3490F3; }
|
||||
.jssocials-share-email .jssocials-share-link:hover, .jssocials-share-email .jssocials-share-link:focus, .jssocials-share-email .jssocials-share-link:active {
|
||||
color: #0e76e6; }
|
||||
.jssocials-share-email .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-email .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-email .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #0e76e6; }
|
||||
|
||||
.jssocials-share-stumbleupon .jssocials-share-link {
|
||||
color: #eb4823; }
|
||||
.jssocials-share-stumbleupon .jssocials-share-link .jssocials-share-label {
|
||||
color: #eb4823; }
|
||||
.jssocials-share-stumbleupon .jssocials-share-link:hover, .jssocials-share-stumbleupon .jssocials-share-link:focus, .jssocials-share-stumbleupon .jssocials-share-link:active {
|
||||
color: #c93412; }
|
||||
.jssocials-share-stumbleupon .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-stumbleupon .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-stumbleupon .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #c93412; }
|
||||
|
||||
.jssocials-share-whatsapp .jssocials-share-link {
|
||||
color: #29a628; }
|
||||
.jssocials-share-whatsapp .jssocials-share-link .jssocials-share-label {
|
||||
color: #29a628; }
|
||||
.jssocials-share-whatsapp .jssocials-share-link:hover, .jssocials-share-whatsapp .jssocials-share-link:focus, .jssocials-share-whatsapp .jssocials-share-link:active {
|
||||
color: #1f7d1e; }
|
||||
.jssocials-share-whatsapp .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-whatsapp .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-whatsapp .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #1f7d1e; }
|
||||
|
||||
.jssocials-share-telegram .jssocials-share-link {
|
||||
color: #2ca5e0; }
|
||||
.jssocials-share-telegram .jssocials-share-link .jssocials-share-label {
|
||||
color: #2ca5e0; }
|
||||
.jssocials-share-telegram .jssocials-share-link:hover, .jssocials-share-telegram .jssocials-share-link:focus, .jssocials-share-telegram .jssocials-share-link:active {
|
||||
color: #1c88bd; }
|
||||
.jssocials-share-telegram .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-telegram .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-telegram .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #1c88bd; }
|
||||
|
||||
.jssocials-share-line .jssocials-share-link {
|
||||
color: #25af00; }
|
||||
.jssocials-share-line .jssocials-share-link .jssocials-share-label {
|
||||
color: #25af00; }
|
||||
.jssocials-share-line .jssocials-share-link:hover, .jssocials-share-line .jssocials-share-link:focus, .jssocials-share-line .jssocials-share-link:active {
|
||||
color: #1a7c00; }
|
||||
.jssocials-share-line .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-line .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-line .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #1a7c00; }
|
||||
|
||||
.jssocials-share-viber .jssocials-share-link {
|
||||
color: #7b519d; }
|
||||
.jssocials-share-viber .jssocials-share-link .jssocials-share-label {
|
||||
color: #7b519d; }
|
||||
.jssocials-share-viber .jssocials-share-link:hover, .jssocials-share-viber .jssocials-share-link:focus, .jssocials-share-viber .jssocials-share-link:active {
|
||||
color: #61407b; }
|
||||
.jssocials-share-viber .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-viber .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-viber .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #61407b; }
|
||||
|
||||
.jssocials-share-pocket .jssocials-share-link {
|
||||
color: #ef4056; }
|
||||
.jssocials-share-pocket .jssocials-share-link .jssocials-share-label {
|
||||
color: #ef4056; }
|
||||
.jssocials-share-pocket .jssocials-share-link:hover, .jssocials-share-pocket .jssocials-share-link:focus, .jssocials-share-pocket .jssocials-share-link:active {
|
||||
color: #e9132e; }
|
||||
.jssocials-share-pocket .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-pocket .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-pocket .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #e9132e; }
|
||||
|
||||
.jssocials-share-messenger .jssocials-share-link {
|
||||
color: #0084ff; }
|
||||
.jssocials-share-messenger .jssocials-share-link .jssocials-share-label {
|
||||
color: #0084ff; }
|
||||
.jssocials-share-messenger .jssocials-share-link:hover, .jssocials-share-messenger .jssocials-share-link:focus, .jssocials-share-messenger .jssocials-share-link:active {
|
||||
color: #006acc; }
|
||||
.jssocials-share-messenger .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-messenger .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-messenger .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #006acc; }
|
||||
|
||||
.jssocials-share-vkontakte .jssocials-share-link {
|
||||
color: #45668e; }
|
||||
.jssocials-share-vkontakte .jssocials-share-link .jssocials-share-label {
|
||||
color: #45668e; }
|
||||
.jssocials-share-vkontakte .jssocials-share-link:hover, .jssocials-share-vkontakte .jssocials-share-link:focus, .jssocials-share-vkontakte .jssocials-share-link:active {
|
||||
color: #344d6c; }
|
||||
.jssocials-share-vkontakte .jssocials-share-link:hover .jssocials-share-label, .jssocials-share-vkontakte .jssocials-share-link:focus .jssocials-share-label, .jssocials-share-vkontakte .jssocials-share-link:active .jssocials-share-label {
|
||||
color: #344d6c; }
|
||||
|
||||
.jssocials-share-link {
|
||||
-webkit-transition: color 200ms ease-in-out;
|
||||
transition: color 200ms ease-in-out; }
|
||||
.jssocials-share-link.jssocials-share-link-count .jssocials-share-count {
|
||||
font-size: .5em; }
|
||||
|
||||
.jssocials-share-label {
|
||||
font-size: 0.8em;
|
||||
color: #444;
|
||||
-webkit-transition: color 200ms ease-in-out;
|
||||
transition: color 200ms ease-in-out; }
|
||||
|
||||
.jssocials-share-count-box {
|
||||
margin-left: 0.3em;
|
||||
border: 1px solid #efefef;
|
||||
border-radius: 0.3em; }
|
||||
.jssocials-share-count-box .jssocials-share-count {
|
||||
line-height: 1.8em;
|
||||
font-size: 0.8em;
|
||||
color: #444; }
|
||||
43
f_scripts/shared/jssocials/jssocials-theme-plain.css
Normal file
43
f_scripts/shared/jssocials/jssocials-theme-plain.css
Normal file
@@ -0,0 +1,43 @@
|
||||
.jssocials-share-link {
|
||||
padding: .5em .6em;
|
||||
border-radius: 0.3em;
|
||||
border: 2px solid #acacac;
|
||||
color: #acacac;
|
||||
-webkit-transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out; }
|
||||
.jssocials-share-link:hover, .jssocials-share-link:focus, .jssocials-share-link:active {
|
||||
border: 2px solid #939393;
|
||||
color: #939393; }
|
||||
|
||||
.jssocials-share-count-box {
|
||||
position: relative;
|
||||
height: 2.5em;
|
||||
padding: 0 .3em;
|
||||
margin-left: 0.4em;
|
||||
background: #f5f5f5;
|
||||
border-radius: 0.3em;
|
||||
-webkit-transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out; }
|
||||
.jssocials-share-count-box:hover {
|
||||
background: #e8e8e8; }
|
||||
.jssocials-share-count-box:hover:after {
|
||||
border-color: transparent #e8e8e8 transparent transparent; }
|
||||
.jssocials-share-count-box:after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0.75em;
|
||||
left: -0.4em;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-width: 0.5em 0.5em 0.5em 0;
|
||||
border-style: solid;
|
||||
border-color: transparent #f5f5f5 transparent transparent;
|
||||
-webkit-transform: rotate(360deg);
|
||||
-ms-transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
-webkit-transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out, color 200ms ease-in-out, border-color 200ms ease-in-out; }
|
||||
.jssocials-share-count-box .jssocials-share-count {
|
||||
line-height: 2.5em;
|
||||
color: #acacac; }
|
||||
232
f_scripts/shared/jssocials/jssocials.css
Normal file
232
f_scripts/shared/jssocials/jssocials.css
Normal file
@@ -0,0 +1,232 @@
|
||||
.jssocials-shares {
|
||||
margin: 0.2em auto;
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
max-width:80%;
|
||||
}
|
||||
|
||||
.jssocials-shares * {
|
||||
box-sizing: border-box; }
|
||||
|
||||
.jssocials-share {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 0 0 10px 10px;
|
||||
}
|
||||
|
||||
.jssocials-share:last-child {
|
||||
margin-right: 0; }
|
||||
|
||||
.jssocials-share-logo {
|
||||
width: 1em;
|
||||
vertical-align: middle;
|
||||
font-size: 1.5em; }
|
||||
|
||||
img.jssocials-share-logo {
|
||||
width: auto;
|
||||
height: 1em; }
|
||||
|
||||
.jssocials-share-link {
|
||||
border-radius:20px;
|
||||
min-width: 70px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
line-height: 1; }
|
||||
.jssocials-share-link.jssocials-share-link-count {
|
||||
padding-top: .2em; }
|
||||
.jssocials-share-link.jssocials-share-link-count .jssocials-share-count {
|
||||
display: block;
|
||||
font-size: .6em;
|
||||
margin: 0 -.5em -.8em -.5em; }
|
||||
.jssocials-share-link.jssocials-share-no-count {
|
||||
padding-top: .5em; }
|
||||
.jssocials-share-link.jssocials-share-no-count .jssocials-share-count {
|
||||
height: 1em; }
|
||||
|
||||
.jssocials-share-label {
|
||||
padding-left: 0.3em;
|
||||
vertical-align: middle;
|
||||
margin: 5px 0 0 0;
|
||||
}
|
||||
|
||||
.jssocials-share-count-box {
|
||||
display: inline-block;
|
||||
height: 1.5em;
|
||||
padding: 0 0.3em;
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
cursor: default; }
|
||||
.jssocials-share-count-box.jssocials-share-no-count {
|
||||
display: none; }
|
||||
|
||||
.jssocials-share-count {
|
||||
line-height: 1.5em;
|
||||
vertical-align: middle; }
|
||||
|
||||
|
||||
.jssocials-share-gab .jssocials-share-link {
|
||||
background: #00d178;
|
||||
border: 1px solid #00c979;
|
||||
}
|
||||
.jssocials-share-gab .jssocials-share-link:hover {
|
||||
background: #00a25d;
|
||||
border: 1px solid #009857;
|
||||
}
|
||||
.gab-logo {
|
||||
background-image: url(/f_data/data_images/gab.png);
|
||||
width: 15px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
.jssocials-share-parler .jssocials-share-link {
|
||||
background: #be1e2d;
|
||||
border: 1px solid #aa0b1a;
|
||||
}
|
||||
.jssocials-share-parler .jssocials-share-link:hover {
|
||||
background: #961824;
|
||||
border: 1px solid #9f0f1c;
|
||||
}
|
||||
.parler-logo {
|
||||
background-image: url(/f_data/data_images/parler.png);
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.jssocials-share-twitter .jssocials-share-link {
|
||||
background: #00aced;
|
||||
border: 1px solid #0099d4; }
|
||||
.jssocials-share-twitter .jssocials-share-link:hover {
|
||||
background: #0087ba; }
|
||||
|
||||
.jssocials-share-facebook .jssocials-share-link {
|
||||
background: #3b5998;
|
||||
border: 1px solid #344e86; }
|
||||
.jssocials-share-facebook .jssocials-share-link:hover {
|
||||
background: #2d4373; }
|
||||
|
||||
.jssocials-share-googleplus .jssocials-share-link {
|
||||
background: #dd4b39;
|
||||
border: 1px solid #d73925; }
|
||||
.jssocials-share-googleplus .jssocials-share-link:hover {
|
||||
background: #c23321; }
|
||||
|
||||
.jssocials-share-linkedin .jssocials-share-link {
|
||||
background: #007bb6;
|
||||
border: 1px solid #006a9d; }
|
||||
.jssocials-share-linkedin .jssocials-share-link:hover {
|
||||
background: #005983; }
|
||||
|
||||
.jssocials-share-pinterest .jssocials-share-link {
|
||||
background: #cb2027;
|
||||
border: 1px solid #b51d23; }
|
||||
.jssocials-share-pinterest .jssocials-share-link:hover {
|
||||
background: #9f191f; }
|
||||
|
||||
.jssocials-share-email .jssocials-share-link {
|
||||
background: #3490F3;
|
||||
border: 1px solid #1c83f2; }
|
||||
.jssocials-share-email .jssocials-share-link:hover {
|
||||
background: #0e76e6; }
|
||||
|
||||
.jssocials-share-stumbleupon .jssocials-share-link {
|
||||
background: #eb4823;
|
||||
border: 1px solid #e03a14; }
|
||||
.jssocials-share-stumbleupon .jssocials-share-link:hover {
|
||||
background: #c93412; }
|
||||
|
||||
.jssocials-share-whatsapp .jssocials-share-link {
|
||||
background: #29a628;
|
||||
border: 1px solid #249123; }
|
||||
.jssocials-share-whatsapp .jssocials-share-link:hover {
|
||||
background: #1f7d1e; }
|
||||
|
||||
.jssocials-share-telegram .jssocials-share-link {
|
||||
background: #2ca5e0;
|
||||
border: 1px solid #1f98d3; }
|
||||
.jssocials-share-telegram .jssocials-share-link:hover {
|
||||
background: #1c88bd; }
|
||||
|
||||
.jssocials-share-line .jssocials-share-link {
|
||||
background: #25af00;
|
||||
border: 1px solid #209600; }
|
||||
.jssocials-share-line .jssocials-share-link:hover {
|
||||
background: #1a7c00; }
|
||||
|
||||
.jssocials-share-viber .jssocials-share-link {
|
||||
background: #7b519d;
|
||||
border: 1px solid #6e488c; }
|
||||
.jssocials-share-viber .jssocials-share-link:hover {
|
||||
background: #61407b; }
|
||||
|
||||
.jssocials-share-pocket .jssocials-share-link {
|
||||
background: #ef4056;
|
||||
border: 1px solid #ed2841; }
|
||||
.jssocials-share-pocket .jssocials-share-link:hover {
|
||||
background: #e9132e; }
|
||||
|
||||
.jssocials-share-messenger .jssocials-share-link {
|
||||
background: #0084ff;
|
||||
border: 1px solid #0077e6; }
|
||||
.jssocials-share-messenger .jssocials-share-link:hover {
|
||||
background: #006acc; }
|
||||
|
||||
.jssocials-share-vkontakte .jssocials-share-link {
|
||||
background: #45668e;
|
||||
border: 1px solid #3d5a7d; }
|
||||
.jssocials-share-vkontakte .jssocials-share-link:hover {
|
||||
background: #344d6c; }
|
||||
|
||||
.jssocials-share-link {
|
||||
padding: .5em .6em;
|
||||
border-radius: 0.3em;
|
||||
box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||
color: #fff;
|
||||
-webkit-transition: background 200ms ease-in-out;
|
||||
transition: background 200ms ease-in-out; }
|
||||
.jssocials-share-link:hover, .jssocials-share-link:focus, .jssocials-share-link:active {
|
||||
color: #fff; }
|
||||
|
||||
.jssocials-share-count-box {
|
||||
position: relative;
|
||||
height: 2.5em;
|
||||
padding: 0 .3em;
|
||||
margin-left: 6px;
|
||||
border-radius: 0.3em;
|
||||
border: 1px solid #dcdcdc;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
|
||||
.jssocials-share-count-box:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: -9px;
|
||||
display: block;
|
||||
width: 0;
|
||||
border-style: solid;
|
||||
border-width: 6px 6px 0;
|
||||
border-color: #dcdcdc transparent;
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
.jssocials-share-count-box:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 1em;
|
||||
left: -7px;
|
||||
display: block;
|
||||
width: 0;
|
||||
border-style: solid;
|
||||
border-width: 5px 5px 0;
|
||||
border-color: #fff transparent;
|
||||
-webkit-transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
.jssocials-share-count-box .jssocials-share-count {
|
||||
line-height: 2.75em;
|
||||
color: #444;
|
||||
font-size: .9em; }
|
||||
566
f_scripts/shared/jssocials/jssocials.js
Normal file
566
f_scripts/shared/jssocials/jssocials.js
Normal file
@@ -0,0 +1,566 @@
|
||||
(function(window, $, undefined) {
|
||||
|
||||
var JSSOCIALS = "JSSocials",
|
||||
JSSOCIALS_DATA_KEY = JSSOCIALS;
|
||||
|
||||
var getOrApply = function(value, context) {
|
||||
if($.isFunction(value)) {
|
||||
return value.apply(context, $.makeArray(arguments).slice(2));
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
var IMG_SRC_REGEX = /(\.(jpeg|png|gif|bmp|svg)$|^data:image\/(jpeg|png|gif|bmp|svg\+xml);base64)/i;
|
||||
var URL_PARAMS_REGEX = /(&?[a-zA-Z0-9]+=)?\{([a-zA-Z0-9]+)\}/g;
|
||||
|
||||
var MEASURES = {
|
||||
"G": 1000000000,
|
||||
"M": 1000000,
|
||||
"K": 1000
|
||||
};
|
||||
|
||||
var shares = {};
|
||||
|
||||
function Socials(element, config) {
|
||||
var $element = $(element);
|
||||
|
||||
$element.data(JSSOCIALS_DATA_KEY, this);
|
||||
|
||||
this._$element = $element;
|
||||
|
||||
this.shares = [];
|
||||
|
||||
this._init(config);
|
||||
this._render();
|
||||
}
|
||||
|
||||
Socials.prototype = {
|
||||
url: "",
|
||||
text: "",
|
||||
shareIn: "blank",
|
||||
|
||||
showLabel: function(screenWidth) {
|
||||
return (this.showCount === false) ?
|
||||
(screenWidth > this.smallScreenWidth) :
|
||||
(screenWidth >= this.largeScreenWidth);
|
||||
},
|
||||
|
||||
showCount: function(screenWidth) {
|
||||
return (screenWidth <= this.smallScreenWidth) ? "inside" : true;
|
||||
},
|
||||
|
||||
smallScreenWidth: 640,
|
||||
largeScreenWidth: 1024,
|
||||
|
||||
resizeTimeout: 200,
|
||||
|
||||
elementClass: "jssocials",
|
||||
sharesClass: "jssocials-shares",
|
||||
shareClass: "jssocials-share",
|
||||
shareButtonClass: "jssocials-share-button",
|
||||
shareLinkClass: "jssocials-share-link",
|
||||
shareLogoClass: "jssocials-share-logo",
|
||||
shareLabelClass: "jssocials-share-label",
|
||||
shareLinkCountClass: "jssocials-share-link-count",
|
||||
shareCountBoxClass: "jssocials-share-count-box",
|
||||
shareCountClass: "jssocials-share-count",
|
||||
shareZeroCountClass: "jssocials-share-no-count",
|
||||
|
||||
_init: function(config) {
|
||||
this._initDefaults();
|
||||
$.extend(this, config);
|
||||
this._initShares();
|
||||
this._attachWindowResizeCallback();
|
||||
},
|
||||
|
||||
_initDefaults: function() {
|
||||
this.url = window.location.href;
|
||||
//this.text = $.trim($("meta[name=description]").attr("content") || $("title").text());
|
||||
this.text = $.trim($("meta[name=description]").attr("content"));
|
||||
this.title = $.trim($("title").text());
|
||||
},
|
||||
|
||||
_initShares: function() {
|
||||
this.shares = $.map(this.shares, $.proxy(function(shareConfig) {
|
||||
if(typeof shareConfig === "string") {
|
||||
shareConfig = { share: shareConfig };
|
||||
}
|
||||
|
||||
var share = (shareConfig.share && shares[shareConfig.share]);
|
||||
|
||||
if(!share && !shareConfig.renderer) {
|
||||
throw Error("Share '" + shareConfig.share + "' is not found");
|
||||
}
|
||||
|
||||
return $.extend({ url: this.url, text: this.text, title: this.title }, share, shareConfig);
|
||||
}, this));
|
||||
},
|
||||
|
||||
_attachWindowResizeCallback: function() {
|
||||
$(window).on("resize", $.proxy(this._windowResizeHandler, this));
|
||||
},
|
||||
|
||||
_detachWindowResizeCallback: function() {
|
||||
$(window).off("resize", this._windowResizeHandler);
|
||||
},
|
||||
|
||||
_windowResizeHandler: function() {
|
||||
if($.isFunction(this.showLabel) || $.isFunction(this.showCount)) {
|
||||
window.clearTimeout(this._resizeTimer);
|
||||
this._resizeTimer = setTimeout($.proxy(this.refresh, this), this.resizeTimeout);
|
||||
}
|
||||
},
|
||||
|
||||
_render: function() {
|
||||
this._clear();
|
||||
|
||||
this._defineOptionsByScreen();
|
||||
|
||||
this._$element.addClass(this.elementClass);
|
||||
|
||||
this._$shares = $("<div>").addClass(this.sharesClass)
|
||||
.appendTo(this._$element);
|
||||
|
||||
this._renderShares();
|
||||
},
|
||||
|
||||
_defineOptionsByScreen: function() {
|
||||
this._screenWidth = $(window).width();
|
||||
this._showLabel = getOrApply(this.showLabel, this, this._screenWidth);
|
||||
this._showCount = getOrApply(this.showCount, this, this._screenWidth);
|
||||
},
|
||||
|
||||
_renderShares: function() {
|
||||
$.each(this.shares, $.proxy(function(_, share) {
|
||||
this._renderShare(share);
|
||||
}, this));
|
||||
},
|
||||
|
||||
_renderShare: function(share) {
|
||||
var $share;
|
||||
|
||||
if($.isFunction(share.renderer)) {
|
||||
$share = $(share.renderer());
|
||||
} else {
|
||||
$share = this._createShare(share);
|
||||
}
|
||||
|
||||
$share.addClass(this.shareClass)
|
||||
.addClass(share.share ? "jssocials-share-" + share.share : "")
|
||||
.addClass(share.css)
|
||||
.appendTo(this._$shares);
|
||||
},
|
||||
|
||||
_createShare: function(share) {
|
||||
var $result = $("<div>");
|
||||
var $shareLink = this._createShareLink(share).appendTo($result);
|
||||
|
||||
if(this._showCount) {
|
||||
var isInsideCount = (this._showCount === "inside");
|
||||
var $countContainer = isInsideCount ? $shareLink : $("<div>").addClass(this.shareCountBoxClass).appendTo($result);
|
||||
$countContainer.addClass(isInsideCount ? this.shareLinkCountClass : this.shareCountBoxClass);
|
||||
this._renderShareCount(share, $countContainer);
|
||||
}
|
||||
|
||||
return $result;
|
||||
},
|
||||
|
||||
_createShareLink: function(share) {
|
||||
var shareStrategy = this._getShareStrategy(share);
|
||||
|
||||
var $result = shareStrategy.call(share, {
|
||||
shareUrl: this._getShareUrl(share)
|
||||
});
|
||||
|
||||
$result.addClass(this.shareLinkClass)
|
||||
.append(this._createShareLogo(share));
|
||||
|
||||
if(this._showLabel) {
|
||||
$result.append(this._createShareLabel(share));
|
||||
}
|
||||
|
||||
$.each(this.on || {}, function(event, handler) {
|
||||
if($.isFunction(handler)) {
|
||||
$result.on(event, $.proxy(handler, share));
|
||||
}
|
||||
});
|
||||
|
||||
return $result;
|
||||
},
|
||||
|
||||
_getShareStrategy: function(share) {
|
||||
var result = shareStrategies[share.shareIn || this.shareIn];
|
||||
|
||||
if(!result)
|
||||
throw Error("Share strategy '" + this.shareIn + "' not found");
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
_getShareUrl: function(share) {
|
||||
var shareUrl = getOrApply(share.shareUrl, share);
|
||||
return this._formatShareUrl(shareUrl, share);
|
||||
},
|
||||
|
||||
_createShareLogo: function(share) {
|
||||
var logo = share.logo;
|
||||
|
||||
var $result = IMG_SRC_REGEX.test(logo) ?
|
||||
$("<img>").attr("src", share.logo) :
|
||||
$("<i>").addClass(logo);
|
||||
|
||||
$result.addClass(this.shareLogoClass);
|
||||
|
||||
return $result;
|
||||
},
|
||||
|
||||
_createShareLabel: function(share) {
|
||||
return $("<span>").addClass(this.shareLabelClass)
|
||||
.text(share.label);
|
||||
},
|
||||
|
||||
_renderShareCount: function(share, $container) {
|
||||
var $count = $("<span>").addClass(this.shareCountClass);
|
||||
|
||||
$container.addClass(this.shareZeroCountClass)
|
||||
.append($count);
|
||||
|
||||
this._loadCount(share).done($.proxy(function(count) {
|
||||
if(count) {
|
||||
$container.removeClass(this.shareZeroCountClass);
|
||||
$count.text(count);
|
||||
}
|
||||
}, this));
|
||||
},
|
||||
|
||||
_loadCount: function(share) {
|
||||
var deferred = $.Deferred();
|
||||
var countUrl = this._getCountUrl(share);
|
||||
|
||||
if(!countUrl) {
|
||||
return deferred.resolve(0).promise();
|
||||
}
|
||||
|
||||
var handleSuccess = $.proxy(function(response) {
|
||||
deferred.resolve(this._getCountValue(response, share));
|
||||
}, this);
|
||||
|
||||
$.getJSON(countUrl).done(handleSuccess)
|
||||
.fail(function() {
|
||||
$.get(countUrl).done(handleSuccess)
|
||||
.fail(function() {
|
||||
deferred.resolve(0);
|
||||
});
|
||||
});
|
||||
|
||||
return deferred.promise();
|
||||
},
|
||||
|
||||
_getCountUrl: function(share) {
|
||||
var countUrl = getOrApply(share.countUrl, share);
|
||||
return this._formatShareUrl(countUrl, share);
|
||||
},
|
||||
|
||||
_getCountValue: function(response, share) {
|
||||
var count = ($.isFunction(share.getCount) ? share.getCount(response) : response) || 0;
|
||||
return (typeof count === "string") ? count : this._formatNumber(count);
|
||||
},
|
||||
|
||||
_formatNumber: function(number) {
|
||||
$.each(MEASURES, function(letter, value) {
|
||||
if(number >= value) {
|
||||
number = parseFloat((number / value).toFixed(2)) + letter;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return number;
|
||||
},
|
||||
|
||||
_formatShareUrl: function(url, share) {
|
||||
return url.replace(URL_PARAMS_REGEX, function(match, key, field) {
|
||||
var value = share[field] || "";
|
||||
return value ? (key || "") + window.encodeURIComponent(value) : "";
|
||||
});
|
||||
},
|
||||
|
||||
_clear: function() {
|
||||
window.clearTimeout(this._resizeTimer);
|
||||
this._$element.empty();
|
||||
},
|
||||
|
||||
_passOptionToShares: function(key, value) {
|
||||
var shares = this.shares;
|
||||
|
||||
$.each(["url", "text"], function(_, optionName) {
|
||||
if(optionName !== key)
|
||||
return;
|
||||
|
||||
$.each(shares, function(_, share) {
|
||||
share[key] = value;
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
_normalizeShare: function(share) {
|
||||
if($.isNumeric(share)) {
|
||||
return this.shares[share];
|
||||
}
|
||||
|
||||
if(typeof share === "string") {
|
||||
return $.grep(this.shares, function(s) {
|
||||
return s.share === share;
|
||||
})[0];
|
||||
}
|
||||
|
||||
return share;
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
this._render();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this._clear();
|
||||
this._detachWindowResizeCallback();
|
||||
|
||||
this._$element
|
||||
.removeClass(this.elementClass)
|
||||
.removeData(JSSOCIALS_DATA_KEY);
|
||||
},
|
||||
|
||||
option: function(key, value) {
|
||||
if(arguments.length === 1) {
|
||||
return this[key];
|
||||
}
|
||||
|
||||
this[key] = value;
|
||||
|
||||
this._passOptionToShares(key, value);
|
||||
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
shareOption: function(share, key, value) {
|
||||
share = this._normalizeShare(share);
|
||||
|
||||
if(arguments.length === 2) {
|
||||
return share[key];
|
||||
}
|
||||
|
||||
share[key] = value;
|
||||
this.refresh();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$.fn.jsSocials = function(config) {
|
||||
var args = $.makeArray(arguments),
|
||||
methodArgs = args.slice(1),
|
||||
result = this;
|
||||
|
||||
this.each(function() {
|
||||
var $element = $(this),
|
||||
instance = $element.data(JSSOCIALS_DATA_KEY),
|
||||
methodResult;
|
||||
|
||||
if(instance) {
|
||||
if(typeof config === "string") {
|
||||
methodResult = instance[config].apply(instance, methodArgs);
|
||||
if(methodResult !== undefined && methodResult !== instance) {
|
||||
result = methodResult;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
instance._detachWindowResizeCallback();
|
||||
instance._init(config);
|
||||
instance._render();
|
||||
}
|
||||
} else {
|
||||
new Socials($element, config);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
var setDefaults = function(config) {
|
||||
var component;
|
||||
|
||||
if($.isPlainObject(config)) {
|
||||
component = Socials.prototype;
|
||||
} else {
|
||||
component = shares[config];
|
||||
config = arguments[1] || {};
|
||||
}
|
||||
|
||||
$.extend(component, config);
|
||||
};
|
||||
|
||||
var shareStrategies = {
|
||||
popup: function(args) {
|
||||
return $("<a>").attr("href", "#")
|
||||
.on("click", function() {
|
||||
window.open(args.shareUrl, null, "width=600, height=400, location=0, menubar=0, resizeable=0, scrollbars=0, status=0, titlebar=0, toolbar=0");
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
blank: function(args) {
|
||||
return $("<a>").attr({ target: "_blank", href: args.shareUrl });
|
||||
},
|
||||
|
||||
self: function(args) {
|
||||
return $("<a>").attr({ target: "_self", href: args.shareUrl });
|
||||
}
|
||||
};
|
||||
|
||||
window.jsSocials = {
|
||||
Socials: Socials,
|
||||
shares: shares,
|
||||
shareStrategies: shareStrategies,
|
||||
setDefaults: setDefaults
|
||||
};
|
||||
|
||||
}(window, jQuery));
|
||||
|
||||
|
||||
(function(window, $, jsSocials, undefined) {
|
||||
|
||||
$.extend(jsSocials.shares, {
|
||||
email: {
|
||||
label: "E-mail",
|
||||
logo: "fa fa-at",
|
||||
shareUrl: "mailto:{to}?subject={title}&body={url}",
|
||||
countUrl: "",
|
||||
shareIn: "self"
|
||||
},
|
||||
|
||||
twitter: {
|
||||
label: "Twitter",
|
||||
logo: "fa-brands fa-twitter",
|
||||
shareUrl: "https://twitter.com/share?url={url}&text={text}&via={via}&hashtags={hashtags}",
|
||||
countUrl: ""
|
||||
},
|
||||
|
||||
gab: {
|
||||
label: "Gab",
|
||||
logo: "gab-logo",
|
||||
shareUrl: "https://gab.com/compose?url={url}&text={title}",
|
||||
countUrl: ""
|
||||
},
|
||||
|
||||
parler: {
|
||||
label: "Parler",
|
||||
logo: "parler-logo",
|
||||
shareUrl: "https://parler.com/new-post?message={title}&url={url}",
|
||||
countUrl: ""
|
||||
},
|
||||
|
||||
facebook: {
|
||||
label: "Facebook",
|
||||
logo: "fa-brands fa-facebook",
|
||||
shareUrl: "https://facebook.com/sharer/sharer.php?u={url}",
|
||||
countUrl: "https://graph.facebook.com/?id={url}",
|
||||
getCount: function(data) {
|
||||
return data.share && data.share.share_count || 0;
|
||||
}
|
||||
},
|
||||
|
||||
vkontakte: {
|
||||
label: "Like",
|
||||
logo: "fa fa-vk",
|
||||
shareUrl: "https://vk.com/share.php?url={url}&title={title}&description={text}",
|
||||
countUrl: "https://vk.com/share.php?act=count&index=1&url={url}",
|
||||
getCount: function(data) {
|
||||
return parseInt(data.slice(15, -2).split(', ')[1]);
|
||||
}
|
||||
},
|
||||
|
||||
googleplus: {
|
||||
label: "Google+",
|
||||
logo: "fa-brands fa-google",
|
||||
shareUrl: "https://plus.google.com/share?url={url}",
|
||||
countUrl: ""
|
||||
},
|
||||
|
||||
linkedin: {
|
||||
label: "LinkedIn",
|
||||
logo: "fa-brands fa-linkedin",
|
||||
shareUrl: "https://www.linkedin.com/shareArticle?mini=true&url={url}",
|
||||
countUrl: "https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?",
|
||||
getCount: function(data) {
|
||||
return data.count;
|
||||
}
|
||||
},
|
||||
|
||||
pinterest: {
|
||||
label: "Pinterest",
|
||||
logo: "fa-brands fa-pinterest",
|
||||
shareUrl: "https://pinterest.com/pin/create/bookmarklet/?media={media}&url={url}&description={text}",
|
||||
countUrl: "https://api.pinterest.com/v1/urls/count.json?&url={url}&callback=?",
|
||||
getCount: function(data) {
|
||||
return data.count;
|
||||
}
|
||||
},
|
||||
|
||||
stumbleupon: {
|
||||
label: "Stumble",
|
||||
logo: "fa-brands fa-stumbleupon",
|
||||
shareUrl: "http://www.stumbleupon.com/submit?url={url}&title={title}",
|
||||
countUrl: "https://cors-anywhere.herokuapp.com/https://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}",
|
||||
getCount: function(data) {
|
||||
return data.result.views;
|
||||
}
|
||||
},
|
||||
|
||||
telegram: {
|
||||
label: "Telegram",
|
||||
logo: "fa fa-paper-plane",
|
||||
shareUrl: "tg://msg?text={url} {text}",
|
||||
countUrl: "",
|
||||
shareIn: "self"
|
||||
},
|
||||
|
||||
whatsapp: {
|
||||
label: "WhatsApp",
|
||||
logo: "fa-brands fa-whatsapp",
|
||||
shareUrl: "whatsapp://send?text={url} {text}",
|
||||
countUrl: "",
|
||||
shareIn: "self"
|
||||
},
|
||||
|
||||
line: {
|
||||
label: "LINE",
|
||||
logo: "fa fa-comment",
|
||||
shareUrl: "http://line.me/R/msg/text/?{text} {url}",
|
||||
countUrl: ""
|
||||
},
|
||||
|
||||
viber: {
|
||||
label: "Viber",
|
||||
logo: "fa fa-volume-control-phone",
|
||||
shareUrl: "viber://forward?text={url} {text}",
|
||||
countUrl: "",
|
||||
shareIn: "self"
|
||||
},
|
||||
|
||||
pocket: {
|
||||
label: "Pocket",
|
||||
logo: "fa-brands fa-get-pocket",
|
||||
shareUrl: "https://getpocket.com/save?url={url}&title={title}",
|
||||
countUrl: ""
|
||||
},
|
||||
|
||||
messenger: {
|
||||
label: "Share",
|
||||
logo: "fa fa-commenting",
|
||||
shareUrl: "fb-messenger://share?link={url}",
|
||||
countUrl: "",
|
||||
shareIn: "self"
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}(window, jQuery, window.jsSocials));
|
||||
|
||||
4
f_scripts/shared/jssocials/jssocials.min.js
vendored
Normal file
4
f_scripts/shared/jssocials/jssocials.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user