diff --git a/assets/css/joe.config.css b/assets/css/joe.config.css index f47f04d..c774904 100644 --- a/assets/css/joe.config.css +++ b/assets/css/joe.config.css @@ -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}} diff --git a/assets/css/joe.config.scss b/assets/css/joe.config.scss index 9248106..460cd6e 100644 --- a/assets/css/joe.config.scss +++ b/assets/css/joe.config.scss @@ -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; + } } - } } diff --git a/assets/css/joe.global.css b/assets/css/joe.global.css index 9351756..1a75196 100644 --- a/assets/css/joe.global.css +++ b/assets/css/joe.global.css @@ -1 +1 @@ -.joe_dropdown{position:relative}.joe_dropdown__link{display:flex;align-items:center}.joe_dropdown__link-icon{transition:-webkit-transform 0.35s;transition:transform 0.35s;transition:transform 0.35s, -webkit-transform 0.35s}.joe_dropdown__menu{position:absolute;left:50%;visibility:hidden;z-index:999;border-top:3px solid var(--theme);-webkit-transform-origin:top;transform-origin:top;background:var(--background);box-shadow:0 0 10px rgba(0,0,0,0.15);border-radius:0 0 4px 4px;padding:10px 0;opacity:0;-webkit-transform:translateX(-50%) perspective(600px) rotateX(-45deg);transform:translateX(-50%) perspective(600px) rotateX(-45deg);transition:opacity 0.35s, visibility 0.35s, -webkit-transform 0.35s;transition:opacity 0.35s, visibility 0.35s, transform 0.35s;transition:opacity 0.35s, visibility 0.35s, transform 0.35s, -webkit-transform 0.35s}.joe_dropdown__menu::before{content:'';position:absolute;top:-10px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid var(--theme)}.joe_dropdown.active .joe_dropdown__link-icon{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.joe_dropdown.active .joe_dropdown__menu{visibility:visible;opacity:1;-webkit-transform:translateX(-50%) perspective(600px) rotateX(0);transform:translateX(-50%) perspective(600px) rotateX(0)}.joe_header{position:-webkit-sticky;position:sticky;top:0;z-index:1000;background:var(--background);box-shadow:0 2px 10px 0 rgba(0,0,0,0.1)}.joe_header__above-logo{position:relative;display:flex;align-items:center;height:60px;padding-right:15px;margin-right:15px}.joe_header__above-logo img{max-width:150px;max-height:50px;-o-object-fit:cover;object-fit:cover}.joe_header__above-logo::after{content:'';position:absolute;top:50%;right:0;width:1px;height:20px;background:var(--classC);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.joe_header__above-nav{display:flex;align-items:center}.joe_header__above-nav .item{position:relative;height:60px;line-height:60px;font-size:15px;padding:0 8px;margin-right:15px;transition:color 0.35s;white-space:nowrap;color:var(--main)}.joe_header__above-nav .item:last-child{margin-right:0}.joe_header__above-nav .item::after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;transition:opacity 0.5s, -webkit-transform 0.5s;transition:opacity 0.5s, transform 0.5s;transition:opacity 0.5s, transform 0.5s, -webkit-transform 0.5s;border-radius:6px 6px 0 0;opacity:0;-webkit-transform:scaleX(0.25);transform:scaleX(0.25);background:var(--theme)}.joe_header__above-nav .item.active,.joe_header__above-nav .item:hover{color:var(--theme)}.joe_header__above-nav .item.active::after,.joe_header__above-nav .item:hover::after{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}.joe_header__above-nav .joe_dropdown__link a{height:60px;line-height:60px;font-size:15px;padding-left:8px;padding-right:3px;transition:color 0.35s;white-space:nowrap;color:var(--main)}.joe_header__above-nav .joe_dropdown__menu{width:110px;text-align:center}.joe_header__above-nav .joe_dropdown__menu a{display:block;line-height:34px;height:34px;transition:color 0.35s, background 0.35s;color:var(--minor);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 15px}.joe_header__above-nav .joe_dropdown__menu a:hover,.joe_header__above-nav .joe_dropdown__menu a.active{color:var(--theme);background:var(--classD)}.joe_header__above-search{position:relative;margin-left:auto;display:flex;align-items:center}.joe_header__above-search .input{background:var(--classC);width:170px;height:34px;border:1px solid transparent;padding:0 18px;color:var(--routine);transition:background 0.35s, border-color 0.35s, padding-right 0.35s;border-radius:17px 0 0 17px}.joe_header__above-search .input:focus{background:var(--background);border-color:var(--theme);padding-right:28px}.joe_header__above-search .input:focus ~ .icon{-webkit-transform:translate3d(0, -50%, 0) rotateY(180deg);transform:translate3d(0, -50%, 0) rotateY(180deg)}.joe_header__above-search .submit{position:relative;z-index:1;height:34px;border:none;background:var(--theme);color:#fff;border-radius:0 17px 17px 0;padding:0 10px}.joe_header__above-search .icon{position:absolute;top:50%;left:142px;width:28px;height:38px;background:url(../img/search.png);background-size:100% 100%;transition:-webkit-transform 0.35s;transition:transform 0.35s;transition:transform 0.35s, -webkit-transform 0.35s;-webkit-transform:translate3d(100%, -50%, 0) rotateY(180deg);transform:translate3d(100%, -50%, 0) rotateY(180deg)}.joe_header__below{border-top:1px solid var(--classC);height:45px}.joe_header__below-class{display:flex}.joe_header__below-class .item{margin-right:15px;color:var(--minor);height:45px;line-height:45px;transition:color 0.35s;white-space:nowrap}.joe_header__below-class .item:hover,.joe_header__below-class .item.active{color:var(--theme)}.joe_header__below-class .joe_dropdown{margin-right:15px}.joe_header__below-class .joe_dropdown__link .item{margin-right:3px}.joe_header__below-class .joe_dropdown__menu{width:110px;text-align:center}.joe_header__below-class .joe_dropdown__menu a{display:block;height:34px;line-height:34px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--minor);transition:color 0.35s, background 0.35s}.joe_header__below-class .joe_dropdown__menu a:hover,.joe_header__below-class .joe_dropdown__menu a.active{color:var(--theme);background:var(--classD)}.joe_aside{padding:15px 0;margin-left:15px}.joe_aside__item{position:relative;width:250px;margin-bottom:15px;border-radius:8px;box-shadow:var(--box-shadow);overflow:hidden}.joe_aside__item:last-child{position:-webkit-sticky;position:sticky;margin-bottom:0}.joe_aside__item-title{display:flex;align-items:center;border-bottom:1px solid var(--classC);font-size:16px;font-weight:500;height:45px;line-height:45px;padding:0 15px;color:var(--main)}.joe_aside__item-title .icon{width:18px;height:18px;margin-right:8px;fill:var(--main)}.joe_aside__item-title .line{width:10px;height:1px;background:#54b5db;margin-left:12px}.joe_aside__item-contain{position:relative;padding:15px}.joe_aside__item.author{background:var(--background);padding:45px 15px 15px}.joe_aside__item.author::before{content:'';position:absolute;top:90px;left:0;width:100%;height:30px;z-index:2;background:linear-gradient(to bottom, rgba(255,255,255,0), var(--background))}.joe_aside__item.author::after{display:none;content:'';position:absolute;top:0;left:0;width:100%;height:273px;background:url("https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/img/snow.gif") no-repeat;background-size:cover;z-index:3;pointer-events:none}.joe_aside__item.author:hover::after{display:block}.joe_aside__item.author .image{position:absolute;top:0;left:0;width:100%;height:120px;-o-object-fit:cover;object-fit:cover;z-index:1}.joe_aside__item.author .user{position:relative;z-index:4;display:flex;flex-direction:column;align-items:center;padding-bottom:15px}.joe_aside__item.author .user .avatar{width:75px;height:75px;border-radius:50%;overflow:hidden;margin-bottom:10px;-o-object-fit:cover;object-fit:cover;transition:-webkit-transform 0.75s;transition:transform 0.75s;transition:transform 0.75s, -webkit-transform 0.75s;background:var(--background);padding:5px}.joe_aside__item.author .user .avatar:hover{-webkit-transform:rotate(360deg);transform:rotate(360deg)}.joe_aside__item.author .user .link{color:var(--theme);margin-bottom:10px;font-size:16px;font-weight:500}.joe_aside__item.author .user .link:hover{text-decoration:underline}.joe_aside__item.author .user .motto{color:var(--main);text-align:center}.joe_aside__item.author .count{width:100%;padding-bottom:15px;display:flex;align-items:center;border-bottom:1px solid var(--classC)}.joe_aside__item.author .count .item{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;color:var(--routine);font-size:12px}.joe_aside__item.author .count .item:first-child{border-right:1px solid var(--classC)}.joe_aside__item.author .count .item .num{max-width:70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;font-size:22px;color:var(--main);margin-bottom:3px;text-shadow:var(--text_shadow)}.joe_aside__item.author .list{padding-top:15px}.joe_aside__item.author .list .item{display:flex;align-items:center;justify-content:space-between;line-height:30px}.joe_aside__item.author .list .item .link{position:relative;color:var(--routine);max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.joe_aside__item.author .list .item .link::after{content:'';position:absolute;bottom:0;left:0;width:0;height:1px;background:var(--theme);transition:all 0.35s}.joe_aside__item.author .list .item .link:hover{color:var(--theme)}.joe_aside__item.author .list .item .link:hover::after{width:100%}.joe_aside__item.author .list .item .icon{fill:var(--routine)}.joe_aside__item.timelife{background:var(--background)}.joe_aside__item.timelife .item{margin-bottom:15px}.joe_aside__item.timelife .item:last-child{margin-bottom:0}.joe_aside__item.timelife .item .title{font-size:12px;color:var(--minor);margin-bottom:5px;display:flex;align-items:center}.joe_aside__item.timelife .item .title .text{color:var(--theme);font-weight:500;font-size:14px;margin:0 5px}.joe_aside__item.timelife .item .progress{display:flex;align-items:center}.joe_aside__item.timelife .item .progress-bar{height:10px;border-radius:5px;overflow:hidden;background:var(--classC);width:0;min-width:0;flex:1;margin-right:5px}.joe_aside__item.timelife .item .progress-bar-inner{width:0;height:100%;border-radius:5px;transition:width 0.35s;-webkit-animation:progress 750ms linear infinite;animation:progress 750ms linear infinite}.joe_aside__item.timelife .item .progress-bar-inner-0{background:#bde6ff;background-image:linear-gradient(135deg, #50bfff 25%, transparent 25%, transparent 50%, #50bfff 50%, #50bfff 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-bar-inner-1{background:#ffd980;background-image:linear-gradient(135deg, #f7ba2a 25%, transparent 25%, transparent 50%, #f7ba2a 50%, #f7ba2a 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-bar-inner-2{background:#ffa9a9;background-image:linear-gradient(135deg, #ff4949 25%, transparent 25%, transparent 50%, #ff4949 50%, #ff4949 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-bar-inner-3{background:#67c23a;background-image:linear-gradient(135deg, #4f9e28 25%, transparent 25%, transparent 50%, #4f9e28 50%, #4f9e28 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-percentage{color:var(--minor)}@-webkit-keyframes progress{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes progress{0%{background-position:0 0}100%{background-position:30px 0}} +.joe_dropdown{position:relative}.joe_dropdown__link{display:flex;align-items:center}.joe_dropdown__link-icon{transition:-webkit-transform 0.35s;transition:transform 0.35s;transition:transform 0.35s, -webkit-transform 0.35s}.joe_dropdown__menu{position:absolute;left:50%;visibility:hidden;z-index:999;border-top:3px solid var(--theme);-webkit-transform-origin:top;transform-origin:top;background:var(--background);box-shadow:0 0 10px rgba(0,0,0,0.15);border-radius:0 0 4px 4px;padding:10px 0;opacity:0;-webkit-transform:translateX(-50%) perspective(600px) rotateX(-45deg);transform:translateX(-50%) perspective(600px) rotateX(-45deg);transition:opacity 0.35s, visibility 0.35s, -webkit-transform 0.35s;transition:opacity 0.35s, visibility 0.35s, transform 0.35s;transition:opacity 0.35s, visibility 0.35s, transform 0.35s, -webkit-transform 0.35s}.joe_dropdown__menu::before{content:'';position:absolute;top:-10px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid var(--theme)}.joe_dropdown.active .joe_dropdown__link-icon{-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.joe_dropdown.active .joe_dropdown__menu{visibility:visible;opacity:1;-webkit-transform:translateX(-50%) perspective(600px) rotateX(0);transform:translateX(-50%) perspective(600px) rotateX(0)}.joe_header{position:-webkit-sticky;position:sticky;top:0;z-index:1000;background:var(--background);box-shadow:0 2px 10px 0 rgba(0,0,0,0.1)}.joe_header__above-logo{position:relative;display:flex;align-items:center;height:60px;padding-right:15px;margin-right:15px}.joe_header__above-logo img{max-width:150px;max-height:50px;-o-object-fit:cover;object-fit:cover}.joe_header__above-logo::after{content:'';position:absolute;top:50%;right:0;width:1px;height:20px;background:var(--classC);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.joe_header__above-nav{display:flex;align-items:center}.joe_header__above-nav .item{position:relative;height:60px;line-height:60px;font-size:15px;padding:0 8px;margin-right:15px;transition:color 0.35s;white-space:nowrap;color:var(--main)}.joe_header__above-nav .item:last-child{margin-right:0}.joe_header__above-nav .item::after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;transition:opacity 0.5s, -webkit-transform 0.5s;transition:opacity 0.5s, transform 0.5s;transition:opacity 0.5s, transform 0.5s, -webkit-transform 0.5s;border-radius:6px 6px 0 0;opacity:0;-webkit-transform:scaleX(0.25);transform:scaleX(0.25);background:var(--theme)}.joe_header__above-nav .item.active,.joe_header__above-nav .item:hover{color:var(--theme)}.joe_header__above-nav .item.active::after,.joe_header__above-nav .item:hover::after{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}.joe_header__above-nav .joe_dropdown__link a{height:60px;line-height:60px;font-size:15px;padding-left:8px;padding-right:3px;transition:color 0.35s;white-space:nowrap;color:var(--main)}.joe_header__above-nav .joe_dropdown__menu{width:110px;text-align:center}.joe_header__above-nav .joe_dropdown__menu a{display:block;line-height:34px;height:34px;transition:color 0.35s, background 0.35s;color:var(--minor);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 15px}.joe_header__above-nav .joe_dropdown__menu a:hover,.joe_header__above-nav .joe_dropdown__menu a.active{color:var(--theme);background:var(--classD)}.joe_header__above-search{position:relative;margin-left:auto;display:flex;align-items:center}.joe_header__above-search .input{background:var(--classC);width:170px;height:34px;border:1px solid transparent;padding:0 18px;color:var(--routine);transition:background 0.35s, border-color 0.35s, padding-right 0.35s;border-radius:17px 0 0 17px}.joe_header__above-search .input:focus{background:var(--background);border-color:var(--theme);padding-right:28px}.joe_header__above-search .input:focus ~ .icon{-webkit-transform:translate3d(0, -50%, 0) rotateY(180deg);transform:translate3d(0, -50%, 0) rotateY(180deg)}.joe_header__above-search .submit{position:relative;z-index:1;height:34px;border:none;background:var(--theme);color:#fff;border-radius:0 17px 17px 0;padding:0 10px}.joe_header__above-search .icon{position:absolute;top:50%;left:142px;width:28px;height:38px;background:url(../img/search.png);background-size:100% 100%;transition:-webkit-transform 0.35s;transition:transform 0.35s;transition:transform 0.35s, -webkit-transform 0.35s;-webkit-transform:translate3d(100%, -50%, 0) rotateY(180deg);transform:translate3d(100%, -50%, 0) rotateY(180deg)}.joe_header__below{border-top:1px solid var(--classC);height:45px}.joe_header__below-class{display:flex}.joe_header__below-class .item{margin-right:15px;color:var(--minor);height:45px;line-height:45px;transition:color 0.35s;white-space:nowrap}.joe_header__below-class .item:hover,.joe_header__below-class .item.active{color:var(--theme)}.joe_header__below-class .joe_dropdown{margin-right:15px}.joe_header__below-class .joe_dropdown__link .item{margin-right:3px}.joe_header__below-class .joe_dropdown__menu{width:110px;text-align:center}.joe_header__below-class .joe_dropdown__menu a{display:block;height:34px;line-height:34px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--minor);transition:color 0.35s, background 0.35s}.joe_header__below-class .joe_dropdown__menu a:hover,.joe_header__below-class .joe_dropdown__menu a.active{color:var(--theme);background:var(--classD)}.joe_aside{padding:15px 0;margin-left:15px}.joe_aside__item{position:relative;width:250px;margin-bottom:15px;border-radius:8px;box-shadow:var(--box-shadow);overflow:hidden}.joe_aside__item:last-child{position:-webkit-sticky;position:sticky;margin-bottom:0}.joe_aside__item-title{display:flex;align-items:center;border-bottom:1px solid var(--classC);font-size:16px;font-weight:500;height:45px;line-height:45px;padding:0 15px;color:var(--main)}.joe_aside__item-title .icon{width:18px;height:18px;margin-right:8px;fill:var(--main)}.joe_aside__item-title .line{width:10px;height:1px;background:#54b5db;margin-left:12px}.joe_aside__item-contain{position:relative;padding:15px}.joe_aside__item.author{background:var(--background);padding:45px 15px 15px}.joe_aside__item.author::before{content:'';position:absolute;top:90px;left:0;width:100%;height:30px;z-index:2;background:linear-gradient(to bottom, rgba(255,255,255,0), var(--background))}.joe_aside__item.author::after{display:none;content:'';position:absolute;top:0;left:0;width:100%;height:273px;background:url("https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/img/snow.gif") no-repeat;background-size:cover;z-index:3;pointer-events:none}.joe_aside__item.author:hover::after{display:block}.joe_aside__item.author .image{position:absolute;top:0;left:0;width:100%;height:120px;-o-object-fit:cover;object-fit:cover;z-index:1}.joe_aside__item.author .user{position:relative;z-index:4;display:flex;flex-direction:column;align-items:center;padding-bottom:15px}.joe_aside__item.author .user .avatar{width:75px;height:75px;border-radius:50%;overflow:hidden;margin-bottom:10px;-o-object-fit:cover;object-fit:cover;transition:-webkit-transform 0.75s;transition:transform 0.75s;transition:transform 0.75s, -webkit-transform 0.75s;background:var(--background);padding:5px}.joe_aside__item.author .user .avatar:hover{-webkit-transform:rotate(360deg);transform:rotate(360deg)}.joe_aside__item.author .user .link{color:var(--theme);margin-bottom:10px;font-size:16px;font-weight:500}.joe_aside__item.author .user .link:hover{text-decoration:underline}.joe_aside__item.author .user .motto{color:var(--main);text-align:center}.joe_aside__item.author .count{width:100%;padding-bottom:15px;display:flex;align-items:center;border-bottom:1px solid var(--classC)}.joe_aside__item.author .count .item{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;color:var(--routine);font-size:12px}.joe_aside__item.author .count .item:first-child{border-right:1px solid var(--classC)}.joe_aside__item.author .count .item .num{max-width:70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;font-size:22px;color:var(--main);margin-bottom:3px;text-shadow:var(--text_shadow)}.joe_aside__item.author .list{padding-top:15px}.joe_aside__item.author .list .item{display:flex;align-items:center;justify-content:space-between;line-height:30px}.joe_aside__item.author .list .item .link{position:relative;color:var(--routine);max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.joe_aside__item.author .list .item .link::after{content:'';position:absolute;bottom:0;left:0;width:0;height:1px;background:var(--theme);transition:all 0.35s}.joe_aside__item.author .list .item .link:hover{color:var(--theme)}.joe_aside__item.author .list .item .link:hover::after{width:100%}.joe_aside__item.author .list .item .icon{fill:var(--routine)}.joe_aside__item.timelife{background:var(--background)}.joe_aside__item.timelife .item{margin-bottom:15px}.joe_aside__item.timelife .item:last-child{margin-bottom:0}.joe_aside__item.timelife .item .title{font-size:12px;color:var(--minor);margin-bottom:5px;display:flex;align-items:center}.joe_aside__item.timelife .item .title .text{color:var(--theme);font-weight:500;font-size:14px;margin:0 5px}.joe_aside__item.timelife .item .progress{display:flex;align-items:center}.joe_aside__item.timelife .item .progress-bar{height:10px;border-radius:5px;overflow:hidden;background:var(--classC);width:0;min-width:0;flex:1;margin-right:5px}.joe_aside__item.timelife .item .progress-bar-inner{width:0;height:100%;border-radius:5px;transition:width 0.35s;-webkit-animation:progress 750ms linear infinite;animation:progress 750ms linear infinite}.joe_aside__item.timelife .item .progress-bar-inner-0{background:#bde6ff;background-image:linear-gradient(135deg, #50bfff 25%, transparent 25%, transparent 50%, #50bfff 50%, #50bfff 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-bar-inner-1{background:#ffd980;background-image:linear-gradient(135deg, #f7ba2a 25%, transparent 25%, transparent 50%, #f7ba2a 50%, #f7ba2a 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-bar-inner-2{background:#ffa9a9;background-image:linear-gradient(135deg, #ff4949 25%, transparent 25%, transparent 50%, #ff4949 50%, #ff4949 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-bar-inner-3{background:#67c23a;background-image:linear-gradient(135deg, #4f9e28 25%, transparent 25%, transparent 50%, #4f9e28 50%, #4f9e28 75%, transparent 75%, transparent 100%);background-size:30px 30px}.joe_aside__item.timelife .item .progress-percentage{color:var(--minor)}.joe_aside__item.weather{background:var(--background)}.joe_aside__item.weather .joe_aside__item-contain{min-height:300px}.joe_aside__item.hot{background:var(--background)}.joe_aside__item.hot .empty{text-align:center;color:var(--routine)}@-webkit-keyframes progress{0%{background-position:0 0}100%{background-position:30px 0}}@keyframes progress{0%{background-position:0 0}100%{background-position:30px 0}} diff --git a/assets/css/joe.global.scss b/assets/css/joe.global.scss index ecd9808..e35f372 100644 --- a/assets/css/joe.global.scss +++ b/assets/css/joe.global.scss @@ -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); + } + } } } diff --git a/assets/img/lazyload.jpg b/assets/img/lazyload.jpg new file mode 100644 index 0000000..d80891f Binary files /dev/null and b/assets/img/lazyload.jpg differ diff --git a/assets/js/joe.global.js b/assets/js/joe.global.js index 9896bc2..ec68a3b 100644 --- a/assets/js/joe.global.js +++ b/assets/js/joe.global.js @@ -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 () { `; }); - $('.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 } }; } }; diff --git a/core/core.php b/core/core.php index bca76e7..7ed2a58 100644 --- a/core/core.php +++ b/core/core.php @@ -7,6 +7,7 @@ function _getVersion() }; timerStart(); + function timerStart() { global $timeStart; @@ -14,6 +15,7 @@ function timerStart() $timeStart = $mTime[1] + $mTime[0]; return true; } + function timerStop($precision = 3) { global $timeStart, $timeEnd; @@ -42,6 +44,29 @@ function _getAsideAuthorMotto() echo $JMottoRandom[array_rand($JMottoRandom, 1)]; } +function _getThumbnail($item) +{ + $randomThumb = 'https://cdn.jsdelivr.net/npm/typecho_joe_theme@4.3.5/assets/img/random/' . rand(1, 25) . '.webp'; + $custom_thumbnail = Helper::options()->JThumbnail; + if ($custom_thumbnail) { + $custom_thumbnail_arr = explode("\r\n", $custom_thumbnail); + $randomThumb = $custom_thumbnail_arr[array_rand($custom_thumbnail_arr, 1)] . "?key=" . mt_rand(0, 1000000); + } + $pattern = '/\]*>/i'; + $patternMD = '/\!\[.*?\]\((http(s)?:\/\/.*?(jpg|jpeg|gif|png|webp))/i'; + $patternMDfoot = '/\[.*?\]:\s*(http(s)?:\/\/.*?(jpg|jpeg|gif|png|webp))/i'; + if ($item->fields->thumb) { + $randomThumb = $item->fields->thumb; + } elseif (preg_match_all($pattern, $item->content, $thumbUrl)) { + $randomThumb = $thumbUrl[1][0]; + } elseif (preg_match_all($patternMD, $item->content, $thumbUrl)) { + $randomThumb = $thumbUrl[1][0]; + } elseif (preg_match_all($patternMDfoot, $item->content, $thumbUrl)) { + $randomThumb = $thumbUrl[1][0]; + } + echo $randomThumb; +} + function _getAsideAuthorNav() { if (Helper::options()->JAside_Author_Nav !== "off") { @@ -55,9 +80,9 @@ function _getAsideAuthorNav() $result = $db->fetchAll( $db->select() ->from('table.contents') - ->where('status = ?', 'publish') - ->where('type = ?', 'post') - ->where('password IS NULL') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.type = ?', 'post') + ->where("table.contents.password IS NULL OR table.contents.password = ''") ->limit(Helper::options()->JAside_Author_Nav) ->order($order_by) ); @@ -92,4 +117,35 @@ function themeFields($layout) 注意:只有在外观设置侧边栏开启状态下生效' ); $layout->addItem($aside); + + $thumb = new Typecho_Widget_Helper_Form_Element_Textarea( + 'thumb', + NULL, + NULL, + '自定义文章缩略图', + '填写时:将会显示填写的文章缩略图
+ 不填写时:
+ 1、若文章有图片则取文章内图片
+ 2、若文章无图片,并且外观设置里未填写·自定义缩略图·选项,则取模板自带图片
+ 3、若文章无图片,并且外观设置里填写了·自定义缩略图·选项,则取自定义缩略图图片' + ); + $layout->addItem($thumb); +} + +class Widget_Contents_Hot extends Widget_Abstract_Contents +{ + public function execute() + { + $this->parameter->setDefault(array('pageSize' => 10)); + $this->db->fetchAll( + $this->select()->from('table.contents') + ->where("table.contents.password IS NULL OR table.contents.password = ''") + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created <= ?', time()) + ->where('table.contents.type = ?', 'post') + ->limit($this->parameter->pageSize) + ->order('table.contents.views', Typecho_Db::SORT_DESC), + array($this, 'push') + ); + } } diff --git a/functions.php b/functions.php index f14d6df..59b5a03 100644 --- a/functions.php +++ b/functions.php @@ -80,6 +80,8 @@ function themeConfig($form) array( 'author' => '作者栏', 'timelife' => '计时栏', + 'weather' => '天气栏(需先在下方填写KEY值)', + 'hot' => '热门文章栏' ), null, '选择首页需要显示的侧边栏栏目', @@ -141,4 +143,76 @@ function themeConfig($form) ); $JAside_Author_Nav->setAttribute('class', 'joe_content joe_aside'); $form->addInput($JAside_Author_Nav->multiMode()); + + $JAside_Weather_Key = new Typecho_Widget_Helper_Form_Element_Textarea( + 'JAside_Weather_Key', + NULL, + NULL, + '天气栏 —— 天气KEY值', + '介绍:用于初始化天气栏
+ 注意:填写时请填写正确的KEY值!
+ 其他:免费申请地址:cj.weather.com.cn' + ); + $JAside_Weather_Key->setAttribute('class', 'joe_content joe_aside'); + $form->addInput($JAside_Weather_Key); + + $JAside_Weather_Style = new Typecho_Widget_Helper_Form_Element_Select( + 'JAside_Weather_Style', + array( + '1' => '自动(默认)', + '2' => '浅色', + '3' => '深色' + ), + '1', + '天气栏 —— 天气风格样式', + '介绍:选择一款您所喜爱的天气风格
+ 注意:需要先填写天气的KEY值' + ); + $JAside_Weather_Style->setAttribute('class', 'joe_content joe_aside'); + $form->addInput($JAside_Weather_Style->multiMode()); + + $JAside_Hot_Num = new Typecho_Widget_Helper_Form_Element_Select( + 'JAside_Hot_Num', + array( + '3' => '显示3条(默认)', + '4' => '显示4条', + '5' => '显示5条', + '6' => '显示6条', + '7' => '显示7条', + '8' => '显示8条', + '9' => '显示9条', + '10' => '显示10条', + ), + '3', + '热门文章栏 —— 文章数', + '介绍:用于控制热门文章栏目的数量' + ); + $JAside_Hot_Num->setAttribute('class', 'joe_content joe_aside'); + $form->addInput($JAside_Hot_Num->multiMode()); + + $JThumbnail = new Typecho_Widget_Helper_Form_Element_Textarea( + 'JThumbnail', + NULL, + NULL, + '自定义缩略图(非必填)', + '介绍:用于修改主题默认缩略图
+ 格式:图片地址,一行一个
+ 注意:不填写时,则使用主题内置的默认缩略图 + ' + ); + $JThumbnail->setAttribute('class', 'joe_content joe_image'); + $form->addInput($JThumbnail); + + $JLazyload = new Typecho_Widget_Helper_Form_Element_Textarea( + 'JLazyload', + NULL, + "https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/img/lazyload.jpg", + '自定义缩略图(非必填)', + '介绍:用于修改主题默认缩略图
+ 格式:图片地址,一行一个
+ 注意:不填写时,则使用主题内置的默认缩略图 + ' + ); + $JLazyload->setAttribute('class', 'joe_content joe_image'); + $form->addInput($JLazyload); } ?> \ No newline at end of file diff --git a/public/aside.php b/public/aside.php index 0164265..0258f95 100644 --- a/public/aside.php +++ b/public/aside.php @@ -29,16 +29,64 @@ options->JAside)) : ?>
-

+
人生倒计时 -

+
+ + options->JAside)) : ?> +
+
+ + + + + 热门文章 + +
+ widget('Widget_Contents_Hot', 'pageSize=' . $this->options->JAside_Hot_Num)->to($item); ?> +
    + have()) : ?> + next()) : ?> +
  1. + + + <?php $item->title() ?> +
    +
    title() ?>
    + 阅读 - date('m/d'); ?> +
    +
    +
  2. + + +
  3. 这个博主很懒!
  4. + +
+
+ + + options->JAside) && $this->options->JAside_Weather_Key) : ?> +
+
+ + + + + 今日天气 + +
+
+
+
+
+ \ No newline at end of file diff --git a/public/include.php b/public/include.php index 4efe1a4..bdac472 100644 --- a/public/include.php +++ b/public/include.php @@ -9,6 +9,8 @@ + - \ No newline at end of file + + \ No newline at end of file