Skip to content

Commit fde18e2

Browse files
committed
v0.0.11
1 parent 40b83ec commit fde18e2

File tree

17 files changed

+323
-111
lines changed

17 files changed

+323
-111
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"prepackage": "npm run build --workspaces --if-present",
1313
"package": "rm -rf build && npm run build && ",
1414
"release:commit": "node scripts/commit.js",
15-
"release:patch": "npm version patch --workspaces && npm run release:commit",
16-
"release:minor": "npm version minor --workspaces && npm run release:commit",
17-
"release:major": "npm version major --workspaces && npm run release:commit",
15+
"release:patch": "npm version patch -w develop && npm run release:commit",
16+
"release:minor": "npm version minor -w develop && npm run release:commit",
17+
"release:major": "npm version major -w develop && npm run release:commit",
1818
"check-update": "npx -p npm-check-updates -c ncu",
1919
"prepare": "husky"
2020
},

scripts/build.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import fs from 'fs-extra';
22
import { zipPromise } from './lib/index.js';
33
import { readFile } from 'fs/promises';
4-
import path from 'path';
54

65
const zipDir = 'develop';
76
const srcDir = ['themes', 'bin'];

scripts/commit.js

Lines changed: 12 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,24 @@
1-
import fs from 'fs';
2-
import path from 'path';
31
import { systemCmd } from './lib/index.js';
2+
import { readFile } from 'fs/promises';
43
import { fileURLToPath } from 'url';
5-
import { dirname } from 'path';
4+
import { dirname, join } from 'path';
65

7-
// __dirname の代替
86
const __filename = fileURLToPath(import.meta.url);
97
const __dirname = dirname(__filename);
108

11-
async function getWorkspaces() {
12-
const rootPackage = JSON.parse(await fs.promises.readFile(path.resolve(__dirname, '../package.json'), 'utf8'));
13-
return rootPackage.workspaces || [];
14-
}
15-
16-
async function createTag(packageJson, isWorkspace = false) {
17-
const version = packageJson.version;
18-
const tagName = isWorkspace ? `${packageJson.name}@${version}` : `v${version}`;
19-
20-
try {
21-
await systemCmd(`git tag ${tagName}`);
22-
console.log(`Created tag: ${tagName}`);
23-
} catch (error) {
24-
console.error(`Failed to create tag ${tagName}:`, error.message);
25-
}
26-
}
27-
28-
async function stagePackageFiles(filepath) {
29-
const dirPath = path.dirname(filepath);
30-
const lockFile = path.join(dirPath, 'package-lock.json');
31-
32-
await systemCmd(`git add ${filepath}`);
33-
if (fs.existsSync(lockFile)) {
34-
await systemCmd(`git add ${lockFile}`);
35-
}
36-
37-
return JSON.parse(await fs.promises.readFile(filepath, 'utf8'));
38-
}
39-
40-
async function commitWorkspaceChanges(workspacePackages) {
41-
try {
42-
const versions = workspacePackages.map((pkg) => `${pkg.name}@${pkg.version}`).join(', ');
43-
44-
const message = `chore(workspace): update versions to ${versions}`;
45-
await systemCmd(`git commit -m "${message}" --no-verify`);
46-
console.log('Committed workspace changes');
47-
} catch (error) {
48-
console.error('Failed to commit workspace changes:', error.message);
49-
throw error;
50-
}
51-
}
9+
// package.json のバージョンを読み込み
10+
const pkgJsonPath = join(__dirname, '../themes/develop/package.json');
11+
const { version } = JSON.parse(await readFile(pkgJsonPath, 'utf8'));
5212

5313
async function main() {
5414
try {
55-
// ワークスペースのpackage.jsonをステージングしてタグを作成
56-
const workspaces = await getWorkspaces();
57-
const workspacePackages = [];
58-
59-
for (const workspace of workspaces) {
60-
const pattern = workspace.replace(/\/\*$/, '');
61-
const basePath = path.resolve(__dirname, '..', pattern);
62-
const dirs = await fs.promises.readdir(basePath);
63-
64-
for (const dir of dirs) {
65-
const packagePath = path.resolve(basePath, dir, 'package.json');
66-
if (fs.existsSync(packagePath)) {
67-
const packageJson = await stagePackageFiles(packagePath);
68-
workspacePackages.push(packageJson);
69-
await createTag(packageJson, true);
70-
}
71-
}
72-
}
73-
74-
await systemCmd(`git add -A`);
75-
await systemCmd(`git commit -m "chore(workspace): update versions" --no-verify`);
76-
await systemCmd(`git push --tags`);
77-
78-
console.log('✅ Version update completed');
79-
} catch (error) {
80-
console.error('Error during version update:', error);
81-
process.exit(1);
15+
await systemCmd('git add -A');
16+
await systemCmd(`git commit -m "v${version}"`);
17+
await systemCmd(`git tag v${version}`);
18+
await systemCmd('git push');
19+
await systemCmd('git push --tags');
20+
} catch (err) {
21+
console.error(err);
8222
}
8323
}
8424

