This commit is contained in:
杜恒
2021-01-20 16:06:51 +08:00
parent 4e31dbdf81
commit d9e7ec858d
10 changed files with 440 additions and 232 deletions

View File

@@ -1 +1 @@
.col-mb-12.col-tb-8.col-tb-offset-2{margin-left:0;width:100%}.joe_config{display:flex}.joe_config *{margin:0;padding:0;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent}.joe_config li{list-style:none}.joe_config__aside{position:-webkit-sticky;position:sticky;top:15px;width:200px;background:#fff;padding:10px;box-shadow:0px 0px 20px -5px rgba(158,158,158,0.22);border-radius:8px}.joe_config__aside .logo{color:#303133;font-weight:500;font-size:24px;text-align:center;margin-bottom:10px;border-bottom:1px solid #ebeef5;padding-bottom:10px}.joe_config__aside .tabs{margin-bottom:10px}.joe_config__aside .tabs .item{border-radius:20px;text-align:center;height:40px;line-height:40px;color:#606266;cursor:pointer;transition:background 0.35s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.joe_config__aside .tabs .item:hover{background:#f2f6fc}.joe_config__aside .tabs .item.active{color:#409eff;font-weight:500}.joe_config__aside .backup input{width:170px;height:40px;line-height:40px;margin-bottom:10px;color:#fff;font-size:14px;border-radius:20px;transition:opacity 0.35s;border:none;cursor:pointer}.joe_config__aside .backup input:hover{opacity:0.85}.joe_config__aside .backup input:nth-child(1){background:#5cb85c}.joe_config__aside .backup input:nth-child(2){background:#f0ad4e}.joe_config__aside .backup input:nth-child(3){margin-bottom:0;background:#d9534f}.joe_config>form{position:relative;display:none;background:#fff;min-width:0;flex:1;margin-left:15px;box-shadow:0px 0px 20px -5px rgba(158,158,158,0.22);border-radius:8px}.joe_config>form .typecho-option{position:-webkit-sticky;position:sticky;bottom:0;display:flex;align-items:center;justify-content:center;margin:0;padding:15px;background:#fff;border-top:1px solid #ebebeb;border-radius:0 0 8px 8px}.joe_config>form .typecho-option button{width:170px;height:40px;background-color:#409eff;border-radius:20px}.joe_config>form .typecho-option button:hover{-webkit-animation:pulse 1s;animation:pulse 1s;box-shadow:0 0 0 20px rgba(255,255,255,0)}.joe_config>form .joe_content{display:none;padding:15px}.joe_config>form .joe_content li{border:1px solid #e9e9eb;padding:15px}.joe_config>form .joe_content li .typecho-label{display:block;border-left:4px solid #409eff;background:#ecf5ff;line-height:26px;margin-bottom:15px;padding:5px 15px;color:#409eff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:0 4px 4px 0}.joe_config>form .joe_content li select{min-width:200px;height:34px;line-height:34px;border:1px solid #e9e9eb;color:#666;border-radius:4px;padding-left:5px}.joe_config>form .joe_content li textarea,.joe_config>form .joe_content li input[type="text"]{width:100%;padding:10px;color:#666;border:1px solid #e9e9eb;-webkit-appearance:none}.joe_config>form .joe_content li .description{background:#f8f8f8;color:#999;padding:10px 15px;margin-top:15px;line-height:26px;border-radius:4px}.joe_config__notice{display:none;margin-left:15px;background:#fff;padding:15px;flex:1;box-shadow:0px 0px 20px -5px rgba(158,158,158,0.22);border-radius:8px;line-height:28px;color:#606266}.joe_config__notice ol{padding:0 40px}.joe_config__notice ol li{list-style:decimal}@-webkit-keyframes pulse{0%{box-shadow:0 0 0 0 #409eff}}@keyframes pulse{0%{box-shadow:0 0 0 0 #409eff}}@media (max-width: 768px){.joe_config{display:block}.joe_config__aside{width:100%;margin-bottom:15px}.joe_config__aside .tabs{display:flex;flex-wrap:wrap;border-bottom:1px solid #ebeef5;padding-bottom:10px}.joe_config__aside .tabs .item{width:33.33333333%;height:36px;line-height:36px;border-radius:18px}.joe_config__aside .backup{display:flex;align-items:center;justify-content:space-between}.joe_config__aside .backup input{width:auto;flex:1;margin-bottom:0;height:36px;line-height:36px;border-radius:18px}.joe_config__aside .backup input:nth-child(2){margin:0 10px}.joe_config>form{margin-left:0}.joe_config>form .typecho-option{padding:10px 0}.joe_config>form .typecho-option button{width:150px;height:38px;border-radius:19px}.joe_config__notice{margin-left:0}}
.col-mb-12.col-tb-8.col-tb-offset-2{margin-left:0;width:100%}.joe_config{display:flex}.joe_config *{margin:0;padding:0;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent}.joe_config li{list-style:none}.joe_config__aside{position:-webkit-sticky;position:sticky;top:15px;width:200px;background:#fff;padding:10px;box-shadow:0px 0px 20px -5px rgba(158,158,158,0.22);border-radius:8px}.joe_config__aside .logo{color:#303133;font-weight:500;font-size:24px;text-align:center;margin-bottom:10px;border-bottom:1px solid #ebeef5;padding-bottom:10px}.joe_config__aside .tabs{margin-bottom:10px}.joe_config__aside .tabs .item{border-radius:20px;text-align:center;height:40px;line-height:40px;color:#606266;cursor:pointer;transition:background 0.35s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.joe_config__aside .tabs .item:hover{background:#f2f6fc}.joe_config__aside .tabs .item.active{color:#409eff;font-weight:500}.joe_config__aside .backup input{width:170px;height:40px;line-height:40px;margin-bottom:10px;color:#fff;font-size:14px;border-radius:20px;transition:opacity 0.35s;border:none;cursor:pointer}.joe_config__aside .backup input:hover{opacity:0.85}.joe_config__aside .backup input:nth-child(1){background:#5cb85c}.joe_config__aside .backup input:nth-child(2){background:#f0ad4e}.joe_config__aside .backup input:nth-child(3){margin-bottom:0;background:#d9534f}.joe_config>form{position:relative;display:none;background:#fff;min-width:0;flex:1;margin-left:15px;box-shadow:0px 0px 20px -5px rgba(158,158,158,0.22);border-radius:8px}.joe_config>form .typecho-option{position:-webkit-sticky;position:sticky;bottom:0;display:flex;align-items:center;justify-content:center;margin:0;padding:15px;background:#fff;border-top:1px solid #ebebeb;border-radius:0 0 8px 8px}.joe_config>form .typecho-option button{width:170px;height:40px;background-color:#409eff;border-radius:20px}.joe_config>form .typecho-option button:hover{-webkit-animation:pulse 1s;animation:pulse 1s;box-shadow:0 0 0 20px rgba(255,255,255,0)}.joe_config>form .joe_content{display:none;padding:15px}.joe_config>form .joe_content li{border:1px solid #e9e9eb;padding:15px}.joe_config>form .joe_content li .typecho-label{display:block;border-left:4px solid #409eff;background:#ecf5ff;line-height:26px;margin-bottom:15px;padding:5px 15px;color:#409eff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:0 4px 4px 0}.joe_config>form .joe_content li select{min-width:200px;height:34px;line-height:34px;border:1px solid #e9e9eb;color:#666;border-radius:4px;padding-left:5px}.joe_config>form .joe_content li .multiline{display:flex;align-items:center;color:#666}.joe_config>form .joe_content li .multiline input[type='checkbox']{margin-right:5px}.joe_config>form .joe_content li textarea,.joe_config>form .joe_content li input[type='text']{width:100%;padding:10px;color:#666;border:1px solid #e9e9eb;-webkit-appearance:none}.joe_config>form .joe_content li .description{background:#f8f8f8;color:#999;padding:10px 15px;margin-top:15px;line-height:26px;border-radius:4px}.joe_config__notice{display:none;margin-left:15px;background:#fff;padding:15px;flex:1;box-shadow:0px 0px 20px -5px rgba(158,158,158,0.22);border-radius:8px;line-height:28px;color:#606266}.joe_config__notice ol{padding:0 40px}.joe_config__notice ol li{list-style:decimal}@-webkit-keyframes pulse{0%{box-shadow:0 0 0 0 #409eff}}@keyframes pulse{0%{box-shadow:0 0 0 0 #409eff}}@media (max-width: 768px){.joe_config{display:block}.joe_config__aside{width:100%;margin-bottom:15px}.joe_config__aside .tabs{display:flex;flex-wrap:wrap;border-bottom:1px solid #ebeef5;padding-bottom:10px}.joe_config__aside .tabs .item{width:33.33333333%;height:36px;line-height:36px;border-radius:18px}.joe_config__aside .backup{display:flex;align-items:center;justify-content:space-between}.joe_config__aside .backup input{width:auto;flex:1;margin-bottom:0;height:36px;line-height:36px;border-radius:18px}.joe_config__aside .backup input:nth-child(2){margin:0 10px}.joe_config>form{margin-left:0}.joe_config>form .typecho-option{padding:10px 0}.joe_config>form .typecho-option button{width:150px;height:38px;border-radius:19px}.joe_config__notice{margin-left:0}}

View File

@@ -1,242 +1,250 @@
.col-mb-12.col-tb-8.col-tb-offset-2 {
margin-left: 0;
width: 100%;
margin-left: 0;
width: 100%;
}
.joe_config {
display: flex;
display: flex;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
-webkit-tap-highlight-color: transparent;
}
li {
list-style: none;
}
&__aside {
position: sticky;
top: 15px;
width: 200px;
background: #fff;
padding: 10px;
box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
border-radius: 8px;
.logo {
color: #303133;
font-weight: 500;
font-size: 24px;
text-align: center;
margin-bottom: 10px;
border-bottom: 1px solid #ebeef5;
padding-bottom: 10px;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
-webkit-tap-highlight-color: transparent;
}
.tabs {
margin-bottom: 10px;
.item {
border-radius: 20px;
text-align: center;
height: 40px;
line-height: 40px;
color: #606266;
cursor: pointer;
transition: background 0.35s;
user-select: none;
&:hover {
background: #f2f6fc;
}
&.active {
color: #409eff;
font-weight: 500;
}
}
}
.backup {
input {
width: 170px;
height: 40px;
line-height: 40px;
margin-bottom: 10px;
color: #fff;
font-size: 14px;
border-radius: 20px;
transition: opacity 0.35s;
border: none;
cursor: pointer;
&:hover {
opacity: 0.85;
}
&:nth-child(1) {
background: #5cb85c;
}
&:nth-child(2) {
background: #f0ad4e;
}
&:nth-child(3) {
margin-bottom: 0;
background: #d9534f;
}
}
}
}
> form {
position: relative;
display: none;
background: #fff;
min-width: 0;
flex: 1;
margin-left: 15px;
box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
border-radius: 8px;
.typecho-option {
position: sticky;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
margin: 0;
padding: 15px;
background: #fff;
border-top: 1px solid #ebebeb;
border-radius: 0 0 8px 8px;
button {
width: 170px;
height: 40px;
background-color: #409eff;
border-radius: 20px;
&:hover {
animation: pulse 1s;
box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
}
}
li {
list-style: none;
}
.joe_content {
display: none;
padding: 15px;
li {
border: 1px solid #e9e9eb;
padding: 15px;
.typecho-label {
display: block;
border-left: 4px solid #409eff;
background: #ecf5ff;
line-height: 26px;
margin-bottom: 15px;
padding: 5px 15px;
color: #409eff;
user-select: none;
border-radius: 0 4px 4px 0;
}
select {
min-width: 200px;
height: 34px;
line-height: 34px;
border: 1px solid #e9e9eb;
color: #666;
border-radius: 4px;
padding-left: 5px;
}
textarea,
input[type="text"] {
width: 100%;
padding: 10px;
color: #666;
border: 1px solid #e9e9eb;
-webkit-appearance: none;
}
.description {
background: #f8f8f8;
color: #999;
padding: 10px 15px;
margin-top: 15px;
line-height: 26px;
border-radius: 4px;
}
}
}
}
&__notice {
display: none;
margin-left: 15px;
background: #fff;
padding: 15px;
flex: 1;
box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
border-radius: 8px;
line-height: 28px;
color: #606266;
ol {
padding: 0 40px;
li {
list-style: decimal;
}
}
}
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 #409eff;
}
}
@media (max-width: 768px) {
.joe_config {
display: block;
&__aside {
width: 100%;
margin-bottom: 15px;
.tabs {
display: flex;
flex-wrap: wrap;
border-bottom: 1px solid #ebeef5;
padding-bottom: 10px;
.item {
width: 33.33333333%;
height: 36px;
line-height: 36px;
border-radius: 18px;
position: sticky;
top: 15px;
width: 200px;
background: #fff;
padding: 10px;
box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
border-radius: 8px;
.logo {
color: #303133;
font-weight: 500;
font-size: 24px;
text-align: center;
margin-bottom: 10px;
border-bottom: 1px solid #ebeef5;
padding-bottom: 10px;
}
}
.backup {
display: flex;
align-items: center;
justify-content: space-between;
input {
width: auto;
flex: 1;
margin-bottom: 0;
height: 36px;
line-height: 36px;
border-radius: 18px;
&:nth-child(2) {
margin: 0 10px;
}
.tabs {
margin-bottom: 10px;
.item {
border-radius: 20px;
text-align: center;
height: 40px;
line-height: 40px;
color: #606266;
cursor: pointer;
transition: background 0.35s;
user-select: none;
&:hover {
background: #f2f6fc;
}
&.active {
color: #409eff;
font-weight: 500;
}
}
}
.backup {
input {
width: 170px;
height: 40px;
line-height: 40px;
margin-bottom: 10px;
color: #fff;
font-size: 14px;
border-radius: 20px;
transition: opacity 0.35s;
border: none;
cursor: pointer;
&:hover {
opacity: 0.85;
}
&:nth-child(1) {
background: #5cb85c;
}
&:nth-child(2) {
background: #f0ad4e;
}
&:nth-child(3) {
margin-bottom: 0;
background: #d9534f;
}
}
}
}
}
> form {
margin-left: 0;
.typecho-option {
padding: 10px 0;
button {
width: 150px;
height: 38px;
border-radius: 19px;
position: relative;
display: none;
background: #fff;
min-width: 0;
flex: 1;
margin-left: 15px;
box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
border-radius: 8px;
.typecho-option {
position: sticky;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
margin: 0;
padding: 15px;
background: #fff;
border-top: 1px solid #ebebeb;
border-radius: 0 0 8px 8px;
button {
width: 170px;
height: 40px;
background-color: #409eff;
border-radius: 20px;
&:hover {
animation: pulse 1s;
box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
}
}
}
.joe_content {
display: none;
padding: 15px;
li {
border: 1px solid #e9e9eb;
padding: 15px;
.typecho-label {
display: block;
border-left: 4px solid #409eff;
background: #ecf5ff;
line-height: 26px;
margin-bottom: 15px;
padding: 5px 15px;
color: #409eff;
user-select: none;
border-radius: 0 4px 4px 0;
}
select {
min-width: 200px;
height: 34px;
line-height: 34px;
border: 1px solid #e9e9eb;
color: #666;
border-radius: 4px;
padding-left: 5px;
}
.multiline {
display: flex;
align-items: center;
color: #666;
input[type='checkbox'] {
margin-right: 5px;
}
}
textarea,
input[type='text'] {
width: 100%;
padding: 10px;
color: #666;
border: 1px solid #e9e9eb;
-webkit-appearance: none;
}
.description {
background: #f8f8f8;
color: #999;
padding: 10px 15px;
margin-top: 15px;
line-height: 26px;
border-radius: 4px;
}
}
}
}
}
&__notice {
margin-left: 0;
display: none;
margin-left: 15px;
background: #fff;
padding: 15px;
flex: 1;
box-shadow: 0px 0px 20px -5px rgba(158, 158, 158, 0.22);
border-radius: 8px;
line-height: 28px;
color: #606266;
ol {
padding: 0 40px;
li {
list-style: decimal;
}
}
}
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 #409eff;
}
}
@media (max-width: 768px) {
.joe_config {
display: block;
&__aside {
width: 100%;
margin-bottom: 15px;
.tabs {
display: flex;
flex-wrap: wrap;
border-bottom: 1px solid #ebeef5;
padding-bottom: 10px;
.item {
width: 33.33333333%;
height: 36px;
line-height: 36px;
border-radius: 18px;
}
}
.backup {
display: flex;
align-items: center;
justify-content: space-between;
input {
width: auto;
flex: 1;
margin-bottom: 0;
height: 36px;
line-height: 36px;
border-radius: 18px;
&:nth-child(2) {
margin: 0 10px;
}
}
}
}
> form {
margin-left: 0;
.typecho-option {
padding: 10px 0;
button {
width: 150px;
height: 38px;
border-radius: 19px;
}
}
}
&__notice {
margin-left: 0;
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -490,6 +490,19 @@
}
}
}
&.weather {
background: var(--background);
.joe_aside__item-contain {
min-height: 300px;
}
}
&.hot {
background: var(--background);
.empty {
text-align: center;
color: var(--routine);
}
}
}
}

BIN
assets/img/lazyload.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

View File

@@ -26,9 +26,8 @@ window.Joe = function () {
}
});
}
/* Timelife */
{
if ($('.joe_aside__item.timelife').length !== 0) {
let timelife = [
{ title: '今日已经过去', endTitle: '小时', num: 0, percent: '0%' },
{ title: '这周已经过去', endTitle: '天', num: 0, percent: '0%' },
@@ -83,7 +82,15 @@ window.Joe = function () {
</div>
`;
});
$('.joe_aside__item-contain').html(htmlStr);
$('.joe_aside__item.timelife .joe_aside__item-contain').html(htmlStr);
}
/* Weather */
if ($('.joe_aside__item.weather').length !== 0) {
const key = $('.joe_aside__item.weather').attr('data-key');
const style = $('.joe_aside__item.weather').attr('data-style');
const aqiColor = { 1: 'FFFFFF', 2: '4A4A4A', 3: 'FFFFFF' };
window.WIDGET = { CONFIG: { layout: 2, width: '220', height: '270', background: style, dataColor: aqiColor[style], language: 'zh', key: key } };
}
};