@@ -11,8 +11,6 @@ interface Props {
1111 * adresten sunan sayfalar (arşivin ilk sayfası ile ana sayfa) için. */
1212 canonicalPath? : string ;
1313 type? : string ;
14- shellLayout? : boolean ;
15- hideHeader? : boolean ;
1614}
1715
1816const {
@@ -23,8 +21,6 @@ const {
2321 noindex = false ,
2422 canonicalPath,
2523 type = ' website' ,
26- shellLayout = false ,
27- hideHeader = false
2824} = Astro .props ;
2925
3026// SEO Hardening Logic
@@ -33,6 +29,23 @@ const finalOgImage = ogImage && typeof ogImage === 'string' && ogImage.trim() !=
3329 : ' /og-default.jpg' ;
3430
3531const canonicalURL = new URL (canonicalPath || Astro .url .pathname , Astro .site ).toString ();
32+
33+ /* Bu kabukta SAYFA BAŞLIĞI YOK ve olmamalı.
34+ *
35+ * Bir dönem burada blog döneminden kalma bir header duruyordu: "Samet Başbuğ"
36+ * logosu, eski gezinme bağlantıları, bozuk emoji taşıyan bir tema düğmesi.
37+ * Üretime hiç çıkmıyordu — `NewsLayout` hem `hideHeader` geçiyor hem de
38+ * `#main-header { display: none }` yazıyordu, yani aynı ölü şey iki ayrı
39+ * mekanizmayla saklanıyordu.
40+ *
41+ * Ama ölü değil UYUYORDU. `BaseLayout`u doğrudan kullanan yeni bir sayfa
42+ * yazdım ve hayalet tasarım ekrana geldi; hangi kabuğun ne çizdiğini bilmeden
43+ * "temel" adını taşıyan şeyi seçmiştim. Header, betiği ve stilleri
44+ * kaldırıldı, `hideHeader`/`shellLayout` propları da: tek değer alan bir prop
45+ * prop değil, saklanmış bir karardır.
46+ *
47+ * Başlık `NewsLayout`un işi. Yeni bir sayfa `InfoPageLayout` kullanır. */
48+
3649const ogImageURL = new URL (finalOgImage , Astro .site ).toString ();
3750// Paylaşım kartlarında görselin alternatif metni. Sayfa içindeki hero
3851// görselleri aria-hidden bir sarmalayıcıda durduğu ve komşu başlık linkinin
@@ -151,7 +164,7 @@ const fullTitle = title === publicationName ? publicationName : `${publicationNa
151164 </script >
152165 <ClientRouter />
153166 </head >
154- <body class = { shellLayout ? ' app-shell-layout ' : undefined } >
167+ <body >
155168 <div id =" progress-bar" ></div >
156169
157170 <!-- Back to Top Button -->
@@ -164,32 +177,6 @@ const fullTitle = title === publicationName ? publicationName : `${publicationNa
164177 <img id =" lightbox-img" src =" " alt =" " />
165178 </div >
166179
167- { ! hideHeader && (
168- <header transition :persist id = " main-header" >
169- <nav >
170- <div class = " logo-area" id = " logo-area" >
171- <a href = " /" class = " logo" ><span class = " logo-text" >Samet Başbuğ</span ></a >
172- </div >
173- <div class = " nav-right" id = " nav-right" >
174- <div class = " links" >
175- <a href = " /" >Ana Sayfa</a >
176- <a href = " /hakkimizda/" >Hakkımızda</a >
177- <a href = " /yazarlar/" >Yazarlar</a >
178- <a href = " /iletisim/" >İletişim</a >
179- <a href = " /rss.xml" >RSS</a >
180- </div >
181- <div class = " theme-switch-wrapper" id = " theme-switch-wrapper" >
182- <button id = " theme-toggle" class = " theme-switch" aria-label = " Temayı Değiştir" >
183- <div class = " switch-handle" >
184- <span class = " sun-icon" >??</span >
185- <span class = " moon-icon" >??</span >
186- </div >
187- </button >
188- </div >
189- </div >
190- </nav >
191- </header >
192- )}
193180
194181 <main >
195182 <slot />
@@ -215,47 +202,10 @@ const fullTitle = title === publicationName ? publicationName : `${publicationNa
215202
216203 applyTheme();
217204
218- function attachThemeToggle() {
219- const toggle = document.getElementById('theme-toggle');
220- if (toggle) {
221- toggle.replaceWith(toggle.cloneNode(true));
222- const newToggle = document.getElementById('theme-toggle');
223- newToggle.addEventListener('click', () => {
224- const currentTheme = document.documentElement.getAttribute('data-theme');
225- const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
226- setTheme(newTheme);
227- });
228- }
229- }
230-
231- function placeThemeSwitch() {
232- const wrapper = document.getElementById('theme-switch-wrapper');
233- const logoArea = document.getElementById('logo-area');
234- const navRight = document.getElementById('nav-right');
235- if (!wrapper || !logoArea || !navRight) return;
236-
237- const isMobile = window.matchMedia('(max-width: 700px)').matches;
238- if (isMobile) {
239- if (wrapper.parentElement !== logoArea) logoArea.appendChild(wrapper);
240- } else {
241- if (wrapper.parentElement !== navRight) navRight.appendChild(wrapper);
242- }
243- }
244-
245205 // Header Scroll, Reading Progress & Back to Top
246206 function handleScroll() {
247- const header = document.getElementById('main-header');
248207 const backToTop = document.getElementById('back-to-top');
249208
250- if (header) {
251- if (window.scrollY > 20) {
252- header.classList.add('scrolled');
253- } else {
254- header.classList.remove('scrolled');
255- }
256- }
257-
258-
259209 if (backToTop) {
260210 if (window.scrollY > 300) {
261211 backToTop.classList.add('visible');
@@ -311,8 +261,6 @@ const fullTitle = title === publicationName ? publicationName : `${publicationNa
311261
312262 document.addEventListener('astro:page-load', () => {
313263 applyTheme();
314- placeThemeSwitch();
315- attachThemeToggle();
316264 initLightbox();
317265 initCopyShare();
318266 initBackToTop();
@@ -323,7 +271,6 @@ const fullTitle = title === publicationName ? publicationName : `${publicationNa
323271
324272 if (!window.__themeSwitchPlacementBound) {
325273 window.__themeSwitchPlacementBound = true;
326- window.addEventListener('resize', placeThemeSwitch);
327274 }
328275
329276 document.addEventListener('astro:before-swap', (event) => {
@@ -481,114 +428,6 @@ const fullTitle = title === publicationName ? publicationName : `${publicationNa
481428 to { opacity: 1; transform: translateY(0); }
482429 }
483430 main { animation: fadeInUp 0.5s ease-out forwards; flex: 1; padding: 3rem 1rem; max-width: 850px; margin: 0 auto; width: 100%; }
484- body.app-shell-layout main { animation: none; max-width: 1240px; padding-top: 0; }
485- body.app-shell-layout header { display: none; }
486-
487- header {
488- padding: 1rem 1.5rem; max-width: 900px; margin: 1rem auto;
489- width: calc(100% - 2rem); background: var(--card-bg);
490- border-radius: 1rem; border: 1px solid var(--border);
491- box-shadow: var(--shadow); backdrop-filter: blur(12px);
492- position: sticky; top: 1rem; z-index: 50;
493- display: flex; flex-direction: column; align-items: stretch; gap: 0.75rem;
494- transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
495- }
496-
497- header.scrolled { background: rgba(var(--card-bg-rgb), 0.8); max-width: 850px; margin-top: 0.5rem; }
498- nav { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 1rem; }
499-
500- .logo-area { display: inline-flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
501- .nav-right { display: flex; align-items: center; gap: 1.5rem; min-width: 0; }
502- .links { display: flex; align-items: center; gap: 0.5rem; }
503-
504- .links a, .dropbtn {
505- text-decoration: none; color: var(--secondary); font-weight: 500; font-size: 0.95rem;
506- transition: all 0.2s; padding: 0.5rem 0.75rem; border-radius: 0.5rem;
507- }
508- .links a:hover, .dropdown:hover .dropbtn { color: var(--accent); background: var(--accent-light); }
509-
510- /* Mobil Responsive Ayarlar� */
511- @media (max-width: 700px) {
512- header {
513- height: auto;
514- padding: 1rem;
515- top: 0.5rem;
516- }
517- header.scrolled {
518- height: auto;
519- }
520- nav {
521- flex-direction: column;
522- gap: 1rem;
523- }
524- .logo-area {
525- width: 100%;
526- justify-content: space-between;
527- }
528- .logo {
529- font-size: clamp(1.02rem, 4.6vw, 1.2rem);
530- }
531- .nav-right {
532- width: 100%;
533- display: flex;
534- justify-content: center;
535- }
536- .links {
537- display: flex;
538- flex-wrap: nowrap;
539- justify-content: space-between;
540- align-items: center;
541- gap: 0.3rem;
542- width: 100%;
543- }
544- .links a {
545- font-size: clamp(0.78rem, 3.2vw, 0.9rem);
546- padding: 0.3rem 0.2rem;
547- white-space: nowrap;
548- line-height: 1.25;
549- }
550-
551- .theme-switch-wrapper {
552- padding-left: 0;
553- border-left: 0;
554- margin-left: auto;
555- }
556- }
557-
558- /* Dropdown Stilleri */
559- .dropdown { position: relative; display: inline-block; }
560- .dropbtn { background: none; border: none; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }
561- .chevron-icon { width: 1rem; height: 1rem; transition: transform 0.3s ease; }
562- .dropdown:hover .chevron-icon { transform: rotate(180deg); }
563-
564- .dropdown-content {
565- position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
566- background: var(--card-bg); border: 1px solid var(--border); min-width: 140px;
567- box-shadow: var(--shadow); border-radius: 0.75rem; opacity: 0; visibility: hidden;
568- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; padding: 0.5rem; backdrop-filter: blur(10px);
569- }
570- .dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(5px); }
571- .dropdown-content a { color: var(--text); padding: 0.6rem 1rem; display: block; font-size: 0.9rem; margin: 0; }
572-
573- .theme-switch-wrapper { display: inline-flex; align-items: center; border-left: 0; padding-left: 0; }
574- @media (min-width: 701px) {
575- .theme-switch-wrapper { border-left: 1px solid var(--border); padding-left: 1.2rem; }
576- }
577- .theme-switch { background: var(--muted); border: 1px solid var(--border); width: 3.5rem; height: 1.8rem; border-radius: 2rem; cursor: pointer; position: relative; padding: 0; transition: all 0.3s ease; }
578- .switch-handle { width: 1.4rem; height: 1.4rem; background: var(--card-bg); border-radius: 50%; position: absolute; left: 0.2rem; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; box-shadow: var(--shadow); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
579- .sun-icon { opacity: 1; } .moon-icon { opacity: 1; }
580- .switch-handle .sun-icon { display: block; } .switch-handle .moon-icon { display: none; }
581- [data-theme="dark"] .switch-handle { left: calc(100% - 1.6rem); background: #1e293b; }
582- [data-theme="dark"] .switch-handle .sun-icon { display: none; } [data-theme="dark"] .switch-handle .moon-icon { display: block; }
583-
584- @media (prefers-color-scheme: dark) {
585- :root:not([data-theme="light"]) .switch-handle { left: calc(100% - 1.6rem); background: #1e293b; }
586- :root:not([data-theme="light"]) .switch-handle .sun-icon { display: none; }
587- :root:not([data-theme="light"]) .switch-handle .moon-icon { display: block; }
588- }
589-
590- .logo { font-size: 1.25rem; font-weight: 800; color: var(--accent); text-decoration: none; }
591- .logo-text { background: linear-gradient(to right, var(--accent), #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
592431
593432 h1, h2, h3 { line-height: 1.3; margin-bottom: 1.5rem; color: var(--text); font-weight: 800; }
594433 .hero-title { font-size: 3.5rem; background: linear-gradient(to right, var(--accent), #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }
0 commit comments