themes/develop/contact/form/input.html

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,18 @@
201201
</div>
202202
</div>
203203
<input type="hidden" name="field[]" value="cue">
204+
<input type="hidden" name="cue:v#required" id="cue-v-required">
205+
<div role="alert" aria-live="assertive">
206+
<div id="cue-v-required-message" data-validator-label="cue-v-required"
207+
class="validator-result-{cue:validator#required}">
208+
<span class="flex w-full mt-2 text-red-600 [&>svg]:text-foreground">
209+
<span aria-hidden="true">
210+
<svg class="w-5 h-5 -translate-y-0.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" /></svg>
211+
</span>
212+
<span class="ml-2 mb-1 font-bold leading-none tracking-tight">お問い合わせ種別を選択してください</span>
213+
</span>
214+
</div>
215+
</div>
204216
</div>
205217

206218
<div class="mt-8">
@@ -254,6 +266,184 @@
254266
</div>
255267
</div>
256268

269+
<fieldset>
270+
<legend class="contact-form-label">弊社を何をきっかけに知りましたか?</legend>
271+
<div class="contact-form-control">
272+
<div class="acms-admin-form-checkbox">
273+
<input type="checkbox" name="know[]" value="sns" {know:checked#sns} id="input-checkbox-know-sns" />
274+
<label for="input-checkbox-know-sns">
275+
<i class="acms-admin-ico-checkbox"></i>SNS</label>
276+
</div>
277+
<div class="acms-admin-form-checkbox">
278+
<input type="checkbox" name="know[]" value="paper" {know:checked#paper} id="input-checkbox-know-paper" />
279+
<label for="input-checkbox-know-paper">
280+
<i class="acms-admin-ico-checkbox"></i>チラシ</label>
281+
</div>
282+
<div class="acms-admin-form-checkbox">
283+
<input type="checkbox" name="know[]" value="web" {know:checked#web} id="input-checkbox-know-web" />
284+
<label for="input-checkbox-know-web">
285+
<i class="acms-admin-ico-checkbox"></i>ウェブ</label>
286+
</div>
287+
<div class="acms-admin-form-checkbox">
288+
<input type="checkbox" name="know[]" value="other" {know:checked#other} id="input-checkbox-know-other" />
289+
<label for="input-checkbox-know-other">
290+
<i class="acms-admin-ico-checkbox"></i>その他</label>
291+
</div>
292+
<input type="hidden" name="field[]" value="know" />
293+
<input type="hidden" name="know:v#required" id="know-v-required">
294+
<input type="hidden" name="know:v#all_minChecked" value="2" id="know-v-all_minChecked">
295+
</div>
296+
<div role="alert" aria-live="assertive">
297+
<div id="know-v-required-message" data-validator-label="know-v-required"
298+
class="validator-result-{know:validator#required}">
299+
<span class="flex w-full mt-2 text-red-600 [&>svg]:text-foreground">
300+
<span aria-hidden="true">
301+
<svg class="w-5 h-5 -translate-y-0.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" /></svg>
302+
</span>
303+
<span class="ml-2 mb-1 font-bold leading-none tracking-tight">選択してください</span>
304+
</span>
305+
</div>
306+
<div id="know-v-all_minChecked-message" data-validator-label="know-v-all_minChecked"
307+
class="validator-result-{know:validator#all_minChecked}">
308+
<span class="flex w-full mt-2 text-red-600 [&>svg]:text-foreground">
309+
<span aria-hidden="true">
310+
<svg class="w-5 h-5 -translate-y-0.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" /></svg>
311+
</span>
312+
<span class="ml-2 mb-1 font-bold leading-none tracking-tight">2つ以上選択してください</span>
313+
</span>
314+
</div>
315+
</div>
316+
</fieldset>
317+
<h2 class="acms-admin-admin-title2">経歴</h2>
318+
<table class="js-fieldgroup-sortable adminTable acms-admin-table-admin-edit">
319+
<thead class="acms-admin-hide-sp">
320+
<tr>
321+
<th class="acms-admin-table-left acms-admin-admin-config-table-item-handle"> </th>
322+
<th class="acms-admin-table-left">会社名</th>
323+
<th class="acms-admin-table-left">勤続年数</th>
324+
<th class="acms-admin-table-left">役職</th>
325+
<th class="acms-admin-table-left acms-admin-admin-config-table-action">削除</th>
326+
</tr>
327+
</thead>
328+
<tbody>
329+
<!-- BEGIN group_career:loop -->
330+
<tr class="sortable-item">
331+
<td class="item-handle acms-admin-table-nowrap">
332+
<i class="acms-admin-icon-sort"></i>
333+
</td>
334+
<td>
335+
<input type="text" name="company_name[]" class="acms-admin-form-width-full" value="{company_name}" />
336+
<div data-validator-label="company_name-v-required" class="validator-result-{company_name:v#required}">
337+
<p class="error-text">
338+
<span class="acms-admin-icon acms-admin-icon-attention"></span>会社名を入力してください</p>
339+
</div>
340+
</td>
341+
<td>
342+
<div class="acms-admin-form-radio">
343+
<input type="radio" name="duration_of_service[]" {duration_of_service:checked#1} id="input-radio-duration_of_service-1" value="1" />
344+
<label for="input-radio-duration_of_service-1">
345+
<i class="acms-admin-ico-radio"></i>0 ~ 3年</label>
346+
</div>
347+
<div class="acms-admin-form-radio">
348+
<input type="radio" name="duration_of_service[]" {duration_of_service:checked#2} id="input-radio-duration_of_service-2" value="2" />
349+
<label for="input-radio-duration_of_service-2">
350+
<i class="acms-admin-ico-radio"></i>3 ~ 5年</label>
351+
</div>
352+
<div class="acms-admin-form-radio">
353+
<input type="radio" name="duration_of_service[]" {duration_of_service:checked#3} id="input-radio-duration_of_service-3" value="3" />
354+
<label for="input-radio-duration_of_service-3">
355+
<i class="acms-admin-ico-radio"></i>5年以上</label>
356+
</div>
357+
<div data-validator-label="duration_of_service-v-required" class="validator-result-{duration_of_service:v#required}">
358+
<p class="error-text">
359+
<span class="acms-admin-icon acms-admin-icon-attention"></span>勤続年数を選択してください</p>
360+
</div>
361+
</td>
362+
<td>
363+
<select name="company_role[]" class="acms-admin-form-width-full">
364+
<option value=""></option>
365+
<option value="hirasyain" {company_role:selected#hirasyain}>平社員</option>
366+
<option value="katyo" {company_role:selected#katyo}>課長</option>
367+
<option value="butyo" {company_role:selected#butyo}>部長</option>
368+
</select>
369+
<div data-validator-label="company_role-v-required" class="validator-result-{company_role:v#required}">
370+
<p class="error-text">
371+
<span class="acms-admin-icon acms-admin-icon-attention"></span>役職を選択してください</p>
372+
</div>
373+
</td>
374+
<td class="acms-admin-table-nowrap">
375+
<input type="button" class="item-delete acms-admin-btn-admin acms-admin-btn-admin-danger" value="削除" />
376+
</td>
377+
</tr>
378+
<!-- END group_career:loop -->
379+
<tr class="sortable-item item-template">
380+
<td class="item-handle acms-admin-table-nowrap">
381+
<i class="acms-admin-icon-sort"></i>
382+
</td>
383+
<td>
384+
<input type="text" name="company_name[]" class="acms-admin-form-width-full" value="" />
385+
<div data-validator-label="company_name-v-required" class="validator-result-1">
386+
<p class="error-text">
387+
<span class="acms-admin-icon acms-admin-icon-attention"></span>会社名を入力してください</p>
388+
</div>
389+
</td>
390+
<td>
391+
<div class="acms-admin-form-radio">
392+
<input type="radio" name="duration_of_service[]" id="input-radio-duration_of_service-1" value="1" />
393+
<label for="input-radio-duration_of_service-1">
394+
<i class="acms-admin-ico-radio"></i>0 ~ 3年</label>
395+
</div>
396+
<div class="acms-admin-form-radio">
397+
<input type="radio" name="duration_of_service[]" id="input-radio-duration_of_service-2" value="2" />
398+
<label for="input-radio-duration_of_service-2">
399+
<i class="acms-admin-ico-radio"></i>3 ~ 5年</label>
400+
</div>
401+
<div class="acms-admin-form-radio">
402+
<input type="radio" name="duration_of_service[]" id="input-radio-duration_of_service-3" value="3" />
403+
<label for="input-radio-duration_of_service-3">
404+
<i class="acms-admin-ico-radio"></i>5年以上</label>
405+
</div>
406+
<div data-validator-label="duration_of_service-v-required" class="validator-result-1">
407+
<p class="error-text">
408+
<span class="acms-admin-icon acms-admin-icon-attention"></span>勤続年数を選択してください</p>
409+
</div>
410+
</td>
411+
<td>
412+
<select name="company_role[]" class="acms-admin-form-width-full">
413+
<option value=""></option>
414+
<option value="hirasyain">平社員</option>
415+
<option value="katyo">課長</option>
416+
<option value="butyo">部長</option>
417+
</select>
418+
<div data-validator-label="company_role-v-required" class="validator-result-1">
419+
<p class="error-text">
420+
<span class="acms-admin-icon acms-admin-icon-attention"></span>役職を選択してください</p>
421+
</div>
422+
</td>
423+
<td class="acms-admin-table-nowrap">
424+
<input type="button" class="item-delete acms-admin-btn-admin acms-admin-btn-admin-danger" value="削除" />
425+
</td>
426+
</tr>
427+
</tbody>
428+
<tfoot>
429+
<tr>
430+
<td colSpan="5">
431+
<input type="button" class="item-insert acms-admin-btn-admin" value="追加" />
432+
</td>
433+
</tr>
434+
</tfoot>
435+
</table>
436+
<input type="hidden" name="@group_career[]" value="company_name" />
437+
<input type="hidden" name="field[]" value="company_name" />
438+
<input type="hidden" name="company_name:v#required" id="company_name-v-required" value="" />
439+
<input type="hidden" name="@group_career[]" value="duration_of_service" />
440+
<input type="hidden" name="field[]" value="duration_of_service" />
441+
<input type="hidden" name="duration_of_service:v#required" id="duration_of_service-v-required" value="" />
442+
<input type="hidden" name="@group_career[]" value="company_role" />
443+
<input type="hidden" name="field[]" value="company_role" />
444+
<input type="hidden" name="company_role:v#required" id="company_role-v-required" value="" />
445+
<input type="hidden" name="field[]" value="@group_career" />
446+
257447
<!-- お問い合わせNo(件名用) -->
258448
<input type="hidden" name="contactNo" value="%{Y}%{n}%{j}%{H}%{i}%{s}">
259449
<input type="hidden" name="field[]" value="contactNo">

themes/develop/contact/form/main.html

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<!-- BEGIN step -->
99
<!-- フォームステップ:初期 -->
10-
<form action="?step=reapply#orderForm" method="post" enctype="multipart/form-data" class="text-gray-800 js-validator">
10+
<form id="contactForm" action="?step=reapply#orderForm" method="post" enctype="multipart/form-data" class="text-gray-800 js-validator">
1111
@include("/contact/form/input.html")
1212
<div class="mt-12 pt-10 text-right border-t border-solid border-gray-200">
1313
<input type="hidden" name="step" value="confirm">
@@ -18,6 +18,41 @@
1818
class="inline-block px-6 py-2 text-sm font-semibold text-center text-white transition duration-100 bg-indigo-600 rounded-md outline-none hover:bg-indigo-500 active:bg-indigo-700 ring-blue-300 md:text-base">
1919
</div>
2020
</form>
21+
<div>
22+
<label for="name" class="inline-block mb-2">
23+
<span class="text-sm font-bold sm:text-base">会社名</span>
24+
<span class="bg-red-100 text-red-800 text-xs font-semibold ml-2 px-2.5 py-0.5 rounded-full">必須</span>
25+
</label>
26+
<div>
27+
<input
28+
name="company"
29+
type="text"
30+
value="{company}"
31+
placeholder="例)山田 太郎"
32+
autocomplete="company"
33+
id="company"
34+
data-validator="company"
35+
class="w-full md:w-6/12 px-3 py-2 text-gray-800 transition duration-100 border border-gray-200 rounded-md outline-none bg-gray-50 [&.invalid]:border-red-500 [&.invalid]:bg-red-100 focus:ring ring-blue-300"
36+
aria-required="true"
37+
aria-describedby="company-v-required-message"
38+
form="contactForm"
39+
>
40+
<input type="hidden" name="field[]" value="company" form="contactForm">
41+
<input type="hidden" name="company:v#required" id="company-v-required" form="contactForm">
42+
<input type="hidden" name="company:c" value="KV" form="contactForm">
43+
</div>
44+
<div role="alert" aria-live="assertive">
45+
<div id="company-v-required-message" data-validator-label="company-v-required"
46+
class="validator-result-{company:validator#required}">
47+
<span class="flex w-full mt-2 text-red-600 [&>svg]:text-foreground">
48+
<span aria-hidden="true">
49+
<svg class="w-5 h-5 -translate-y-0.5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z" /></svg>
50+
</span>
51+
<span class="ml-2 mb-1 font-bold leading-none tracking-tight">会社名を入力してください</span>
52+
</span>
53+
</div>
54+
</div>
55+
</div>
2156
<!-- END step -->
2257

2358
<!-- BEGIN step#reapply -->

themes/develop/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)