{"id":35546692,"url":"https://github.com/pickles2/lib-px2-theme-editor","last_synced_at":"2026-01-20T17:57:15.015Z","repository":{"id":57041332,"uuid":"320179791","full_name":"pickles2/lib-px2-theme-editor","owner":"pickles2","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-29T12:33:09.000Z","size":11992,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-14T12:18:36.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pickles2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-10T06:24:10.000Z","updated_at":"2025-07-29T12:33:31.000Z","dependencies_parsed_at":"2022-08-23T23:31:12.424Z","dependency_job_id":"dc18061c-414e-4a78-9294-8c08f73b32bd","html_url":"https://github.com/pickles2/lib-px2-theme-editor","commit_stats":null,"previous_names":["pickles2/pickles2-theme-editor"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/pickles2/lib-px2-theme-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pickles2%2Flib-px2-theme-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pickles2%2Flib-px2-theme-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pickles2%2Flib-px2-theme-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pickles2%2Flib-px2-theme-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pickles2","download_url":"https://codeload.github.com/pickles2/lib-px2-theme-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pickles2%2Flib-px2-theme-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28198673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-04T02:00:06.065Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-04T06:02:32.024Z","updated_at":"2026-01-04T06:04:17.860Z","avatar_url":"https://github.com/pickles2.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pickles2/lib-px2-theme-editor\n\n## Usage\n\n### Server Side (PHP)\n\n```php\n\u003c?php\n/**\n * api.php\n */\nrequire_once('vendor/autoload.php');\n\n$px2te = new pickles2\\libs\\themeEditor\\main( $px );\n$px2te-\u003einit(array(\n\t'appMode' =\u003e 'web', // 'web' or 'desktop'. default to 'web'\n\t'entryScript' =\u003e '/realpath/to/.px_execute.php', // Pickles 2 のエンドポイント\n\t'commands' =\u003e array(\n\t\t// コマンドのパスを指定する (任意)\n\t\t'php' =\u003e array(\n\t\t\t'bin' =\u003e 'php',\n\t\t\t'ini' =\u003e null,\n\t\t),\n\t),\n));\n\n$value = $px2te-\u003egpi( json_decode( $_REQUEST['data'] ) );\nheader('Content-type: text/json');\necho json_encode($value);\nexit;\n```\n\n\n### Client Side\n\n```php\n\u003cdiv id=\"canvas\"\u003e\u003c/div\u003e\n\n\u003c!--\nエディタが利用する CSS や JavaScript などのリソースファイルがあります。\n`$px2te-\u003eget_client_resources()` からリソースの一覧を取得し、読み込んでください。\n--\u003e\n\n\u003c?php\nrequire_once('vendor/autoload.php');\n\n$px2te = new pickles2\\libs\\themeEditor\\main( $px );\n$px2te-\u003einit( /* any options */ );\n\n$resources = $px2te-\u003eget_client_resources();\nforeach($resources-\u003ecss as $css_file){\n\techo('\u003clink rel=\"stylesheet\" href=\"'.htmlspecialchars($css_file).'\" /\u003e');\n}\nforeach($resources-\u003ejs as $js_file){\n\techo('\u003cscript src=\"'.htmlspecialchars($js_file).'\"\u003e\u003c/script\u003e');\n}\n?\u003e\n\n\u003cscript\u003e\nvar pickles2ThemeEditor = new Pickles2ThemeEditor();\npickles2ThemeEditor.init(\n\t{\n\t\t'elmCanvas': document.getElementById('canvas'), // \u003c- 編集画面を描画するための器となる要素\n\t\t'lang': 'en', // language\n\t\t'gpiBridge': function(input, callback){\n\t\t\t// GPI(General Purpose Interface) Bridge\n\t\t\t// broccoliは、バックグラウンドで様々なデータ通信を行います。\n\t\t\t// GPIは、これらのデータ通信を行うための汎用的なAPIです。\n\t\t\t$.ajax({\n\t\t\t\t\"url\": '/your/api/path',\n\t\t\t\t\"type\": 'post',\n\t\t\t\t'data': {'data':JSON.stringify(input)},\n\t\t\t\t\"success\": function(data){\n\t\t\t\t\tcallback(data);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn;\n\t\t},\n        'themeLayoutEditor': function(themeId, layoutId){\n            alert('themeLayoutEditor: '+themeId+'/'+layoutId);\n        },\n        'openInBrowser': function(path){\n            alert('openInBrowser: '+path);\n        },\n        'openInFinder': function(path){\n            alert('openInFinder: '+path);\n        },\n        'openInTextEditor': function(path){\n            alert('openInTextEditor: '+path);\n        }\n\t},\n\tfunction(){\n\t\t// スタンバイ完了したら呼び出されるコールバックメソッドです。\n\t\tconsole.info('standby!!');\n\t}\n);\n\u003c/script\u003e\n```\n\n\n\n## 更新履歴 - Change log\n\n### pickles2/lib-px2-theme-editor v0.3.0 (2025年7月29日)\n\n- テーマテンプレート `Kaleflower` を追加した。\n- テーマレイアウトの編集画面で、サイト名、キャッチフレーズ、ページタイトル、著作権者の表示、各ナビゲーション の実際の値が表示されるようになった。\n\n### pickles2/lib-px2-theme-editor v0.2.13 (2025年4月3日)\n\n- テーマレイアウトの2重拡張子に対応した。\n- `px2style` の `.px2-viewport-fit` の変更に対応し、ビューポートにフィットさせる処理を追加した。\n\n### pickles2/lib-px2-theme-editor v0.2.12 (2024年9月10日)\n\n- モジュールを更新した。\n\n### pickles2/lib-px2-theme-editor v0.2.11 (2024年4月30日)\n\n- \"2023 Pickles 2\" テンプレート, \"2023 Pickles 2 Darkmode\" テンプレート\n\t- スタイルに関する微調整。\n- その他、いくつかの細かい修正。\n\n### pickles2/lib-px2-theme-editor v0.2.10 (2024年2月18日)\n\n- \"2023 Pickles 2\" テンプレート, \"2023 Pickles 2 Darkmode\" テンプレート\n\t- サイドバーが画面内に固定されるようになった。\n\t- スタイルに関する微調整。\n- スタートアップ機能で、テーマテンプレートごとの異なるオプションに対応した。\n- ブロックエディタで作成された新規レイアウトの編集が開始できない不具合を修正。\n\n### pickles2/lib-px2-theme-editor v0.2.9 (2023年11月13日)\n\n- \"2023 Pickles 2\" テンプレートのスタイル調整を追加した。\n- \"2023 Pickles 2\" テンプレートで、 `article` レイアウトにロゴ画像が適用されない不具合を修正した。\n- 多言語対応に関する更新。\n- サブプロジェクトで プレビュー したとき、`$conf-\u003epath_controot` を考慮した画面を開くようになった。\n- テンプレート `Pickles 2 Darkmode 2023` の改善。\n- ダークモード用のスタイルをバンドルした。\n\n### pickles2/lib-px2-theme-editor v0.2.8 (2023年9月24日)\n\n- 編集方法の変更ダイアログで、現在の編集方法がプリセットされない不具合を修正した。\n\n### pickles2/lib-px2-theme-editor v0.2.7 (2023年8月29日)\n\n- `article` レイアウトを標準化した。\n- ダークモードテンプレートのスタイリングを修正。\n\n### pickles2/lib-px2-theme-editor v0.2.6 (2023年5月1日)\n\n- \"2023 Pickles 2\" テンプレートに、コンテンツモジュールのスタイル調整を追加した。\n- \"2023 Pickles 2 Darkmode\" テンプレートを追加した。\n- \"SHIROMUKU\" テンプレートを追加した。\n- テーマアイコンの表示を廃止した。\n- クライアントサイドにオプション `openInBrowser` を追加。\n- テンプレートが キャッチコピー(`$conf-\u003etagline`) に対応した。\n\n### pickles2/lib-px2-theme-editor v0.2.5 (2023年3月11日)\n\n- テーマテンプレートのユーザビリティを向上と不具合の修正。\n- ハンバーガーメニューモジュールを追加。\n- バナーモジュールを追加。\n\n### pickles2/lib-px2-theme-editor v0.2.4 (2023年2月11日)\n\n- スタートアップ機能での初期化時に、 Broccoli コンテンツのリビルドを実行するようになった。\n\n### pickles2/lib-px2-theme-editor v0.2.3 (2022年12月29日)\n\n- `openInFinder`、 `openInTextEditor` を省略できるようになった。\n\n### pickles2/lib-px2-theme-editor v0.2.2 (2022年11月3日)\n\n- テーマテンプレートの微修正。\n\n### pickles2/lib-px2-theme-editor v0.2.1 (2022年6月5日)\n\n- 依存パッケージのバージョンを更新。\n\n### pickles2/lib-px2-theme-editor v0.2.0 (2022年1月8日)\n\n- サポートするPHPのバージョンを `\u003e=7.3.0` に変更。\n- PHP 8.1 に対応した。\n\n### pickles2/lib-px2-theme-editor v0.1.1 (2022年1月3日)\n\n- レイアウトの編集方法変更ができるようになった。\n- パフォーマンスに関する改善。\n- サーバーサイドの初期化オプション `commands` を追加。\n- 内部コードの改善。\n\n### pickles2/lib-px2-theme-editor v0.1.0 (2021年6月26日)\n\n- テーマのスタートアップ機能を追加。\n\n### pickles2/lib-px2-theme-editor v0.0.2 (2021年2月21日)\n\n- Windows で プラグインオプションの取得と、デフォルトテーマの変更に失敗する問題を修正。\n- レイアウトとスタイリングの修正。\n- ダークモードへの対応。\n- その他の細かい不具合の修正。\n\n### pickles2/lib-px2-theme-editor v0.0.1 (2020年12月30日)\n\n- 初回リリース\n\n\n## License\n\nMIT License\n\n\n## Author\n\n- Tomoya Koyanagi \u003ctomk79@gmail.com\u003e\n- website: \u003chttps://www.pxt.jp/\u003e\n- Twitter: @tomk79 \u003chttps://twitter.com/tomk79/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpickles2%2Flib-px2-theme-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpickles2%2Flib-px2-theme-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpickles2%2Flib-px2-theme-editor/lists"}