@jjlmoya/utils-games-development 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +67 -0
- package/scripts/postinstall.mjs +27 -0
- package/src/category/GamesCategorySEO.astro +19 -0
- package/src/category/i18n/de.ts +15 -0
- package/src/category/i18n/en.ts +15 -0
- package/src/category/i18n/es.ts +15 -0
- package/src/category/i18n/fr.ts +15 -0
- package/src/category/i18n/id.ts +10 -0
- package/src/category/i18n/it.ts +10 -0
- package/src/category/i18n/ja.ts +10 -0
- package/src/category/i18n/ko.ts +10 -0
- package/src/category/i18n/nl.ts +10 -0
- package/src/category/i18n/pl.ts +10 -0
- package/src/category/i18n/pt.ts +10 -0
- package/src/category/i18n/ru.ts +10 -0
- package/src/category/i18n/sv.ts +10 -0
- package/src/category/i18n/tr.ts +10 -0
- package/src/category/i18n/zh.ts +10 -0
- package/src/category/index.ts +24 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +11 -0
- package/src/entries.ts +5 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +21 -0
- package/src/layouts/PreviewLayout.astro +122 -0
- package/src/pages/[locale]/[slug].astro +165 -0
- package/src/pages/[locale].astro +251 -0
- package/src/pages/index.astro +4 -0
- package/src/tests/diacritics_density.test.ts +118 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/i18n_coverage.test.ts +36 -0
- package/src/tests/inverted_punctuation.test.ts +84 -0
- package/src/tests/locale_completeness.test.ts +27 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_en_dash.test.ts +70 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/pagespeed_best_practices.test.ts +198 -0
- package/src/tests/qa-test-helpers.ts +32 -0
- package/src/tests/qa_bibliography_links.test.ts +41 -0
- package/src/tests/qa_claim_evidence.test.ts +69 -0
- package/src/tests/qa_logic_reference_coverage.test.ts +46 -0
- package/src/tests/qa_runtime_i18n.test.ts +100 -0
- package/src/tests/schemas_fulfillment.test.ts +23 -0
- package/src/tests/script_density.test.ts +94 -0
- package/src/tests/seo_length.test.ts +23 -0
- package/src/tests/slug_language_code_format.test.ts +23 -0
- package/src/tests/slug_uniqueness.test.ts +81 -0
- package/src/tests/title_quality.test.ts +56 -0
- package/src/tests/tool_validation.test.ts +17 -0
- package/src/tool/steamCapsuleGenerator/bibliography.astro +6 -0
- package/src/tool/steamCapsuleGenerator/bibliography.ts +6 -0
- package/src/tool/steamCapsuleGenerator/component.astro +289 -0
- package/src/tool/steamCapsuleGenerator/components/SteamLibraryGridMockup.astro +51 -0
- package/src/tool/steamCapsuleGenerator/components/SteamLibraryMockup.astro +64 -0
- package/src/tool/steamCapsuleGenerator/components/SteamMasterControls.astro +2 -0
- package/src/tool/steamCapsuleGenerator/components/SteamStoreMockup.astro +90 -0
- package/src/tool/steamCapsuleGenerator/entry.ts +28 -0
- package/src/tool/steamCapsuleGenerator/i18n/de.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/en.ts +243 -0
- package/src/tool/steamCapsuleGenerator/i18n/es.ts +243 -0
- package/src/tool/steamCapsuleGenerator/i18n/fr.ts +165 -0
- package/src/tool/steamCapsuleGenerator/i18n/id.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/it.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/ja.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/ko.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/nl.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/pl.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/pt.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/ru.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/shared.ts +46 -0
- package/src/tool/steamCapsuleGenerator/i18n/sv.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/tr.ts +144 -0
- package/src/tool/steamCapsuleGenerator/i18n/zh.ts +144 -0
- package/src/tool/steamCapsuleGenerator/index.ts +9 -0
- package/src/tool/steamCapsuleGenerator/logic.test.ts +72 -0
- package/src/tool/steamCapsuleGenerator/logic.ts +259 -0
- package/src/tool/steamCapsuleGenerator/seo.astro +15 -0
- package/src/tool/steamCapsuleGenerator/steam-capsule-generator.css +697 -0
- package/src/tool/steamCapsuleGenerator/ui.ts +23 -0
- package/src/tool/steamCapsuleGenerator/validation.ts +22 -0
- package/src/tools.ts +8 -0
- package/src/types.ts +72 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SteamCapsuleGeneratorUI } from '../ui';
|
|
3
|
+
import { bibliographyEntries } from '../bibliography';
|
|
4
|
+
|
|
5
|
+
export const content: ToolLocaleContent<SteamCapsuleGeneratorUI> = {
|
|
6
|
+
slug: 'steam-kapsel-skapare',
|
|
7
|
+
title: 'Steam Kapsel och Grafik Generator',
|
|
8
|
+
description: 'Beskär, förhandsgranska och formatera officiella Steam butiks och bibliotekskapslar med säkerhetszonskontroll.',
|
|
9
|
+
ui: {
|
|
10
|
+
uploadTitle: 'Ladda Upp Spelgrafik',
|
|
11
|
+
uploadHint: 'Ladda upp en högupplöst bild (rekommenderas 3840x1240 px eller större).',
|
|
12
|
+
chooseFile: 'Välj Fil',
|
|
13
|
+
minimumSize: 'Rekommenderad minsta storlek: 1920x1080 px',
|
|
14
|
+
horizontalFocus: 'Horisontellt Fokus (X)',
|
|
15
|
+
verticalFocus: 'Vertikalt Fokus (Y)',
|
|
16
|
+
zoomLevel: 'Zoomnivå',
|
|
17
|
+
resetFocus: 'Återställ Fokus',
|
|
18
|
+
safeZone: 'Säker Zon',
|
|
19
|
+
downloadZip: 'Ladda Ner Alla Filer (ZIP)',
|
|
20
|
+
headerCapsule: 'Headerkapsel (460x215 / HD 920x430)',
|
|
21
|
+
smallCapsule: 'Liten Kapsel (231x87 / HD 462x174)',
|
|
22
|
+
mainCapsule: 'Huvudkapsel (616x353 / HD 1232x706)',
|
|
23
|
+
verticalCapsule: 'Vertikal Bibliotekskapsel (300x450 / HD 600x900)',
|
|
24
|
+
libraryHero: 'Biblioteksbanner (1920x620 / HD 3840x1240)',
|
|
25
|
+
communityIcon: 'Community Appikon (32x32 / HD 184x184)',
|
|
26
|
+
storePreviewTab: 'Steam Butik',
|
|
27
|
+
libraryPreviewTab: 'Steam Bibliotek',
|
|
28
|
+
allAssetsTab: 'Alla Storlekar',
|
|
29
|
+
toggleSafeZones: 'Säkerhetszoner',
|
|
30
|
+
toggleSteamOverlay: 'Steam Gränssnitt'
|
|
31
|
+
},
|
|
32
|
+
seo: [
|
|
33
|
+
{
|
|
34
|
+
type: 'title',
|
|
35
|
+
level: 2,
|
|
36
|
+
text: 'Steam Grafik Kapsel Specifikationer'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'paragraph',
|
|
40
|
+
html: 'Steam butikssidor och bibliotek använder standardiserade kapselbilder.'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'stats',
|
|
44
|
+
columns: 4,
|
|
45
|
+
items: [
|
|
46
|
+
{ label: 'Butik Header HD Upplösning', value: '920 x 430 px' },
|
|
47
|
+
{ label: 'Biblioteks Kapsel Proportion', value: '2:3 Vertikal' },
|
|
48
|
+
{ label: 'Biblioteks Banner Max', value: '3840 x 1240 px' },
|
|
49
|
+
{ label: 'Community Ikon Storlek', value: '184 x 184 px' }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'table',
|
|
54
|
+
headers: ['Grafiktyp', 'Standard (px)', 'HD Mål (px)', 'Proportion', 'Format'],
|
|
55
|
+
rows: [
|
|
56
|
+
['Headerkapsel', '460 x 215', '920 x 430', '2.14:1', 'JPG / PNG'],
|
|
57
|
+
['Liten Kapsel', '231 x 87', '462 x 174', '2.65:1', 'JPG / PNG'],
|
|
58
|
+
['Huvudkapsel', '616 x 353', '1232 x 706', '1.74:1', 'JPG / PNG'],
|
|
59
|
+
['Vertikal Kapsel', '300 x 450', '600 x 900', '2:3', 'JPG / PNG'],
|
|
60
|
+
['Biblioteksbanner', '1920 x 620', '3840 x 1240', '3.1:1', 'JPG / PNG'],
|
|
61
|
+
['Bibliotekslogotyp', '1280 x 720', '1280 x 720', '16:9', 'Transparent PNG'],
|
|
62
|
+
['Community Ikon', '32 x 32', '184 x 184', '1:1', 'PNG']
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'tip',
|
|
67
|
+
title: 'Optimering av Säkerhetszoner',
|
|
68
|
+
html: 'Håll alla viktiga logotyper i övre vänstra två tredjedelarna av bilden.'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'proscons',
|
|
72
|
+
title: 'Arbetsflödesutvärdering',
|
|
73
|
+
items: [
|
|
74
|
+
{
|
|
75
|
+
pro: 'Direkt generering av alla erforderliga Steamworks storlekar',
|
|
76
|
+
con: 'Komplexa bilder kan kräva separata lager'
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'glossary',
|
|
82
|
+
items: [
|
|
83
|
+
{
|
|
84
|
+
term: 'Kapsel',
|
|
85
|
+
definition: 'Valves standardterm för marknadsföringsbilder.'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
faqTitle: 'Vanliga Frågor om Steam Grafik',
|
|
91
|
+
faq: [
|
|
92
|
+
{
|
|
93
|
+
question: 'Vilket filformat ska jag använda?',
|
|
94
|
+
answer: 'Steam accepterar JPG eller PNG filer för huvudkapslar.'
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
howTo: [
|
|
98
|
+
{
|
|
99
|
+
name: 'Ladda Upp Bild',
|
|
100
|
+
text: 'Välj en högupplöst bild.'
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
schemas: [
|
|
104
|
+
{
|
|
105
|
+
'@context': 'https://schema.org',
|
|
106
|
+
'@type': 'SoftwareApplication',
|
|
107
|
+
name: 'Steam Kapsel och Grafik Generator',
|
|
108
|
+
applicationCategory: 'DeveloperApplication',
|
|
109
|
+
operatingSystem: 'Any',
|
|
110
|
+
offers: {
|
|
111
|
+
'@type': 'Offer',
|
|
112
|
+
price: '0',
|
|
113
|
+
priceCurrency: 'SEK'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
'@context': 'https://schema.org',
|
|
118
|
+
'@type': 'FAQPage',
|
|
119
|
+
mainEntity: [
|
|
120
|
+
{
|
|
121
|
+
'@type': 'Question',
|
|
122
|
+
name: 'Vilket filformat ska jag använda?',
|
|
123
|
+
acceptedAnswer: {
|
|
124
|
+
'@type': 'Answer',
|
|
125
|
+
text: 'Steam accepterar JPG eller PNG filer.'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
'@context': 'https://schema.org',
|
|
132
|
+
'@type': 'HowTo',
|
|
133
|
+
name: 'Hur man skapar Steam kapslar',
|
|
134
|
+
step: [
|
|
135
|
+
{
|
|
136
|
+
'@type': 'HowToStep',
|
|
137
|
+
name: 'Ladda Upp Bild',
|
|
138
|
+
text: 'Välj en högupplöst bild.'
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
bibliography: bibliographyEntries
|
|
144
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SteamCapsuleGeneratorUI } from '../ui';
|
|
3
|
+
import { bibliographyEntries } from '../bibliography';
|
|
4
|
+
|
|
5
|
+
export const content: ToolLocaleContent<SteamCapsuleGeneratorUI> = {
|
|
6
|
+
slug: 'steam-kapsul-generatoru',
|
|
7
|
+
title: 'Steam Kapsül ve Görsel Önizleme Oluşturucu',
|
|
8
|
+
description: 'Steam mağaza ve kütüphane kapsül görsellerini kırpın, önizleyin ve güvenli alan doğrulaması ile biçimlendirin.',
|
|
9
|
+
ui: {
|
|
10
|
+
uploadTitle: 'Oyun Görseli Yükle',
|
|
11
|
+
uploadHint: 'Yüksek çözünürlüklü bir ana görsel yükleyin (önerilen 3840x1240 px veya üzeri).',
|
|
12
|
+
chooseFile: 'Dosya Seç',
|
|
13
|
+
minimumSize: 'Önerilen minimum boyut: 1920x1080 px',
|
|
14
|
+
horizontalFocus: 'Yatay Odak (X)',
|
|
15
|
+
verticalFocus: 'Dikey Odak (Y)',
|
|
16
|
+
zoomLevel: 'Yakınlaştırma Seviyesi',
|
|
17
|
+
resetFocus: 'Odağı Sıfırla',
|
|
18
|
+
safeZone: 'Güvenli Alan',
|
|
19
|
+
downloadZip: 'Tüm Dosyaları İndir (ZIP)',
|
|
20
|
+
headerCapsule: 'Üst Bilgi Kapsülü (460x215 / HD 920x430)',
|
|
21
|
+
smallCapsule: 'Küçük Kapsül (231x87 / HD 462x174)',
|
|
22
|
+
mainCapsule: 'Ana Kapsül (616x353 / HD 1232x706)',
|
|
23
|
+
verticalCapsule: 'Dikey Kütüphane Kapsülü (300x450 / HD 600x900)',
|
|
24
|
+
libraryHero: 'Kütüphane Banner (1920x620 / HD 3840x1240)',
|
|
25
|
+
communityIcon: 'Topluluk Uygulama Simgesi (32x32 / HD 184x184)',
|
|
26
|
+
storePreviewTab: 'Steam Mağazası',
|
|
27
|
+
libraryPreviewTab: 'Steam Kütüphanesi',
|
|
28
|
+
allAssetsTab: 'Tüm Boyutlar',
|
|
29
|
+
toggleSafeZones: 'Güvenli Alan Çizgileri',
|
|
30
|
+
toggleSteamOverlay: 'Steam Arayüzü'
|
|
31
|
+
},
|
|
32
|
+
seo: [
|
|
33
|
+
{
|
|
34
|
+
type: 'title',
|
|
35
|
+
level: 2,
|
|
36
|
+
text: 'Steam Grafik Kapsül Özellikleri'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'paragraph',
|
|
40
|
+
html: 'Steam mağaza sayfaları ve kütüphane görünümleri standart kapsül görselleri kullanır.'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'stats',
|
|
44
|
+
columns: 4,
|
|
45
|
+
items: [
|
|
46
|
+
{ label: 'Mağaza Üst Bilgi HD', value: '920 x 430 px' },
|
|
47
|
+
{ label: 'Kütüphane Kapsül Oranı', value: '2:3 Dikey' },
|
|
48
|
+
{ label: 'Kütüphane Banner Maks', value: '3840 x 1240 px' },
|
|
49
|
+
{ label: 'Topluluk Simge Boyutu', value: '184 x 184 px' }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'table',
|
|
54
|
+
headers: ['Varlık Türü', 'Standart Boyut (px)', 'HD Hedef Boyut (px)', 'En Boy Oranı', 'Biçim'],
|
|
55
|
+
rows: [
|
|
56
|
+
['Üst Bilgi Kapsülü', '460 x 215', '920 x 430', '2.14:1', 'JPG / PNG'],
|
|
57
|
+
['Küçük Kapsül', '231 x 87', '462 x 174', '2.65:1', 'JPG / PNG'],
|
|
58
|
+
['Ana Kapsül', '616 x 353', '1232 x 706', '1.74:1', 'JPG / PNG'],
|
|
59
|
+
['Dikey Kapsül', '300 x 450', '600 x 900', '2:3', 'JPG / PNG'],
|
|
60
|
+
['Kütüphane Banner', '1920 x 620', '3840 x 1240', '3.1:1', 'JPG / PNG'],
|
|
61
|
+
['Kütüphane Logosu', '1280 x 720', '1280 x 720', '16:9', 'Şeffaf PNG'],
|
|
62
|
+
['Topluluk Simgesi', '32 x 32', '184 x 184', '1:1', 'PNG']
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'tip',
|
|
67
|
+
title: 'Güvenli Alan İpuçları',
|
|
68
|
+
html: 'Önemli logoları görselin sol üst üçte ikilik alanında tutun.'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'proscons',
|
|
72
|
+
title: 'İş Akışı Değerlendirmesi',
|
|
73
|
+
items: [
|
|
74
|
+
{
|
|
75
|
+
pro: 'Tüm Steamworks boyutlarını anında oluşturma',
|
|
76
|
+
con: 'Karmaşık görseller ayrı katmanlar gerektirebilir'
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'glossary',
|
|
82
|
+
items: [
|
|
83
|
+
{
|
|
84
|
+
term: 'Kapsül',
|
|
85
|
+
definition: 'Valve tarafından tanıtım görselleri için kullanılan standart terim.'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
faqTitle: 'Steam Görselleri Hakkında Sıkça Sorulan Sorular',
|
|
91
|
+
faq: [
|
|
92
|
+
{
|
|
93
|
+
question: 'Hangi dosya biçimini kullanmalıyım?',
|
|
94
|
+
answer: 'Steam ana kapsüller için JPG veya PNG dosyalarını kabul eder.'
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
howTo: [
|
|
98
|
+
{
|
|
99
|
+
name: 'Görsel Yükle',
|
|
100
|
+
text: 'Yüksek çözünürlüklü bir görsel seçin.'
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
schemas: [
|
|
104
|
+
{
|
|
105
|
+
'@context': 'https://schema.org',
|
|
106
|
+
'@type': 'SoftwareApplication',
|
|
107
|
+
name: 'Steam Kapsül ve Görsel Önizleme Oluşturucu',
|
|
108
|
+
applicationCategory: 'DeveloperApplication',
|
|
109
|
+
operatingSystem: 'Any',
|
|
110
|
+
offers: {
|
|
111
|
+
'@type': 'Offer',
|
|
112
|
+
price: '0',
|
|
113
|
+
priceCurrency: 'TRY'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
'@context': 'https://schema.org',
|
|
118
|
+
'@type': 'FAQPage',
|
|
119
|
+
mainEntity: [
|
|
120
|
+
{
|
|
121
|
+
'@type': 'Question',
|
|
122
|
+
name: 'Hangi dosya biçimini kullanmalıyım?',
|
|
123
|
+
acceptedAnswer: {
|
|
124
|
+
'@type': 'Answer',
|
|
125
|
+
text: 'Steam ana kapsüller için JPG veya PNG dosyalarını kabul eder.'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
'@context': 'https://schema.org',
|
|
132
|
+
'@type': 'HowTo',
|
|
133
|
+
name: 'Steam kapsülleri nasıl oluşturulur',
|
|
134
|
+
step: [
|
|
135
|
+
{
|
|
136
|
+
'@type': 'HowToStep',
|
|
137
|
+
name: 'Görsel Yükle',
|
|
138
|
+
text: 'Yüksek çözünürlüklü bir görsel seçin.'
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
bibliography: bibliographyEntries
|
|
144
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SteamCapsuleGeneratorUI } from '../ui';
|
|
3
|
+
import { bibliographyEntries } from '../bibliography';
|
|
4
|
+
|
|
5
|
+
export const content: ToolLocaleContent<SteamCapsuleGeneratorUI> = {
|
|
6
|
+
slug: 'steam-capsule-generator',
|
|
7
|
+
title: 'Steam 胶囊图与艺术图像预览生成器',
|
|
8
|
+
description: '裁剪、预览并格式化 Steam 商店和库官方胶囊图像,支持实时安全区校验。',
|
|
9
|
+
ui: {
|
|
10
|
+
uploadTitle: '上传游戏艺术图',
|
|
11
|
+
uploadHint: '上传高分辨率主视觉图(建议 3840x1240 px 或更高)。',
|
|
12
|
+
chooseFile: '选择文件',
|
|
13
|
+
minimumSize: '建议最小尺寸:1920x1080 px',
|
|
14
|
+
horizontalFocus: '水平焦点 (X)',
|
|
15
|
+
verticalFocus: '垂直焦点 (Y)',
|
|
16
|
+
zoomLevel: '缩放倍率',
|
|
17
|
+
resetFocus: '重置焦点',
|
|
18
|
+
safeZone: '安全区',
|
|
19
|
+
downloadZip: '下载所有资源 (ZIP)',
|
|
20
|
+
headerCapsule: '页头胶囊图 (460x215 / 高清 920x430)',
|
|
21
|
+
smallCapsule: '小胶囊图 (231x87 / 高清 462x174)',
|
|
22
|
+
mainCapsule: '主胶囊图 (616x353 / 高清 1232x706)',
|
|
23
|
+
verticalCapsule: '库竖版胶囊图 (300x450 / 高清 600x900)',
|
|
24
|
+
libraryHero: '库横幅图 (1920x620 / 高清 3840x1240)',
|
|
25
|
+
communityIcon: '社区应用图标 (32x32 / 高清 184x184)',
|
|
26
|
+
storePreviewTab: 'Steam 商店',
|
|
27
|
+
libraryPreviewTab: 'Steam 库',
|
|
28
|
+
allAssetsTab: '所有尺寸',
|
|
29
|
+
toggleSafeZones: '安全区指南',
|
|
30
|
+
toggleSteamOverlay: 'Steam 界面'
|
|
31
|
+
},
|
|
32
|
+
seo: [
|
|
33
|
+
{
|
|
34
|
+
type: 'title',
|
|
35
|
+
level: 2,
|
|
36
|
+
text: 'Steam 图像胶囊规范与要求'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'paragraph',
|
|
40
|
+
html: 'Steam 商店页面和玩家库视图依赖标准化的胶囊图像展示游戏。开发者必须遵守严格的像素尺寸和安全区要求,防止价格标签遮挡标题。'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'stats',
|
|
44
|
+
columns: 4,
|
|
45
|
+
items: [
|
|
46
|
+
{ label: '商店页头高清分辨率', value: '920 x 430 px' },
|
|
47
|
+
{ label: '库胶囊图宽高比', value: '2:3 竖版' },
|
|
48
|
+
{ label: '库横幅最大分辨率', value: '3840 x 1240 px' },
|
|
49
|
+
{ label: '社区图标尺寸', value: '184 x 184 px' }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'table',
|
|
54
|
+
headers: ['资源类型', '标准尺寸 (px)', '高清目标尺寸 (px)', '宽高比', '格式'],
|
|
55
|
+
rows: [
|
|
56
|
+
['页头胶囊图', '460 x 215', '920 x 430', '2.14:1', 'JPG / PNG'],
|
|
57
|
+
['小胶囊图', '231 x 87', '462 x 174', '2.65:1', 'JPG / PNG'],
|
|
58
|
+
['主胶囊图', '616 x 353', '1232 x 706', '1.74:1', 'JPG / PNG'],
|
|
59
|
+
['竖版库胶囊图', '300 x 450', '600 x 900', '2:3', 'JPG / PNG'],
|
|
60
|
+
['库横幅图', '1920 x 620', '3840 x 1240', '3.1:1', 'JPG / PNG'],
|
|
61
|
+
['库标志图', '1280 x 720', '1280 x 720', '16:9', '透明 PNG'],
|
|
62
|
+
['社区图标', '32 x 32', '184 x 184', '1:1', 'PNG']
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'tip',
|
|
67
|
+
title: '安全区优化建议',
|
|
68
|
+
html: '将关键标志和人物面部保持在图像左上方三分之二区域内。'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'proscons',
|
|
72
|
+
title: '工作流评估',
|
|
73
|
+
items: [
|
|
74
|
+
{
|
|
75
|
+
pro: '一键快速生成所有 Steamworks 所需图像尺寸',
|
|
76
|
+
con: '复杂的艺术图可能需要单独的分层设计'
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'glossary',
|
|
82
|
+
items: [
|
|
83
|
+
{
|
|
84
|
+
term: '胶囊图 (Capsule)',
|
|
85
|
+
definition: 'Valve 用来指代 Steam 商店和客户端库中推广图容器的术语。'
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
faqTitle: '关于 Steam 图像资源的常见问题',
|
|
91
|
+
faq: [
|
|
92
|
+
{
|
|
93
|
+
question: '我应该使用什么文件格式?',
|
|
94
|
+
answer: 'Steam 主胶囊图支持 JPG 或 PNG 文件。推荐使用高质量 JPG。'
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
howTo: [
|
|
98
|
+
{
|
|
99
|
+
name: '上传艺术图',
|
|
100
|
+
text: '选择一张高分辨率主视觉图。'
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
schemas: [
|
|
104
|
+
{
|
|
105
|
+
'@context': 'https://schema.org',
|
|
106
|
+
'@type': 'SoftwareApplication',
|
|
107
|
+
name: 'Steam 胶囊图与艺术图像预览生成器',
|
|
108
|
+
applicationCategory: 'DeveloperApplication',
|
|
109
|
+
operatingSystem: 'Any',
|
|
110
|
+
offers: {
|
|
111
|
+
'@type': 'Offer',
|
|
112
|
+
price: '0',
|
|
113
|
+
priceCurrency: 'CNY'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
'@context': 'https://schema.org',
|
|
118
|
+
'@type': 'FAQPage',
|
|
119
|
+
mainEntity: [
|
|
120
|
+
{
|
|
121
|
+
'@type': 'Question',
|
|
122
|
+
name: '我应该使用什么文件格式?',
|
|
123
|
+
acceptedAnswer: {
|
|
124
|
+
'@type': 'Answer',
|
|
125
|
+
text: 'Steam 主胶囊图支持 JPG 或 PNG 文件。'
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
'@context': 'https://schema.org',
|
|
132
|
+
'@type': 'HowTo',
|
|
133
|
+
name: '如何生成 Steam 胶囊图',
|
|
134
|
+
step: [
|
|
135
|
+
{
|
|
136
|
+
'@type': 'HowToStep',
|
|
137
|
+
name: '上传艺术图',
|
|
138
|
+
text: '选择一张高分辨率主视觉图。'
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
bibliography: bibliographyEntries
|
|
144
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ToolDefinition } from '../../types';
|
|
2
|
+
import { steamCapsuleGenerator } from './entry';
|
|
3
|
+
export * from './entry';
|
|
4
|
+
export const STEAM_CAPSULE_GENERATOR_TOOL: ToolDefinition = {
|
|
5
|
+
entry: steamCapsuleGenerator,
|
|
6
|
+
Component: () => import('./component.astro'),
|
|
7
|
+
SEOComponent: () => import('./seo.astro'),
|
|
8
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
9
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import {
|
|
3
|
+
calculateCropBounds,
|
|
4
|
+
getInitialState,
|
|
5
|
+
STEAM_ASSETS,
|
|
6
|
+
validateImageDimensions
|
|
7
|
+
} from './logic';
|
|
8
|
+
|
|
9
|
+
describe('Steam Capsule Generator Logic', () => {
|
|
10
|
+
it('contains mandatory Steam asset definitions', () => {
|
|
11
|
+
expect(STEAM_ASSETS.length).toBeGreaterThanOrEqual(7);
|
|
12
|
+
const header = STEAM_ASSETS.find((a) => a.id === 'header-capsule');
|
|
13
|
+
expect(header).toBeDefined();
|
|
14
|
+
expect(header?.hdWidth).toBe(920);
|
|
15
|
+
expect(header?.hdHeight).toBe(430);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('calculates crop bounds correctly with centered focal point', () => {
|
|
19
|
+
const crop = calculateCropBounds({
|
|
20
|
+
srcWidth: 1920,
|
|
21
|
+
srcHeight: 1080,
|
|
22
|
+
targetWidth: 460,
|
|
23
|
+
targetHeight: 215,
|
|
24
|
+
focusX: 0.5,
|
|
25
|
+
focusY: 0.5,
|
|
26
|
+
zoom: 1
|
|
27
|
+
});
|
|
28
|
+
expect(crop.sWidth).toBeGreaterThan(0);
|
|
29
|
+
expect(crop.sHeight).toBeGreaterThan(0);
|
|
30
|
+
expect(crop.sx).toBeGreaterThanOrEqual(0);
|
|
31
|
+
expect(crop.sy).toBeGreaterThanOrEqual(0);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('calculates crop bounds with zoom factor', () => {
|
|
35
|
+
const unzoomed = calculateCropBounds({
|
|
36
|
+
srcWidth: 1920,
|
|
37
|
+
srcHeight: 1080,
|
|
38
|
+
targetWidth: 460,
|
|
39
|
+
targetHeight: 215,
|
|
40
|
+
focusX: 0.5,
|
|
41
|
+
focusY: 0.5,
|
|
42
|
+
zoom: 1
|
|
43
|
+
});
|
|
44
|
+
const zoomed = calculateCropBounds({
|
|
45
|
+
srcWidth: 1920,
|
|
46
|
+
srcHeight: 1080,
|
|
47
|
+
targetWidth: 460,
|
|
48
|
+
targetHeight: 215,
|
|
49
|
+
focusX: 0.5,
|
|
50
|
+
focusY: 0.5,
|
|
51
|
+
zoom: 2
|
|
52
|
+
});
|
|
53
|
+
expect(zoomed.sWidth).toBeLessThan(unzoomed.sWidth);
|
|
54
|
+
expect(zoomed.sHeight).toBeLessThan(unzoomed.sHeight);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('validates image resolution sufficiency against HD specs', () => {
|
|
58
|
+
const headerSpec = STEAM_ASSETS.find((a) => a.id === 'header-capsule')!;
|
|
59
|
+
const highRes = validateImageDimensions(1920, 1080, headerSpec);
|
|
60
|
+
expect(highRes.isSufficient).toBe(true);
|
|
61
|
+
|
|
62
|
+
const lowRes = validateImageDimensions(300, 200, headerSpec);
|
|
63
|
+
expect(lowRes.isSufficient).toBe(false);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it('provides default tool state', () => {
|
|
67
|
+
const state = getInitialState();
|
|
68
|
+
expect(state.focalPoint.x).toBe(0.5);
|
|
69
|
+
expect(state.focalPoint.y).toBe(0.5);
|
|
70
|
+
expect(state.showSafeZones).toBe(true);
|
|
71
|
+
});
|
|
72
|
+
});
|