From b774a07e1aba9c4d7af2a19b11cb2cab933abe05 Mon Sep 17 00:00:00 2001 From: roccotrip Date: Fri, 22 Nov 2024 00:17:59 -0500 Subject: [PATCH 1/5] only commit the build, not the start fix initialization logic add some js comments fixed issue with nonce verification add search bar logic for showing loading graphic add gsap animation dependency loading animation search functionality simplify loader add some commentary format scripts linting scripts --- assets/css/build/admin.css | 36 +++ assets/css/build/admin.css.map | 2 +- assets/css/build/index.css.map | 2 +- assets/css/src/admin/_theme_garden.scss | 36 +++ assets/js/build/theme-garden.asset.php | 2 +- assets/js/build/theme-garden.js | 2 +- .../src/components/theme-garden-filterbar.js | 164 ++++++++++ assets/js/src/components/theme-garden-list.js | 66 ++++ .../src/components/theme-garden-no-themes.js | 40 +++ .../js/src/components/theme-garden-store.js | 117 +++++++ assets/js/src/theme-garden.js | 54 +++- functions.php | 4 +- package-lock.json | 36 ++- package.json | 9 +- src/Plugin.php | 7 +- src/ThemeGarden.php | 301 ++++++------------ 16 files changed, 655 insertions(+), 223 deletions(-) create mode 100644 assets/js/src/components/theme-garden-filterbar.js create mode 100644 assets/js/src/components/theme-garden-list.js create mode 100644 assets/js/src/components/theme-garden-no-themes.js create mode 100644 assets/js/src/components/theme-garden-store.js diff --git a/assets/css/build/admin.css b/assets/css/build/admin.css index fd55287..1ab395d 100644 --- a/assets/css/build/admin.css +++ b/assets/css/build/admin.css @@ -240,4 +240,40 @@ body.admin-color-sunrise { #tumblr-no-themes { display: block; } + +#tumblr-loading-themes { + width: 100%; + height: 500px; + margin: 200px auto; + position: absolute; + top: 0; + left: 0; + z-index: 10000; +} + +.fade-left { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 200px; + background: linear-gradient(0.25turn, #f2f1e7, rgba(0, 0, 0, 0)); +} + +.fade-right { + position: absolute; + top: 0; + right: 0; + width: 40px; + height: 200px; + background: linear-gradient(0.25turn, rgba(0, 0, 0, 0), #f2f1e7); +} + +#tumblr-loading-stage { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 200px; +} /*# sourceMappingURL=admin.css.map */ \ No newline at end of file diff --git a/assets/css/build/admin.css.map b/assets/css/build/admin.css.map index 5b32c41..ca4f897 100644 --- a/assets/css/build/admin.css.map +++ b/assets/css/build/admin.css.map @@ -1 +1 @@ -{"version":3,"sources":["../src/admin/_theme_garden.scss","../src/admin.scss"],"names":[],"mappings":"AAEA;EACC,qBAAA;EACA,uBAAA;EACA,wBAAA;EACA,kBAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,oBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,eAAA;ACDD;;ADIA;EACC,qBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,eAAA;ACDD;;ADIA;EACC,aAAA;EACA,0BAAA;EACA,uBAAA;EACA,UAAA;EACA,cAAA;ACDD;;ADIA;EACC,WAAA;EACA,qBAAA;EACA,mBAAA;EACA,sBAAA;EACA,6CAAA;ACDD;ADGC;EACC,gDAAA;ACDF;ADIC;EACC,gDAAA;ACFF;ADKC;EACC,+CAAA;ACHF;ADMC;EACC,gDAAA;ACJF;;ADQA;EAEC;IACC,sCAAA;IACA,8BAAA;ECNA;AACF;ADSA;EAEC;IACC,kCAAA;IACA,8BAAA;ECRA;AACF;ADWA;EAEC;IACC,8BAAA;IACA,8BAAA;ECVA;AACF;ADaA;EACC,aAAA;EACA,uBAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,uBAAA;EACA,YAAA;ACXD;;ADcA;EACC,aAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,sBAAA;EACA,cAAA;EACA,uBAAA;ACXD;;ADcA;EACC,sCAAA;EACA,aAAA;EACA,kVACC;ACZF;;ADyBA;EACC,uBAAA;EACA,YAAA;EACA,oBAAA;EACA,mBAAA;EACA,qCAAA;EACA,kBAAA;ACtBD;;ADyBA;EACC,cAAA;EACA,kBAAA;EACA,sCAAA;EACA,wBAAA;EACA,YAAA;EACA,iBAAA;EACA,sBAAA;EACA,cAAA;EACA,gBAAA;EACA,6wBACC;ACvBF;;ADmDA;EACC,aAAA;EACA,yBAAA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;EACA,UAAA;EACA,WAAA;AChDD;;ADmDA;EACC,UAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;AChDD;;ADoDA;EACC,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,cAAA;EACA,mBAAA;EACA,kBAAA;EACA,qBAAA;EACA,sBAAA;EACA,4BAAA;EACA,mCAAA;EACA,6BAAA;ACjDD;;ADoDA;EACC,wJAAA;EASA,0BAAA;EACA,oCAAA;EACA,WAAA;ACzDD;;AD6DA;EACC,YAAA;AC1DD;;AD6DA;EACC,eAAA;AC1DD;;AD6DA;EACC;IACC,8BAAA;EC1DA;AACF;AD6DA;EACC,aAAA;EACA,mBAAA;AC3DD;;AD8DA;EACC,WAAA;EACA,cAAA;AC3DD;;AD8DA;EACC,iBAAA;EACA,gBAAA;EACA,kBAAA;AC3DD;;AD8DA;EACC,eAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,qDAAA;UAAA,6CAAA;EACA,wJAAA;AC3DD;;ADsEA;EACC,oCAAA;ACnED;;ADsEA;EACC,cAAA;ACnED","file":"admin.css","sourcesContent":["$buttonWidth: 70px;\n\nbody {\n\t--t3-primary: #49a2c4;\n\t--t3-secondary: #8eb2c0;\n\t--t3-background: #f1f1f1;\n\t--t3-text: #49a2c4;\n\t--t3-button-text: #fff;\n\t--t3-red: #f8c7c3;\n\t--t3-orange: #f8d8bf;\n\t--t3-yellow: #f0e794;\n\t--t3-green: #b9ebc8;\n\t--t3-violet: #d4caf7;\n}\n\nbody.admin-color-light {\n\t--t3-primary: #04a4cc;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #999;\n}\n\nbody.admin-color-modern {\n\t--t3-primary: #3858e9;\n\t--t3-text: #1e1e1e;\n}\n\nbody.admin-color-blue {\n\t--t3-primary: #4796b3;\n\t--t3-secondary: #74b6ce;\n\t--t3-text: #096484;\n}\n\nbody.admin-color-coffee {\n\t--t3-primary: #c7a589;\n\t--t3-secondary: #9ea476;\n\t--t3-text: #46403c;\n}\n\nbody.admin-color-ectoplasm {\n\t--t3-primary: #a3b745;\n\t--t3-secondary: #a3b745;\n\t--t3-text: #523f6d;\n}\n\nbody.admin-color-midnight {\n\t--t3-primary: #e14d43;\n\t--t3-secondary: #363b3f;\n\t--t3-text: #25282b;\n}\n\nbody.admin-color-ocean {\n\t--t3-primary: #9ebaa0;\n\t--t3-secondary: #738e96;\n\t--t3-text: #627c83;\n}\n\nbody.admin-color-sunrise {\n\t--t3-primary: #dd823b;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #000;\n}\n\n.tumblr-themes {\n\tdisplay: grid;\n\tgrid-template-columns: 95%;\n\tjustify-content: center;\n\twidth: 98%;\n\tmargin: 0 auto;\n}\n\n.tumblr-theme {\n\twidth: 100%;\n\tcolor: var(--t3-text);\n\tmargin-bottom: 40px;\n\tfont-family: monospace;\n\tfilter: drop-shadow(-8px 8px 0 var(--t3-red));\n\n\t&:nth-child(5n + 2) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-orange));\n\t}\n\n\t&:nth-child(5n + 3) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-yellow));\n\t}\n\n\t&:nth-child(5n + 4) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-green));\n\t}\n\n\t&:nth-child(5n + 5) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-violet));\n\t}\n}\n\n@media screen and (min-width: 1601px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 22% 22% 22% 22%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 1301px) and (max-width: 1600px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 30% 30% 30%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 730px) and (max-width: 1300px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 47% 47%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n.tumblr-theme-header {\n\tdisplay: flex;\n\talign-items: flex-start;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: -8px;\n\twidth: calc(100% + 8px);\n\theight: 26px;\n}\n\n.tumblr-theme-title-wrapper {\n\tflex: initial;\n\tdisplay: block;\n\tposition: relative;\n\tmargin-left: 4px;\n\tpadding: 4px 4px 0 4px;\n\tmax-width: 80%;\n\ttext-overflow: ellipsis;\n}\n\n.tumblr-theme-content {\n\tbackground-color: var(--t3-background);\n\tpadding: 10px;\n\tbox-shadow:\n\t\t-2px -2px 0 0 var(--t3-background),\n\t\t0 -2px 0 0 var(--t3-background),\n\t\t-2px 0 0 0 var(--t3-background),\n\t\t0 2px 0 0 var(--t3-background),\n\t\t2px 0 0 0 var(--t3-background),\n\t\t0 0 0 2px var(--t3-text),\n\t\t-4px -4px 0 0 var(--t3-text),\n\t\t0 -4px 0 0 var(--t3-text),\n\t\t-4px 0 0 0 var(--t3-text),\n\t\t0 4px 0 0 var(--t3-text),\n\t\t4px 0 0 0 var(--t3-text);\n}\n\n.tumblr-theme-thumbnail {\n\twidth: calc(100% - 4px);\n\theight: auto;\n\taspect-ratio: 100/67;\n\tobject-fit: contain;\n\tborder: 2px solid var(--t3-secondary);\n\tborder-radius: 4px;\n}\n\n.tumblr-theme-title {\n\tdisplay: block;\n\tposition: relative;\n\tbackground-color: var(--t3-background);\n\tpadding: 3px 12px 0 10px;\n\theight: 18px;\n\tline-height: 18px;\n\tfont-family: monospace;\n\tfont-size: 1em;\n\tfont-weight: 700;\n\tbox-shadow:\n\t\t-2px 4px 0 var(--t3-background),\n\t\t0 -2px 0 var(--t3-background),\n\t\t-2px 0 0 var(--t3-background),\n\t\t2px 0 0 var(--t3-background),\n\t\t4px 2px 0 var(--t3-background),\n\t\t6px 4px 0 var(--t3-background),\n\t\t8px 6px 0 var(--t3-background),\n\t\t10px 8px 0 var(--t3-background),\n\t\t12px 10px 0 var(--t3-background),\n\t\t14px 12px 0 var(--t3-background),\n\t\t16px 14px 0 var(--t3-background),\n\t\t18px 16px 0 var(--t3-background),\n\t\t20px 18px 0 var(--t3-background),\n\t\t-4px 0 0 var(--t3-text),\n\t\t0 -4px 0 var(--t3-text),\n\t\t-2px -2px 0 var(--t3-text),\n\t\t2px -2px 0 var(--t3-text),\n\t\t4px 0 0 var(--t3-text),\n\t\t6px 2px 0 var(--t3-text),\n\t\t8px 4px 0 var(--t3-text),\n\t\t10px 6px 0 var(--t3-text),\n\t\t12px 8px 0 var(--t3-text),\n\t\t14px 10px 0 var(--t3-text),\n\t\t16px 12px 0 var(--t3-text),\n\t\t18px 14px 0 var(--t3-text),\n\t\t20px 16px 0 var(--t3-text);\n}\n\n.tumblr-theme-buttons {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 10px 0 0;\n\tpadding: 0;\n\twidth: 100%;\n}\n\n.tumblr-theme-buttons li {\n\tflex: none;\n\tdisplay: block;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: 10px;\n\tborder-radius: 4px;\n}\n\n\n.tumblr-theme-buttons li a {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\twidth: 90px;\n\tline-height: 24px;\n\tfont-size: 1em;\n\twhite-space: nowrap;\n\ttext-align: center;\n\ttext-decoration: none;\n\tborder-radius: inherit;\n\tcolor: var(--t3-button-text);\n\tborder: 1px solid var(--t3-primary);\n\tbackground: var(--t3-primary);\n}\n\n.tumblr-theme-buttons li a:hover {\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n\tbackground-size: 90px 100%;\n\tanimation: play 1.5s linear infinite;\n\tcolor: #000;\n}\n\n\n#t3-categories {\n\tmargin: 10px;\n}\n\n#t3-category-select-form {\n\tdisplay: inline;\n}\n\n@keyframes play {\n\t100% {\n\t\tbackground-position: -90px top;\n\t}\n}\n\n#theme-garden-heading {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.tumblr-logo-icon {\n\twidth: 30px;\n\tmargin: 0 12px;\n}\n\n.tumblr-theme-garden-list-item {\n\tpadding: 4px 10px;\n\tbackground: #000;\n\tborder-radius: 6px;\n}\n\n.tumblr-theme-garden-link {\n\tcursor: pointer;\n\tborder: none;\n\toutline: none;\n\twidth: 80px;\n\theight: 16px;\n\tmask-image: url(../../images/tumblr-logo.png) ;\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n}\n\n.tumblr-theme-garden-link:hover {\n\tanimation: play 1.5s linear infinite;\n}\n\n#tumblr-no-themes {\n\tdisplay: block;\n}\n","@import \"admin/theme_garden\";\n"]} \ No newline at end of file +{"version":3,"sources":["../src/admin/_theme_garden.scss","../src/admin.scss"],"names":[],"mappings":"AAEA;EACC,qBAAA;EACA,uBAAA;EACA,wBAAA;EACA,kBAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,oBAAA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C,aAAA;EACA,yBAAA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;EACA,UAAA;EACA,WAAA;AChDD;;ADmDA;EACC,UAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;AChDD;;ADoDA;EACC,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,cAAA;EACA,mBAAA;EACA,kBAAA;EACA,qBAAA;EACA,sBAAA;EACA,4BAAA;EACA,mCAAA;EACA,6BAAA;ACjDD;;ADoDA;EACC,wJAAA;EASA,0BAAA;EACA,oCAAA;EACA,WAAA;ACzDD;;AD6DA;EACC,YAAA;AC1DD;;AD6DA;EACC,eAAA;AC1DD;;AD6DA;EACC;IACC,8BAAA;EC1DA;AACF;AD6DA;EACC,aAAA;EACA,mBAAA;AC3DD;;AD8DA;EACC,WAAA;EACA,cAAA;AC3DD;;AD8DA;EACC,iBAAA;EACA,gBAAA;EACA,kBAAA;AC3DD;;AD8DA;EACC,eAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,qDAAA;UAAA,6CAAA;EACA,wJAAA;AC3DD;;ADsEA;EACC,oCAAA;ACnED;;ADsEA;EACC,cAAA;ACnED;;ADsEA;EACC,WAAA;EACA,aAAA;EACA,kBAAA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,cAAA;ACnED;;ADsEA;EACC,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;EACA,gEAAA;ACnED;;ADsEA;EACC,kBAAA;EACA,MAAA;EACA,QAAA;EACA,WAAA;EACA,aAAA;EACA,gEAAA;ACnED;;ADsEA;EACC,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;ACnED","file":"admin.css","sourcesContent":["$buttonWidth: 70px;\n\nbody {\n\t--t3-primary: #49a2c4;\n\t--t3-secondary: #8eb2c0;\n\t--t3-background: #f1f1f1;\n\t--t3-text: #49a2c4;\n\t--t3-button-text: #fff;\n\t--t3-red: #f8c7c3;\n\t--t3-orange: #f8d8bf;\n\t--t3-yellow: #f0e794;\n\t--t3-green: #b9ebc8;\n\t--t3-violet: #d4caf7;\n}\n\nbody.admin-color-light {\n\t--t3-primary: #04a4cc;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #999;\n}\n\nbody.admin-color-modern {\n\t--t3-primary: #3858e9;\n\t--t3-text: #1e1e1e;\n}\n\nbody.admin-color-blue {\n\t--t3-primary: #4796b3;\n\t--t3-secondary: #74b6ce;\n\t--t3-text: #096484;\n}\n\nbody.admin-color-coffee {\n\t--t3-primary: #c7a589;\n\t--t3-secondary: #9ea476;\n\t--t3-text: #46403c;\n}\n\nbody.admin-color-ectoplasm {\n\t--t3-primary: #a3b745;\n\t--t3-secondary: #a3b745;\n\t--t3-text: #523f6d;\n}\n\nbody.admin-color-midnight {\n\t--t3-primary: #e14d43;\n\t--t3-secondary: #363b3f;\n\t--t3-text: #25282b;\n}\n\nbody.admin-color-ocean {\n\t--t3-primary: #9ebaa0;\n\t--t3-secondary: #738e96;\n\t--t3-text: #627c83;\n}\n\nbody.admin-color-sunrise {\n\t--t3-primary: #dd823b;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #000;\n}\n\n.tumblr-themes {\n\tdisplay: grid;\n\tgrid-template-columns: 95%;\n\tjustify-content: center;\n\twidth: 98%;\n\tmargin: 0 auto;\n}\n\n.tumblr-theme {\n\twidth: 100%;\n\tcolor: var(--t3-text);\n\tmargin-bottom: 40px;\n\tfont-family: monospace;\n\tfilter: drop-shadow(-8px 8px 0 var(--t3-red));\n\n\t&:nth-child(5n + 2) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-orange));\n\t}\n\n\t&:nth-child(5n + 3) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-yellow));\n\t}\n\n\t&:nth-child(5n + 4) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-green));\n\t}\n\n\t&:nth-child(5n + 5) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-violet));\n\t}\n}\n\n@media screen and (min-width: 1601px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 22% 22% 22% 22%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 1301px) and (max-width: 1600px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 30% 30% 30%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 730px) and (max-width: 1300px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 47% 47%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n.tumblr-theme-header {\n\tdisplay: flex;\n\talign-items: flex-start;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: -8px;\n\twidth: calc(100% + 8px);\n\theight: 26px;\n}\n\n.tumblr-theme-title-wrapper {\n\tflex: initial;\n\tdisplay: block;\n\tposition: relative;\n\tmargin-left: 4px;\n\tpadding: 4px 4px 0 4px;\n\tmax-width: 80%;\n\ttext-overflow: ellipsis;\n}\n\n.tumblr-theme-content {\n\tbackground-color: var(--t3-background);\n\tpadding: 10px;\n\tbox-shadow:\n\t\t-2px -2px 0 0 var(--t3-background),\n\t\t0 -2px 0 0 var(--t3-background),\n\t\t-2px 0 0 0 var(--t3-background),\n\t\t0 2px 0 0 var(--t3-background),\n\t\t2px 0 0 0 var(--t3-background),\n\t\t0 0 0 2px var(--t3-text),\n\t\t-4px -4px 0 0 var(--t3-text),\n\t\t0 -4px 0 0 var(--t3-text),\n\t\t-4px 0 0 0 var(--t3-text),\n\t\t0 4px 0 0 var(--t3-text),\n\t\t4px 0 0 0 var(--t3-text);\n}\n\n.tumblr-theme-thumbnail {\n\twidth: calc(100% - 4px);\n\theight: auto;\n\taspect-ratio: 100/67;\n\tobject-fit: contain;\n\tborder: 2px solid var(--t3-secondary);\n\tborder-radius: 4px;\n}\n\n.tumblr-theme-title {\n\tdisplay: block;\n\tposition: relative;\n\tbackground-color: var(--t3-background);\n\tpadding: 3px 12px 0 10px;\n\theight: 18px;\n\tline-height: 18px;\n\tfont-family: monospace;\n\tfont-size: 1em;\n\tfont-weight: 700;\n\tbox-shadow:\n\t\t-2px 4px 0 var(--t3-background),\n\t\t0 -2px 0 var(--t3-background),\n\t\t-2px 0 0 var(--t3-background),\n\t\t2px 0 0 var(--t3-background),\n\t\t4px 2px 0 var(--t3-background),\n\t\t6px 4px 0 var(--t3-background),\n\t\t8px 6px 0 var(--t3-background),\n\t\t10px 8px 0 var(--t3-background),\n\t\t12px 10px 0 var(--t3-background),\n\t\t14px 12px 0 var(--t3-background),\n\t\t16px 14px 0 var(--t3-background),\n\t\t18px 16px 0 var(--t3-background),\n\t\t20px 18px 0 var(--t3-background),\n\t\t-4px 0 0 var(--t3-text),\n\t\t0 -4px 0 var(--t3-text),\n\t\t-2px -2px 0 var(--t3-text),\n\t\t2px -2px 0 var(--t3-text),\n\t\t4px 0 0 var(--t3-text),\n\t\t6px 2px 0 var(--t3-text),\n\t\t8px 4px 0 var(--t3-text),\n\t\t10px 6px 0 var(--t3-text),\n\t\t12px 8px 0 var(--t3-text),\n\t\t14px 10px 0 var(--t3-text),\n\t\t16px 12px 0 var(--t3-text),\n\t\t18px 14px 0 var(--t3-text),\n\t\t20px 16px 0 var(--t3-text);\n}\n\n.tumblr-theme-buttons {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 10px 0 0;\n\tpadding: 0;\n\twidth: 100%;\n}\n\n.tumblr-theme-buttons li {\n\tflex: none;\n\tdisplay: block;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: 10px;\n\tborder-radius: 4px;\n}\n\n\n.tumblr-theme-buttons li a {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\twidth: 90px;\n\tline-height: 24px;\n\tfont-size: 1em;\n\twhite-space: nowrap;\n\ttext-align: center;\n\ttext-decoration: none;\n\tborder-radius: inherit;\n\tcolor: var(--t3-button-text);\n\tborder: 1px solid var(--t3-primary);\n\tbackground: var(--t3-primary);\n}\n\n.tumblr-theme-buttons li a:hover {\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n\tbackground-size: 90px 100%;\n\tanimation: play 1.5s linear infinite;\n\tcolor: #000;\n}\n\n\n#t3-categories {\n\tmargin: 10px;\n}\n\n#t3-category-select-form {\n\tdisplay: inline;\n}\n\n@keyframes play {\n\t100% {\n\t\tbackground-position: -90px top;\n\t}\n}\n\n#theme-garden-heading {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.tumblr-logo-icon {\n\twidth: 30px;\n\tmargin: 0 12px;\n}\n\n.tumblr-theme-garden-list-item {\n\tpadding: 4px 10px;\n\tbackground: #000;\n\tborder-radius: 6px;\n}\n\n.tumblr-theme-garden-link {\n\tcursor: pointer;\n\tborder: none;\n\toutline: none;\n\twidth: 80px;\n\theight: 16px;\n\tmask-image: url(../../images/tumblr-logo.png) ;\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n}\n\n.tumblr-theme-garden-link:hover {\n\tanimation: play 1.5s linear infinite;\n}\n\n#tumblr-no-themes {\n\tdisplay: block;\n}\n\n#tumblr-loading-themes {\n\twidth: 100%;\n\theight: 500px;\n\tmargin: 200px auto;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 10000;\n}\n\n.fade-left {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 40px;\n\theight: 200px;\n\tbackground: linear-gradient(.25turn, #f2f1e7, #0000 )\n}\n\n.fade-right {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\twidth: 40px;\n\theight: 200px;\n\tbackground: linear-gradient(.25turn, #0000, #f2f1e7 )\n}\n\n#tumblr-loading-stage {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth:100%;\n\theight: 200px;\n}\n","@import \"admin/theme_garden\";\n"]} \ No newline at end of file diff --git a/assets/css/build/index.css.map b/assets/css/build/index.css.map index 7047c25..f23650e 100644 --- a/assets/css/build/index.css.map +++ b/assets/css/build/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["../src/index.scss%23sass","../src/frontend/_global.scss","../src/index.scss","../src/frontend/_text.scss","../src/frontend/_variables.scss","../src/frontend/_link.scss","../src/frontend/_video.scss","../src/frontend/_image.scss"],"names":[],"mappings":"AAAA,mIAAA;ACCC;ECCD,aAAA;AACA;ADEC;ECAD,aAAA;AACA;;ACDA;EACC,qDAAA;EACA,eAAA;ADID;;ACDA;EACC,6BAAA;EACA,eCoB4B;EDnB5B,kBCoB8B;AFhB/B;;ACDA;EACC,yCAAA;ADID;;ACDA;;EAEC,cCqDY;AFjDb;;ACDA;;EAEC,cCiDc;AF7Cf;;ACDA;;EAEC,cC6Cc;AFzCf;;ACDA;;EAEC,cCyCY;AFrCb;;ACDA;;EAEC,cCqCc;AFjCf;;ACDA;;EAEC,cCiCgB;AF7BjB;;ACDA;;EAEC,cC+Ba;AF3Bd;;ACDA;;EAEC,cCKwB;AFDzB;;ACDA;;EAEC,cCsBc;AFlBf;;AGvDA;EACC,mBAAA;EACA,uCAAA;EACA,kBAAA;EACA,aAAA;EACA,uBAAA;EACA,cAAA;EACA,gBAAA;AH0DD;AGxDC;EACC,cAAA;EACA,WAAA;EACA,qBAAA;AH0DF;AGvDC;EACC,eAAA;EACA,iBA1BkB;EA2BlB,iBAAA;EAvBD,gBAAA;EACA,uBAAA;EACA,uBAAA;AHiFD;AGvDC;EACC,oBAAA;AHyDF;AGtDC;EACC,mBAAA;EACA,2BAAA;E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;;;;;EAEC,eAAA;ALyLF","file":"index.css","sourcesContent":["/* https://github.tumblr.net/Tumblr/tumblr/tree/279a7aec5cb51960de9844af0546f142ff32012a/client/standalone/blog-network-npf/styles*/\n@import \"frontend/variables\";\n@import \"frontend/global\";\n@import \"frontend/text\";\n@import \"frontend/link\";\n@import \"frontend/video\";\n@import \"frontend/image\";\n","body {\n\t> .iframe-container {\n\t\tdisplay: none;\n\t}\n\n\tiframe[src*=\"https://www.tumblr.com/dashboard/iframe\"] {\n\t\tdisplay: none;\n\t}\n}","// https://github.tumblr.net/Tumblr/tumblr/tree/279a7aec5cb51960de9844af0546f142ff32012a/client/standalone/blog-network-npf/styles\n@import \"frontend/variables\";\n@import \"frontend/global\";\n@import \"frontend/text\";\n@import \"frontend/link\";\n@import \"frontend/video\";\n@import \"frontend/image\";\n","// NPF text block styles - namely, to add NPF colors.\n\n// Disabled SelectorFormat to use underscored selector names\n// scss-lint:disable SelectorFormat\n\np.npf_quote {\n\tfont-family: Georgia, Times, \"Times New Roman\", serif;\n\tfont-size: 23px;\n}\n\np.npf_quirky {\n\tfont-family: Fairwater, serif;\n\tfont-size: $font-size-post-text-quirky;\n\tline-height: $line-height-post-text-quirky;\n}\n\np.npf_chat {\n\tfont-family: \"Source Code Pro\", monospace;\n}\n\np.npf_color_joey,\nspan.npf_color_joey {\n\tcolor: $color-joey;\n}\n\np.npf_color_monica,\nspan.npf_color_monica {\n\tcolor: $color-monica;\n}\n\np.npf_color_phoebe,\nspan.npf_color_phoebe {\n\tcolor: $color-phoebe;\n}\n\np.npf_color_ross,\nspan.npf_color_ross {\n\tcolor: $color-ross;\n}\n\np.npf_color_rachel,\nspan.npf_color_rachel {\n\tcolor: $color-rachel;\n}\n\np.npf_color_chandler,\nspan.npf_color_chandler {\n\tcolor: $color-chandler;\n}\n\np.npf_color_niles,\nspan.npf_color_niles {\n\tcolor: $color-niles;\n}\n\np.npf_color_frasier,\nspan.npf_color_frasier {\n\tcolor: $color-frasier;\n}\n\np.npf_color_mr_big,\nspan.npf_color_mr_big {\n\tcolor: $color-mr-big;\n}\n","@use \"sass:math\";\n\n$post-full-width: 540px;\n$post-full-radius: 3px;\n$post-full-v-padding: 15px;\n$post-full-h-padding: 20px;\n$post-full-note-item-h-padding: 14px;\n$color-post-members-only: #900020;\n\n$font-size-content: 14px;\n$line-height-content: math.round(1.5 * $font-size-content);\n\n// those match NPF heading size better\n$font-size-content-heading1: 26px;\n$line-height-content-heading1: math.round(1.3 * $font-size-content-heading1);\n$font-size-content-heading2: 20px;\n$line-height-content-heading2: math.round(1.3 * $font-size-content-heading2);\n\n$font-size-content-heading-medium: 30px;\n$line-height-content-heading-medium: math.round(1.3 * $font-size-content-heading-medium);\n$font-size-content-heading-large: 36px;\n$line-height-content-heading-large: math.round(1.3 * $font-size-content-heading-large);\n\n$font-size-pre: 11px;\n$line-height-pre: $font-size-pre;\n\n$font-size-icon: 24px;\n$line-height-icon: 24px;\n\n$font-size-base: $font-size-content;\n$line-height-base: 1.4;\n\n$font-size-post-text-quirky: 24px;\n$line-height-post-text-quirky: 1.3em;\n\n// These omit `serif` and `sans-serf` to make it\n// possible to splice in additional fallbacks\n$font-family-sans-face: \"Helvetica Neue\", \"HelveticaNeue\", helvetica, arial;\n$font-family-serif-face: georgia, times, \"Times New Roman\";\n$font-family-monospace-face: courier;\n\n// Standard faces\n$font-family-sans: $font-family-sans-face, sans-serif;\n$font-family-serif: georgia, times, \"Times New Roman\", serif;\n$font-family-monospace: $font-family-monospace-face, monospace;\n$font-family-korean: $font-family-sans-face, \"AppleGothic\", \"Malgun Gothic\", \"Dotum\", \"Gulim\", sans-serif;\n\n// Named faces\n$font-family-gibson: \"Gibson\", $font-family-sans;\n$font-family-walsheim: \"Walsheim\", \"Helvetica Neue\", \"HelveticaNeue\", helvetica, arial, sans-serif;\n$font-family-franklin-medium: \"Franklin Gothic Medium\", $font-family-sans;\n$font-family-franklin-medium-condensed: \"Franklin Gothic Medium Condensed\", $font-family-sans;\n$font-family-franklin-compressed: \"Franklin Gothic Compressed\", $font-family-sans;\n$font-family-source-code-pro: \"Source Code Pro\", $font-family-monospace;\n\n// Default \"app\" font family\n$font-family-base: $font-family-sans;\n\n$color-white: #fff;\n$color-black: #000;\n$color-tumblr-black: #444;\n$color-tumblr-blue: #36465d;\n$color-tumblr-dark-blue: #001935;\n\n$color-dank-smoke: #9da6af;\n$color-gloomy-cloud: #748089;\n// The below have Neue Color variants\n$color-likable-red: #d95e40;\n$color-cheezbort: #f2992e;\n$color-always-sunny: #f7dd38;\n$color-reblog-green: #56bc8a;\n$color-neat-blue: #529ecc;\n$color-purple-rain: #a77dc2;\n\n// These replace old accent colors\n$color-joey: #ff492f; // Red\n$color-monica: #ff8a00; // Orange\n$color-phoebe: #e8d73a; // Yellow\n$color-ross: #00cf35; // Green\n$color-rachel: #00b8ff; // Light Blue\n$color-chandler: #7c5cff; // Purple\n// These are new\n$color-frasier: $color-tumblr-dark-blue; // Dark Blue, new brand color\n$color-niles: #ff62ce; // Pink\n$color-mr-big: #000c1a; // Off-Black\n$color-explicit-red: #ff4930; // project x red\n\n\n$color-gray-100: $color-tumblr-black; // #444444\n\n$color-gray-60: prima-mix($color-tumblr-black, 0.6); // #8f8f8f\n$color-gray-40: prima-mix($color-tumblr-black, 0.4); // #b4b4b4\n$color-gray-25: prima-mix($color-tumblr-black, 0.25); // #d0d0d0\n$color-gray-13: prima-mix($color-tumblr-black, 0.13); // #e7e7e7\n$color-gray-7: prima-mix($color-tumblr-black, 0.07); // #f2f2f2\n\n\n$color-gray-60-transparent: unmatte-gray($color-gray-60); // rgba(0, 0, 0, 0.439216)\n$color-gray-40-transparent: unmatte-gray($color-gray-40); // rgba(0, 0, 0, 0.294118)\n$color-gray-25-transparent: unmatte-gray($color-gray-25); // rgba(0, 0, 0, 0.184314)\n$color-gray-13-transparent: unmatte-gray($color-gray-13); // rgba(0, 0, 0, 0.0941176)\n$color-gray-7-transparent: unmatte-gray($color-gray-7); // rgba(0, 0, 0, 0.0509804)\n\n\n$color-white-60-transparent: prima-mix($color-white, 0.6, transparent); // rgba(255, 255, 255, 0.6);\n$color-white-40-transparent: prima-mix($color-white, 0.4, transparent); // rgba(255, 255, 255, 0.4);\n$color-white-25-transparent: prima-mix($color-white, 0.25, transparent); // rgba(255, 255, 255, 0.25);\n$color-white-13-transparent: prima-mix($color-white, 0.13, transparent); // rgba(255, 255, 255, 0.13);\n$color-white-7-transparent: prima-mix($color-white, 0.07, transparent); // rgba(255, 255, 255, 0.07);\n\n\n@mixin brandBlue($prop) {\n\t#{$prop}: $color-tumblr-dark-blue;\n}\n\n@mixin brandBlueGray($prop, $percent) {\n\t#{$prop}: prima-mix($color-white, 1 - $percent, $color-tumblr-dark-blue);\n}\n\n@mixin transparentBrandBlue($prop, $opacity) {\n\t#{$prop}: rgba($color-tumblr-dark-blue, $opacity);\n}\n\n$accentColors: (\n\t\"red\": $color-joey,\n\t\"orange\": $color-monica,\n\t\"yellow\": $color-phoebe,\n\t\"green\": $color-ross,\n\t\"blue\": $color-rachel,\n\t\"purple\": $color-chandler,\n\t\"black\": $color-black,\n\n\t\"video\": $color-niles,\n);\n\n@function newAccentColor($color) {\n\n\t@if (not map_has_key($accentColors, $color)) {\n\n\t\t@error 'Unrecognized accent color \"#{$color}\" in accentColor mixin';\n\t}\n\n\t@return map-get($accentColors, $color);\n}\n\n@mixin accentColor($prop, $color) {\n\t#{$prop}: newaccentcolor($color);\n}\n\n@mixin updatedWhite($opacity: 1, $prop: color) {\n\t#{$prop}: rgba($color-white, $opacity);\n}\n\n@mixin updatedBlack($opacity: 1, $prop: color) {\n\t#{$prop}: rgba($color-black, $opacity);\n}\n","// NPF link block styles\n\n$title-line-height: 34px;\n$description-line-height: 24px;\n\n@mixin text-cutoff {\n\toverflow: hidden;\n\toverflow-wrap: anywhere;\n\ttext-overflow: ellipsis;\n}\n\ndiv.npf-link-block {\n\talign-items: center;\n\tborder: 1px solid $color-gray-25;\n\tborder-radius: 6px;\n\tdisplay: flex;\n\tjustify-content: center;\n\tmargin: 15px 0;\n\toverflow: hidden;\n\n\t> a {\n\t\tcolor: inherit;\n\t\twidth: 100%;\n\t\ttext-decoration: none;\n\t}\n\n\t.title {\n\t\tfont-size: 25px;\n\t\tline-height: $title-line-height;\n\t\tmax-height: $title-line-height * 4; // This needs to be equal to (line-height * 4) - We want to show a maximum of 4 lines here\n\n\t\t@include text-cutoff;\n\t}\n\n\t&.no-poster .title {\n\t\tpadding: 16px 12px 0;\n\t}\n\n\t.poster {\n\t\talign-items: center;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: cover;\n\t\tbackground-clip: content-box;\n\t\tborder-bottom: 1px solid $color-gray-25;\n\t\tdisplay: flex;\n\t\theight: 250px;\n\t\tjustify-content: center;\n\t\tposition: relative;\n\n\t\t&::before {\n\t\t\tbackground: $color-black;\n\t\t\tcontent: \"\";\n\t\t\tdisplay: block;\n\t\t\theight: 100%;\n\t\t\topacity: 0.4;\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.title {\n\t\t\tcolor: $color-white;\n\t\t\tfont-weight: 400;\n\t\t\tpadding: 16px 12px;\n\t\t\tposition: absolute;\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.bottom {\n\t\tcolor: inherit;\n\t\tline-height: 24px;\n\t\tpadding: 8px 12px 16px;\n\n\t\t.description {\n\t\t\tcolor: inherit;\n\t\t\tfont-size: 16px;\n\t\t\tline-height: $description-line-height;\n\t\t\tmargin: 0;\n\t\t\tmax-height: $description-line-height * 2; // This needs to be equal to (line-height * 2) - We want to show a maximum of 2 lines here\n\n\t\t\t@include text-cutoff;\n\t\t}\n\n\t\t.site-name {\n\t\t\tcolor: inherit;\n\t\t\tfont-size: 12.5px;\n\t\t\tfont-weight: 400;\n\t\t\tline-height: 18px;\n\t\t\tmargin-top: 10px;\n\t\t\topacity: 0.65;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t}\n}\n","// NPF video block styles\nvideo,\naudio,\nimg,\n.wp-caption,\niframe {\n\tmax-width: 100%;\n}\n\n.tmblr-full > video {\n\theight: 100%;\n\twidth: 100%;\n}\n","// NPF image block styles - most importantly, to render NPF-created photosets.\n// stylelint-disable no-descending-specificity -- unnecessary.\n\nbody,\n.post,\n.post-content {\n\t// NPF photoset wrapper\n\tdiv.npf_row {\n\t\talign-items: stretch;\n\t\tdisplay: flex;\n\t\tmargin-top: 0;\n\t\toverflow: hidden;\n\n\t\tfigure.tmblr-full {\n\t\t\tflex: 1;\n\t\t\tjustify-content: space-between;\n\t\t\tmargin: 0;\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\tfigure.tmblr-full,\n\t\t.npf_col {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tpadding-left: 2px;\n\t\t\tpadding-right: 2px;\n\n\t\t\t&:first-child {\n\t\t\t\tpadding-left: 0;\n\t\t\t\tpadding-right: 2px;\n\t\t\t}\n\n\t\t\t&:last-child {\n\t\t\t\tpadding-left: 2px;\n\t\t\t\tpadding-right: 0;\n\t\t\t}\n\t\t}\n\n\t\tfigure.tmblr-full:only-child,\n\t\t.npf_col:only-child {\n\t\t\tpadding-left: 0;\n\t\t\tpadding-right: 0;\n\t\t}\n\n\t\timg {\n\t\t\theight: auto;\n\t\t}\n\n\t\t.npf_col {\n\t\t\tflex: 1;\n\n\t\t\tfigure {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\tmargin: 0;\n\t\t\t\ttext-align: left;\n\n\t\t\t\timg {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tobject-fit: cover;\n\t\t\t\t}\n\n\t\t\t\tp.tmblr-attribution {\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfigure[data-enable-lightbox=\"1\"],\n\ta.post_media_photo_anchor {\n\t\tcursor: pointer;\n\t}\n\n\tp + div.npf_row,\n\tdiv.npf_row + p {\n\t\tmargin-top: 15px;\n\t}\n\n\t// Add a margin if following/preceding a video\n\t.crt-video + div.npf_row,\n\tdiv.npf_row + .crt-video {\n\t\tmargin-top: 15px;\n\t}\n\n\t// Horizontal margins between photoset rows\n\tdiv.npf_row + figure.tmblr-full,\n\tdiv.npf_row + div.npf_row {\n\t\tmargin-top: 4px;\n\t}\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../src/index.scss%23sass","../src/frontend/_global.scss","../src/index.scss","../src/frontend/_text.scss","../src/frontend/_variables.scss","../src/frontend/_link.scss","../src/frontend/_video.scss","../src/frontend/_image.scss","../src/frontend/_audio.scss"],"names":[],"mappings":"AAAA,iGAAA;ACCC;ECCD,aAAA;AACA;ADEC;ECAD,aAAA;AACA;;ACDA;EACC,qDAAA;EACA,eAAA;ADID;;ACDA;EACC,6BAAA;EACA,eCoB4B;EDnB5B,kBCoB8B;AFhB/B;;ACDA;EACC,yCAAA;ADID;;ACDA;;EAEC,cCqDY;AFjDb;;ACDA;;EAEC,cCiDc;AF7Cf;;ACDA;;EAEC,cC6Cc;AFzCf;;ACDA;;EAEC,cCyCY;AFrCb;;ACDA;;EAEC,cCqCc;AFjCf;;ACDA;;EAEC,cCiCgB;AF7BjB;;ACDA;;EAEC,cC+Ba;AF3Bd;;ACDA;;EAEC,cCKwB;AFDzB;;ACDA;;EAEC,cCsBc;AFlBf;;AGvDA;EACC,mBAAA;EACA,uCAAA;EACA,kBAAA;EACA,aAAA;EACA,uBAAA;EACA,cAAA;EACA,gBAAA;AH0DD;AGxDC;EACC,cAAA;EACA,WAAA;EACA,qBAAA;AH0DF;AGvDC;EACC,eAAA;EACA,iBA1BkB;EA2BlB,iBAAA;EAvBD,gBAAA;EACA,uBAAA;EACA,uBAAA;AHiFD;AGvDC;EACC,oBAAA;AHyDF;AGtDC;EACC,mBAAA;EACA,2BAAA;EACA,4BAAA;EACA,sBAAA;EACA,4BAAA;EACA,8CAAA;EACA,aAAA;EACA,aAAA;E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,aAAA;EACA,mBAAA;AN+QJ;AM7QI;EACI,WAAA;EACA,YAAA;AN+QR;AM5QI;EACI,aAAA;EACA,cAAA;EACA,sBAAA;EACA,uBAAA;EACA,uBAAA;EACA,eAAA;AN8QR;AM3QI;EACI,iBAAA;EACA,gBAAA;AN6QR;AM1QI;;EAEI,kBAAA;EACA,gBAAA;AN4QR","file":"index.css","sourcesContent":["/* https://github.tumblr.net/Tumblr/tumblr/tree/master/client/standalone/blog-network-npf/styles*/\n@import \"frontend/variables\";\n@import \"frontend/global\";\n@import \"frontend/text\";\n@import \"frontend/link\";\n@import \"frontend/video\";\n@import \"frontend/image\";\n@import \"frontend/audio\";\n","body {\n\t> .iframe-container {\n\t\tdisplay: none;\n\t}\n\n\tiframe[src*=\"https://www.tumblr.com/dashboard/iframe\"] {\n\t\tdisplay: none;\n\t}\n}","// https://github.tumblr.net/Tumblr/tumblr/tree/master/client/standalone/blog-network-npf/styles\n@import \"frontend/variables\";\n@import \"frontend/global\";\n@import \"frontend/text\";\n@import \"frontend/link\";\n@import \"frontend/video\";\n@import \"frontend/image\";\n@import \"frontend/audio\";\n","// NPF text block styles - namely, to add NPF colors.\n\n// Disabled SelectorFormat to use underscored selector names\n// scss-lint:disable SelectorFormat\n\np.npf_quote {\n\tfont-family: Georgia, Times, \"Times New Roman\", serif;\n\tfont-size: 23px;\n}\n\np.npf_quirky {\n\tfont-family: Fairwater, serif;\n\tfont-size: $font-size-post-text-quirky;\n\tline-height: $line-height-post-text-quirky;\n}\n\np.npf_chat {\n\tfont-family: \"Source Code Pro\", monospace;\n}\n\np.npf_color_joey,\nspan.npf_color_joey {\n\tcolor: $color-joey;\n}\n\np.npf_color_monica,\nspan.npf_color_monica {\n\tcolor: $color-monica;\n}\n\np.npf_color_phoebe,\nspan.npf_color_phoebe {\n\tcolor: $color-phoebe;\n}\n\np.npf_color_ross,\nspan.npf_color_ross {\n\tcolor: $color-ross;\n}\n\np.npf_color_rachel,\nspan.npf_color_rachel {\n\tcolor: $color-rachel;\n}\n\np.npf_color_chandler,\nspan.npf_color_chandler {\n\tcolor: $color-chandler;\n}\n\np.npf_color_niles,\nspan.npf_color_niles {\n\tcolor: $color-niles;\n}\n\np.npf_color_frasier,\nspan.npf_color_frasier {\n\tcolor: $color-frasier;\n}\n\np.npf_color_mr_big,\nspan.npf_color_mr_big {\n\tcolor: $color-mr-big;\n}\n","@use \"sass:math\";\n\n$post-full-width: 540px;\n$post-full-radius: 3px;\n$post-full-v-padding: 15px;\n$post-full-h-padding: 20px;\n$post-full-note-item-h-padding: 14px;\n$color-post-members-only: #900020;\n\n$font-size-content: 14px;\n$line-height-content: math.round(1.5 * $font-size-content);\n\n// those match NPF heading size better\n$font-size-content-heading1: 26px;\n$line-height-content-heading1: math.round(1.3 * $font-size-content-heading1);\n$font-size-content-heading2: 20px;\n$line-height-content-heading2: math.round(1.3 * $font-size-content-heading2);\n\n$font-size-content-heading-medium: 30px;\n$line-height-content-heading-medium: math.round(1.3 * $font-size-content-heading-medium);\n$font-size-content-heading-large: 36px;\n$line-height-content-heading-large: math.round(1.3 * $font-size-content-heading-large);\n\n$font-size-pre: 11px;\n$line-height-pre: $font-size-pre;\n\n$font-size-icon: 24px;\n$line-height-icon: 24px;\n\n$font-size-base: $font-size-content;\n$line-height-base: 1.4;\n\n$font-size-post-text-quirky: 24px;\n$line-height-post-text-quirky: 1.3em;\n\n// These omit `serif` and `sans-serf` to make it\n// possible to splice in additional fallbacks\n$font-family-sans-face: \"Helvetica Neue\", \"HelveticaNeue\", helvetica, arial;\n$font-family-serif-face: georgia, times, \"Times New Roman\";\n$font-family-monospace-face: courier;\n\n// Standard faces\n$font-family-sans: $font-family-sans-face, sans-serif;\n$font-family-serif: georgia, times, \"Times New Roman\", serif;\n$font-family-monospace: $font-family-monospace-face, monospace;\n$font-family-korean: $font-family-sans-face, \"AppleGothic\", \"Malgun Gothic\", \"Dotum\", \"Gulim\", sans-serif;\n\n// Named faces\n$font-family-gibson: \"Gibson\", $font-family-sans;\n$font-family-walsheim: \"Walsheim\", \"Helvetica Neue\", \"HelveticaNeue\", helvetica, arial, sans-serif;\n$font-family-franklin-medium: \"Franklin Gothic Medium\", $font-family-sans;\n$font-family-franklin-medium-condensed: \"Franklin Gothic Medium Condensed\", $font-family-sans;\n$font-family-franklin-compressed: \"Franklin Gothic Compressed\", $font-family-sans;\n$font-family-source-code-pro: \"Source Code Pro\", $font-family-monospace;\n\n// Default \"app\" font family\n$font-family-base: $font-family-sans;\n\n$color-white: #fff;\n$color-black: #000;\n$color-tumblr-black: #444;\n$color-tumblr-blue: #36465d;\n$color-tumblr-dark-blue: #001935;\n\n$color-dank-smoke: #9da6af;\n$color-gloomy-cloud: #748089;\n// The below have Neue Color variants\n$color-likable-red: #d95e40;\n$color-cheezbort: #f2992e;\n$color-always-sunny: #f7dd38;\n$color-reblog-green: #56bc8a;\n$color-neat-blue: #529ecc;\n$color-purple-rain: #a77dc2;\n\n// These replace old accent colors\n$color-joey: #ff492f; // Red\n$color-monica: #ff8a00; // Orange\n$color-phoebe: #e8d73a; // Yellow\n$color-ross: #00cf35; // Green\n$color-rachel: #00b8ff; // Light Blue\n$color-chandler: #7c5cff; // Purple\n// These are new\n$color-frasier: $color-tumblr-dark-blue; // Dark Blue, new brand color\n$color-niles: #ff62ce; // Pink\n$color-mr-big: #000c1a; // Off-Black\n$color-explicit-red: #ff4930; // project x red\n\n\n$color-gray-100: $color-tumblr-black; // #444444\n\n$color-gray-60: prima-mix($color-tumblr-black, 0.6); // #8f8f8f\n$color-gray-40: prima-mix($color-tumblr-black, 0.4); // #b4b4b4\n$color-gray-25: prima-mix($color-tumblr-black, 0.25); // #d0d0d0\n$color-gray-13: prima-mix($color-tumblr-black, 0.13); // #e7e7e7\n$color-gray-7: prima-mix($color-tumblr-black, 0.07); // #f2f2f2\n\n\n$color-gray-60-transparent: unmatte-gray($color-gray-60); // rgba(0, 0, 0, 0.439216)\n$color-gray-40-transparent: unmatte-gray($color-gray-40); // rgba(0, 0, 0, 0.294118)\n$color-gray-25-transparent: unmatte-gray($color-gray-25); // rgba(0, 0, 0, 0.184314)\n$color-gray-13-transparent: unmatte-gray($color-gray-13); // rgba(0, 0, 0, 0.0941176)\n$color-gray-7-transparent: unmatte-gray($color-gray-7); // rgba(0, 0, 0, 0.0509804)\n\n\n$color-white-60-transparent: prima-mix($color-white, 0.6, transparent); // rgba(255, 255, 255, 0.6);\n$color-white-40-transparent: prima-mix($color-white, 0.4, transparent); // rgba(255, 255, 255, 0.4);\n$color-white-25-transparent: prima-mix($color-white, 0.25, transparent); // rgba(255, 255, 255, 0.25);\n$color-white-13-transparent: prima-mix($color-white, 0.13, transparent); // rgba(255, 255, 255, 0.13);\n$color-white-7-transparent: prima-mix($color-white, 0.07, transparent); // rgba(255, 255, 255, 0.07);\n\n\n@mixin brandBlue($prop) {\n\t#{$prop}: $color-tumblr-dark-blue;\n}\n\n@mixin brandBlueGray($prop, $percent) {\n\t#{$prop}: prima-mix($color-white, 1 - $percent, $color-tumblr-dark-blue);\n}\n\n@mixin transparentBrandBlue($prop, $opacity) {\n\t#{$prop}: rgba($color-tumblr-dark-blue, $opacity);\n}\n\n$accentColors: (\n\t\"red\": $color-joey,\n\t\"orange\": $color-monica,\n\t\"yellow\": $color-phoebe,\n\t\"green\": $color-ross,\n\t\"blue\": $color-rachel,\n\t\"purple\": $color-chandler,\n\t\"black\": $color-black,\n\n\t\"video\": $color-niles,\n);\n\n@function newAccentColor($color) {\n\n\t@if (not map_has_key($accentColors, $color)) {\n\n\t\t@error 'Unrecognized accent color \"#{$color}\" in accentColor mixin';\n\t}\n\n\t@return map-get($accentColors, $color);\n}\n\n@mixin accentColor($prop, $color) {\n\t#{$prop}: newaccentcolor($color);\n}\n\n@mixin updatedWhite($opacity: 1, $prop: color) {\n\t#{$prop}: rgba($color-white, $opacity);\n}\n\n@mixin updatedBlack($opacity: 1, $prop: color) {\n\t#{$prop}: rgba($color-black, $opacity);\n}\n","// NPF link block styles\n\n$title-line-height: 34px;\n$description-line-height: 24px;\n\n@mixin text-cutoff {\n\toverflow: hidden;\n\toverflow-wrap: anywhere;\n\ttext-overflow: ellipsis;\n}\n\ndiv.npf-link-block {\n\talign-items: center;\n\tborder: 1px solid $color-gray-25;\n\tborder-radius: 6px;\n\tdisplay: flex;\n\tjustify-content: center;\n\tmargin: 15px 0;\n\toverflow: hidden;\n\n\t> a {\n\t\tcolor: inherit;\n\t\twidth: 100%;\n\t\ttext-decoration: none;\n\t}\n\n\t.title {\n\t\tfont-size: 25px;\n\t\tline-height: $title-line-height;\n\t\tmax-height: $title-line-height * 4; // This needs to be equal to (line-height * 4) - We want to show a maximum of 4 lines here\n\n\t\t@include text-cutoff;\n\t}\n\n\t&.no-poster .title {\n\t\tpadding: 16px 12px 0;\n\t}\n\n\t.poster {\n\t\talign-items: center;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: cover;\n\t\tbackground-clip: content-box;\n\t\tborder-bottom: 1px solid $color-gray-25;\n\t\tdisplay: flex;\n\t\theight: 250px;\n\t\tjustify-content: center;\n\t\tposition: relative;\n\n\t\t&::before {\n\t\t\tbackground: $color-black;\n\t\t\tcontent: \"\";\n\t\t\tdisplay: block;\n\t\t\theight: 100%;\n\t\t\topacity: 0.4;\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.title {\n\t\t\tcolor: $color-white;\n\t\t\tfont-weight: 400;\n\t\t\tpadding: 16px 12px;\n\t\t\tposition: absolute;\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.bottom {\n\t\tcolor: inherit;\n\t\tline-height: 24px;\n\t\tpadding: 8px 12px 16px;\n\n\t\t.description {\n\t\t\tcolor: inherit;\n\t\t\tfont-size: 16px;\n\t\t\tline-height: $description-line-height;\n\t\t\tmargin: 0;\n\t\t\tmax-height: $description-line-height * 2; // This needs to be equal to (line-height * 2) - We want to show a maximum of 2 lines here\n\n\t\t\t@include text-cutoff;\n\t\t}\n\n\t\t.site-name {\n\t\t\tcolor: inherit;\n\t\t\tfont-size: 12.5px;\n\t\t\tfont-weight: 400;\n\t\t\tline-height: 18px;\n\t\t\tmargin-top: 10px;\n\t\t\topacity: 0.65;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t}\n}\n","// NPF video block styles\nvideo,\naudio,\nimg,\n.wp-caption,\niframe {\n\tmax-width: 100%;\n}\n\n.tmblr-full > video {\n\theight: 100%;\n\twidth: 100%;\n}\n","// NPF image block styles - most importantly, to render NPF-created photosets.\n// stylelint-disable no-descending-specificity -- unnecessary.\n\n.post,\n.post-content,\nbody {\n // NPF photoset wrapper\n div.npf_row {\n align-items: stretch;\n display: flex;\n margin-top: 0;\n overflow: hidden;\n\n figure.tmblr-full {\n flex: 1;\n justify-content: space-between;\n margin: 0;\n overflow-y: hidden;\n }\n\n figure.tmblr-full,\n .npf_col {\n display: flex;\n flex-direction: column;\n padding-left: 2px;\n padding-right: 2px;\n\n &:first-child {\n padding-left: 0;\n }\n\n &:last-child {\n padding-right: 0;\n }\n }\n\n img {\n height: auto;\n }\n\n .npf_col {\n flex: 1;\n\n figure {\n position: relative;\n width: 100%;\n margin: 0;\n text-align: left;\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n p.tmblr-attribution {\n box-sizing: border-box;\n width: 100%;\n }\n }\n }\n }\n\n figure[data-enable-lightbox=\"1\"] {\n cursor: pointer;\n }\n\n a.post_media_photo_anchor {\n cursor: pointer;\n flex: 1;\n text-decoration: none;\n }\n\n p + div.npf_row,\n div.npf_row + p {\n margin-top: 15px;\n }\n\n // Add a margin if following/preceding a video\n .crt-video + div.npf_row,\n div.npf_row + .crt-video {\n margin-top: 15px;\n }\n\n // Horizontal margins between photoset rows\n div.npf_row + figure.tmblr-full,\n div.npf_row + div.npf_row {\n margin-top: 4px;\n }\n}\n",".tmblr-full > audio {\n width: 100%;\n}\n\n.tmblr-full > .audio-caption {\n display: flex;\n flex-direction: row;\n\n .album-cover {\n width: 85px;\n height: 85px;\n }\n\n .audio-details {\n display: flex;\n flex: 1 0 auto;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n padding: 0 20px;\n }\n\n .title {\n font-weight: bold;\n line-height: 1.5;\n }\n\n .artist,\n .album {\n font-size: 0.875em;\n line-height: 1.5;\n }\n}\n"]} \ No newline at end of file diff --git a/assets/css/src/admin/_theme_garden.scss b/assets/css/src/admin/_theme_garden.scss index 16f6deb..47b3275 100644 --- a/assets/css/src/admin/_theme_garden.scss +++ b/assets/css/src/admin/_theme_garden.scss @@ -307,3 +307,39 @@ body.admin-color-sunrise { #tumblr-no-themes { display: block; } + +#tumblr-loading-themes { + width: 100%; + height: 500px; + margin: 200px auto; + position: absolute; + top: 0; + left: 0; + z-index: 10000; +} + +.fade-left { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 200px; + background: linear-gradient(.25turn, #f2f1e7, #0000 ) +} + +.fade-right { + position: absolute; + top: 0; + right: 0; + width: 40px; + height: 200px; + background: linear-gradient(.25turn, #0000, #f2f1e7 ) +} + +#tumblr-loading-stage { + position: absolute; + top: 0; + left: 0; + width:100%; + height: 200px; +} diff --git a/assets/js/build/theme-garden.asset.php b/assets/js/build/theme-garden.asset.php index 0002073..a3bb145 100644 --- a/assets/js/build/theme-garden.asset.php +++ b/assets/js/build/theme-garden.asset.php @@ -1 +1 @@ - array(), 'version' => 'bee837eb4a53a080e012'); + array('react', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'c195335bb54965f60f33'); diff --git a/assets/js/build/theme-garden.js b/assets/js/build/theme-garden.js index bf24db5..dda0cad 100644 --- a/assets/js/build/theme-garden.js +++ b/assets/js/build/theme-garden.js @@ -1 +1 @@ -window.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("t3-categories"),t=document.getElementById("t3-category-select-form");e.addEventListener("change",(function(){t.submit()}))}),!1); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,r=window.wp.element,a=window.wp.i18n,s=window.wp.data,n=window.wp.compose,l=window.wp.apiFetch;var m=e.n(l);const o={logoUrl:themeGardenData.logoUrl,themes:themeGardenData.themes,categories:themeGardenData.categories,selectedCategory:themeGardenData.selectedCategory,search:themeGardenData.search,baseUrl:themeGardenData.baseUrl,isFetchingThemes:!1},c={receiveThemes:e=>({type:"RECEIVE_THEMES",themes:e}),prefetchThemes:()=>({type:"PREFETCH_THEMES"}),*fetchThemes(e){try{return console.log("d1"),i.FETCH_THEMES(e)}catch(e){throw new Error("Failed to update settings")}},*searchThemes(e){try{return i.SEARCH_THEMES(e)}catch(e){throw new Error("Failed to update settings")}}},h={getLogoUrl:()=>o.logoUrl,getInitialFilterBarProps:()=>({categories:o.categories,selectedCategory:o.selectedCategory,baseUrl:o.baseUrl,search:o.search}),getIsFetchingThemes:e=>e.isFetchingThemes,getThemes:e=>e.themes},i={FETCH_THEMES:e=>(console.log("d2",e),m()({path:"/tumblr3/v1/themes?category="+e,method:"GET"}).then((e=>(console.log("d3",e),e))).catch((e=>{throw e}))),SEARCH_THEMES:e=>m()({path:"/tumblr3/v1/themes?search="+e,method:"GET"}).then((e=>e)).catch((e=>{throw console.error("API Error:",e),e}))},d=(0,s.createReduxStore)("tumblr3/theme-garden-store",{reducer:(e=o,t)=>{switch(t.type){case"PREFETCH_THEMES":return{...e,isFetchingThemes:!0};case"RECEIVE_THEMES":return{...e,themes:t.themes,isFetchingThemes:!1};default:return e}},actions:c,selectors:h,controls:i,resolvers:{}});(0,s.register)(d);const u=(0,n.compose)((0,s.withSelect)((e=>({initialProps:e("tumblr3/theme-garden-store").getInitialFilterBarProps(),themes:e("tumblr3/theme-garden-store").getThemes()}))),(0,s.withDispatch)((e=>({prefetchThemes:()=>e("tumblr3/theme-garden-store").prefetchThemes(),fetchThemes:t=>e("tumblr3/theme-garden-store").fetchThemes(t),searchThemes:t=>e("tumblr3/theme-garden-store").searchThemes(t),receiveThemes:t=>e("tumblr3/theme-garden-store").receiveThemes(t)}))))((({initialProps:{baseUrl:e,selectedCategory:s,categories:n,search:l},themes:m,fetchThemes:o,receiveThemes:c,prefetchThemes:h,searchThemes:i})=>{const[d,u]=(0,r.useState)(s),[g,E]=(0,r.useState)(l),[p,w]=(0,r.useState)(m),T=(0,r.useRef)();(0,r.useEffect)((()=>{w(m)}),[m]),(0,r.useEffect)((()=>(window.addEventListener("popstate",y),()=>{window.removeEventListener("popstate",y)})),[]);const b=async e=>{h();const t=await o(e);c(t)},y=async()=>{const e=new URLSearchParams(window.location.search),t=e.get("category")||"featured",r=e.get("search")||"";""!==r?E(r):(await b(t),u(t))};return(0,t.createElement)("div",{className:"wp-filter"},(0,t.createElement)("div",{className:"filter-count"},(0,t.createElement)("span",{className:"count"},p.length)),(0,t.createElement)("label",{htmlFor:"t3-categories"},(0,a.__)("Categories","tumblr3")),(0,t.createElement)("select",{id:"t3-categories",name:"category",onChange:async({currentTarget:t})=>{const r=t.value;await b(r),u(r),E(""),window.history.pushState({},"",e+"&category="+r)}},(0,t.createElement)("option",{value:"featured"},(0,a._x)("Featured","The name of a category in a list of categories.","tumblr3")),n.map((e=>(0,t.createElement)("option",{key:e.text_key,value:e.text_key,selected:d===e.text_key},e.name)))),(0,t.createElement)("p",{className:"search-box"},(0,t.createElement)("label",{htmlFor:"wp-filter-search-input"},"Search Themes"),(0,t.createElement)("input",{type:"search","aria-describedby":"live-search-desc",id:"wp-filter-search-input",className:"wp-filter-search",name:"search",value:g,onChange:async({currentTarget:t})=>{const r=t.value;clearTimeout(T.current),E(r),T.current=setTimeout((async()=>{await(async e=>{h();const t=await i(e);c(t)})(r),window.history.pushState({},"",e+"&search="+r),u("")}),500)}})))})),g=()=>{const e=[(0,a._x)("Sadly, nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Tragically, nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("We found nothing. Here it isn’t.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Couldn’t find that. Please, don’t be upset. Please.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Sincerely, we found nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Nothing to see here.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("If you were looking for nothing, congrats, you found it.","The message displayed when no themes were found.","tumblr3")],r=Math.floor(Math.random()*e.length);return(0,t.createElement)("p",{className:"no-themes",id:"tumblr-no-themes"},e[r])},E=(0,n.compose)((0,s.withSelect)((e=>({themes:e("tumblr3/theme-garden-store").getThemes(),isFetchingThemes:e("tumblr3/theme-garden-store").getIsFetchingThemes()}))))((({themes:e,isFetchingThemes:s})=>{const[n,l]=(0,r.useState)(e);return(0,r.useEffect)((()=>{l(e)}),[e]),s?(0,t.createElement)("div",{className:"loading-content"},(0,t.createElement)("span",{className:"spinner"})):0===n.length?(0,t.createElement)(g,null):(0,t.createElement)("div",{className:"tumblr-themes"},e.map((e=>(0,t.createElement)("article",{className:"tumblr-theme",key:e.title},(0,t.createElement)("header",{className:"tumblr-theme-header"},(0,t.createElement)("div",{className:"tumblr-theme-title-wrapper"},(0,t.createElement)("span",{className:"tumblr-theme-title"},e.title))),(0,t.createElement)("div",{className:"tumblr-theme-content"},(0,t.createElement)("img",{className:"tumblr-theme-thumbnail",src:e.thumbnail,alt:""}),(0,t.createElement)("ul",{className:"tumblr-theme-buttons"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.activate_url},(0,a._x)("Activate","Text on a button to activate a theme.","tumblr3")))))))))})),p=(0,n.compose)((0,s.withSelect)((e=>({logoUrl:e("tumblr3/theme-garden-store").getLogoUrl()}))))((({logoUrl:e})=>(0,t.createElement)("div",{className:"wrap"},(0,t.createElement)("h1",{className:"wp-heading-inline",id:"theme-garden-heading"},(0,t.createElement)("img",{className:"tumblr-logo-icon",src:e,alt:""}),(0,t.createElement)("span",null,(0,a.__)("Tumblr Themes","tumblr3"))),(0,t.createElement)(u,null),(0,t.createElement)(E,null)))),w=document.getElementById("tumblr-theme-garden");w?(0,r.createRoot)(w).render((0,t.createElement)(p,null)):console.error("Failed to find the root element for the settings panel.")})(); \ No newline at end of file diff --git a/assets/js/src/components/theme-garden-filterbar.js b/assets/js/src/components/theme-garden-filterbar.js new file mode 100644 index 0000000..412f2c4 --- /dev/null +++ b/assets/js/src/components/theme-garden-filterbar.js @@ -0,0 +1,164 @@ +import { useState, useEffect, useRef } from '@wordpress/element'; +import { __, _x } from '@wordpress/i18n'; +import { withDispatch, withSelect } from '@wordpress/data'; +import { compose } from '@wordpress/compose'; +import './theme-garden-store'; + +/** + * This component appears at the top of the theme browser, and has a category selector and a search bar. + * + * Class names reference built-in wp-admin styles, and styles declared in _theme_garden.scss. + * + * @param {Object} props + * @param {Object} props.initialProps + * @param {string} props.initialProps.baseUrl + * @param {string} props.initialProps.selectedCategory + * @param {Array} props.initialProps.categories + * @param {string } props.initialProps.search + * @param {Array} props.themes + * @param {Function} props.fetchThemes + * @param {Function} props.receiveThemes + * @param {Function} props.prefetchThemes + * @param {Function} props.searchThemes + */ +const _ThemeGardenFilterBar = ( { + initialProps: { + baseUrl, + selectedCategory: initialSelectedCategory, + categories, + search: initialSearch, + }, + themes, + fetchThemes, + receiveThemes, + prefetchThemes, + searchThemes, +} ) => { + const [ selectedCategory, setSelectedCategory ] = useState( initialSelectedCategory ); + const [ search, setSearch ] = useState( initialSearch ); + const [ themeList, setThemeList ] = useState( themes ); + const timerRef = useRef(); + + /** + * Whenever themes from the store change, re-render the component. + */ + useEffect( () => { + setThemeList( themes ); + }, [ themes ] ); + + /** + * Detect backwards and forwards browser navigation. + */ + useEffect( () => { + window.addEventListener( 'popstate', onBrowserNavigation ); + return () => { + window.removeEventListener( 'popstate', onBrowserNavigation ); + }; + }, [] ); + + const fetchThemesByCategory = async category => { + prefetchThemes(); + const response = await fetchThemes( category ); + receiveThemes( response ); + }; + + const fetchThemesByQuery = async newSearch => { + prefetchThemes(); + const response = await searchThemes( newSearch ); + receiveThemes( response ); + }; + + /** + * After backwards or forwards navigation, check URL search params for indicators that we have to re-fetch themes. + * + * @return {Promise} + */ + const onBrowserNavigation = async () => { + const urlParams = new URLSearchParams( window.location.search ); + const category = urlParams.get( 'category' ) || 'featured'; + const searchParam = urlParams.get( 'search' ) || ''; + if ( searchParam !== '' ) { + setSearch( searchParam ); + } else { + await fetchThemesByCategory( category ); + setSelectedCategory( category ); + } + }; + + const onChangeCategory = async ( { currentTarget } ) => { + const newCategory = currentTarget.value; + await fetchThemesByCategory( newCategory ); + setSelectedCategory( newCategory ); + setSearch( '' ); + window.history.pushState( {}, '', baseUrl + '&category=' + newCategory ); + }; + + const onChangeSearch = async ( { currentTarget } ) => { + const newSearch = currentTarget.value; + clearTimeout( timerRef.current ); + setSearch( newSearch ); + timerRef.current = setTimeout( async () => { + await fetchThemesByQuery( newSearch ); + window.history.pushState( {}, '', baseUrl + '&search=' + newSearch ); + setSelectedCategory( '' ); + }, 500 ); + }; + + return ( +
+
+ { themeList.length } +
+ + +

+ + +

+
+ ); +}; + +export const ThemeGardenFilterBar = compose( + withSelect( select => ( { + initialProps: select( 'tumblr3/theme-garden-store' ).getInitialFilterBarProps(), + themes: select( 'tumblr3/theme-garden-store' ).getThemes(), + } ) ), + withDispatch( dispatch => ( { + prefetchThemes: () => { + return dispatch( 'tumblr3/theme-garden-store' ).prefetchThemes(); + }, + fetchThemes: category => { + return dispatch( 'tumblr3/theme-garden-store' ).fetchThemes( category ); + }, + searchThemes: query => { + return dispatch( 'tumblr3/theme-garden-store' ).searchThemes( query ); + }, + receiveThemes: themes => { + return dispatch( 'tumblr3/theme-garden-store' ).receiveThemes( themes ); + }, + } ) ) +)( _ThemeGardenFilterBar ); diff --git a/assets/js/src/components/theme-garden-list.js b/assets/js/src/components/theme-garden-list.js new file mode 100644 index 0000000..d31535c --- /dev/null +++ b/assets/js/src/components/theme-garden-list.js @@ -0,0 +1,66 @@ +import { useEffect, useState } from '@wordpress/element'; +import { withSelect } from '@wordpress/data'; +import { compose } from '@wordpress/compose'; +import { _x } from '@wordpress/i18n'; +import { ThemeGardenNoThemes } from './theme-garden-no-themes'; +import './theme-garden-store'; + +/** + * Displays a list of Tumblr themes. + * + * Class names reference built-in wp-admin styles, and styles declared in _theme_garden.scss. + * + * @param {Object} props + * @param {Array} props.themes + * @param {boolean} props.isFetchingThemes + */ +const _ThemeGardenList = ( { themes, isFetchingThemes } ) => { + const [ localThemes, setLocalThemes ] = useState( themes ); + + useEffect( () => { + setLocalThemes( themes ); + }, [ themes ] ); + + if ( isFetchingThemes ) { + return ( +
+ +
+ ); + } + + if ( localThemes.length === 0 ) { + return ; + } + + return ( +
+ { themes.map( theme => ( + + ) ) } +
+ ); +}; + +export const ThemeGardenList = compose( + withSelect( select => ( { + themes: select( 'tumblr3/theme-garden-store' ).getThemes(), + isFetchingThemes: select( 'tumblr3/theme-garden-store' ).getIsFetchingThemes(), + } ) ) +)( _ThemeGardenList ); diff --git a/assets/js/src/components/theme-garden-no-themes.js b/assets/js/src/components/theme-garden-no-themes.js new file mode 100644 index 0000000..f17b92a --- /dev/null +++ b/assets/js/src/components/theme-garden-no-themes.js @@ -0,0 +1,40 @@ +import { _x } from '@wordpress/i18n'; + +/** + * These playful messages were written by Tumblr staff. + * + * Class names reference built-in wp-admin styles, and styles declared in _theme_garden.scss. + */ +export const ThemeGardenNoThemes = () => { + const playfulNoThemesText = [ + _x( 'Sadly, nothing.', 'The message displayed when no themes were found.', 'tumblr3' ), + _x( 'Tragically, nothing.', 'The message displayed when no themes were found.', 'tumblr3' ), + _x( + 'We found nothing. Here it isn’t.', + 'The message displayed when no themes were found.', + 'tumblr3' + ), + _x( + 'Couldn’t find that. Please, don’t be upset. Please.', + 'The message displayed when no themes were found.', + 'tumblr3' + ), + _x( + 'Sincerely, we found nothing.', + 'The message displayed when no themes were found.', + 'tumblr3' + ), + _x( 'Nothing to see here.', 'The message displayed when no themes were found.', 'tumblr3' ), + _x( + 'If you were looking for nothing, congrats, you found it.', + 'The message displayed when no themes were found.', + 'tumblr3' + ), + ]; + const textKey = Math.floor( Math.random() * playfulNoThemesText.length ); + return ( +

+ { playfulNoThemesText[ textKey ] } +

+ ); +}; diff --git a/assets/js/src/components/theme-garden-store.js b/assets/js/src/components/theme-garden-store.js new file mode 100644 index 0000000..373235c --- /dev/null +++ b/assets/js/src/components/theme-garden-store.js @@ -0,0 +1,117 @@ +import apiFetch from '@wordpress/api-fetch'; +import { createReduxStore, register } from '@wordpress/data'; + +/** + * Default state is loaded from an inline script declared in ThemeGarden.php. + */ + +/*ignore jslint start*/ +const DEFAULT_STATE = { + logoUrl: themeGardenData.logoUrl, // eslint-disable-line no-undef + themes: themeGardenData.themes, // eslint-disable-line no-undef + categories: themeGardenData.categories, // eslint-disable-line no-undef + selectedCategory: themeGardenData.selectedCategory, // eslint-disable-line no-undef + search: themeGardenData.search, // eslint-disable-line no-undef + baseUrl: themeGardenData.baseUrl, // eslint-disable-line no-undef + isFetchingThemes: false, +}; +/*ignore jslint end*/ + +const reducer = ( state = DEFAULT_STATE, action ) => { + switch ( action.type ) { + case 'PREFETCH_THEMES': + return { ...state, isFetchingThemes: true }; + case 'RECEIVE_THEMES': + return { ...state, themes: action.themes, isFetchingThemes: false }; + default: + return state; + } +}; + +const actions = { + receiveThemes( themes ) { + return { + type: 'RECEIVE_THEMES', + themes, + }; + }, + prefetchThemes() { + return { type: 'PREFETCH_THEMES' }; + }, + *fetchThemes( category ) { + try { + return controls.FETCH_THEMES( category ); + } catch ( error ) { + throw new Error( 'Failed to update settings' ); + } + }, + *searchThemes( query ) { + try { + return controls.SEARCH_THEMES( query ); + } catch ( error ) { + throw new Error( 'Failed to update settings' ); + } + }, +}; + +const selectors = { + getLogoUrl() { + return DEFAULT_STATE.logoUrl; + }, + getInitialFilterBarProps() { + return { + categories: DEFAULT_STATE.categories, + selectedCategory: DEFAULT_STATE.selectedCategory, + baseUrl: DEFAULT_STATE.baseUrl, + search: DEFAULT_STATE.search, + }; + }, + getIsFetchingThemes( state ) { + return state.isFetchingThemes; + }, + getThemes( state ) { + return state.themes; + }, +}; + +const controls = { + FETCH_THEMES( category ) { + return apiFetch( { + path: '/tumblr3/v1/themes?category=' + category, + method: 'GET', + } ) + .then( response => { + return response; + } ) + .catch( error => { + throw error; + } ); + }, + SEARCH_THEMES( query ) { + return apiFetch( { + path: '/tumblr3/v1/themes?search=' + query, + method: 'GET', + } ) + .then( response => { + return response; + } ) + .catch( error => { + console.error( 'API Error:', error ); // eslint-disable-line no-console + throw error; + } ); + }, +}; + +const resolvers = {}; + +const store = createReduxStore( 'tumblr3/theme-garden-store', { + reducer, + actions, + selectors, + controls, + resolvers, +} ); + +register( store ); + +export default store; diff --git a/assets/js/src/theme-garden.js b/assets/js/src/theme-garden.js index 040af67..c73ec51 100644 --- a/assets/js/src/theme-garden.js +++ b/assets/js/src/theme-garden.js @@ -1,12 +1,44 @@ -window.addEventListener( - 'DOMContentLoaded', - function () { - const categorySelect = document.getElementById( 't3-categories' ); - const categorySelectForm = document.getElementById( 't3-category-select-form' ); +import { createRoot } from '@wordpress/element'; +import { ThemeGardenFilterBar } from './components/theme-garden-filterbar'; +import { ThemeGardenList } from './components/theme-garden-list'; +import { __ } from '@wordpress/i18n'; +import { withSelect } from '@wordpress/data'; +import { compose } from '@wordpress/compose'; +import './components/theme-garden-store'; - categorySelect.addEventListener( 'change', function () { - categorySelectForm.submit(); - } ); - }, - false -); +/** + * ThemeGarden Component + * + * This component provides a user interface for browsing themes from Tumblr's theme garden. + * + * Class names reference built-in wp-admin styles, and styles declared in _theme_garden.scss. + * + * @param {Object} props + * @param {string} props.logoUrl + */ +const ThemeGarden = ( { logoUrl } ) => { + return ( +
+

+ + { __( 'Tumblr Themes', 'tumblr3' ) } +

+ + +
+ ); +}; + +export const ConnectedThemeGarden = compose( + withSelect( select => ( { + logoUrl: select( 'tumblr3/theme-garden-store' ).getLogoUrl(), + } ) ) +)( ThemeGarden ); + +const rootElement = document.getElementById( 'tumblr-theme-garden' ); +if ( rootElement ) { + const root = createRoot( rootElement ); + root.render( ); +} else { + console.error( 'Failed to find the root element for the settings panel.' ); // eslint-disable-line no-console +} diff --git a/functions.php b/functions.php index 19d4780..a0bca04 100644 --- a/functions.php +++ b/functions.php @@ -52,8 +52,8 @@ function tumblr3_get_asset_meta( string $asset_path, ?array $extra_dependencies } $asset_path_info = pathinfo( $asset_path ); - if ( file_exists( $asset_path_info['dirname'] . '/' . $asset_path_info['filename'] . '.asset.php' ) ) { - $asset_meta = require $asset_path_info['dirname'] . '/' . $asset_path_info['filename'] . '.asset.php'; + if ( file_exists( $asset_path_info['dirname'] . '/' . $asset_path_info['filename'] . '.php' ) ) { + $asset_meta = require $asset_path_info['dirname'] . '/' . $asset_path_info['filename'] . '.php'; $asset_meta += array( 'dependencies' => array() ); // Ensure 'dependencies' key exists. } else { $asset_meta = array( diff --git a/package-lock.json b/package-lock.json index 7e0ec03..5e16499 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,11 @@ "name": "t3", "version": "1.0.0", "license": "GPL-2.0-or-later", + "dependencies": { + "@gsap/react": "^2.1.1", + "gsap": "^3.12.5", + "use-debounce": "^10.0.4" + }, "devDependencies": { "@csstools/postcss-sass": "^5.0.1", "@wordpress/browserslist-config": "^5.34.1", @@ -2035,6 +2040,16 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@gsap/react": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@gsap/react/-/react-2.1.1.tgz", + "integrity": "sha512-apGPRrmpqxvl1T6Io1KgT8tFU+IuACI6z4zmT7t8+PASserJeLVRFJdSNUFA2Xb/eVkZI1noE8LIrY/w/oJECw==", + "license": "SEE LICENSE AT https://gsap.com/standard-license", + "dependencies": { + "gsap": "^3.12.5", + "react": ">=16" + } + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "dev": true, @@ -8928,6 +8943,12 @@ "dev": true, "license": "MIT" }, + "node_modules/gsap": { + "version": "3.12.5", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.5.tgz", + "integrity": "sha512-srBfnk4n+Oe/ZnMIOXt3gT605BX9x5+rh/prT2F1SsNJsU1XuMiP0E2aptW481OnonOGACZWBqseH5Z7csHxhQ==", + "license": "Standard 'no charge' license: https://gsap.com/standard-license. Club GSAP members get more: https://gsap.com/licensing/. Why GreenSock doesn't employ an MIT license: https://gsap.com/why-license/" + }, "node_modules/gzip-size": { "version": "6.0.0", "dev": true, @@ -10796,7 +10817,6 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -11409,7 +11429,6 @@ }, "node_modules/loose-envify": { "version": "1.4.0", - "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -14187,7 +14206,6 @@ }, "node_modules/react": { "version": "18.3.1", - "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.1.0" @@ -16665,6 +16683,18 @@ "requires-port": "^1.0.0" } }, + "node_modules/use-debounce": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/use-debounce/-/use-debounce-10.0.4.tgz", + "integrity": "sha512-6Cf7Yr7Wk7Kdv77nnJMf6de4HuDE4dTxKij+RqE9rufDsI6zsbjyAxcH5y2ueJCQAnfgKbzXbZHYlkFwmBlWkw==", + "license": "MIT", + "engines": { + "node": ">= 16.0.0" + }, + "peerDependencies": { + "react": "*" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "dev": true, diff --git a/package.json b/package.json index a7f9956..7e27756 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "scripts": { "build": "npm-run-all --sequential build:**", "build:assets:scripts": "wp-scripts build assets/js/src/*.js --output-path=assets/js/build", - "build:assets:styles": "postcss assets/css/src/*.scss --ext .css --dir assets/css/build --config postcss.config.js", + "build:assets:styles": "postcss assets/css/src/*.scss --ext .css --dir assets/css/build --config postcss.config.js", "format": "npm-run-all --sequential format:**", "format:scripts": "wp-scripts format assets/js --no-error-on-unmatched-pattern", "format:styles": "npm run lint:styles -- --fix", @@ -59,6 +59,11 @@ "check-licenses": "wp-scripts check-licenses", "start": "npm-run-all --parallel start:**", "start:assets:scripts": "wp-scripts start assets/js/src/*.js --output-path=assets/js/build", - "start:assets:styles": "postcss assets/css/src/*.scss --ext .css --dir assets/css/build --config postcss.config.js --watch" + "start:assets:styles": "postcss assets/css/src/*.scss --ext .css --dir assets/css/build --config postcss.config.js --watch" + }, + "dependencies": { + "@gsap/react": "^2.1.1", + "gsap": "^3.12.5", + "use-debounce": "^10.0.4" } } diff --git a/src/Plugin.php b/src/Plugin.php index 751be1a..22866f2 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -138,11 +138,8 @@ public function initialize(): void { $this->customizer = new Customizer(); $this->customizer->initialize( $this->tumblr3_active ); - // In the admin, setup the theme browser. - if ( is_admin() ) { - $this->theme_garden = new ThemeGarden(); - $this->theme_garden->initialize(); - } + $this->theme_garden = new ThemeGarden(); + $this->theme_garden->initialize(); // In the frontend, setup the parser. if ( ! is_admin() ) { diff --git a/src/ThemeGarden.php b/src/ThemeGarden.php index 2db44b1..7ebc382 100644 --- a/src/ThemeGarden.php +++ b/src/ThemeGarden.php @@ -1,44 +1,18 @@ selected_category = ( isset( $_GET['category'] ) ) ? sanitize_text_field( wp_unslash( $_GET['category'] ) ) : ''; + $this->selected_category = ( isset( $_GET['category'] ) ) ? sanitize_text_field( $_GET['category'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce is verified in maybe_activate_theme. - $this->search = ( isset( $_GET['search'] ) ) ? sanitize_text_field( wp_unslash( $_GET['search'] ) ) : ''; + $this->search = ( isset( $_GET['search'] ) ) ? sanitize_text_field( $_GET['search'] ) : ''; } /** @@ -72,6 +52,7 @@ public function enqueue_assets( string $hook ): void { if ( 'appearance_page_tumblr-themes' === $hook ) { $deps = tumblr3_get_asset_meta( TUMBLR3_PATH . 'assets/js/build/theme-garden.asset.php' ); $this->enqueue_admin_styles( $deps['version'] ); + $themes_and_categories = $this->get_themes_and_categories(); wp_enqueue_script( 'tumblr-theme-garden', TUMBLR3_URL . 'assets/js/build/theme-garden.js', @@ -79,6 +60,20 @@ public function enqueue_assets( string $hook ): void { $deps['version'], true ); + wp_add_inline_script( + 'tumblr-theme-garden', + 'const themeGardenData = ' . wp_json_encode( + array( + 'logoUrl' => TUMBLR3_URL . 'assets/images/tumblr_logo_icon.png', + 'themes' => $themes_and_categories['themes'], + 'categories' => $themes_and_categories['categories'], + 'selectedCategory' => $this->selected_category, + 'search' => $this->search, + 'baseUrl' => admin_url( 'admin.php?page=tumblr-themes' ), + ) + ), + 'before' + ); } if ( 'theme-install.php' === $hook ) { @@ -93,7 +88,7 @@ public function enqueue_assets( string $hook ): void { ); wp_add_inline_script( 'tumblr-theme-install', - 'const t3Install = ' . wp_json_encode( + 'const T3_Install = ' . wp_json_encode( array( 'browseUrl' => admin_url( 'admin.php?page=tumblr-themes' ), 'buttonText' => __( 'Browse Tumblr themes', 'tumblr3' ), @@ -130,19 +125,32 @@ public function enqueue_admin_styles( $version ): void { } /** - * Displays an error message if something went wrong during theme activations. + * Register REST routes. * * @return void */ - public function maybe_show_notice(): void { - if ( empty( $this->activation_error ) ) { - return; - } - ?> -
-

activation_error ); ?>

