22import * as HomeData from " @/data/home" ;
33import { ref , onMounted } from " vue" ;
44
5- // Core sections
65import Hero from " @/components/Hero.vue" ;
76import Section from " @/components/Section.vue" ;
87import CardGrid from " @/components/CardGrid.vue" ;
98import CodeBlock from " @/components/CodeBlock.vue" ;
109import SignalsGrid from " @/components/SignalsGrid.vue" ;
1110
12- // GitHub stats (safe: local first, async refresh)
1311import { getInitialGithubStats , refreshGithubStats } from " @/lib/githubStats" ;
1412
15- /**
16- * Supporte plusieurs formes d’export possibles.
17- * On tente plusieurs chemins courants.
18- */
1913const HOME =
2014 HomeData? .HOME ??
2115 HomeData? .default ??
2216 HomeData? .default ? .HOME ??
2317 HomeData? .default ? .default ??
2418 null ;
2519
26- // GitHub stats state (never blocks render)
2720const github = ref (null );
2821
2922onMounted (async () => {
3023 github .value = await getInitialGithubStats ();
31-
3224 const updated = await refreshGithubStats ({ timeoutMs: 1200 });
3325 if (updated) github .value = updated;
3426});
35-
36- // Debug safe (tu peux enlever après)
37- const _debugHomeType = HOME ? typeof HOME : " null" ;
38- const _debugHomeKeys = HOME && typeof HOME === " object" ? Object .keys (HOME ) : [];
3927< / script>
4028
4129< template>
4230 < div class = " page" >
43- <!-- DEBUG (temporaire, safe, ne crash pas) -->
4431 < div v- if = " !HOME" class = " container loading" >
45- < h2 style = " margin: 0 0 8px " > Loading…< / h2>
46- < p style = " margin: 0; opacity: 0.85 " >
32+ < h2 class = " loading-title " > Loading…< / h2>
33+ < p class = " loading-sub " >
4734 HOME is null . Check export in < code > @/ data / home < / code > .
4835 < / p>
4936 < / div>
5037
51- <!-- HERO -->
5238 < Hero
5339 v- if = " HOME?.hero"
5440 : title= " HOME.hero.title"
@@ -59,17 +45,19 @@ const _debugHomeKeys = HOME && typeof HOME === "object" ? Object.keys(HOME) : []
5945 : support= " HOME.hero.support"
6046 / >
6147
62- <!-- SIGNALS -->
63- < Section
64- v- if = " HOME?.signals"
65- : title= " HOME.signals.title"
66- : subtitle= " HOME.signals.subtitle"
67- tight
68- >
69- < SignalsGrid : items= " HOME.signals.items || []" : github= " github" / >
70- < / Section>
48+ < section v- if = " HOME?.signals" class = " signals" >
49+ < div class = " container signals-layout" >
50+ < div class = " signals-left" >
51+ < h2 class = " signals-title" > {{ HOME .signals .title }}< / h2>
52+ < p class = " signals-subtitle" > {{ HOME .signals .subtitle }}< / p>
53+ < / div>
54+
55+ < div class = " signals-right" >
56+ < SignalsGrid : items= " HOME.signals.items || []" : github= " github" / >
57+ < / div>
58+ < / div>
59+ < / section>
7160
72- <!-- BATTERIES -->
7361 < Section
7462 v- if = " HOME?.batteries"
7563 : title= " HOME.batteries.title"
@@ -79,7 +67,6 @@ const _debugHomeKeys = HOME && typeof HOME === "object" ? Object.keys(HOME) : []
7967 < CardGrid : items= " HOME.batteries.items || []" / >
8068 < / Section>
8169
82- <!-- GET STARTED -->
8370 < Section
8471 v- if = " HOME?.getStarted"
8572 : title= " HOME.getStarted.title"
@@ -113,12 +100,19 @@ const _debugHomeKeys = HOME && typeof HOME === "object" ? Object.keys(HOME) : []
113100}
114101
115102.loading {
116- padding: 48px 0 ;
117- opacity: 0.75 ;
103+ padding: 56px 0 ;
104+ opacity: 0.85 ;
118105}
119106
120- .debug {
121- margin- bottom: 10px ;
107+ .loading - title {
108+ margin: 0 0 10px ;
109+ font- size: 1 .35rem ;
110+ letter- spacing: - 0 .01em ;
111+ }
112+
113+ .loading - sub {
114+ margin: 0 ;
115+ opacity: 0.85 ;
122116}
123117
124118.cta - row {
@@ -127,4 +121,49 @@ const _debugHomeKeys = HOME && typeof HOME === "object" ? Object.keys(HOME) : []
127121 gap: 1rem ;
128122 flex- wrap: wrap;
129123}
124+
125+ .signals {
126+ padding: 3 .2rem 0 ;
127+ }
128+
129+ .signals - layout {
130+ display: grid;
131+ grid- template- columns: minmax (320px , 560px ) minmax (260px , 420px );
132+ gap: 3rem ;
133+ align- items: start;
134+ }
135+
136+ .signals - left {
137+ padding- top: 0 .2rem ;
138+ }
139+
140+ .signals - title {
141+ margin: 0 ;
142+ font- size: 2 .35rem ;
143+ line- height: 1.05 ;
144+ letter- spacing: - 0 .03em ;
145+ }
146+
147+ .signals - subtitle {
148+ margin: 0 .95rem 0 0 ;
149+ max- width: 62ch ;
150+ font- size: 1 .05rem ;
151+ line- height: 1.7 ;
152+ opacity: 0.82 ;
153+ }
154+
155+ .signals - right {
156+ width: 100 % ;
157+ }
158+
159+ @media (max - width : 980px ) {
160+ .signals - layout {
161+ grid- template- columns: 1fr ;
162+ gap: 1 .6rem ;
163+ }
164+
165+ .signals - title {
166+ font- size: 1 .9rem ;
167+ }
168+ }
130169< / style>
0 commit comments