diff --git a/app/configs/options.json b/app/configs/options.json index cc89c96..cab828e 100644 --- a/app/configs/options.json +++ b/app/configs/options.json @@ -26,6 +26,53 @@ "multiple": false } }, + "homepage.slogan": { + "namespace": "homepage.slogan", + "public": true, + "title": "Slogan", + "desc": "The slogan text (with typewriter effect), recommend 10-20 characters.", + "type": "string", + "default": "Hello World!" + }, + "homepage.quote": { + "namespace": "homepage.quote", + "public": true, + "title": "Quote", + "desc": "The quote text (behinds the slogan).", + "type": "longString", + "default": "The most beautiful things in the world cannot be seen or even touched. \nThey must be felt with the heart." + }, + "homepage.signature": { + "namespace": "homepage.signature", + "public": true, + "title": "Signature", + "desc": "The signature text (follows the quote).", + "type": "string", + "default": "—Helen Keller" + }, + "homepage.cover.image": { + "namespace": "homepage.cover.image", + "public": true, + "title": "Cover image", + "desc": "Homepage cover image.", + "type": "mediaPicker", + "default": [ + { + "id": 0, + "url": "https://view.moezx.cc/images/2021/06/19/ca4748651c3c67e7e4c29c34fb13bc33.jpg" + }, + { + "id": 0, + "url": "https://view.moezx.cc/images/2021/07/21/c21fcdbf4cf09674537d928884863ecc.jpg" + } + ], + "binds": { + "title": "Select image for homepage cover.", + "button": "Use this image", + "type": "image", + "multiple": true + } + }, "social.github": { "namespace": "social.github", "public": true, diff --git a/app/functions.php b/app/functions.php index 6167c2f..8500532 100644 --- a/app/functions.php +++ b/app/functions.php @@ -5,7 +5,7 @@ define('SAKURA_VERSION', wp_get_theme()->get('Version')); define('SAKURA_TEXT_DOMAIN', wp_get_theme()->get('TextDomain')); -define('SAKURA_DEVEPLOMENT', true); +define('SAKURA_DEVEPLOMENT', false); define('SAKURA_DEVEPLOMENT_HOST', 'http://127.0.0.1:9000'); // PHP loaders diff --git a/app/helpers/admin-page-helper.php b/app/helpers/admin-page-helper.php index b53c6db..fccb088 100644 --- a/app/helpers/admin-page-helper.php +++ b/app/helpers/admin-page-helper.php @@ -67,7 +67,7 @@ class AdminPageHelper extends ViteHelper wp_localize_script('[type:module]chunk-entrance.js', 'InitState', (new InitStateController())->get_initial_state()); - wp_localize_script('[type:module]chunk-entrance.js', 'SakuraOptions', (new OptionController())->get_all_options()); + wp_localize_script('[type:module]chunk-entrance.js', 'SakuraOptions', ['data' => (new OptionController())->get_all_options()]); // foreach ($manifest[$entry_key]['imports'] as $index => $import) { diff --git a/app/helpers/setup-helper.php b/app/helpers/setup-helper.php index cd66d39..c241953 100644 --- a/app/helpers/setup-helper.php +++ b/app/helpers/setup-helper.php @@ -2,7 +2,7 @@ namespace Sakura\Helpers; -use Sakura\Controllers\OptionController; +// use Sakura\Controllers\OptionController; class SetupHelper { @@ -22,7 +22,8 @@ class SetupHelper // count post views add_action('get_header', [$this, 'set_post_views']); // Inite config options - add_action('after_switch_theme', [new OptionController(), 'inite_theme'], 1, 2); + // won't need anymore with options? + // add_action('after_switch_theme', [new OptionController(), 'inite_theme'], 1, 2); } public function setup() diff --git a/docs/dev.md b/docs/dev.md index baf13f7..4077070 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -1,7 +1,17 @@ +# Dev configurations + .env.development -``` +```env SSH_KEY_PATH='~/.ssh/id_rsa' SSH_REMOTE_HOST='root@8.8.8.8' SSH_REMOTE_WORK_DIR='/var/www/html/wp-contents/themes/sakura-next' ``` + +add this rewrite rule to Nginx: + +```nginx +location /src/assets { + rewrite ^/(.*)$ http://localhost:9000/$1 redirect; +} +``` diff --git a/package.json b/package.json index 0993632..28a6a5d 100644 --- a/package.json +++ b/package.json @@ -25,29 +25,29 @@ "rsync:composer": "nodemon --watch './composer.json' --watch './composer.lock' scripts/rsync.mjs --composer", "icon": "yarn svgo -f ./src/assets/icons/ui/ && node scripts/import-svg-icons.mjs && eslint \"src/components/icon/**/*.{ts,js,json,vue}\" --fix && prettier \"src/components/icon/**/*.{ts,js,json,vue}\" --write", "mdc": "node scripts/mdc-upgrade.mjs", - "options": "node scripts/options-export/copy-options.mjs && yarn tsc scripts/options-export/dump-options.ts && node scripts/options-export/dump-options.js" + "options": "node scripts/options-export/copy-options.mjs && yarn tsc scripts/options-export/dump-options.ts && node scripts/options-export/dump-options.js && eslint \"src/admin/optionsType.ts\" --fix && prettier \"src/admin/optionsType.ts\" --write" }, "dependencies": { "@formatjs/intl": "^1.13.2", - "@material/button": "^12.0.0-canary.9f68a932e.0", - "@material/card": "^12.0.0-canary.9f68a932e.0", - "@material/checkbox": "^12.0.0-canary.9f68a932e.0", - "@material/chips": "^12.0.0-canary.9f68a932e.0", - "@material/dialog": "^12.0.0-canary.9f68a932e.0", - "@material/elevation": "^12.0.0-canary.9f68a932e.0", - "@material/form-field": "^12.0.0-canary.9f68a932e.0", - "@material/list": "^12.0.0-canary.9f68a932e.0", - "@material/menu": "^12.0.0-canary.9f68a932e.0", - "@material/radio": "^12.0.0-canary.9f68a932e.0", - "@material/ripple": "^12.0.0-canary.9f68a932e.0", - "@material/switch": "^12.0.0-canary.9f68a932e.0", - "@material/tab-bar": "^12.0.0-canary.9f68a932e.0", - "@material/textfield": "^12.0.0-canary.9f68a932e.0", - "@material/theme": "^12.0.0-canary.9f68a932e.0", - "@material/typography": "^12.0.0-canary.9f68a932e.0", + "@material/button": "^12.0.0-canary.90e08fc6b.0", + "@material/card": "^12.0.0-canary.90e08fc6b.0", + "@material/checkbox": "^12.0.0-canary.90e08fc6b.0", + "@material/chips": "^12.0.0-canary.90e08fc6b.0", + "@material/dialog": "^12.0.0-canary.90e08fc6b.0", + "@material/elevation": "^12.0.0-canary.90e08fc6b.0", + "@material/form-field": "^12.0.0-canary.90e08fc6b.0", + "@material/menu": "^12.0.0-canary.90e08fc6b.0", + "@material/radio": "^12.0.0-canary.90e08fc6b.0", + "@material/ripple": "^12.0.0-canary.90e08fc6b.0", + "@material/switch": "^12.0.0-canary.90e08fc6b.0", + "@material/tab-bar": "^12.0.0-canary.90e08fc6b.0", + "@material/textfield": "^12.0.0-canary.90e08fc6b.0", + "@material/theme": "^12.0.0-canary.90e08fc6b.0", + "@material/typography": "^12.0.0-canary.90e08fc6b.0", "@vueuse/core": "^5.1.3", "@yzfe/svgicon": "^1.0.1", "@yzfe/vue3-svgicon": "^1.0.1", + "animate.css": "^4.1.1", "axios": "^0.21.1", "camelcase-keys": "^7.0.0", "chroma-js": "^2.1.2", @@ -58,6 +58,7 @@ "lodash": "^4.17.21", "marked": "^2.1.3", "normalize.css": "^8.0.1", + "perfect-scrollbar": "^1.5.2", "sass": "^1.35.1", "sass-loader": "^12.1.0", "snakecase-keys": "^4.0.2", diff --git a/scripts/import-svg-icons.mjs b/scripts/import-svg-icons.mjs index 1906f22..be470fb 100644 --- a/scripts/import-svg-icons.mjs +++ b/scripts/import-svg-icons.mjs @@ -8,7 +8,12 @@ const template = (importContent, dataContent) => ` diff --git a/src/components/cards/postThumbCards/PostThumbCardMobile.vue b/src/components/cards/postThumbCards/PostThumbCardMobile.vue new file mode 100644 index 0000000..a5ddf2f --- /dev/null +++ b/src/components/cards/postThumbCards/PostThumbCardMobile.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/components/icon/UiIcon.vue b/src/components/icon/UiIcon.vue index 9fe2039..a2b2223 100644 --- a/src/components/icon/UiIcon.vue +++ b/src/components/icon/UiIcon.vue @@ -1,7 +1,12 @@ diff --git a/src/layouts/components/.gitkeep b/src/layouts/components/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/layouts/components/cover/Cover.vue b/src/layouts/components/cover/Cover.vue index 04e0853..5829f8e 100644 --- a/src/layouts/components/cover/Cover.vue +++ b/src/layouts/components/cover/Cover.vue @@ -17,14 +17,19 @@
-

{{ sloganText }}

+

{{ sloganText }} 

-
-
+
+
- - You got to put the past behind you before you can move on. - + + {{ quote }} + + +
+
+ + {{ signature }}
+
diff --git a/src/layouts/components/footer/Footer.vue b/src/layouts/components/footer/Footer.vue index fa7201a..67507f4 100644 --- a/src/layouts/components/footer/Footer.vue +++ b/src/layouts/components/footer/Footer.vue @@ -2,7 +2,7 @@