-
- 'GET', + 'callback' => array( $this, 'get_themes' ), + 'permission_callback' => function () { + return current_user_can( 'manage_options' ); + }, + ) + ); + } + + /** + * Gets themes for an ajax request. + * + * @return \WP_REST_Response The settings for the queue. + */ + public function get_themes(): \WP_REST_Response { + $themes_and_categories = $this->get_themes_and_categories(); + return new \WP_REST_Response( $themes_and_categories['themes'], 200 ); } /** @@ -151,24 +159,22 @@ public function maybe_show_notice(): void { * @return void */ public function maybe_activate_theme(): void { - if ( empty( $_GET['activate_tumblr_theme'] ) || ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'activate_tumblr_theme' ) ) { + if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'activate_tumblr_theme' ) ) { return; } // During development, we don't want to be so limited by cache. So we'll send a cache invalidator to every request. // TODO: remove once we are confident that api response will be stable. - $response = wp_remote_get( self::THEME_GARDEN_ENDPOINT . '/theme/' . sanitize_text_field( wp_unslash( $_GET['activate_tumblr_theme'] ) ) . '?time=' . time() ); + $response = wp_remote_get( self::THEME_GARDEN_ENDPOINT . '/theme/' . esc_attr( $_GET['activate_tumblr_theme'] ) . '?time=' . time() ); $status = wp_remote_retrieve_response_code( $response ); if ( 200 !== $status ) { - $this->activation_error = 'Error activating theme. Please try again later.'; return; } $body = json_decode( wp_remote_retrieve_body( $response ) ); if ( ! isset( $body->response->theme ) ) { - $this->activation_error = 'Error activating theme. Please try again later.'; return; } @@ -177,7 +183,7 @@ public function maybe_activate_theme(): void { // Save all external theme details to an option. $external_theme_details = array( - 'id' => sanitize_text_field( wp_unslash( $_GET['activate_tumblr_theme'] ) ), + 'id' => $_GET['activate_tumblr_theme'], 'title' => isset( $body->response->title ) ? $body->response->title : '', 'thumbnail' => isset( $body->response->thumbnail ) ? $body->response->thumbnail : '', 'author_name' => isset( $body->response->author->name ) ? $body->response->author->name : '', @@ -195,6 +201,43 @@ public function maybe_activate_theme(): void { exit; } + /** + * Checks transients for a cached value of themes and categories. If cache is empty, hits the Tumblr API. + * Before output, themes are formatted for use in javascript. + * + * @return array + */ + public function get_themes_and_categories(): array { + $cached_response = get_transient( 'tumblr_themes_response_' . $this->get_api_query_string() ); + + if ( false === $cached_response ) { + $response = wp_remote_get( self::THEME_GARDEN_ENDPOINT . $this->get_api_query_string() ); + $cached_response = wp_remote_retrieve_body( $response ); + set_transient( 'tumblr_themes_response', $cached_response, WEEK_IN_SECONDS ); + } + $body = json_decode( $cached_response, true ); + + $themes = $body['response']['themes']; + if ( ! empty( $this->selected_category ) && 'featured' !== $this->selected_category ) { + // Todo: API is returning themes ordered from oldest to newest. Needs to be fixed on Tumblr side. + $themes = array_reverse( $themes ); + } + + $formatted_themes = array_map( + function ( $theme ) { + $theme['activate_url'] = admin_url( + 'admin.php?page=tumblr-themes&activate_tumblr_theme=' + . $theme['id'] + . '&_wpnonce=' + . wp_create_nonce( 'activate_tumblr_theme' ) ); + return $theme; + }, + $themes + ); + + return array_merge($body['response'], ['themes' => $formatted_themes]); + } + /** * On Tumblr theme activation, sets up the default options provided by the theme. * @@ -225,167 +268,33 @@ public function register_submenu(): void { __( 'Tumblr Themes', 'tumblr3' ), 'manage_options', 'tumblr-themes', - array( $this, 'render_page' ) + array( $this, 'render_theme_garden' ) ); } /** - * Checks for relevant params in the current URL's query, which will be sent to Tumblr API. - * - * @return string A query string to send to Tumblr API. - */ - public function get_api_query_string(): string { - if ( ! empty( $this->search ) ) { - return '?search=' . $this->search; - } - - if ( ! empty( $this->selected_category ) && 'featured' !== $this->selected_category ) { - return '?category=' . $this->selected_category; - } - return ''; - } - - /** - * Renders the theme garden page. - * - * @return void - */ - public function render_page(): void { - $tumblr_logo = TUMBLR3_PATH . 'assets/images/tumblr_logo_icon.png'; - $cached_response = get_transient( 'tumblr_themes_response_' . $this->get_api_query_string() ); - - if ( false === $cached_response ) { - $response = wp_remote_get( self::THEME_GARDEN_ENDPOINT . $this->get_api_query_string() ); - $cached_response = wp_remote_retrieve_body( $response ); - set_transient( 'tumblr_themes_response', $cached_response, WEEK_IN_SECONDS ); - } - - $body = json_decode( $cached_response, true ); - $categories = isset( $body['response']['categories'] ) ? $body['response']['categories'] : array(); - $themes = isset( $body['response']['themes'] ) ? $body['response']['themes'] : array(); - ?> - -
-

