{"id":183,"date":"2026-04-18T16:37:16","date_gmt":"2026-04-18T08:37:16","guid":{"rendered":"https:\/\/tweakl.com\/?page_id=183"},"modified":"2026-04-19T11:54:35","modified_gmt":"2026-04-19T03:54:35","slug":"%e5%9c%a8%e7%ba%bf%e6%96%87%e6%9c%ac%e6%a1%86","status":"publish","type":"page","link":"https:\/\/tweakl.com\/index.php\/%e5%9c%a8%e7%ba%bf%e6%96%87%e6%9c%ac%e6%a1%86\/","title":{"rendered":"\u5728\u7ebf\u4fbf\u5229\u8d34"},"content":{"rendered":"\n    <div class=\"sticky-notes-wrap\">\n                <div style=\"padding:12px;background:#f9f9f9;border-radius:10px;margin-bottom:25px;text-align:center;color:#666;\">\n            \u8bf7\u767b\u5f55\u540e\u53d1\u5e03\u3001\u5220\u9664\u4fbf\u5229\u8d34\n        <\/div>\n        \n        <div class=\"sticky-list\">\n                    <\/div>\n    <\/div>\n\n    <style>\n.sticky-notes-wrap {\n    max-width: 900px;\n    margin: 40px auto;\n    padding: 0 20px;\n}\n.sticky-form {\n    display: flex;\n    gap: 12px;\n    margin-bottom: 30px;\n    align-items: center;\n}\n\/* \u8f93\u5165\u6846\uff1a\u548c\u5bfc\u822a\u6a21\u5757\u5b8c\u5168\u4e00\u81f4 *\/\n.sticky-input {\n    flex: 1;\n    min-width: 140px;\n    padding: 12px 16px;\n    border-radius: 8px;\n    border: 1px solid #e8ddd0;\n    background: #fffbf5;\n    height: 48px;\n    font-size: 15px;\n}\n.sticky-input:focus {\n    outline: none;\n    border-color: #e8ddd0;\n    background: #fff;\n}\n\/* ========== \u4fee\u590d\uff1a\u6309\u94ae\u6587\u5b57\u4e0a\u4e0b\u5c45\u4e2d\uff08\u6838\u5fc3\u4fee\u6539\uff09 ========== *\/\n.sticky-btn {\n    background: linear-gradient(135deg, #e84393 0%, #9b59b6 100%);\n    color: #fff;\n    border: none;\n    padding: 12px 24px;\n    border-radius: 8px;\n    font-size: 15px;\n    height: 48px;\n    min-width: 100px;\n    cursor: pointer;\n    white-space: nowrap;\n    transition: all 0.2s;\n    \/* \u65b0\u589e\uff1a\u8ba9\u6587\u5b57\u5b8c\u7f8e\u5782\u76f4\u5c45\u4e2d *\/\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    line-height: 1;\n}\n.sticky-btn:hover {\n    opacity: 0.9;\n}\n\n.sticky-list {\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n    gap: 20px;\n}\n\n.sticky-item {\n    background: #fff;\n    padding: 20px;\n    border-radius: 14px;\n    border: 1px solid #eee;\n    box-shadow: 0 2px 8px rgba(0,0,0,0.04);\n    min-height: 140px;\n    display: flex;\n    flex-direction: column;\n    transition: all 0.2s ease;\n}\n.sticky-item:hover {\n    transform: translateY(-3px);\n    box-shadow: 0 8px 20px rgba(0,0,0,0.08);\n    border-color: #ddd;\n}\n\n.sticky-item p {\n    margin: 0 0 20px;\n    font-size: 15px;\n    line-height: 1.6;\n    color: #333;\n    flex: 1;\n    word-break: break-word;\n}\n\n.note-buttons {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    margin-top: auto;\n}\n\n.copy-btn {\n    background: #f5f5f5;\n    color: #333;\n    border: none;\n    padding: 6px 12px;\n    border-radius: 8px;\n    font-size: 13px;\n    cursor: pointer;\n    transition: all 0.2s;\n}\n.copy-btn:hover {\n    background: #eaeaea;\n}\n\n.delete-btn {\n    background: #f5f5f5;\n    color: #ff4757;\n    border: none;\n    padding: 6px 12px;\n    border-radius: 8px;\n    font-size: 13px;\n    cursor: pointer;\n    transition: all 0.2s;\n}\n.delete-btn:hover {\n    background: #ffeaea;\n}\n\n\/* \u6697\u8272\u6a21\u5f0f\u81ea\u52a8\u540c\u6b65 *\/\n.dark .sticky-input {\n    background: #111;\n    border-color: #444;\n    color: #eee;\n}\n.dark .sticky-item {\n    background: #1a1a1a;\n    border-color: #444;\n}\n.dark .sticky-item p {\n    color: #eee;\n}\n<\/style>\n\n    <script>\n    document.addEventListener('DOMContentLoaded', function(){\n        const ajaxUrl = 'https:\/\/tweakl.com\/wp-admin\/admin-ajax.php';\n\n        \/\/ \u590d\u5236\u529f\u80fd\n        document.querySelectorAll('.copy-btn').forEach(btn => {\n            btn.addEventListener('click', function(e){\n                e.preventDefault();\n                let content = this.dataset.content;\n                navigator.clipboard.writeText(content).then(() => {\n                    let t = this.innerText;\n                    this.innerText = '\u5df2\u590d\u5236';\n                    setTimeout(() => this.innerText = t, 1500);\n                });\n            });\n        });\n\n        \/\/ \u65e0\u5237\u65b0\u5220\u9664\uff08\u4e0d\u8df3\u52a8\uff09\n        document.querySelectorAll('.delete-btn').forEach(btn => {\n            btn.addEventListener('click', function(e){\n                e.preventDefault();\n                if(!confirm('\u786e\u5b9a\u5220\u9664\uff1f')) return;\n\n                const id = this.dataset.id;\n                const item = this.closest('.sticky-item');\n                \n                fetch(ajaxUrl, {\n                    method: 'POST',\n                    headers: {'Content-Type': 'application\/x-www-form-urlencoded'},\n                    body: 'action=delete_sticky_note&id=' + id\n                }).then(() => {\n                    item.remove();\n                });\n            });\n        });\n\n        \/\/ \u65e0\u5237\u65b0\u53d1\u5e03\uff08\u5b8c\u5168\u4e0d\u95ea\u4e0d\u8df3\uff09\n        const form = document.getElementById('sticky-form');\n        const input = document.getElementById('sticky-content');\n        if(form && input){\n            form.addEventListener('submit', function(e){\n                e.preventDefault();\n                const content = input.value.trim();\n                if(!content) return;\n\n                fetch(ajaxUrl, {\n                    method: 'POST',\n                    headers: {'Content-Type': 'application\/x-www-form-urlencoded'},\n                    body: 'action=add_sticky_note&content=' + encodeURIComponent(content)\n                }).then(() => {\n                    location.reload(); \/\/ \u8f7b\u5fae\u5237\u65b0\u4f46\u4f53\u9a8c\u6781\u7a33\uff0c\u4e5f\u53ef\u6539\u6210\u65e0DOM\u63d2\u5165\n                });\n            });\n        }\n    });\n    <\/script>\n\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-183","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/pages\/183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/comments?post=183"}],"version-history":[{"count":24,"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/pages\/183\/revisions"}],"predecessor-version":[{"id":227,"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/pages\/183\/revisions\/227"}],"wp:attachment":[{"href":"https:\/\/tweakl.com\/index.php\/wp-json\/wp\/v2\/media?parent=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}