initial commit
This commit is contained in:
@@ -0,0 +1,418 @@
|
||||
#wpp-message { display: none; }
|
||||
|
||||
/*
|
||||
* Navigation
|
||||
*/
|
||||
#wpp-menu {
|
||||
float: none;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#wpp-menu ul {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#wpp-menu ul li {
|
||||
padding: 0 15px 0 10px;
|
||||
margin: 0 0px;
|
||||
display: inline;
|
||||
border-right: #ddd 1px solid;
|
||||
}
|
||||
|
||||
#wpp-menu ul li:first-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wpp-menu ul li:last-child {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#wpp-menu ul li a {
|
||||
}
|
||||
|
||||
#wpp-menu ul li.current a {
|
||||
color: #00a0d2;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-wrapper {
|
||||
margin: 20px 20px 0 2px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
}
|
||||
|
||||
.wpp-lightbox {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 999;
|
||||
margin: -140px 0 0 -140px;
|
||||
padding: 15px;
|
||||
width: 250px;
|
||||
max-height: 280px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.25);
|
||||
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.25);
|
||||
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
.wpp-lightbox-tabs {
|
||||
margin: 0 0 25px 0;
|
||||
padding: 0 0 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-lightbox-tabs li {
|
||||
display: inline;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 15px 0 10px;
|
||||
border-right: #ddd 1px solid;
|
||||
}
|
||||
|
||||
.wpp-lightbox-tabs li:first-child {
|
||||
padding: 0 15px 0 0;
|
||||
}
|
||||
|
||||
.wpp-lightbox-tabs li:last-child {
|
||||
padding: 0 0 0 10px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.wpp-lightbox-tabs li.active a {
|
||||
color: #00a0d2;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-lightbox-tab-content {
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpp-lightbox-tab-content-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpp-lightbox form {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpp-lightbox form input[type=text] {
|
||||
display: block;
|
||||
margin: 0 0 15px 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpp-section-stats {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wpp-section-stats .dashicons-admin-generic {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
left: 0;
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.wpp-section-stats .dashicons-admin-generic:hover {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
|
||||
.wpp-header {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
padding: 25px 0 0 0;
|
||||
}
|
||||
|
||||
.wpp-header h2,
|
||||
.wpp-header h3,
|
||||
.wpp-header h4,
|
||||
.wpp-header h5 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-header h2 {
|
||||
margin: 0 0 5px 0;
|
||||
font-size: 1.0em;
|
||||
font-weight: 400;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
.wpp-header h3 {
|
||||
margin: 0 0 30px 0;
|
||||
font-size: 3.5em;
|
||||
letter-spacing: -1px;
|
||||
line-height: 1.0em;
|
||||
}
|
||||
|
||||
.wpp-header h4,
|
||||
#wpp-chart-wrapper h4 {
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 2.0em;
|
||||
font-weight: 100;
|
||||
line-height: 1.0em;
|
||||
letter-spacing: -2px;
|
||||
}
|
||||
|
||||
.wpp-header h5,
|
||||
#wpp-chart-wrapper h5 {
|
||||
margin: 0 0 0 0;
|
||||
font-size: 0.9em;
|
||||
font-weight: 300;
|
||||
line-height: 0.9em;
|
||||
}
|
||||
|
||||
.wpp-header-nav {
|
||||
margin: 55px auto 0px auto;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-header-nav li {
|
||||
display: inline;
|
||||
list-style: none;
|
||||
margin: 0 4px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-header-nav li a {
|
||||
display: inline-block;
|
||||
padding: 6px 12px 7px;
|
||||
line-height: 1.1em;
|
||||
}
|
||||
|
||||
.wpp-section-stats .wpp-header-nav li a:hover,
|
||||
.wpp-section-stats .wpp-header-nav li.current a {
|
||||
color: #00a0d2;
|
||||
}
|
||||
|
||||
.wpp-section-stats .wpp-header-nav li.current a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#wpp-chart-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#wpp-chart-wrapper h4,
|
||||
#wpp-chart-wrapper h5 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#wpp-chart-wrapper #wpp-chart {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 20px auto 0 auto;
|
||||
width: 100%;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
#wpp-chart-wrapper #wpp-chart p {
|
||||
margin: 0 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#wpp-chart-wrapper #wpp-chart a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-content {
|
||||
float: none;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.wpp-content .wpp-tabbed-nav {
|
||||
overflow: hidden;
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.wpp-content .wpp-tabbed-nav li {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 25%;
|
||||
border-bottom: #f0f0f0 1px solid;
|
||||
}
|
||||
|
||||
.wpp-content .wpp-tabbed-nav li.active {
|
||||
border-bottom: #bbb 1px solid;
|
||||
}
|
||||
|
||||
.wpp-content .wpp-tabbed-nav li a {
|
||||
display: block;
|
||||
padding: 15px;
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#wpp-listing .wpp-tabbed-nav li a .fa {
|
||||
display: inline-block;
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
.wpp-tab-content {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
padding: 2% 30px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpp-tab-content-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpp-tab-content .spinner {
|
||||
display: block;
|
||||
visibility: visible;
|
||||
float: none;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.popular-posts-list {
|
||||
margin: 0 0 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
counter-reset: wpp-counter;
|
||||
font-size: 1rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.popular-posts-list li {
|
||||
counter-increment: wpp-counter;
|
||||
margin: 0 1% 15px 1%;
|
||||
padding: 0 0 10px 0;
|
||||
border-bottom: #f0f0f0 1px solid;
|
||||
}
|
||||
|
||||
.popular-posts-list li::before {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
content: counter(wpp-counter) ". ";
|
||||
}
|
||||
|
||||
.popular-posts-list li:last-child,
|
||||
.popular-posts-list li:last-child {
|
||||
margin: 0 1%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.popular-posts-list li a.wpp-title {
|
||||
display: inline;
|
||||
font-size: 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.popular-posts-list li:first-child,
|
||||
.popular-posts-list li:first-child a.wpp-title {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.popular-posts-list li:nth-child(2),
|
||||
.popular-posts-list li:nth-child(2) a.wpp-title {
|
||||
font-size: 1.05em;
|
||||
}
|
||||
|
||||
.popular-posts-list li:first-child a.wpp-title,
|
||||
.popular-posts-list li:nth-child(2) a.wpp-title,
|
||||
.popular-posts-list li:nth-child(3) a.wpp-title {
|
||||
font-weight: bold;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
.popular-posts-list li a.wpp-title:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.popular-posts-list li span {
|
||||
color: #bbb;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.popular-posts-list li small {
|
||||
display: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.popular-posts-list li:hover small {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#wpp_params {}
|
||||
|
||||
#wpp_params div {
|
||||
}
|
||||
|
||||
#wpp_params div table {
|
||||
width: 100%;
|
||||
min-width: 800px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
#wpp_params div table tr th {
|
||||
font-size: 1.2em;
|
||||
text-align: left;
|
||||
border-bottom: #dedede 1px solid;
|
||||
}
|
||||
|
||||
#wpp_params div table tr th,
|
||||
#wpp_params div table tr td {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#wpp_params div table tr td {
|
||||
position: static !important;
|
||||
clear: none !important;
|
||||
display: table-cell !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.clear {
|
||||
float:none;
|
||||
clear:both;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
/*
|
||||
* Media Queries
|
||||
*/
|
||||
|
||||
/* Small devices */
|
||||
@media only screen and (max-width: 480px){
|
||||
|
||||
}
|
||||
|
||||
/* Tablets & small desktops */
|
||||
@media only screen and (max-width: 768px) {
|
||||
|
||||
.wpp-wrapper {
|
||||
margin: 20px 12px 0 2px;
|
||||
}
|
||||
|
||||
#wpp-listing .wpp-tabbed-nav li a span:last-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wpp-listing .wpp-tabbed-nav li a .fa {
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Medium desktops, Large desktops & other devices */
|
||||
@media only screen and (max-width: 992px) { /* 960 + 16 + 16 */
|
||||
|
||||
}
|
@@ -0,0 +1,399 @@
|
||||
/*! jQuery UI - v1.12.1 - 2017-08-15
|
||||
* http://jqueryui.com
|
||||
* Includes: core.css, datepicker.css
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden {
|
||||
display: none;
|
||||
}
|
||||
.ui-helper-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.ui-helper-reset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
line-height: 1.3;
|
||||
text-decoration: none;
|
||||
font-size: 100%;
|
||||
list-style: none;
|
||||
}
|
||||
.ui-helper-clearfix:before,
|
||||
.ui-helper-clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.ui-helper-clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-helper-zfix {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0); /* support: IE8 */
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
.ui-icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-top: -.25em;
|
||||
position: relative;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.ui-widget-icon-block {
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-datepicker {
|
||||
width: 17em;
|
||||
padding: .2em .2em 0;
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header {
|
||||
position: relative;
|
||||
padding: .2em 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev,
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 1.8em;
|
||||
height: 1.8em;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
left: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
right: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover {
|
||||
left: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
right: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title {
|
||||
margin: 0 2.3em;
|
||||
line-height: 1.8em;
|
||||
text-align: center;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title select {
|
||||
font-size: 1em;
|
||||
margin: 1px 0;
|
||||
}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
width: 45%;
|
||||
}
|
||||
.ui-datepicker table {
|
||||
width: 100%;
|
||||
font-size: .9em;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 .4em;
|
||||
}
|
||||
.ui-datepicker th {
|
||||
padding: .7em .3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
.ui-datepicker td {
|
||||
border: 0;
|
||||
padding: 1px;
|
||||
}
|
||||
.ui-datepicker td span,
|
||||
.ui-datepicker td a {
|
||||
display: block;
|
||||
padding: .2em;
|
||||
text-align: right;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane {
|
||||
background-image: none;
|
||||
margin: .7em 0 0 0;
|
||||
padding: 0 .2em;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||
float: right;
|
||||
margin: .5em .2em .4em;
|
||||
cursor: pointer;
|
||||
padding: .2em .6em .3em .6em;
|
||||
width: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi {
|
||||
width: auto;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group table {
|
||||
width: 95%;
|
||||
margin: 0 auto .4em;
|
||||
}
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||
width: 50%;
|
||||
}
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||
width: 33.3%;
|
||||
}
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||
width: 25%;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-left-width: 0;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||
clear: left;
|
||||
}
|
||||
.ui-datepicker-row-break {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||
right: 2px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next {
|
||||
left: 2px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||
right: 1px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||
clear: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||
.ui-datepicker-rtl .ui-datepicker-group {
|
||||
float: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-right-width: 0;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.ui-datepicker .ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
left: .5em;
|
||||
top: .3em;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Custom datepicker theme for WPP.
|
||||
*
|
||||
* @author Hector Cabrera
|
||||
*/
|
||||
|
||||
.ui-datepicker {
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.25);
|
||||
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.25);
|
||||
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.25);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.ui-datepicker-header {}
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
/*left: 50%;
|
||||
margin-left: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px;*/
|
||||
}
|
||||
|
||||
.ui-datepicker-prev:before,
|
||||
.ui-datepicker-next:after {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
display: inline-block;
|
||||
font-family: 'FontAwesome';
|
||||
line-height: 1.1em;
|
||||
}
|
||||
|
||||
.ui-datepicker-prev:before {
|
||||
left: 9px;
|
||||
content: "\f060";
|
||||
}
|
||||
|
||||
.ui-datepicker-next:after {
|
||||
right: 9px;
|
||||
content: "\f061";
|
||||
}
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 2px !important;
|
||||
}
|
||||
|
||||
.ui-datepicker-calendar {}
|
||||
|
||||
.ui-datepicker-calendar tr td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ui-datepicker-unselectable span {
|
||||
color: #ccc;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.ui-datepicker-calendar tr td a {
|
||||
text-align: center;
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
.ui-datepicker-calendar tr td.date-range-selected a {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e;
|
||||
background: #e14d43;
|
||||
}
|
||||
|
||||
.ui-datepicker-buttonpane {}
|
||||
|
||||
.ui-datepicker-buttonpane button {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
line-height: 26px;
|
||||
height: 28px;
|
||||
margin: 0;
|
||||
padding: 0 10px 1px !important;
|
||||
border-color: #ccc;
|
||||
background: #f7f7f7;
|
||||
vertical-align: top;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-webkit-appearance: none;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
white-space: nowrap;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Today button */
|
||||
.ui-datepicker-buttonpane .ui-datepicker-current {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ui-datepicker-buttonpane .ui-priority-primary {
|
||||
color: #fff;
|
||||
background: #e14d43;
|
||||
border-color: #d02c21 #ba281e #ba281e;
|
||||
-webkit-box-shadow: 0 1px 0 #ba281e;
|
||||
box-shadow: 0 1px 0 #ba281e;
|
||||
text-shadow: 0 -1px 1px #ba281e, 1px 0 1px #ba281e, 0 1px 1px #ba281e, -1px 0 1px #ba281e;
|
||||
}
|
||||
|
||||
.ui-datepicker-buttonpane .ui-priority-primary:hover {
|
||||
background: #e35950;
|
||||
border-color: #ba281e;
|
||||
}
|
||||
|
||||
.ui-datepicker-buttonpane .ui-priority-secondary {
|
||||
color: #555;
|
||||
border-color: #ccc;
|
||||
background: #f7f7f7;
|
||||
-webkit-box-shadow: 0 1px 0 #ccc;
|
||||
box-shadow: 0 1px 0 #ccc;
|
||||
}
|
50
hamrokhaanpaan/wp-content/__plugins/wordpress-popular-posts/assets/css/fontello.css
vendored
Normal file
50
hamrokhaanpaan/wp-content/__plugins/wordpress-popular-posts/assets/css/fontello.css
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../fonts/fontello.eot?57329479');
|
||||
src: url('../fonts/fontello.eot?57329479#iefix') format('embedded-opentype'),
|
||||
url('../fonts/fontello.woff2?57329479') format('woff2'),
|
||||
url('../fonts/fontello.woff?57329479') format('woff'),
|
||||
url('../fonts/fontello.ttf?57329479') format('truetype'),
|
||||
url('../fonts/fontello.svg?57329479#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
[class^="wpp-icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.wpp-icon-eye:before { content: '\e800'; }
|
||||
.wpp-icon-award:before { content: '\e801'; }
|
||||
.wpp-icon-comment:before { content: '\f0e5'; }
|
||||
.wpp-icon-rocket:before { content: '\f135'; }
|
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Wordpress Popular Posts plugin stylesheet
|
||||
Developed by Hector Cabrera
|
||||
cabrerahector.com | @cabrerahector
|
||||
|
||||
Use the following classes to style your popular posts list as you like.
|
||||
*/
|
||||
|
||||
/* Styles the "Sorry, no data so far" message */
|
||||
.wpp-no-data {
|
||||
}
|
||||
|
||||
/* UL - Popular Posts container styles */
|
||||
.wpp-list {
|
||||
}
|
||||
|
||||
/* LI - Post container styles */
|
||||
.wpp-list li {
|
||||
overflow: hidden;
|
||||
float: none;
|
||||
clear: both;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.wpp-list li:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Styles for the popular post in view */
|
||||
.wpp-list li.current {
|
||||
}
|
||||
|
||||
/* Thumbnail styles */
|
||||
.wpp-thumbnail {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin: 0 1rem 0 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Title styles */
|
||||
.wpp-post-title {
|
||||
}
|
||||
|
||||
/* Excerpt styles */
|
||||
.wpp-excerpt {
|
||||
}
|
||||
|
||||
/* Stats tag styles */
|
||||
.wpp-meta, .post-stats {
|
||||
display: block;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.wpp-meta:empty, .post-stats:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Comments count styles */
|
||||
.wpp-comments {
|
||||
}
|
||||
|
||||
/* Views count styles */
|
||||
.wpp-views {
|
||||
}
|
||||
|
||||
/* Author styles */
|
||||
.wpp-author {
|
||||
}
|
||||
|
||||
/* Post date styles */
|
||||
.wpp-date {
|
||||
}
|
||||
|
||||
/* Post category styles */
|
||||
.wpp-category {
|
||||
}
|
||||
|
||||
/* WP-PostRatings styles */
|
||||
.wpp-rating {
|
||||
}
|
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2019 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="fontello" horiz-adv-x="1000" >
|
||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="eye" unicode="" d="M929 314q-85 132-213 197 34-58 34-125 0-103-73-177t-177-73-177 73-73 177q0 67 34 125-128-65-213-197 75-114 187-182t242-68 243 68 186 182z m-402 215q0 11-8 19t-19 7q-70 0-120-50t-50-119q0-11 8-19t19-8 19 8 8 19q0 48 34 82t82 34q11 0 19 8t8 19z m473-215q0-19-11-38-78-129-210-206t-279-77-279 77-210 206q-11 19-11 38t11 39q78 128 210 205t279 78 279-78 210-205q11-20 11-39z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="award" unicode="" d="M256 357q-42 91-42 207h-143v-53q0-44 53-91t132-63z m601 154v53h-143q0-116-41-207 79 16 131 63t53 91z m72 71v-71q0-40-24-80t-62-73-97-54-120-25q-23-30-53-53-21-19-29-40t-8-50q0-30 17-51t54-21q42 0 75-25t32-64v-36q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v36q0 39 33 64t74 25q38 0 55 21t17 51q0 28-8 50t-29 40q-30 23-53 53-64 3-121 25t-96 54-63 73-23 80v71q0 23 16 38t38 16h160v53q0 37 27 63t63 27h321q37 0 63-27t26-63v-53h161q22 0 38-16t16-38z" horiz-adv-x="928.6" />
|
||||
|
||||
<glyph glyph-name="comment-empty" unicode="" d="M500 636q-114 0-213-39t-157-105-59-142q0-62 40-119t113-98l48-28-15-53q-13-51-39-97 85 36 154 96l24 21 32-3q38-5 72-5 114 0 213 39t157 105 59 142-59 142-157 105-213 39z m500-286q0-97-67-179t-182-130-251-48q-39 0-81 4-110-97-257-135-27-8-63-12h-3q-8 0-15 6t-9 15v1q-2 2 0 6t1 6 2 5l4 5t4 5 4 5q4 5 17 19t20 22 17 22 18 28 15 33 15 42q-88 50-138 123t-51 157q0 97 67 179t182 130 251 48 251-48 182-130 67-179z" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="rocket" unicode="" d="M804 600q0 22-16 38t-38 16-38-16-16-38 16-38 38-16 38 16 16 38z m125 161q0-139-43-240t-141-202q-45-44-109-98l-11-211q-1-9-9-15l-214-125q-4-2-9-2-7 0-13 5l-36 36q-7 7-4 17l47 155-156 156-154-47q-2-1-6-1-7 0-12 5l-36 36q-10 11-3 22l125 214q6 8 15 9l211 11q54 64 98 109 105 104 200 144t241 40q7 0 13-6t6-12z" horiz-adv-x="928.6" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,94 @@
|
||||
document.addEventListener('DOMContentLoaded', function(){
|
||||
// Performance Nag event handlers
|
||||
let btn_nag_dismiss = document.querySelector('.wpp-dismiss-performance-notice'),
|
||||
btn_nag_remind = document.querySelector('.wpp-remind-performance-notice');
|
||||
|
||||
btn_nag_dismiss.addEventListener('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
let me = e.target;
|
||||
|
||||
me.classList.add('disabled');
|
||||
btn_nag_remind.classList.add('disabled');
|
||||
|
||||
me.parentNode.querySelector('.spinner').classList.add('is-active');
|
||||
|
||||
ajax(
|
||||
'POST',
|
||||
ajaxurl,
|
||||
'action=wpp_handle_performance_notice&dismiss=1&token=' + wpp_admin_notices_params.nonce_performance_nag,
|
||||
function(response) {
|
||||
let json = JSON.parse(response);
|
||||
|
||||
if ( 'success' == json.status ) {
|
||||
let notice = me.parentNode.parentNode;
|
||||
notice.parentNode.removeChild(notice);
|
||||
} else {
|
||||
alert('Something went wrong, please try again later');
|
||||
}
|
||||
|
||||
me.classList.remove('disabled');
|
||||
btn_nag_remind.classList.remove('disabled');
|
||||
me.parentNode.querySelector('.spinner').classList.remove('is-active');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
btn_nag_remind.addEventListener('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
let me = e.target;
|
||||
|
||||
me.classList.add('disabled');
|
||||
btn_nag_dismiss.classList.add('disabled');
|
||||
|
||||
me.parentNode.querySelector('.spinner').classList.add('is-active');
|
||||
|
||||
ajax(
|
||||
'POST',
|
||||
ajaxurl,
|
||||
'action=wpp_handle_performance_notice&dismiss=-1&token=' + wpp_admin_notices_params.nonce_performance_nag,
|
||||
function(response) {
|
||||
let json = JSON.parse(response);
|
||||
|
||||
if ( 'success' == json.status ) {
|
||||
let notice = me.parentNode.parentNode;
|
||||
notice.parentNode.removeChild(notice);
|
||||
} else {
|
||||
alert('Something went wrong, please try again later');
|
||||
}
|
||||
|
||||
me.classList.remove('disabled');
|
||||
btn_nag_remind.classList.remove('disabled');
|
||||
me.parentNode.querySelector('.spinner').classList.remove('is-active');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/** Helper functions */
|
||||
|
||||
function ajax(method, url, params, callback) {
|
||||
let xhr = new XMLHttpRequest(),
|
||||
target = url,
|
||||
args = params,
|
||||
valid_methods = ["GET", "POST"];
|
||||
method = -1 != valid_methods.indexOf( method ) ? method : "GET";
|
||||
/* Set request method and target URL */
|
||||
xhr.open( method, target + ( "GET" == method ? '?' + args : '' ), true );
|
||||
/* Set request headers */
|
||||
if ( "POST" == method ) {
|
||||
xhr.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
|
||||
}
|
||||
xhr.setRequestHeader( "X-Requested-With","XMLHttpRequest" );
|
||||
/* Hook into onreadystatechange */
|
||||
xhr.onreadystatechange = function() {
|
||||
if ( 4 === xhr.readyState && 200 <= xhr.status && 300 > xhr.status ) {
|
||||
if ( 'function' === typeof callback ) {
|
||||
callback.call( undefined, xhr.response );
|
||||
}
|
||||
}
|
||||
};
|
||||
/* Send request */
|
||||
xhr.send( ( "POST" == method ? args : null ) );
|
||||
}
|
||||
});
|
@@ -0,0 +1,493 @@
|
||||
(function ($) {
|
||||
"use strict";
|
||||
$(function () {
|
||||
|
||||
if ( $('#wpp-chart').length && WPPChart.canRender() ) {
|
||||
$("#wpp-chart p").remove();
|
||||
WPPChart.init('wpp-chart');
|
||||
}
|
||||
|
||||
// Stats config
|
||||
$("#wpp-stats-config-btn, #wpp_stats_options .button-secondary").on("click", function(e){
|
||||
e.preventDefault();
|
||||
|
||||
// Hide custom range modal box
|
||||
if ( $("#wpp-stats-range").is(":visible") ) {
|
||||
$("#wpp-stats-range").hide();
|
||||
}
|
||||
|
||||
if ( $("#wpp-stats-config").is(":visible") ) {
|
||||
$("#wpp-stats-config").hide();
|
||||
}
|
||||
else{
|
||||
$("#wpp-stats-config").show();
|
||||
}
|
||||
});
|
||||
|
||||
// Stats range
|
||||
$("#wpp-stats-range form").on('submit', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
if ( $("#wpp-stats-range").is(":visible") ) {
|
||||
$("#wpp-stats-range").hide();
|
||||
}
|
||||
|
||||
get_chart_data( $("#wpp-time-ranges li a[data-range='custom']") );
|
||||
|
||||
$(".wpp-lightbox-tabs li:eq(0) a").trigger("click");
|
||||
});
|
||||
|
||||
$("#wpp-stats-range form .button-secondary").on('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
if ( $("#wpp-stats-range").is(":visible") ) {
|
||||
$("#wpp-stats-range").hide();
|
||||
}
|
||||
|
||||
$("#stats_range_date").val('');
|
||||
|
||||
$(".wpp-lightbox-tabs li:eq(0) a").trigger("click");
|
||||
});
|
||||
|
||||
function get_chart_data(me) {
|
||||
var args = {
|
||||
action: 'wpp_update_chart',
|
||||
nonce: wpp_admin_params.nonce,
|
||||
range: me.data("range"),
|
||||
time_quantity: $("#stats_range_time_quantity").val(),
|
||||
time_unit: $("#stats_range_time_unit").val()
|
||||
};
|
||||
|
||||
if ( '' != $("#stats_range_date").val() ){
|
||||
args.dates = $("#stats_range_date").val();
|
||||
}
|
||||
|
||||
$.get(
|
||||
ajaxurl,
|
||||
args,
|
||||
function( response ){
|
||||
if ( 'ok' == response.status ) {
|
||||
me.parent().addClass("current").siblings().removeClass("current");
|
||||
|
||||
// Update titles
|
||||
$("#wpp-chart-wrapper h4").html( response.data.totals.label_summary );
|
||||
$("#wpp-chart-wrapper h5").html( response.data.totals.label_date_range );
|
||||
|
||||
// Update chart
|
||||
WPPChart.populate(response.data);
|
||||
|
||||
$("#wpp-listing .wpp-tabbed-nav li:eq(0) a").trigger("click");
|
||||
|
||||
// Update lists
|
||||
args = {
|
||||
action: 'wpp_get_most_viewed',
|
||||
nonce: wpp_admin_params.nonce,
|
||||
items: 'most-viewed'
|
||||
};
|
||||
|
||||
if ( '' != $("#stats_range_date").val() ){
|
||||
args.dates = $("#stats_range_date").val();
|
||||
}
|
||||
|
||||
$("#wpp-listing .wpp-tab-content:eq(0)").html('<span class="spinner"></span>');
|
||||
|
||||
$.get(
|
||||
ajaxurl,
|
||||
args,
|
||||
function( response ){
|
||||
$("#wpp-listing .wpp-tab-content:eq(0)").html(response);
|
||||
}
|
||||
);
|
||||
|
||||
args = {
|
||||
action: 'wpp_get_most_commented',
|
||||
nonce: wpp_admin_params.nonce,
|
||||
items: 'most-commented'
|
||||
};
|
||||
|
||||
if ( '' != $("#stats_range_date").val() ){
|
||||
args.dates = $("#stats_range_date").val();
|
||||
}
|
||||
|
||||
$("#wpp-listing .wpp-tab-content:eq(1)").html('<span class="spinner"></span>');
|
||||
|
||||
$.get(
|
||||
ajaxurl,
|
||||
args,
|
||||
function( response ){
|
||||
$("#wpp-listing .wpp-tab-content:eq(1)").html(response);
|
||||
}
|
||||
);
|
||||
|
||||
args = {
|
||||
action: 'wpp_get_trending',
|
||||
nonce: wpp_admin_params.nonce,
|
||||
items: 'trending'
|
||||
};
|
||||
|
||||
if ( '' != $("#stats_range_date").val() ){
|
||||
args.dates = $("#stats_range_date").val();
|
||||
}
|
||||
|
||||
$("#wpp-listing .wpp-tab-content:eq(2)").html('<span class="spinner"></span>');
|
||||
|
||||
$.get(
|
||||
ajaxurl,
|
||||
args,
|
||||
function( response ){
|
||||
$("#wpp-listing .wpp-tab-content:eq(2)").html(response);
|
||||
}
|
||||
);
|
||||
|
||||
// Unset date range
|
||||
$("#stats_range_date").val('');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
$("#wpp-time-ranges li a").on("click", function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var me = $(this);
|
||||
|
||||
// Update chart
|
||||
if ( WPPChart.canRender() ) {
|
||||
if ( 'custom' != me.data("range") ) {
|
||||
get_chart_data(me);
|
||||
}
|
||||
else {
|
||||
// Hide Config modal box
|
||||
if ( $("#wpp-stats-config").is(":visible") ) {
|
||||
$("#wpp-stats-config").hide();
|
||||
}
|
||||
|
||||
if ( !$("#wpp-stats-range").is(":visible") ) {
|
||||
$("#wpp-stats-range").show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#wpp-time-ranges li.current a").trigger("click");
|
||||
|
||||
$(".wpp-lightbox-tabs li a").on("click", function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var me = $(this);
|
||||
me.parent().addClass("active").siblings().removeClass("active");
|
||||
|
||||
me.closest(".wpp-lightbox").find(".wpp-lightbox-tab-content").removeClass("wpp-lightbox-tab-content-active").filter(function( index ) {
|
||||
return me.parent().index() == index;
|
||||
}).addClass("wpp-lightbox-tab-content-active");
|
||||
});
|
||||
|
||||
// Datepicker
|
||||
$.datepicker._defaults.onAfterUpdate = null;
|
||||
var datepicker__updateDatepicker = $.datepicker._updateDatepicker;
|
||||
|
||||
$.datepicker._updateDatepicker = function( instance ){
|
||||
datepicker__updateDatepicker.call( this, instance );
|
||||
|
||||
var onAfterUpdate = this._get( instance, 'onAfterUpdate' );
|
||||
|
||||
if ( onAfterUpdate ) {
|
||||
onAfterUpdate.apply( ( instance.input ? instance.input[0] : null ), [( instance.input ? instance.input.val() : '' ), instance] );
|
||||
}
|
||||
};
|
||||
|
||||
var curr = -1,
|
||||
prev = -1;
|
||||
|
||||
var dp_field = $("#stats_range_date");
|
||||
|
||||
var wpp_datepicker = dp_field.datepicker({
|
||||
maxDate: 0,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
showButtonPanel: true,
|
||||
beforeShowDay: function(date){
|
||||
return [true, ( (date.getTime() >= Math.min(prev, curr) && date.getTime() <= Math.max(prev, curr) ) ? 'date-range-selected' : '' )]
|
||||
},
|
||||
onSelect: function(dateText, instance){
|
||||
|
||||
var d1, d2;
|
||||
|
||||
prev = curr;
|
||||
|
||||
curr = ( new Date(instance.selectedYear, instance.selectedMonth, instance.selectedDay) ).getTime();
|
||||
|
||||
if (
|
||||
-1 == prev
|
||||
|| prev == curr
|
||||
) {
|
||||
prev = curr;
|
||||
dp_field.val( dateText );
|
||||
}
|
||||
else {
|
||||
|
||||
d1 = $.datepicker.formatDate('yy-mm-dd', new Date( Math.min(prev, curr) ), {});
|
||||
d2 = $.datepicker.formatDate('yy-mm-dd', new Date( Math.max(prev, curr) ), {});
|
||||
|
||||
dp_field.val( d1 + ' ~ ' + d2 );
|
||||
|
||||
}
|
||||
|
||||
$(this).data('datepicker').inline = true;
|
||||
|
||||
},
|
||||
onClose: function(){
|
||||
$(this).data('datepicker').inline = false;
|
||||
},
|
||||
onAfterUpdate: function( instance ){
|
||||
var calendar = $(this);
|
||||
|
||||
if (
|
||||
prev > -1
|
||||
&& curr > -1
|
||||
){
|
||||
|
||||
$('<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">OK</button>').appendTo( $(".ui-datepicker-buttonpane") ).on('click', function(){
|
||||
dp_field.datepicker('hide');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// STATISTICS TABS
|
||||
$("#wpp-listing .wpp-tabbed-nav li a").on("click", function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var me = $(this),
|
||||
target = me.parent().index();
|
||||
|
||||
me.parent().addClass("active").siblings().removeClass("active");
|
||||
|
||||
me.closest("#wpp-listing").children(".wpp-tab-content:eq(" + target + ")").addClass("wpp-tab-content-active").siblings().removeClass("wpp-tab-content-active");
|
||||
|
||||
});
|
||||
|
||||
// TOOLS
|
||||
// thumb source selection
|
||||
$("#thumb_source").change(function() {
|
||||
if ($(this).val() == "custom_field") {
|
||||
$("#lbl_field, #thumb_field, #row_custom_field, #row_custom_field_resize").show();
|
||||
} else {
|
||||
$("#lbl_field, #thumb_field, #row_custom_field, #row_custom_field_resize").hide();
|
||||
}
|
||||
});
|
||||
// file upload
|
||||
$('#upload_thumb_button').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var custom_uploader = wp.media({
|
||||
title: 'WordPress Popular Posts',
|
||||
library: { type : 'image' },
|
||||
button: { text: wpp_admin_params.label_media_upload_button },
|
||||
id: 'library-' + (Math.random() * 10),
|
||||
multiple: false
|
||||
}).on('select', function() {
|
||||
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
||||
$('#upload_thumb_src').val( attachment.url );
|
||||
|
||||
var img = new Image();
|
||||
img.onload = function() {
|
||||
$("#thumb-review").html( this ).parent().fadeIn();
|
||||
}
|
||||
img.src = attachment.url;
|
||||
|
||||
})
|
||||
.open();
|
||||
|
||||
});
|
||||
$('#wpp-reset-image-cache').on('click', function(e){
|
||||
e.preventDefault();
|
||||
confirm_clear_image_cache();
|
||||
});
|
||||
// log limit
|
||||
$("#log_limit").change(function(){
|
||||
var me = $(this);
|
||||
|
||||
if (me.val() == 1) {
|
||||
me.parent().children("label, .description").show();
|
||||
me.parent().children("br").hide();
|
||||
} else {
|
||||
me.parent().children("label, .description").hide();
|
||||
me.parent().children("br").show();
|
||||
}
|
||||
});
|
||||
// cache interval
|
||||
$("#cache").change(function() {
|
||||
if ($(this).val() == 1) {
|
||||
$("#cache_refresh_interval").show();
|
||||
} else {
|
||||
$("#cache_refresh_interval, #cache_too_long").hide();
|
||||
}
|
||||
});
|
||||
// interval
|
||||
$("#cache_interval_time").change(function() {
|
||||
var value = parseInt( $("#cache_interval_value").val() );
|
||||
var time = $(this).val();
|
||||
|
||||
if ( time == "hour" && value > 72 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "day" && value > 3 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "week" && value > 1 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "month" && value >= 1 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "year" && value >= 1 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else {
|
||||
$("#cache_too_long").hide();
|
||||
}
|
||||
});
|
||||
|
||||
$("#cache_interval_value").change(function() {
|
||||
var value = parseInt( $(this).val() );
|
||||
var time = $("#cache_interval_time").val();
|
||||
|
||||
if ( time == "hour" && value > 72 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "day" && value > 3 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "week" && value > 1 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "month" && value >= 1 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else if ( time == "year" && value >= 1 ) {
|
||||
$("#cache_too_long").show();
|
||||
} else {
|
||||
$("#cache_too_long").hide();
|
||||
}
|
||||
});
|
||||
|
||||
$("#wpp-reset-cache").on("click", function(e){
|
||||
e.preventDefault();
|
||||
confirm_reset_cache();
|
||||
});
|
||||
|
||||
$("#wpp-reset-all").on("click", function(e){
|
||||
e.preventDefault();
|
||||
confirm_reset_all();
|
||||
});
|
||||
});
|
||||
|
||||
// TOOLS
|
||||
function confirm_reset_cache() {
|
||||
if ( confirm(wpp_admin_params.text_confirm_reset_cache_table + " \n\n" + wpp_admin_params.text_continue) ) {
|
||||
jQuery.post(
|
||||
ajaxurl,
|
||||
{
|
||||
action: 'wpp_clear_data',
|
||||
token: wpp_admin_params.nonce_reset_data,
|
||||
clear: 'cache'
|
||||
}, function(data){
|
||||
var response = "";
|
||||
|
||||
switch( data ) {
|
||||
case "1":
|
||||
response = wpp_admin_params.text_cache_table_cleared;
|
||||
break;
|
||||
|
||||
case "2":
|
||||
response = wpp_admin_params.text_cache_table_missing;
|
||||
break;
|
||||
|
||||
case "3":
|
||||
response = wpp_admin_params.text_invalid_action;
|
||||
break;
|
||||
|
||||
case "4":
|
||||
response = wpp_admin_params.text_insufficient_permissions;
|
||||
break;
|
||||
|
||||
default:
|
||||
response = wpp_admin_params.text_invalid_action;
|
||||
break;
|
||||
}
|
||||
|
||||
alert(response);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function confirm_reset_all() {
|
||||
if ( confirm(wpp_admin_params.text_confirm_reset_all_tables + " \n\n" + wpp_admin_params.text_continue) ) {
|
||||
jQuery.post(
|
||||
ajaxurl,
|
||||
{
|
||||
action: 'wpp_clear_data',
|
||||
token: wpp_admin_params.nonce_reset_data,
|
||||
clear: 'all'
|
||||
}, function(data){
|
||||
var response = "";
|
||||
|
||||
switch( data ) {
|
||||
case "1":
|
||||
response = wpp_admin_params.text_all_table_cleared;
|
||||
break;
|
||||
|
||||
case "2":
|
||||
response = wpp_admin_params.text_tables_missing;
|
||||
break;
|
||||
|
||||
case "3":
|
||||
response = wpp_admin_params.text_invalid_action;
|
||||
break;
|
||||
|
||||
case "4":
|
||||
response = wpp_admin_params.text_insufficient_permissions;
|
||||
break;
|
||||
|
||||
default:
|
||||
response = wpp_admin_params.text_invalid_action;
|
||||
break;
|
||||
}
|
||||
|
||||
alert(response);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function confirm_clear_image_cache() {
|
||||
if ( confirm(wpp_admin_params.text_confirm_image_cache_reset + " \n\n" + wpp_admin_params.text_continue) ) {
|
||||
jQuery.post(
|
||||
ajaxurl,
|
||||
{
|
||||
action: 'wpp_clear_thumbnail',
|
||||
token: wpp_admin_params.nonce_reset_thumbnails
|
||||
}, function(data){
|
||||
var response = "";
|
||||
|
||||
switch( data ) {
|
||||
case "1":
|
||||
response = wpp_admin_params.text_image_cache_cleared;
|
||||
break;
|
||||
|
||||
case "2":
|
||||
response = wpp_admin_params.text_image_cache_already_empty;
|
||||
break;
|
||||
|
||||
case "3":
|
||||
response = wpp_admin_params.text_invalid_action;
|
||||
break;
|
||||
|
||||
case "4":
|
||||
response = wpp_admin_params.text_insufficient_permissions;
|
||||
break;
|
||||
|
||||
default:
|
||||
response = wpp_admin_params.text_invalid_action;
|
||||
break;
|
||||
}
|
||||
|
||||
alert(response);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}(jQuery));
|
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'bd6367a58d4de200ed825558aaf46c2c');
|
File diff suppressed because one or more lines are too long
@@ -0,0 +1,192 @@
|
||||
var WPPChart = (function() {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Private functions and variables
|
||||
*/
|
||||
|
||||
var defaults = {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [],
|
||||
datasets: [
|
||||
{
|
||||
label: "",
|
||||
fill: true,
|
||||
lineTension: 0.2,
|
||||
borderWidth: 3,
|
||||
backgroundColor: "rgba(221, 66, 66, 0.8)",
|
||||
borderColor: "#881111",
|
||||
borderCapStyle: 'butt',
|
||||
borderDash: [],
|
||||
borderDashOffset: 0.0,
|
||||
borderJoinStyle: 'miter',
|
||||
pointBorderColor: "#881111",
|
||||
pointBackgroundColor: "#fff",
|
||||
pointBorderWidth: 2,
|
||||
pointHoverRadius: 4,
|
||||
pointHoverBackgroundColor: "#881111",
|
||||
pointHoverBorderColor: "#881111",
|
||||
pointHoverBorderWidth: 3,
|
||||
pointRadius: 3,
|
||||
pointHitRadius: 10,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
label: "",
|
||||
fill: true,
|
||||
lineTension: 0.2,
|
||||
borderWidth: 3,
|
||||
backgroundColor: "rgba(136, 17, 17, 0.3)",
|
||||
borderColor: "#a80000",
|
||||
borderCapStyle: 'butt',
|
||||
borderDash: [],
|
||||
borderDashOffset: 0.0,
|
||||
borderJoinStyle: 'miter',
|
||||
pointBorderColor: "#a80000",
|
||||
pointBackgroundColor: "#fff",
|
||||
pointBorderWidth: 2,
|
||||
pointHoverRadius: 4,
|
||||
pointHoverBackgroundColor: "#a80000",
|
||||
pointHoverBorderColor: "#a80000",
|
||||
pointHoverBorderWidth: 3,
|
||||
pointRadius: 3,
|
||||
pointHitRadius: 10,
|
||||
data: [],
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
legend: {
|
||||
display: true,
|
||||
labels: {
|
||||
fontColor: '#23282d',
|
||||
fontFamily: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
layout: {
|
||||
padding: {
|
||||
top: 2,
|
||||
right: 5,
|
||||
bottom: 0,
|
||||
left: 5
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
display: true,
|
||||
gridLines: {
|
||||
display: false,
|
||||
},
|
||||
ticks: {
|
||||
fontSize: 10,
|
||||
fontColor: '#23282d',
|
||||
autoSkip: false,
|
||||
maxRotation: 90,
|
||||
minRotation: 90
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
display: false
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
chart = null,
|
||||
canRender = !! window.CanvasRenderingContext2D,
|
||||
element = null,
|
||||
cvs = null;
|
||||
|
||||
var canRender = function(){
|
||||
return canRender;
|
||||
};
|
||||
|
||||
// Source: http://stackoverflow.com/a/5624139
|
||||
var HexToRGB = function( hex ){
|
||||
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
||||
|
||||
hex = hex.replace(shorthandRegex, function( m, r, g, b ) {
|
||||
return r + r + g + g + b + b;
|
||||
});
|
||||
|
||||
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
||||
|
||||
return result ? {
|
||||
r: parseInt( result[1], 16 ),
|
||||
g: parseInt( result[2], 16 ),
|
||||
b: parseInt( result[3], 16 )
|
||||
} : null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Public functions
|
||||
*/
|
||||
|
||||
var init = function(container, options){
|
||||
if ( ! canRender() ) {
|
||||
throw new Error('Your browser is too old, WPPChart cannot create its data chart.');
|
||||
}
|
||||
|
||||
if ( 'undefined' == typeof container ) {
|
||||
throw new Error('Please tell WPPChart where to inject the chart.');
|
||||
}
|
||||
|
||||
element = document.getElementById(container);
|
||||
|
||||
if ( ! element ) {
|
||||
throw new Error('WPPChart cannot find ' + container);
|
||||
}
|
||||
|
||||
if ( 'undefined' == typeof Chart ) {
|
||||
throw new Error('ChartJS library not found');
|
||||
}
|
||||
|
||||
cvs = document.createElement('canvas');
|
||||
element.appendChild(cvs);
|
||||
};
|
||||
|
||||
var populate = function(data){
|
||||
if ( chart ) {
|
||||
chart.destroy();
|
||||
}
|
||||
|
||||
var config = defaults;
|
||||
|
||||
config.data.labels = data.labels;
|
||||
config.data.datasets[0].label = data.datasets[0].label;
|
||||
config.data.datasets[0].data = data.datasets[0].data;
|
||||
config.data.datasets[1].label = data.datasets[1].label;
|
||||
config.data.datasets[1].data = data.datasets[1].data;
|
||||
|
||||
var colors_arr = wpp_chart_params.colors.slice(-2);
|
||||
|
||||
var rgb_comments = HexToRGB(colors_arr[0]);
|
||||
config.data.datasets[1].backgroundColor = "rgba(" + rgb_comments.r + ", " + rgb_comments.g + ", " + rgb_comments.b + ", 0.9)";
|
||||
config.data.datasets[1].borderColor = colors_arr[0];
|
||||
config.data.datasets[1].pointBorderColor = colors_arr[0];
|
||||
config.data.datasets[1].pointHoverBackgroundColor = colors_arr[0];
|
||||
config.data.datasets[1].pointHoverBorderColor = colors_arr[0];
|
||||
|
||||
var rgb_views = HexToRGB(colors_arr[1]);
|
||||
config.data.datasets[0].backgroundColor = "rgba(" + rgb_views.r + ", " + rgb_views.g + ", " + rgb_views.b + ", 0.7)";
|
||||
config.data.datasets[0].borderColor = colors_arr[1];
|
||||
config.data.datasets[0].pointBorderColor = colors_arr[1];
|
||||
config.data.datasets[0].pointHoverBackgroundColor = colors_arr[1];
|
||||
config.data.datasets[0].pointHoverBorderColor = colors_arr[1];
|
||||
|
||||
chart = new Chart(cvs, config);
|
||||
};
|
||||
|
||||
/**
|
||||
* Provide access to public methods
|
||||
*/
|
||||
|
||||
return {
|
||||
init: init,
|
||||
populate: populate,
|
||||
canRender: canRender
|
||||
};
|
||||
})();
|
7
hamrokhaanpaan/wp-content/__plugins/wordpress-popular-posts/assets/js/vendor/Chart.min.js
vendored
Normal file
7
hamrokhaanpaan/wp-content/__plugins/wordpress-popular-posts/assets/js/vendor/Chart.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,198 @@
|
||||
var wpp_params = null;
|
||||
var WordPressPopularPosts = (function(){
|
||||
|
||||
"use strict";
|
||||
|
||||
var noop = function(){};
|
||||
var supportsShadowDOMV1 = !! HTMLElement.prototype.attachShadow;
|
||||
|
||||
var get = function( url, params, callback, additional_headers ){
|
||||
callback = ( 'function' === typeof callback ) ? callback : noop;
|
||||
ajax( "GET", url, params, callback, additional_headers );
|
||||
};
|
||||
|
||||
var post = function( url, params, callback, additional_headers ){
|
||||
callback = ( 'function' === typeof callback ) ? callback : noop;
|
||||
ajax( "POST", url, params, callback, additional_headers );
|
||||
};
|
||||
|
||||
var ajax = function( method, url, params, callback, additional_headers ){
|
||||
/* Create XMLHttpRequest object and set variables */
|
||||
var xhr = new XMLHttpRequest(),
|
||||
target = url,
|
||||
args = params,
|
||||
valid_methods = ["GET", "POST"],
|
||||
headers = {
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
};
|
||||
|
||||
method = -1 != valid_methods.indexOf( method ) ? method : "GET";
|
||||
|
||||
/* Set request headers */
|
||||
if ( 'POST' == method ) {
|
||||
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
}
|
||||
|
||||
if ( 'object' == typeof additional_headers && Object.keys(additional_headers).length ) {
|
||||
headers = Object.assign({}, headers, additional_headers);
|
||||
}
|
||||
|
||||
/* Set request method and target URL */
|
||||
xhr.open( method, target + ( 'GET' == method ? '?' + args : '' ), true );
|
||||
|
||||
for (const key in headers) {
|
||||
if ( headers.hasOwnProperty(key) ) {
|
||||
xhr.setRequestHeader( key, headers[key] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Hook into onreadystatechange */
|
||||
xhr.onreadystatechange = function() {
|
||||
if ( 4 === xhr.readyState && 200 <= xhr.status && 300 > xhr.status ) {
|
||||
if ( 'function' === typeof callback ) {
|
||||
callback.call( undefined, xhr.response );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Send request */
|
||||
xhr.send( ( 'POST' == method ? args : null ) );
|
||||
};
|
||||
|
||||
var theme = function(wpp_list) {
|
||||
if ( supportsShadowDOMV1 ) {
|
||||
let base_styles = document.createElement('style'),
|
||||
dummy_list = document.createElement('ul');
|
||||
|
||||
dummy_list.innerHTML = '<li><a href="#"></a></li>';
|
||||
wpp_list.parentNode.appendChild(dummy_list);
|
||||
|
||||
let dummy_list_item_styles = getComputedStyle(dummy_list.querySelector('li')),
|
||||
dummy_link_item_styles = getComputedStyle(dummy_list.querySelector('li a'));
|
||||
|
||||
base_styles.innerHTML = '.wpp-list li {font-size: '+ dummy_list_item_styles.fontSize +'}';
|
||||
base_styles.innerHTML += '.wpp-list li a {color: '+ dummy_link_item_styles.color +'}';
|
||||
|
||||
wpp_list.parentNode.removeChild(dummy_list);
|
||||
|
||||
let wpp_list_sr = wpp_list.attachShadow({mode: "open"});
|
||||
|
||||
wpp_list_sr.append(base_styles);
|
||||
|
||||
while(wpp_list.firstElementChild) {
|
||||
wpp_list_sr.append(wpp_list.firstElementChild);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
get: get,
|
||||
post: post,
|
||||
ajax: ajax,
|
||||
theme: theme
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
(function(){
|
||||
try {
|
||||
var wpp_json = document.querySelector("script#wpp-json"),
|
||||
do_request = true;
|
||||
|
||||
wpp_params = JSON.parse(wpp_json.textContent);
|
||||
|
||||
if ( wpp_params.ID ) {
|
||||
if ( '1' == wpp_params.sampling_active ) {
|
||||
var num = Math.floor(Math.random() * wpp_params.sampling_rate) + 1;
|
||||
do_request = ( 1 === num );
|
||||
}
|
||||
|
||||
if ( do_request ) {
|
||||
WordPressPopularPosts.post(
|
||||
wpp_params.ajax_url,
|
||||
"_wpnonce=" + wpp_params.token + "&wpp_id=" + wpp_params.ID + "&sampling=" + wpp_params.sampling_active + "&sampling_rate=" + wpp_params.sampling_rate,
|
||||
function( response ) {
|
||||
wpp_params.debug&&window.console&&window.console.log&&window.console.log(JSON.parse(response));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("WPP: Couldn't read JSON data");
|
||||
}
|
||||
})();
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var widget_placeholders = document.querySelectorAll('.wpp-widget-placeholder, .wpp-widget-block-placeholder'),
|
||||
w = 0;
|
||||
|
||||
while ( w < widget_placeholders.length ) {
|
||||
fetchWidget(widget_placeholders[w]);
|
||||
w++;
|
||||
}
|
||||
|
||||
var sr = document.querySelectorAll('.popular-posts-sr');
|
||||
|
||||
if ( sr.length ) {
|
||||
for( var s = 0; s < sr.length; s++ ) {
|
||||
WordPressPopularPosts.theme(sr[s]);
|
||||
}
|
||||
}
|
||||
|
||||
function fetchWidget(widget_placeholder) {
|
||||
let widget_id_attr = widget_placeholder.getAttribute('data-widget-id'),
|
||||
method = 'GET',
|
||||
url = '',
|
||||
headers = {},
|
||||
params = '';
|
||||
|
||||
if ( widget_id_attr ) {
|
||||
url = wpp_params.ajax_url + '/widget/' + widget_id_attr.split('-')[1];
|
||||
params = 'is_single=' + wpp_params.ID + ( wpp_params.lang ? '&lang=' + wpp_params.lang : '' );
|
||||
} else {
|
||||
method = 'POST';
|
||||
url = wpp_params.api_url + '/v2/widget?is_single=' + wpp_params.ID + ( wpp_params.lang ? '&lang=' + wpp_params.lang : '' );
|
||||
headers = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
|
||||
let json_tag = widget_placeholder.parentNode.querySelector('script[type="application/json"]');
|
||||
|
||||
if ( json_tag ) {
|
||||
let args = JSON.parse(json_tag.textContent);
|
||||
params = JSON.stringify(args);
|
||||
}
|
||||
}
|
||||
|
||||
WordPressPopularPosts.ajax(
|
||||
method,
|
||||
url,
|
||||
params,
|
||||
function(response) {
|
||||
renderWidget(response, widget_placeholder);
|
||||
},
|
||||
headers
|
||||
);
|
||||
}
|
||||
|
||||
function renderWidget(response, widget_placeholder) {
|
||||
widget_placeholder.insertAdjacentHTML('afterend', JSON.parse(response).widget);
|
||||
|
||||
let parent = widget_placeholder.parentNode,
|
||||
sr = parent.querySelector('.popular-posts-sr'),
|
||||
json_tag = parent.querySelector('script[type="application/json"]');
|
||||
|
||||
if ( json_tag )
|
||||
parent.removeChild(json_tag);
|
||||
|
||||
parent.removeChild(widget_placeholder);
|
||||
parent.classList.add('wpp-ajax');
|
||||
|
||||
if ( sr ) {
|
||||
WordPressPopularPosts.theme(sr);
|
||||
}
|
||||
|
||||
let event = new Event("wpp-onload", {"bubbles": true, "cancelable": false});
|
||||
parent.dispatchEvent(event);
|
||||
}
|
||||
});
|
7
hamrokhaanpaan/wp-content/__plugins/wordpress-popular-posts/assets/js/wpp.min.js
vendored
Normal file
7
hamrokhaanpaan/wp-content/__plugins/wordpress-popular-posts/assets/js/wpp.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
var wpp_params=null,WordPressPopularPosts=function(){var m=function(){},h=!!HTMLElement.prototype.attachShadow,f=function(b,c,a,g,k){var e=new XMLHttpRequest,d={"X-Requested-With":"XMLHttpRequest"};b=-1!=["GET","POST"].indexOf(b)?b:"GET";"POST"==b&&(d["Content-Type"]="application/x-www-form-urlencoded");"object"==typeof k&&Object.keys(k).length&&(d=Object.assign({},d,k));e.open(b,c+("GET"==b?"?"+a:""),!0);for(var l in d)d.hasOwnProperty(l)&&e.setRequestHeader(l,d[l]);e.onreadystatechange=function(){4===
|
||||
e.readyState&&200<=e.status&&300>e.status&&"function"===typeof g&&g.call(void 0,e.response)};e.send("POST"==b?a:null)};return{get:function(b,c,a,g){a="function"===typeof a?a:m;f("GET",b,c,a,g)},post:function(b,c,a,g){a="function"===typeof a?a:m;f("POST",b,c,a,g)},ajax:f,theme:function(b){if(h){var c=document.createElement("style"),a=document.createElement("ul");a.innerHTML='<li><a href="#"></a></li>';b.parentNode.appendChild(a);var g=getComputedStyle(a.querySelector("li")),k=getComputedStyle(a.querySelector("li a"));
|
||||
c.innerHTML=".wpp-list li {font-size: "+g.fontSize+"}";c.innerHTML+=".wpp-list li a {color: "+k.color+"}";b.parentNode.removeChild(a);a=b.attachShadow({mode:"open"});for(a.append(c);b.firstElementChild;)a.append(b.firstElementChild)}}}}();
|
||||
(function(){try{var m=document.querySelector("script#wpp-json"),h=!0;wpp_params=JSON.parse(m.textContent);wpp_params.ID&&("1"==wpp_params.sampling_active&&(h=1===Math.floor(Math.random()*wpp_params.sampling_rate)+1),h&&WordPressPopularPosts.post(wpp_params.ajax_url,"_wpnonce="+wpp_params.token+"&wpp_id="+wpp_params.ID+"&sampling="+wpp_params.sampling_active+"&sampling_rate="+wpp_params.sampling_rate,function(f){wpp_params.debug&&window.console&&window.console.log&&window.console.log(JSON.parse(f))}))}catch(f){console.error("WPP: Couldn't read JSON data")}})();
|
||||
document.addEventListener("DOMContentLoaded",function(){function m(b){var c=b.getAttribute("data-widget-id"),a="GET",g="",k={},e="";if(c)g=wpp_params.ajax_url+"/widget/"+c.split("-")[1],e="is_single="+wpp_params.ID+(wpp_params.lang?"&lang="+wpp_params.lang:"");else if(a="POST",g=wpp_params.api_url+"/v2/widget?is_single="+wpp_params.ID+(wpp_params.lang?"&lang="+wpp_params.lang:""),k={"Content-Type":"application/json"},c=b.parentNode.querySelector('script[type="application/json"]'))e=JSON.parse(c.textContent),
|
||||
e=JSON.stringify(e);WordPressPopularPosts.ajax(a,g,e,function(d){b.insertAdjacentHTML("afterend",JSON.parse(d).widget);d=b.parentNode;var l=d.querySelector(".popular-posts-sr"),n=d.querySelector('script[type="application/json"]');n&&d.removeChild(n);d.removeChild(b);d.classList.add("wpp-ajax");l&&WordPressPopularPosts.theme(l);l=new Event("wpp-onload",{bubbles:!0,cancelable:!1});d.dispatchEvent(l)},k)}for(var h=document.querySelectorAll(".wpp-widget-placeholder, .wpp-widget-block-placeholder"),f=
|
||||
0;f<h.length;)m(h[f]),f++;h=document.querySelectorAll(".popular-posts-sr");if(h.length)for(f=0;f<h.length;f++)WordPressPopularPosts.theme(h[f])});
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Cards Compact",
|
||||
"description": "A compact card-style popular posts list.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": true,
|
||||
"build": "manual",
|
||||
"width": 75,
|
||||
"height": 75,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": true,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-cards-compact\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\">{thumb_img}<div class=\"wpp-item-data\"><div class=\"taxonomies\">{taxonomy}</div>{title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
.wpp-cards-compact {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
border-bottom: #ddd 1px solid;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-cards-compact li {
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li:last-of-type,
|
||||
.wpp-cards-compact li:only-child {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li .wpp-thumbnail {
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
margin-right: 1em;
|
||||
font-size: 0.8em;
|
||||
line-height: 1;
|
||||
background: #f0f0f0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li .taxonomies,
|
||||
.wpp-cards-compact li .wpp-post-title {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li .taxonomies {
|
||||
margin-bottom: 0.25em;
|
||||
font-size: 0.7em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li .wpp-post-title {
|
||||
margin-bottom: 0.5em;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wpp-cards-compact li .wpp-excerpt {
|
||||
margin: 0;
|
||||
font-size: 0.8em;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Cards",
|
||||
"description": "A card-style popular posts list.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": true,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": true,
|
||||
"build": "manual",
|
||||
"width": 75,
|
||||
"height": 75,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": true,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-cards\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\">{thumb_img} <div class=\"wpp-item-data\"><div class=\"taxonomies\">{taxonomy}</div>{title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
.wpp-cards {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-cards li {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
border-bottom: #ddd 1px solid;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-cards li {
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.wpp-cards li:last-of-type,
|
||||
.wpp-cards li:only-child {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.wpp-cards li .wpp-thumbnail {
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
align-self: flex-start;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
margin-right: 1em;
|
||||
font-size: 0.8em;
|
||||
line-height: 1;
|
||||
background: #f0f0f0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpp-cards li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-cards li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-cards li .taxonomies,
|
||||
.wpp-cards li .wpp-post-title {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wpp-cards li .taxonomies {
|
||||
margin-bottom: 0.25em;
|
||||
font-size: 0.7em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.wpp-cards li .wpp-post-title {
|
||||
margin-bottom: 0.5em;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wpp-cards li .wpp-excerpt {
|
||||
margin: 0;
|
||||
font-size: 0.8em;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Cardview Compact",
|
||||
"description": "A compact cardview-style popular posts list.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": true,
|
||||
"build": "manual",
|
||||
"width": 320,
|
||||
"height": 165,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": true,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-cardview-compact\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\"><div class=\"wpp-thumbnail-container\">{thumb}<div class=\"taxonomies\">{taxonomy}</div></div> <div class=\"wpp-item-data\">{title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
.wpp-cardview-compact {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li {
|
||||
list-style: none;
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
border-bottom: #ddd 1px solid;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-cardview-compact li {
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li:last-of-type,
|
||||
.wpp-cardview-compact li:only-child {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact .wpp-thumbnail-container {
|
||||
position: relative;
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li .wpp-thumbnail {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 0.8em;
|
||||
line-height: 1;
|
||||
background: #f0f0f0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li .taxonomies,
|
||||
.wpp-cardview-compact li .wpp-post-title {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li .taxonomies {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 1em;
|
||||
color: #aaa;
|
||||
font-size: 0.7em;
|
||||
line-height: 1;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li .taxonomies a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpp-cardview-compact li .wpp-post-title {
|
||||
margin: 0 0 0.5em;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Cardview",
|
||||
"description": "A cardview-style popular posts list.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": true,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": true,
|
||||
"build": "manual",
|
||||
"width": 320,
|
||||
"height": 165,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": true,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-cardview\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\"><div class=\"wpp-thumbnail-container\">{thumb}<div class=\"taxonomies\">{taxonomy}</div></div> <div class=\"wpp-item-data\">{title} <p class=\"wpp-excerpt\">{excerpt}</p></div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
.wpp-cardview {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-cardview li {
|
||||
list-style: none;
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
border-bottom: #ddd 1px solid;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-cardview li {
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.wpp-cardview li:last-of-type,
|
||||
.wpp-cardview li:only-child {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.wpp-cardview .wpp-thumbnail-container {
|
||||
position: relative;
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
|
||||
.wpp-cardview li .wpp-thumbnail {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
float: none;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 0.8em;
|
||||
line-height: 1;
|
||||
background: #f0f0f0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpp-cardview li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-cardview li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-cardview li .taxonomies,
|
||||
.wpp-cardview li .wpp-post-title {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wpp-cardview li .taxonomies {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 1em;
|
||||
color: #aaa;
|
||||
font-size: 0.7em;
|
||||
line-height: 1;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.wpp-cardview li .taxonomies a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpp-cardview li .wpp-post-title {
|
||||
margin: 0 0 0.5em;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wpp-cardview li .wpp-excerpt {
|
||||
margin: 0;
|
||||
font-size: 0.8em;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Evergreen",
|
||||
"description": "A simple list of popular posts.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": false,
|
||||
"build": "manual",
|
||||
"width": 75,
|
||||
"height": 75,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": false,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-evergreen\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\" style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
.wpp-evergreen {
|
||||
counter-reset: wpp-counter;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
border-right: 6px solid rgb(49, 188, 7);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpp-evergreen li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
counter-increment: wpp-counter;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
background: rgba(49, 188, 7, calc((((var(--total-items) - (var(--item-position) - 1)) * 100)/var(--total-items))/100));
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-evergreen li {
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
}
|
||||
|
||||
.wpp-evergreen li .item-position::before {
|
||||
display: inline-block;
|
||||
flex: 1 0 0;
|
||||
content: counter(wpp-counter);
|
||||
color: rgba(0, 0, 0, 0.15);
|
||||
width: 40px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-evergreen li .item-data .wpp-post-title {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wpp-evergreen li .item-data a {
|
||||
color: #0f470e;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-evergreen li .item-data a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Midnight",
|
||||
"description": "A simple list of popular posts.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": false,
|
||||
"build": "manual",
|
||||
"width": 75,
|
||||
"height": 75,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": false,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-midnight\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\" style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
.wpp-midnight {
|
||||
counter-reset: wpp-counter;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
border-right: 6px solid rgb(0, 51, 51);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpp-midnight li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
counter-increment: wpp-counter;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
background: rgba(0, 51, 51, calc((((var(--total-items) - (var(--item-position) - 1)) * 100)/var(--total-items))/100));
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-midnight li {
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
}
|
||||
|
||||
.wpp-midnight li .item-position::before {
|
||||
display: inline-block;
|
||||
flex: 1 0 0;
|
||||
content: counter(wpp-counter);
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
width: 40px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-midnight li .item-data .wpp-post-title {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wpp-midnight li .item-data a {
|
||||
color: #eee;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-midnight li .item-data a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Sunrise",
|
||||
"description": "A simple list of popular posts.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": false,
|
||||
"build": "manual",
|
||||
"width": 75,
|
||||
"height": 75,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": false,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-sunrise\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\" style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
.wpp-sunrise {
|
||||
counter-reset: wpp-counter;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
border-right: 6px solid rgb(255, 255, 124);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpp-sunrise li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
counter-increment: wpp-counter;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
background: rgba(255, 255, 124, calc((((var(--total-items) - (var(--item-position) - 1)) * 100)/var(--total-items))/100));
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-sunrise li {
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
}
|
||||
|
||||
.wpp-sunrise li .item-position::before {
|
||||
display: inline-block;
|
||||
flex: 1 0 0;
|
||||
content: counter(wpp-counter);
|
||||
color: rgba(0, 0, 0, 0.15);
|
||||
width: 40px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-sunrise li .item-data .wpp-post-title {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wpp-sunrise li .item-data a {
|
||||
color: #2b2b09;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-sunrise li .item-data a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Sunset",
|
||||
"description": "A simple list of popular posts.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": false,
|
||||
"build": "manual",
|
||||
"width": 75,
|
||||
"height": 75,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": false,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-sunset\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\" style=\"--item-position: {item_position}; --total-items: {total_items};\"><div class=\"item-position\"></div> <div class=\"item-data\">{title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
.wpp-sunset {
|
||||
counter-reset: wpp-counter;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
border-right: 6px solid rgb(234, 51, 51);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpp-sunset li {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
counter-increment: wpp-counter;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
background: rgba(234, 51, 51, calc((((var(--total-items) - (var(--item-position) - 1)) * 100)/var(--total-items))/100));
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-sunset li {
|
||||
margin: 0;
|
||||
padding: 15px 15px 15px 0;
|
||||
}
|
||||
|
||||
.wpp-sunset li .item-position::before {
|
||||
display: inline-block;
|
||||
flex: 1 0 0;
|
||||
content: counter(wpp-counter);
|
||||
color: rgba(0, 0, 0, 0.15);
|
||||
width: 40px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpp-sunset li .item-data .wpp-post-title {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wpp-sunset li .item-data a {
|
||||
color: #222;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-sunset li .item-data a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Tiles",
|
||||
"description": "A Tile-styled popular posts list.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"shorten_title": {
|
||||
"active": false,
|
||||
"length": 25,
|
||||
"words": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false,
|
||||
"length": 75,
|
||||
"keep_format": false,
|
||||
"words": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": true,
|
||||
"build": "manual",
|
||||
"width": 320,
|
||||
"height": 160,
|
||||
"crop": true
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false,
|
||||
"format": "F j, Y"
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": true,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-tiles\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\">{thumb}<div class=\"wpp-post-data\">{taxonomy} {title}</div></li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,70 @@
|
||||
.wpp-tiles {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-tiles li {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-tiles li {
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-tiles li:last-of-type {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpp-tiles li .wpp-thumbnail {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 0.8em;
|
||||
line-height: 1;
|
||||
background: #f0f0f0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpp-tiles li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-tiles li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-tiles li .wpp-post-data {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding: .75em 1em 1em;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.wpp-tiles li .wpp-post-data .category,
|
||||
.wpp-tiles li .wpp-post-data .wpp-post-title {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wpp-tiles li .wpp-post-data .category {
|
||||
margin: 0;
|
||||
font-size: 0.7em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.wpp-tiles li .wpp-post-data .wpp-post-title {
|
||||
display: block;
|
||||
margin: 0 0 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.2;
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "Tiny",
|
||||
"description": "A very compact popular posts list.",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Hector Cabrera",
|
||||
"email": "me@cabrerahector.com",
|
||||
"role": "Creator / Main Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"title" : "Trending",
|
||||
"shorten_title": {
|
||||
"active": false
|
||||
},
|
||||
"post-excerpt": {
|
||||
"active": false
|
||||
},
|
||||
"thumbnail": {
|
||||
"active": false
|
||||
},
|
||||
"rating": false,
|
||||
"stats_tag": {
|
||||
"comment_count": false,
|
||||
"views": false,
|
||||
"author": false,
|
||||
"date": {
|
||||
"active": false
|
||||
},
|
||||
"taxonomy": {
|
||||
"active": true,
|
||||
"name": "category"
|
||||
}
|
||||
},
|
||||
"markup": {
|
||||
"wpp-start": "<ul class=\"wpp-list wpp-tiny\">",
|
||||
"wpp-end": "</ul>",
|
||||
"post-html": "<li class=\"{current_class}\"><div class=\"wpp-item-data\">{category}</div> {title}</li>"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
.wpp-tiny {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-tiny li {
|
||||
list-style: none;
|
||||
margin: 0 0 1.2rem 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.in-preview-mode .wpp-tiny li {
|
||||
margin: 0 0 1.2em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpp-tiny li:last-of-type {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpp-tiny li a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpp-tiny li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpp-tiny li .wpp-post-title {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -1px;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.wpp-tiny li .wpp-item-data {
|
||||
opacity: 0.5;
|
||||
font-size: 0.65rem;
|
||||
text-transform: capitalize;
|
||||
}
|
Reference in New Issue
Block a user