- - -

- render_filter_bar( $categories, count( $themes ) ); ?> - render_theme_list( $themes ); ?> -
- - allowing React to render the theme garden. * @return void */ - public function render_filter_bar( array $categories, int $theme_count ): void { + public function render_theme_garden(): void { ?> - -
- -
- -
- - - -
- -
- - -
- -
- +
-

- render_no_themes(); - return; + public function get_api_query_string(): string { + if ( ! empty( $this->search ) ) { + return '?search=' . $this->search; } if ( ! empty( $this->selected_category ) && 'featured' !== $this->selected_category ) { - // Todo: API is returning themes ordered from oldest to newest. Needs to be fixed on Tumblr side. - $themes = array_reverse( $themes ); + return '?category=' . $this->selected_category; } - ?> -
- - $theme['id'], - ), - admin_url( 'admin.php?page=tumblr-themes' ) - ); - $activate_url = wp_nonce_url( $url, 'activate_tumblr_theme' ); - ?> - - - - -
- Date: Mon, 25 Nov 2024 21:52:37 -0500 Subject: [PATCH 2/5] rebuild --- assets/js/build/theme-garden.asset.php | 2 +- assets/js/build/theme-garden.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/build/theme-garden.asset.php b/assets/js/build/theme-garden.asset.php index a3bb145..ba9ec76 100644 --- a/assets/js/build/theme-garden.asset.php +++ b/assets/js/build/theme-garden.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'c195335bb54965f60f33'); + array('react', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'fd810d3ceda54951e88a'); diff --git a/assets/js/build/theme-garden.js b/assets/js/build/theme-garden.js index dda0cad..58a588a 100644 --- a/assets/js/build/theme-garden.js +++ b/assets/js/build/theme-garden.js @@ -1 +1 @@ -(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,r=window.wp.element,a=window.wp.i18n,s=window.wp.data,n=window.wp.compose,l=window.wp.apiFetch;var m=e.n(l);const o={logoUrl:themeGardenData.logoUrl,themes:themeGardenData.themes,categories:themeGardenData.categories,selectedCategory:themeGardenData.selectedCategory,search:themeGardenData.search,baseUrl:themeGardenData.baseUrl,isFetchingThemes:!1},c={receiveThemes:e=>({type:"RECEIVE_THEMES",themes:e}),prefetchThemes:()=>({type:"PREFETCH_THEMES"}),*fetchThemes(e){try{return console.log("d1"),i.FETCH_THEMES(e)}catch(e){throw new Error("Failed to update settings")}},*searchThemes(e){try{return i.SEARCH_THEMES(e)}catch(e){throw new Error("Failed to update settings")}}},h={getLogoUrl:()=>o.logoUrl,getInitialFilterBarProps:()=>({categories:o.categories,selectedCategory:o.selectedCategory,baseUrl:o.baseUrl,search:o.search}),getIsFetchingThemes:e=>e.isFetchingThemes,getThemes:e=>e.themes},i={FETCH_THEMES:e=>(console.log("d2",e),m()({path:"/tumblr3/v1/themes?category="+e,method:"GET"}).then((e=>(console.log("d3",e),e))).catch((e=>{throw e}))),SEARCH_THEMES:e=>m()({path:"/tumblr3/v1/themes?search="+e,method:"GET"}).then((e=>e)).catch((e=>{throw console.error("API Error:",e),e}))},d=(0,s.createReduxStore)("tumblr3/theme-garden-store",{reducer:(e=o,t)=>{switch(t.type){case"PREFETCH_THEMES":return{...e,isFetchingThemes:!0};case"RECEIVE_THEMES":return{...e,themes:t.themes,isFetchingThemes:!1};default:return e}},actions:c,selectors:h,controls:i,resolvers:{}});(0,s.register)(d);const u=(0,n.compose)((0,s.withSelect)((e=>({initialProps:e("tumblr3/theme-garden-store").getInitialFilterBarProps(),themes:e("tumblr3/theme-garden-store").getThemes()}))),(0,s.withDispatch)((e=>({prefetchThemes:()=>e("tumblr3/theme-garden-store").prefetchThemes(),fetchThemes:t=>e("tumblr3/theme-garden-store").fetchThemes(t),searchThemes:t=>e("tumblr3/theme-garden-store").searchThemes(t),receiveThemes:t=>e("tumblr3/theme-garden-store").receiveThemes(t)}))))((({initialProps:{baseUrl:e,selectedCategory:s,categories:n,search:l},themes:m,fetchThemes:o,receiveThemes:c,prefetchThemes:h,searchThemes:i})=>{const[d,u]=(0,r.useState)(s),[g,E]=(0,r.useState)(l),[p,w]=(0,r.useState)(m),T=(0,r.useRef)();(0,r.useEffect)((()=>{w(m)}),[m]),(0,r.useEffect)((()=>(window.addEventListener("popstate",y),()=>{window.removeEventListener("popstate",y)})),[]);const b=async e=>{h();const t=await o(e);c(t)},y=async()=>{const e=new URLSearchParams(window.location.search),t=e.get("category")||"featured",r=e.get("search")||"";""!==r?E(r):(await b(t),u(t))};return(0,t.createElement)("div",{className:"wp-filter"},(0,t.createElement)("div",{className:"filter-count"},(0,t.createElement)("span",{className:"count"},p.length)),(0,t.createElement)("label",{htmlFor:"t3-categories"},(0,a.__)("Categories","tumblr3")),(0,t.createElement)("select",{id:"t3-categories",name:"category",onChange:async({currentTarget:t})=>{const r=t.value;await b(r),u(r),E(""),window.history.pushState({},"",e+"&category="+r)}},(0,t.createElement)("option",{value:"featured"},(0,a._x)("Featured","The name of a category in a list of categories.","tumblr3")),n.map((e=>(0,t.createElement)("option",{key:e.text_key,value:e.text_key,selected:d===e.text_key},e.name)))),(0,t.createElement)("p",{className:"search-box"},(0,t.createElement)("label",{htmlFor:"wp-filter-search-input"},"Search Themes"),(0,t.createElement)("input",{type:"search","aria-describedby":"live-search-desc",id:"wp-filter-search-input",className:"wp-filter-search",name:"search",value:g,onChange:async({currentTarget:t})=>{const r=t.value;clearTimeout(T.current),E(r),T.current=setTimeout((async()=>{await(async e=>{h();const t=await i(e);c(t)})(r),window.history.pushState({},"",e+"&search="+r),u("")}),500)}})))})),g=()=>{const e=[(0,a._x)("Sadly, nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Tragically, nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("We found nothing. Here it isn’t.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Couldn’t find that. Please, don’t be upset. Please.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Sincerely, we found nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Nothing to see here.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("If you were looking for nothing, congrats, you found it.","The message displayed when no themes were found.","tumblr3")],r=Math.floor(Math.random()*e.length);return(0,t.createElement)("p",{className:"no-themes",id:"tumblr-no-themes"},e[r])},E=(0,n.compose)((0,s.withSelect)((e=>({themes:e("tumblr3/theme-garden-store").getThemes(),isFetchingThemes:e("tumblr3/theme-garden-store").getIsFetchingThemes()}))))((({themes:e,isFetchingThemes:s})=>{const[n,l]=(0,r.useState)(e);return(0,r.useEffect)((()=>{l(e)}),[e]),s?(0,t.createElement)("div",{className:"loading-content"},(0,t.createElement)("span",{className:"spinner"})):0===n.length?(0,t.createElement)(g,null):(0,t.createElement)("div",{className:"tumblr-themes"},e.map((e=>(0,t.createElement)("article",{className:"tumblr-theme",key:e.title},(0,t.createElement)("header",{className:"tumblr-theme-header"},(0,t.createElement)("div",{className:"tumblr-theme-title-wrapper"},(0,t.createElement)("span",{className:"tumblr-theme-title"},e.title))),(0,t.createElement)("div",{className:"tumblr-theme-content"},(0,t.createElement)("img",{className:"tumblr-theme-thumbnail",src:e.thumbnail,alt:""}),(0,t.createElement)("ul",{className:"tumblr-theme-buttons"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.activate_url},(0,a._x)("Activate","Text on a button to activate a theme.","tumblr3")))))))))})),p=(0,n.compose)((0,s.withSelect)((e=>({logoUrl:e("tumblr3/theme-garden-store").getLogoUrl()}))))((({logoUrl:e})=>(0,t.createElement)("div",{className:"wrap"},(0,t.createElement)("h1",{className:"wp-heading-inline",id:"theme-garden-heading"},(0,t.createElement)("img",{className:"tumblr-logo-icon",src:e,alt:""}),(0,t.createElement)("span",null,(0,a.__)("Tumblr Themes","tumblr3"))),(0,t.createElement)(u,null),(0,t.createElement)(E,null)))),w=document.getElementById("tumblr-theme-garden");w?(0,r.createRoot)(w).render((0,t.createElement)(p,null)):console.error("Failed to find the root element for the settings panel.")})(); \ No newline at end of file +(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,r=window.wp.element,a=window.wp.i18n,s=window.wp.data,n=window.wp.compose,l=window.wp.apiFetch;var m=e.n(l);const c={logoUrl:themeGardenData.logoUrl,themes:themeGardenData.themes,categories:themeGardenData.categories,selectedCategory:themeGardenData.selectedCategory,search:themeGardenData.search,baseUrl:themeGardenData.baseUrl,isFetchingThemes:!1},o={receiveThemes:e=>({type:"RECEIVE_THEMES",themes:e}),prefetchThemes:()=>({type:"PREFETCH_THEMES"}),*fetchThemes(e){try{return i.FETCH_THEMES(e)}catch(e){throw new Error("Failed to update settings")}},*searchThemes(e){try{return i.SEARCH_THEMES(e)}catch(e){throw new Error("Failed to update settings")}}},h={getLogoUrl:()=>c.logoUrl,getInitialFilterBarProps:()=>({categories:c.categories,selectedCategory:c.selectedCategory,baseUrl:c.baseUrl,search:c.search}),getIsFetchingThemes:e=>e.isFetchingThemes,getThemes:e=>e.themes},i={FETCH_THEMES:e=>m()({path:"/tumblr3/v1/themes?category="+e,method:"GET"}).then((e=>e)).catch((e=>{throw e})),SEARCH_THEMES:e=>m()({path:"/tumblr3/v1/themes?search="+e,method:"GET"}).then((e=>e)).catch((e=>{throw console.error("API Error:",e),e}))},u=(0,s.createReduxStore)("tumblr3/theme-garden-store",{reducer:(e=c,t)=>{switch(t.type){case"PREFETCH_THEMES":return{...e,isFetchingThemes:!0};case"RECEIVE_THEMES":return{...e,themes:t.themes,isFetchingThemes:!1};default:return e}},actions:o,selectors:h,controls:i,resolvers:{}});(0,s.register)(u);const d=(0,n.compose)((0,s.withSelect)((e=>({initialProps:e("tumblr3/theme-garden-store").getInitialFilterBarProps(),themes:e("tumblr3/theme-garden-store").getThemes()}))),(0,s.withDispatch)((e=>({prefetchThemes:()=>e("tumblr3/theme-garden-store").prefetchThemes(),fetchThemes:t=>e("tumblr3/theme-garden-store").fetchThemes(t),searchThemes:t=>e("tumblr3/theme-garden-store").searchThemes(t),receiveThemes:t=>e("tumblr3/theme-garden-store").receiveThemes(t)}))))((({initialProps:{baseUrl:e,selectedCategory:s,categories:n,search:l},themes:m,fetchThemes:c,receiveThemes:o,prefetchThemes:h,searchThemes:i})=>{const[u,d]=(0,r.useState)(s),[g,E]=(0,r.useState)(l),[p,w]=(0,r.useState)(m),T=(0,r.useRef)();(0,r.useEffect)((()=>{w(m)}),[m]),(0,r.useEffect)((()=>(window.addEventListener("popstate",y),()=>{window.removeEventListener("popstate",y)})),[]);const b=async e=>{h();const t=await c(e);o(t)},y=async()=>{const e=new URLSearchParams(window.location.search),t=e.get("category")||"featured",r=e.get("search")||"";""!==r?E(r):(await b(t),d(t))};return(0,t.createElement)("div",{className:"wp-filter"},(0,t.createElement)("div",{className:"filter-count"},(0,t.createElement)("span",{className:"count"},p.length)),(0,t.createElement)("label",{htmlFor:"t3-categories"},(0,a.__)("Categories","tumblr3")),(0,t.createElement)("select",{id:"t3-categories",name:"category",onChange:async({currentTarget:t})=>{const r=t.value;await b(r),d(r),E(""),window.history.pushState({},"",e+"&category="+r)}},(0,t.createElement)("option",{value:"featured"},(0,a._x)("Featured","The name of a category in a list of categories.","tumblr3")),n.map((e=>(0,t.createElement)("option",{key:e.text_key,value:e.text_key,selected:u===e.text_key},e.name)))),(0,t.createElement)("p",{className:"search-box"},(0,t.createElement)("label",{htmlFor:"wp-filter-search-input"},"Search Themes"),(0,t.createElement)("input",{type:"search","aria-describedby":"live-search-desc",id:"wp-filter-search-input",className:"wp-filter-search",name:"search",value:g,onChange:async({currentTarget:t})=>{const r=t.value;clearTimeout(T.current),E(r),T.current=setTimeout((async()=>{await(async e=>{h();const t=await i(e);o(t)})(r),window.history.pushState({},"",e+"&search="+r),d("")}),500)}})))})),g=()=>{const e=[(0,a._x)("Sadly, nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Tragically, nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("We found nothing. Here it isn’t.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Couldn’t find that. Please, don’t be upset. Please.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Sincerely, we found nothing.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("Nothing to see here.","The message displayed when no themes were found.","tumblr3"),(0,a._x)("If you were looking for nothing, congrats, you found it.","The message displayed when no themes were found.","tumblr3")],r=Math.floor(Math.random()*e.length);return(0,t.createElement)("p",{className:"no-themes",id:"tumblr-no-themes"},e[r])},E=(0,n.compose)((0,s.withSelect)((e=>({themes:e("tumblr3/theme-garden-store").getThemes(),isFetchingThemes:e("tumblr3/theme-garden-store").getIsFetchingThemes()}))))((({themes:e,isFetchingThemes:s})=>{const[n,l]=(0,r.useState)(e);return(0,r.useEffect)((()=>{l(e)}),[e]),s?(0,t.createElement)("div",{className:"loading-content"},(0,t.createElement)("span",{className:"spinner"})):0===n.length?(0,t.createElement)(g,null):(0,t.createElement)("div",{className:"tumblr-themes"},e.map((e=>(0,t.createElement)("article",{className:"tumblr-theme",key:e.title},(0,t.createElement)("header",{className:"tumblr-theme-header"},(0,t.createElement)("div",{className:"tumblr-theme-title-wrapper"},(0,t.createElement)("span",{className:"tumblr-theme-title"},e.title))),(0,t.createElement)("div",{className:"tumblr-theme-content"},(0,t.createElement)("img",{className:"tumblr-theme-thumbnail",src:e.thumbnail,alt:""}),(0,t.createElement)("ul",{className:"tumblr-theme-buttons"},(0,t.createElement)("li",null,(0,t.createElement)("a",{href:e.activate_url},(0,a._x)("Activate","Text on a button to activate a theme.","tumblr3")))))))))})),p=(0,n.compose)((0,s.withSelect)((e=>({logoUrl:e("tumblr3/theme-garden-store").getLogoUrl()}))))((({logoUrl:e})=>(0,t.createElement)("div",{className:"wrap"},(0,t.createElement)("h1",{className:"wp-heading-inline",id:"theme-garden-heading"},(0,t.createElement)("img",{className:"tumblr-logo-icon",src:e,alt:""}),(0,t.createElement)("span",null,(0,a.__)("Tumblr Themes","tumblr3"))),(0,t.createElement)(d,null),(0,t.createElement)(E,null)))),w=document.getElementById("tumblr-theme-garden");w?(0,r.createRoot)(w).render((0,t.createElement)(p,null)):console.error("Failed to find the root element for the settings panel.")})(); \ No newline at end of file From 2e9d98aa067b5c23aa2b84c0f75308bfdfcfc532 Mon Sep 17 00:00:00 2001 From: roccotrip Date: Mon, 25 Nov 2024 21:56:30 -0500 Subject: [PATCH 3/5] unused styles --- assets/css/build/admin.css | 36 ------------------------- assets/css/build/admin.css.map | 2 +- assets/css/src/admin/_theme_garden.scss | 36 ------------------------- 3 files changed, 1 insertion(+), 73 deletions(-) diff --git a/assets/css/build/admin.css b/assets/css/build/admin.css index 1ab395d..fd55287 100644 --- a/assets/css/build/admin.css +++ b/assets/css/build/admin.css @@ -240,40 +240,4 @@ body.admin-color-sunrise { #tumblr-no-themes { display: block; } - -#tumblr-loading-themes { - width: 100%; - height: 500px; - margin: 200px auto; - position: absolute; - top: 0; - left: 0; - z-index: 10000; -} - -.fade-left { - position: absolute; - top: 0; - left: 0; - width: 40px; - height: 200px; - background: linear-gradient(0.25turn, #f2f1e7, rgba(0, 0, 0, 0)); -} - -.fade-right { - position: absolute; - top: 0; - right: 0; - width: 40px; - height: 200px; - background: linear-gradient(0.25turn, rgba(0, 0, 0, 0), #f2f1e7); -} - -#tumblr-loading-stage { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 200px; -} /*# sourceMappingURL=admin.css.map */ \ No newline at end of file diff --git a/assets/css/build/admin.css.map b/assets/css/build/admin.css.map index ca4f897..5b32c41 100644 --- a/assets/css/build/admin.css.map +++ b/assets/css/build/admin.css.map @@ -1 +1 @@ -{"version":3,"sources":["../src/admin/_theme_garden.scss","../src/admin.scss"],"names":[],"mappings":"AAEA;EACC,qBAAA;EACA,uBAAA;EACA,wBAAA;EACA,kBAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,oBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,eAAA;AC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AAA;EACA,UAAA;EACA,WAAA;AChDD;;ADmDA;EACC,UAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;AChDD;;ADoDA;EACC,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,cAAA;EACA,mBAAA;EACA,kBAAA;EACA,qBAAA;EACA,sBAAA;EACA,4BAAA;EACA,mCAAA;EACA,6BAAA;ACjDD;;ADoDA;EACC,wJAAA;EASA,0BAAA;EACA,oCAAA;EACA,WAAA;ACzDD;;AD6DA;EACC,YAAA;AC1DD;;AD6DA;EACC,eAAA;AC1DD;;AD6DA;EACC;IACC,8BAAA;EC1DA;AACF;AD6DA;EACC,aAAA;EACA,mBAAA;AC3DD;;AD8DA;EACC,WAAA;EACA,cAAA;AC3DD;;AD8DA;EACC,iBAAA;EACA,gBAAA;EACA,kBAAA;AC3DD;;AD8DA;EACC,eAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,qDAAA;UAAA,6CAAA;EACA,wJAAA;AC3DD;;ADsEA;EACC,oCAAA;ACnED;;ADsEA;EACC,cAAA;ACnED;;ADsEA;EACC,WAAA;EACA,aAAA;EACA,kBAAA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,cAAA;ACnED;;ADsEA;EACC,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;EACA,gEAAA;ACnED;;ADsEA;EACC,kBAAA;EACA,MAAA;EACA,QAAA;EACA,WAAA;EACA,aAAA;EACA,gEAAA;ACnED;;ADsEA;EACC,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;ACnED","file":"admin.css","sourcesContent":["$buttonWidth: 70px;\n\nbody {\n\t--t3-primary: #49a2c4;\n\t--t3-secondary: #8eb2c0;\n\t--t3-background: #f1f1f1;\n\t--t3-text: #49a2c4;\n\t--t3-button-text: #fff;\n\t--t3-red: #f8c7c3;\n\t--t3-orange: #f8d8bf;\n\t--t3-yellow: #f0e794;\n\t--t3-green: #b9ebc8;\n\t--t3-violet: #d4caf7;\n}\n\nbody.admin-color-light {\n\t--t3-primary: #04a4cc;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #999;\n}\n\nbody.admin-color-modern {\n\t--t3-primary: #3858e9;\n\t--t3-text: #1e1e1e;\n}\n\nbody.admin-color-blue {\n\t--t3-primary: #4796b3;\n\t--t3-secondary: #74b6ce;\n\t--t3-text: #096484;\n}\n\nbody.admin-color-coffee {\n\t--t3-primary: #c7a589;\n\t--t3-secondary: #9ea476;\n\t--t3-text: #46403c;\n}\n\nbody.admin-color-ectoplasm {\n\t--t3-primary: #a3b745;\n\t--t3-secondary: #a3b745;\n\t--t3-text: #523f6d;\n}\n\nbody.admin-color-midnight {\n\t--t3-primary: #e14d43;\n\t--t3-secondary: #363b3f;\n\t--t3-text: #25282b;\n}\n\nbody.admin-color-ocean {\n\t--t3-primary: #9ebaa0;\n\t--t3-secondary: #738e96;\n\t--t3-text: #627c83;\n}\n\nbody.admin-color-sunrise {\n\t--t3-primary: #dd823b;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #000;\n}\n\n.tumblr-themes {\n\tdisplay: grid;\n\tgrid-template-columns: 95%;\n\tjustify-content: center;\n\twidth: 98%;\n\tmargin: 0 auto;\n}\n\n.tumblr-theme {\n\twidth: 100%;\n\tcolor: var(--t3-text);\n\tmargin-bottom: 40px;\n\tfont-family: monospace;\n\tfilter: drop-shadow(-8px 8px 0 var(--t3-red));\n\n\t&:nth-child(5n + 2) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-orange));\n\t}\n\n\t&:nth-child(5n + 3) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-yellow));\n\t}\n\n\t&:nth-child(5n + 4) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-green));\n\t}\n\n\t&:nth-child(5n + 5) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-violet));\n\t}\n}\n\n@media screen and (min-width: 1601px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 22% 22% 22% 22%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 1301px) and (max-width: 1600px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 30% 30% 30%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 730px) and (max-width: 1300px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 47% 47%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n.tumblr-theme-header {\n\tdisplay: flex;\n\talign-items: flex-start;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: -8px;\n\twidth: calc(100% + 8px);\n\theight: 26px;\n}\n\n.tumblr-theme-title-wrapper {\n\tflex: initial;\n\tdisplay: block;\n\tposition: relative;\n\tmargin-left: 4px;\n\tpadding: 4px 4px 0 4px;\n\tmax-width: 80%;\n\ttext-overflow: ellipsis;\n}\n\n.tumblr-theme-content {\n\tbackground-color: var(--t3-background);\n\tpadding: 10px;\n\tbox-shadow:\n\t\t-2px -2px 0 0 var(--t3-background),\n\t\t0 -2px 0 0 var(--t3-background),\n\t\t-2px 0 0 0 var(--t3-background),\n\t\t0 2px 0 0 var(--t3-background),\n\t\t2px 0 0 0 var(--t3-background),\n\t\t0 0 0 2px var(--t3-text),\n\t\t-4px -4px 0 0 var(--t3-text),\n\t\t0 -4px 0 0 var(--t3-text),\n\t\t-4px 0 0 0 var(--t3-text),\n\t\t0 4px 0 0 var(--t3-text),\n\t\t4px 0 0 0 var(--t3-text);\n}\n\n.tumblr-theme-thumbnail {\n\twidth: calc(100% - 4px);\n\theight: auto;\n\taspect-ratio: 100/67;\n\tobject-fit: contain;\n\tborder: 2px solid var(--t3-secondary);\n\tborder-radius: 4px;\n}\n\n.tumblr-theme-title {\n\tdisplay: block;\n\tposition: relative;\n\tbackground-color: var(--t3-background);\n\tpadding: 3px 12px 0 10px;\n\theight: 18px;\n\tline-height: 18px;\n\tfont-family: monospace;\n\tfont-size: 1em;\n\tfont-weight: 700;\n\tbox-shadow:\n\t\t-2px 4px 0 var(--t3-background),\n\t\t0 -2px 0 var(--t3-background),\n\t\t-2px 0 0 var(--t3-background),\n\t\t2px 0 0 var(--t3-background),\n\t\t4px 2px 0 var(--t3-background),\n\t\t6px 4px 0 var(--t3-background),\n\t\t8px 6px 0 var(--t3-background),\n\t\t10px 8px 0 var(--t3-background),\n\t\t12px 10px 0 var(--t3-background),\n\t\t14px 12px 0 var(--t3-background),\n\t\t16px 14px 0 var(--t3-background),\n\t\t18px 16px 0 var(--t3-background),\n\t\t20px 18px 0 var(--t3-background),\n\t\t-4px 0 0 var(--t3-text),\n\t\t0 -4px 0 var(--t3-text),\n\t\t-2px -2px 0 var(--t3-text),\n\t\t2px -2px 0 var(--t3-text),\n\t\t4px 0 0 var(--t3-text),\n\t\t6px 2px 0 var(--t3-text),\n\t\t8px 4px 0 var(--t3-text),\n\t\t10px 6px 0 var(--t3-text),\n\t\t12px 8px 0 var(--t3-text),\n\t\t14px 10px 0 var(--t3-text),\n\t\t16px 12px 0 var(--t3-text),\n\t\t18px 14px 0 var(--t3-text),\n\t\t20px 16px 0 var(--t3-text);\n}\n\n.tumblr-theme-buttons {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 10px 0 0;\n\tpadding: 0;\n\twidth: 100%;\n}\n\n.tumblr-theme-buttons li {\n\tflex: none;\n\tdisplay: block;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: 10px;\n\tborder-radius: 4px;\n}\n\n\n.tumblr-theme-buttons li a {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\twidth: 90px;\n\tline-height: 24px;\n\tfont-size: 1em;\n\twhite-space: nowrap;\n\ttext-align: center;\n\ttext-decoration: none;\n\tborder-radius: inherit;\n\tcolor: var(--t3-button-text);\n\tborder: 1px solid var(--t3-primary);\n\tbackground: var(--t3-primary);\n}\n\n.tumblr-theme-buttons li a:hover {\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n\tbackground-size: 90px 100%;\n\tanimation: play 1.5s linear infinite;\n\tcolor: #000;\n}\n\n\n#t3-categories {\n\tmargin: 10px;\n}\n\n#t3-category-select-form {\n\tdisplay: inline;\n}\n\n@keyframes play {\n\t100% {\n\t\tbackground-position: -90px top;\n\t}\n}\n\n#theme-garden-heading {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.tumblr-logo-icon {\n\twidth: 30px;\n\tmargin: 0 12px;\n}\n\n.tumblr-theme-garden-list-item {\n\tpadding: 4px 10px;\n\tbackground: #000;\n\tborder-radius: 6px;\n}\n\n.tumblr-theme-garden-link {\n\tcursor: pointer;\n\tborder: none;\n\toutline: none;\n\twidth: 80px;\n\theight: 16px;\n\tmask-image: url(../../images/tumblr-logo.png) ;\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n}\n\n.tumblr-theme-garden-link:hover {\n\tanimation: play 1.5s linear infinite;\n}\n\n#tumblr-no-themes {\n\tdisplay: block;\n}\n\n#tumblr-loading-themes {\n\twidth: 100%;\n\theight: 500px;\n\tmargin: 200px auto;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 10000;\n}\n\n.fade-left {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 40px;\n\theight: 200px;\n\tbackground: linear-gradient(.25turn, #f2f1e7, #0000 )\n}\n\n.fade-right {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\twidth: 40px;\n\theight: 200px;\n\tbackground: linear-gradient(.25turn, #0000, #f2f1e7 )\n}\n\n#tumblr-loading-stage {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth:100%;\n\theight: 200px;\n}\n","@import \"admin/theme_garden\";\n"]} \ No newline at end of file +{"version":3,"sources":["../src/admin/_theme_garden.scss","../src/admin.scss"],"names":[],"mappings":"AAEA;EACC,qBAAA;EACA,uBAAA;EACA,wBAAA;EACA,kBAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,oBAAA;EACA,mBAAA;EACA,oBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,eAAA;ACDD;;ADIA;EACC,qBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,kBAAA;ACDD;;ADIA;EACC,qBAAA;EACA,uBAAA;EACA,eAAA;ACDD;;ADIA;EACC,aAAA;EACA,0BAAA;EACA,uBAAA;EACA,UAAA;EACA,cAAA;ACDD;;ADIA;EACC,WAAA;EACA,qBAAA;EACA,mBAAA;EACA,sBAAA;EACA,6CAAA;ACDD;ADGC;EACC,gDAAA;ACDF;ADIC;EACC,gDAAA;ACFF;ADKC;EACC,+CAAA;ACHF;ADMC;EACC,gDAAA;ACJF;;ADQA;EAEC;IACC,sCAAA;IACA,8BAAA;ECNA;AACF;ADSA;EAEC;IACC,kCAAA;IACA,8BAAA;ECRA;AACF;ADWA;EAEC;IACC,8BAAA;IACA,8BAAA;ECVA;AACF;ADaA;EACC,aAAA;EACA,uBAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,uBAAA;EACA,YAAA;ACXD;;ADcA;EACC,aAAA;EACA,cAAA;EACA,kBAAA;EACA,gBAAA;EACA,sBAAA;EACA,cAAA;EACA,uBAAA;ACXD;;ADcA;EACC,sCAAA;EACA,aAAA;EACA,kVACC;ACZF;;ADyBA;EACC,uBAAA;EACA,YAAA;EACA,oBAAA;EACA,mBAAA;EACA,qCAAA;EACA,kBAAA;ACtBD;;ADyBA;EACC,cAAA;EACA,kBAAA;EACA,sCAAA;EACA,wBAAA;EACA,YAAA;EACA,iBAAA;EACA,sBAAA;EACA,cAAA;EACA,gBAAA;EACA,6wBACC;ACvBF;;ADmDA;EACC,aAAA;EACA,yBAAA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;EACA,UAAA;EACA,WAAA;AChDD;;ADmDA;EACC,UAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,iBAAA;EACA,kBAAA;AChDD;;ADoDA;EACC,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,cAAA;EACA,mBAAA;EACA,kBAAA;EACA,qBAAA;EACA,sBAAA;EACA,4BAAA;EACA,mCAAA;EACA,6BAAA;ACjDD;;ADoDA;EACC,wJAAA;EASA,0BAAA;EACA,oCAAA;EACA,WAAA;ACzDD;;AD6DA;EACC,YAAA;AC1DD;;AD6DA;EACC,eAAA;AC1DD;;AD6DA;EACC;IACC,8BAAA;EC1DA;AACF;AD6DA;EACC,aAAA;EACA,mBAAA;AC3DD;;AD8DA;EACC,WAAA;EACA,cAAA;AC3DD;;AD8DA;EACC,iBAAA;EACA,gBAAA;EACA,kBAAA;AC3DD;;AD8DA;EACC,eAAA;EACA,YAAA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,qDAAA;UAAA,6CAAA;EACA,wJAAA;AC3DD;;ADsEA;EACC,oCAAA;ACnED;;ADsEA;EACC,cAAA;ACnED","file":"admin.css","sourcesContent":["$buttonWidth: 70px;\n\nbody {\n\t--t3-primary: #49a2c4;\n\t--t3-secondary: #8eb2c0;\n\t--t3-background: #f1f1f1;\n\t--t3-text: #49a2c4;\n\t--t3-button-text: #fff;\n\t--t3-red: #f8c7c3;\n\t--t3-orange: #f8d8bf;\n\t--t3-yellow: #f0e794;\n\t--t3-green: #b9ebc8;\n\t--t3-violet: #d4caf7;\n}\n\nbody.admin-color-light {\n\t--t3-primary: #04a4cc;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #999;\n}\n\nbody.admin-color-modern {\n\t--t3-primary: #3858e9;\n\t--t3-text: #1e1e1e;\n}\n\nbody.admin-color-blue {\n\t--t3-primary: #4796b3;\n\t--t3-secondary: #74b6ce;\n\t--t3-text: #096484;\n}\n\nbody.admin-color-coffee {\n\t--t3-primary: #c7a589;\n\t--t3-secondary: #9ea476;\n\t--t3-text: #46403c;\n}\n\nbody.admin-color-ectoplasm {\n\t--t3-primary: #a3b745;\n\t--t3-secondary: #a3b745;\n\t--t3-text: #523f6d;\n}\n\nbody.admin-color-midnight {\n\t--t3-primary: #e14d43;\n\t--t3-secondary: #363b3f;\n\t--t3-text: #25282b;\n}\n\nbody.admin-color-ocean {\n\t--t3-primary: #9ebaa0;\n\t--t3-secondary: #738e96;\n\t--t3-text: #627c83;\n}\n\nbody.admin-color-sunrise {\n\t--t3-primary: #dd823b;\n\t--t3-secondary: #e5e5e5;\n\t--t3-text: #000;\n}\n\n.tumblr-themes {\n\tdisplay: grid;\n\tgrid-template-columns: 95%;\n\tjustify-content: center;\n\twidth: 98%;\n\tmargin: 0 auto;\n}\n\n.tumblr-theme {\n\twidth: 100%;\n\tcolor: var(--t3-text);\n\tmargin-bottom: 40px;\n\tfont-family: monospace;\n\tfilter: drop-shadow(-8px 8px 0 var(--t3-red));\n\n\t&:nth-child(5n + 2) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-orange));\n\t}\n\n\t&:nth-child(5n + 3) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-yellow));\n\t}\n\n\t&:nth-child(5n + 4) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-green));\n\t}\n\n\t&:nth-child(5n + 5) {\n\t\tfilter: drop-shadow(-8px 8px 0 var(--t3-violet));\n\t}\n}\n\n@media screen and (min-width: 1601px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 22% 22% 22% 22%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 1301px) and (max-width: 1600px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 30% 30% 30%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n@media screen and (min-width: 730px) and (max-width: 1300px) {\n\n\t.tumblr-themes {\n\t\tgrid-template-columns: 47% 47%;\n\t\tjustify-content: space-between;\n\t}\n}\n\n.tumblr-theme-header {\n\tdisplay: flex;\n\talign-items: flex-start;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: -8px;\n\twidth: calc(100% + 8px);\n\theight: 26px;\n}\n\n.tumblr-theme-title-wrapper {\n\tflex: initial;\n\tdisplay: block;\n\tposition: relative;\n\tmargin-left: 4px;\n\tpadding: 4px 4px 0 4px;\n\tmax-width: 80%;\n\ttext-overflow: ellipsis;\n}\n\n.tumblr-theme-content {\n\tbackground-color: var(--t3-background);\n\tpadding: 10px;\n\tbox-shadow:\n\t\t-2px -2px 0 0 var(--t3-background),\n\t\t0 -2px 0 0 var(--t3-background),\n\t\t-2px 0 0 0 var(--t3-background),\n\t\t0 2px 0 0 var(--t3-background),\n\t\t2px 0 0 0 var(--t3-background),\n\t\t0 0 0 2px var(--t3-text),\n\t\t-4px -4px 0 0 var(--t3-text),\n\t\t0 -4px 0 0 var(--t3-text),\n\t\t-4px 0 0 0 var(--t3-text),\n\t\t0 4px 0 0 var(--t3-text),\n\t\t4px 0 0 0 var(--t3-text);\n}\n\n.tumblr-theme-thumbnail {\n\twidth: calc(100% - 4px);\n\theight: auto;\n\taspect-ratio: 100/67;\n\tobject-fit: contain;\n\tborder: 2px solid var(--t3-secondary);\n\tborder-radius: 4px;\n}\n\n.tumblr-theme-title {\n\tdisplay: block;\n\tposition: relative;\n\tbackground-color: var(--t3-background);\n\tpadding: 3px 12px 0 10px;\n\theight: 18px;\n\tline-height: 18px;\n\tfont-family: monospace;\n\tfont-size: 1em;\n\tfont-weight: 700;\n\tbox-shadow:\n\t\t-2px 4px 0 var(--t3-background),\n\t\t0 -2px 0 var(--t3-background),\n\t\t-2px 0 0 var(--t3-background),\n\t\t2px 0 0 var(--t3-background),\n\t\t4px 2px 0 var(--t3-background),\n\t\t6px 4px 0 var(--t3-background),\n\t\t8px 6px 0 var(--t3-background),\n\t\t10px 8px 0 var(--t3-background),\n\t\t12px 10px 0 var(--t3-background),\n\t\t14px 12px 0 var(--t3-background),\n\t\t16px 14px 0 var(--t3-background),\n\t\t18px 16px 0 var(--t3-background),\n\t\t20px 18px 0 var(--t3-background),\n\t\t-4px 0 0 var(--t3-text),\n\t\t0 -4px 0 var(--t3-text),\n\t\t-2px -2px 0 var(--t3-text),\n\t\t2px -2px 0 var(--t3-text),\n\t\t4px 0 0 var(--t3-text),\n\t\t6px 2px 0 var(--t3-text),\n\t\t8px 4px 0 var(--t3-text),\n\t\t10px 6px 0 var(--t3-text),\n\t\t12px 8px 0 var(--t3-text),\n\t\t14px 10px 0 var(--t3-text),\n\t\t16px 12px 0 var(--t3-text),\n\t\t18px 14px 0 var(--t3-text),\n\t\t20px 16px 0 var(--t3-text);\n}\n\n.tumblr-theme-buttons {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tposition: relative;\n\tmargin: 10px 0 0;\n\tpadding: 0;\n\twidth: 100%;\n}\n\n.tumblr-theme-buttons li {\n\tflex: none;\n\tdisplay: block;\n\toverflow: hidden;\n\tposition: relative;\n\tmargin-left: 10px;\n\tborder-radius: 4px;\n}\n\n\n.tumblr-theme-buttons li a {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\twidth: 90px;\n\tline-height: 24px;\n\tfont-size: 1em;\n\twhite-space: nowrap;\n\ttext-align: center;\n\ttext-decoration: none;\n\tborder-radius: inherit;\n\tcolor: var(--t3-button-text);\n\tborder: 1px solid var(--t3-primary);\n\tbackground: var(--t3-primary);\n}\n\n.tumblr-theme-buttons li a:hover {\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n\tbackground-size: 90px 100%;\n\tanimation: play 1.5s linear infinite;\n\tcolor: #000;\n}\n\n\n#t3-categories {\n\tmargin: 10px;\n}\n\n#t3-category-select-form {\n\tdisplay: inline;\n}\n\n@keyframes play {\n\t100% {\n\t\tbackground-position: -90px top;\n\t}\n}\n\n#theme-garden-heading {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.tumblr-logo-icon {\n\twidth: 30px;\n\tmargin: 0 12px;\n}\n\n.tumblr-theme-garden-list-item {\n\tpadding: 4px 10px;\n\tbackground: #000;\n\tborder-radius: 6px;\n}\n\n.tumblr-theme-garden-link {\n\tcursor: pointer;\n\tborder: none;\n\toutline: none;\n\twidth: 80px;\n\theight: 16px;\n\tmask-image: url(../../images/tumblr-logo.png) ;\n\tbackground: repeating-linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--t3-red) 0%,\n\t\t\tvar(--t3-orange),\n\t\t\tvar(--t3-yellow),\n\t\t\tvar(--t3-green),\n\t\t\tvar(--t3-violet),\n\t\t\tvar(--t3-red) 50%\n\t);\n}\n\n.tumblr-theme-garden-link:hover {\n\tanimation: play 1.5s linear infinite;\n}\n\n#tumblr-no-themes {\n\tdisplay: block;\n}\n","@import \"admin/theme_garden\";\n"]} \ No newline at end of file diff --git a/assets/css/src/admin/_theme_garden.scss b/assets/css/src/admin/_theme_garden.scss index 47b3275..16f6deb 100644 --- a/assets/css/src/admin/_theme_garden.scss +++ b/assets/css/src/admin/_theme_garden.scss @@ -307,39 +307,3 @@ body.admin-color-sunrise { #tumblr-no-themes { display: block; } - -#tumblr-loading-themes { - width: 100%; - height: 500px; - margin: 200px auto; - position: absolute; - top: 0; - left: 0; - z-index: 10000; -} - -.fade-left { - position: absolute; - top: 0; - left: 0; - width: 40px; - height: 200px; - background: linear-gradient(.25turn, #f2f1e7, #0000 ) -} - -.fade-right { - position: absolute; - top: 0; - right: 0; - width: 40px; - height: 200px; - background: linear-gradient(.25turn, #0000, #f2f1e7 ) -} - -#tumblr-loading-stage { - position: absolute; - top: 0; - left: 0; - width:100%; - height: 200px; -} From 56cb93f33021c4a0900e4e97f80c3eb3e50c59c9 Mon Sep 17 00:00:00 2001 From: roccotrip Date: Mon, 25 Nov 2024 21:57:29 -0500 Subject: [PATCH 4/5] fix build --- assets/css/build/admin.css | 2 +- assets/css/build/index.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/build/admin.css b/assets/css/build/admin.css index 1c9e866..fd55287 100644 --- a/assets/css/build/admin.css +++ b/assets/css/build/admin.css @@ -240,4 +240,4 @@ body.admin-color-sunrise { #tumblr-no-themes { display: block; } -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9hZG1pbi9fdGhlbWVfZ2FyZGVuLnNjc3MiLCIuLi9zcmMvYWRtaW4uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTtFQUNDLHFCQUFBO0VBQ0EsdUJBQUE7RUFDQSx3QkFBQTtFQUNBLGtCQUFBO0VBQ0Esc0JBQUE7RUFDQSxpQkFBQTtFQUNBLG9CQUFBO0VBQ0Esb0JBQUE7RUFDQSxtQkFBQTtFQUNBLG9CQUFBO0FDREQ7O0FESUE7RUFDQyxxQkFBQTtFQUNBLHVCQUFBO0VBQ0EsZUFBQTtBQ0REOztBRElBO0VBQ0MscUJBQUE7RUFDQSxrQkFBQTtBQ0REOztBRElBO0VBQ0MscUJBQUE7RUFDQSx1QkFBQTtFQUNBLGtCQU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tZS1nYXJkZW4tbGluazpob3ZlciB7XG5cdGFuaW1hdGlvbjogcGxheSAxLjVzIGxpbmVhciBpbmZpbml0ZTtcbn1cblxuI3R1bWJsci1uby10aGVtZXMge1xuXHRkaXNwbGF5OiBibG9jaztcbn1cbiIsIkBpbXBvcnQgXCJhZG1pbi90aGVtZV9nYXJkZW5cIjtcbiJdfQ== */ \ No newline at end of file +/*# sourceMappingURL=admin.css.map */ \ No newline at end of file diff --git a/assets/css/build/index.css b/assets/css/build/index.css index 0689c04..841e011 100644 --- a/assets/css/build/index.css +++ b/assets/css/build/index.css @@ -297,4 +297,4 @@ body div.npf_row + div.npf_row { font-size: 0.875em; line-height: 1.5; } -/*# sourceMappingURL=index.css.map */ \ No newline at end of file +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5zY3NzJTIzc2FzcyIsIi4uL3NyYy9mcm9udGVuZC9fZ2xvYmFsLnNjc3MiLCIuLi9zcmMvaW5kZXguc2NzcyIsIi4uL3NyYy9mcm9udGVuZC9fdGV4dC5zY3NzIiwiLi4vc3JjL2Zyb250ZW5kL192YXJpYWJsZXMuc2NzcyIsIi4uL3NyYy9mcm9udGVuZC9fbGluay5zY3NzIiwiLi4vc3JjL2Zyb250ZW5kL192aWRlby5zY3NzIiwiLi4vc3JjL2Zyb250ZW5kL19pbWFnZS5zY3NzIiwiLi4vc3JjL2Zyb250ZW5kL19hdWRpby5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGlHQUFBO0FDQ0M7RUNDRCxhQUFBO0FBQ0E7QURFQztFQ0FELGFBQUE7QUFDQTs7QUNEQTtFQUNDLHFEQUFBO0VBQ0EsZUFBQTtBRElEOztBQ0RBO0VBQ0MsNkJBQUE7RUFDQSxlQ29CNEI7RURuQjVCLGtCQ29COEI7QUZoQi9COztBQ0RBO0VBQ0MseUNBQUE7QURJRDs7QUNEQTs7RUFFQyxj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ICAgICAgfVxuXG4gICAgICAgIGZpZ3VyZS50bWJsci1mdWxsLFxuICAgICAgICAubnBmX2NvbCB7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogMnB4O1xuICAgICAgICAgICAgcGFkZGluZy1yaWdodDogMnB4O1xuXG4gICAgICAgICAgICAmOmZpcnN0LWNoaWxkIHtcbiAgICAgICAgICAgICAgICBwYWRkaW5nLWxlZnQ6IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICY6bGFzdC1jaGlsZCB7XG4gICAgICAgICAgICAgICAgcGFkZGluZy1yaWdodDogMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGltZyB7XG4gICAgICAgICAgICBoZWlnaHQ6IGF1dG87XG4gICAgICAgIH1cblxuICAgICAgICAubnBmX2NvbCB7XG4gICAgICAgICAgICBmbGV4OiAxO1xuXG4gICAgICAgICAgICBmaWd1cmUge1xuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDtcblxuICAgICAgICAgICAgICAgIGltZyB7XG4gICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDEwMCU7XG4gICAgICAgICAgICAgICAgICAgIG9iamVjdC1maXQ6IGNvdmVyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHAudG1ibHItYXR0cmlidXRpb24ge1xuICAgICAgICAgICAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAg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AuYXVkaW8tZGV0YWlscyB7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGZsZXg6IDEgMCBhdXRvO1xuICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgYWxpZ24taXRlbXM6IGZsZXgtc3RhcnQ7XG4gICAgICAgIHBhZGRpbmc6IDAgMjBweDtcbiAgICB9XG5cbiAgICAudGl0bGUge1xuICAgICAgICBmb250LXdlaWdodDogYm9sZDtcbiAgICAgICAgbGluZS1oZWlnaHQ6IDEuNTtcbiAgICB9XG5cbiAgICAuYXJ0aXN0LFxuICAgIC5hbGJ1bSB7XG4gICAgICAgIGZvbnQtc2l6ZTogMC44NzVlbTtcbiAgICAgICAgbGluZS1oZWlnaHQ6IDEuNTtcbiAgICB9XG59XG4iXX0= */ \ No newline at end of file From 7878cff5daab17f2db196639b48e0fd8224ce319 Mon Sep 17 00:00:00 2001 From: TommusRhodus Date: Tue, 26 Nov 2024 12:16:45 +0000 Subject: [PATCH 5/5] PHPCS fixes on the theme garden class. --- src/ThemeGarden.php | 59 +++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/src/ThemeGarden.php b/src/ThemeGarden.php index 7ebc382..6c588a7 100644 --- a/src/ThemeGarden.php +++ b/src/ThemeGarden.php @@ -1,4 +1,9 @@ selected_category = ( isset( $_GET['category'] ) ) ? sanitize_text_field( $_GET['category'] ) : ''; + $this->selected_category = ( isset( $_GET['category'] ) ) ? sanitize_text_field( wp_unslash( $_GET['category'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce is verified in maybe_activate_theme. - $this->search = ( isset( $_GET['search'] ) ) ? sanitize_text_field( $_GET['search'] ) : ''; + $this->search = ( isset( $_GET['search'] ) ) ? sanitize_text_field( wp_unslash( $_GET['search'] ) ) : ''; } /** @@ -64,12 +82,12 @@ public function enqueue_assets( string $hook ): void { 'tumblr-theme-garden', 'const themeGardenData = ' . wp_json_encode( array( - 'logoUrl' => TUMBLR3_URL . 'assets/images/tumblr_logo_icon.png', - 'themes' => $themes_and_categories['themes'], - 'categories' => $themes_and_categories['categories'], + 'logoUrl' => TUMBLR3_URL . 'assets/images/tumblr_logo_icon.png', + 'themes' => $themes_and_categories['themes'], + 'categories' => $themes_and_categories['categories'], 'selectedCategory' => $this->selected_category, - 'search' => $this->search, - 'baseUrl' => admin_url( 'admin.php?page=tumblr-themes' ), + 'search' => $this->search, + 'baseUrl' => admin_url( 'admin.php?page=tumblr-themes' ), ) ), 'before' @@ -159,13 +177,20 @@ public function get_themes(): \WP_REST_Response { * @return void */ public function maybe_activate_theme(): void { - if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'activate_tumblr_theme' ) ) { + if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'activate_tumblr_theme' ) ) { + return; + } + + $theme_id = isset( $_GET['activate_tumblr_theme'] ) ? absint( wp_unslash( $_GET['activate_tumblr_theme'] ) ) : 0; + + // Returns early if theme id was not set. + if ( 0 === $theme_id ) { return; } // During development, we don't want to be so limited by cache. So we'll send a cache invalidator to every request. // TODO: remove once we are confident that api response will be stable. - $response = wp_remote_get( self::THEME_GARDEN_ENDPOINT . '/theme/' . esc_attr( $_GET['activate_tumblr_theme'] ) . '?time=' . time() ); + $response = wp_remote_get( self::THEME_GARDEN_ENDPOINT . '/theme/' . esc_attr( $theme_id ) . '?time=' . time() ); $status = wp_remote_retrieve_response_code( $response ); if ( 200 !== $status ) { @@ -183,7 +208,7 @@ public function maybe_activate_theme(): void { // Save all external theme details to an option. $external_theme_details = array( - 'id' => $_GET['activate_tumblr_theme'], + 'id' => $theme_id, 'title' => isset( $body->response->title ) ? $body->response->title : '', 'thumbnail' => isset( $body->response->thumbnail ) ? $body->response->thumbnail : '', 'author_name' => isset( $body->response->author->name ) ? $body->response->author->name : '', @@ -215,9 +240,9 @@ public function get_themes_and_categories(): array { $cached_response = wp_remote_retrieve_body( $response ); set_transient( 'tumblr_themes_response', $cached_response, WEEK_IN_SECONDS ); } - $body = json_decode( $cached_response, true ); + $body = json_decode( $cached_response, true ); - $themes = $body['response']['themes']; + $themes = $body['response']['themes']; if ( ! empty( $this->selected_category ) && 'featured' !== $this->selected_category ) { // Todo: API is returning themes ordered from oldest to newest. Needs to be fixed on Tumblr side. $themes = array_reverse( $themes ); @@ -229,13 +254,14 @@ function ( $theme ) { 'admin.php?page=tumblr-themes&activate_tumblr_theme=' . $theme['id'] . '&_wpnonce=' - . wp_create_nonce( 'activate_tumblr_theme' ) ); + . wp_create_nonce( 'activate_tumblr_theme' ) + ); return $theme; }, $themes ); - return array_merge($body['response'], ['themes' => $formatted_themes]); + return array_merge( $body['response'], array( 'themes' => $formatted_themes ) ); } /** @@ -274,6 +300,7 @@ public function register_submenu(): void { /** * Makes a target
allowing React to render the theme garden. + * * @return void */ public function render_theme_garden(): void {