feat: add about, contact with map, legal pages and 404

- About page with identity cards and equipment lists (about.json)
- Contact page: station info, obfuscated e-mail, lazy Leaflet/OSM map
  with antenna tower marker and dark-mode tiles
- Privacy, license and disclaimer pages from a legal collection
- QRT-themed 404 page
- LICENSE (MIT) and LICENSE-CONTENT (CC BY-SA 4.0 legal code)
- Shared PageHeader and CodeCopy components

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 01:59:45 +03:00
parent c1c57c4f85
commit df9c40847d
20 changed files with 1106 additions and 51 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Suphi Çakır (TA1SPH)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+442
View File
@@ -0,0 +1,442 @@
The articles, images and other content of ta1sph.info (everything under
src/content/ and the texts in src/data/) are © Suphi Çakır (TA1SPH) and licensed
under the Creative Commons Attribution-ShareAlike 4.0 International License
(CC BY-SA 4.0): https://creativecommons.org/licenses/by-sa/4.0/
Attribution: "Suphi Çakır – TA1SPH, ta1sph.info" + a link to the original page.
Third-party logos, trademarks and externally sourced images remain under their
owners' licenses. The source code is licensed separately under MIT (see LICENSE).
The full legal code follows (source: creativecommons.org/licenses/by-sa/4.0/legalcode.txt).
=======================================================================
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
+13 -5
View File
@@ -1,14 +1,14 @@
# PROJECT_MEMORY — ta1sph.info
> Claude'un bu proje için kalıcı hafızası. Her görev sonunda güncellenir. Kısa ve güncel tutulur.
> Son güncelleme: 2026-10-16 · Güncelleyen: Claude (Siteyi Kur — Aşama 5)
> Son güncelleme: 2026-10-16 · Güncelleyen: Claude (Siteyi Kur — Aşama 6)
## 1. Durum
- **Aşama:** 5 tamamlandı (görüntülenme sayacı). Sıradaki: **Aşama 6 — Hakkımda, İletişim, Yasal, 404**.
- **Tamamlanan:** Aşama 0–5. Stil önizleme yalnızca dev'de: `http://localhost:4321/styleguide/`.
- **Açık işler:** Aşama 5–8. Yasal sayfalar yok (A6). Favicon + `og-default.png` yok (A7); kapaksız yazılarda og:image yok. `LICENSE` dosyaları A6. 3 örnek yazı (`örnek` etiketli) kullanıcı isteyince silinecek.
- **Bilinen sorunlar:** Arama (Pagefind) `astro dev`'de çalışmaz, yalnızca build sonrası. Kullanıcının elle başlattığı dev sunucusu yeni koleksiyonu görmüyorsa yeniden başlatılmalı.
- **Aşama:** 6 tamamlandı (Hakkımda, İletişim, yasal, 404). Sıradaki: **Aşama 7 — Kalite**.
- **Tamamlanan:** Aşama 0–6. Stil önizleme yalnızca dev'de: `http://localhost:4321/styleguide/`.
- **Açık işler:** Aşama 7–8. Favicon + `og-default.png` yok (A7); kapaksız yazılarda og:image yok. 3 örnek yazı (`örnek` etiketli) kullanıcı isteyince silinecek. Hakkımda'ya tanıtım paragrafı kullanıcı metin verirse eklenecek (`about.json` → `lead`/yeni alan).
- **Bilinen sorunlar:** Arama (Pagefind) `astro dev`'de çalışmaz, yalnızca build sonrası. Kullanıcının elle başlattığı dev sunucusu yeni koleksiyonu görmüyorsa yeniden başlatılmalı. `npm audit`: 2 orta seviye (postcss-selector-parser 6.0.10, @tailwindcss/typography sabitliyor) — yalnızca build zamanı, düzeltme typography'yi eski sürüme düşürdüğü için uygulanmadı.
## 2. Ortam
@@ -39,6 +39,10 @@
- `src/lib/views.ts` — `node:sqlite` sayaç (`$DATA_DIR/views.db`, varsayılan `./data`; Docker'da `/app/data` volume). Tablolar: `views(slug,count)`, `hits(hash,at)` 24 sa, `salts(day,salt)` günlük tuz. IP saklanmaz; `clientIp` önce `X-Forwarded-For`; `isBot` UA filtresi (headless dahil)
- `src/pages/api/views/[slug].ts` (POST, 204; bilinmeyen slug 404) · `src/pages/api/views/top.ts` (GET `?limit=1..10`, JSON `{slug,title,url,count}`, 5 dk cache) — ikisi `prerender = false`
- Yazı sayfası `sendBeacon('/api/views/<slug>/')`; Sidebar script'i `/api/views/top/` ile `ol[data-featured]`'ı değiştirir, eksikleri build-time yedekle tamamlar
- `src/data/about.json` (künye + ekipman grupları) · `src/data/contact.json` (harita lat/lng/zoom, bilgi satırları; `email` HTML'de açık yazılmaz, JS ile birleştirilir) · `src/data/pages.json` (yasal sayfa ortak metinleri, 404)
- `src/pages/hakkimda.astro` (ProfilePage JSON-LD) · `src/pages/iletisim.astro` (Leaflet + OSM, görünür olunca dinamik import; `divIcon` içinde `.tower-pin`) · `src/pages/[legal].astro` + `src/content/legal/{gizlilik,lisans,sorumluluk-reddi}.md` (koleksiyon `legal`, frontmatter `updated`) · `src/pages/404.astro`
- `src/components/PageHeader.astro` (khaki başlık + tek h1; blog listesi de kullanır) · `src/components/CodeCopy.astro` (Markdown'ı sarar, kod bloklarına Kopyala düğmesi)
- `LICENSE` (MIT) · `LICENSE-CONTENT` (CC BY-SA 4.0, resmî legalcode.txt'den)
- `src/dev/Styleguide.astro` — `astro.config.mjs`'deki `devRoutes` entegrasyonu ile sadece `astro dev`'de `/styleguide/` (`_` önekli sayfalar Astro'da rota olmaz)
- `src/lib/slug.ts` — Türkçe karakter dönüştürücü `slugify`
- `scripts/new-post.mjs` — `npm run new:post -- "Başlık"` → `src/content/blog/<slug>/index.md` (draft: true); `slug.ts`'yi Node type-stripping ile import eder
@@ -59,6 +63,9 @@
| 2026-10-15 | Kanonik alan: apex `ta1sph.info`, www → 301 | SEO tekilleştirme |
| 2026-10-15 | Fontlar self-host (Fontsource: Rubik + Inter) | Performans + gizlilik |
| 2026-10-16 | Ek token'lar: `accent-fill`/`on-accent-fill`, `accent-text` (khaki'de fg'ye döner) | Ölçüm: ink/red 4.46, red-strong/khaki 3.85 → küçük metin AA'yı geçmiyordu. Kırmızı zeminli butonlar ≥19px bold |
| 2026-10-16 | Yasal metinler Markdown koleksiyonu (`src/content/legal`), tek dinamik rota | Uzun metin için prose; yeni yasal sayfa = yeni .md |
| 2026-10-16 | Leaflet işaretçisinde döndürme iç elemanda (`.tower-pin`) | CSS `rotate` özelliği Leaflet'in `translate3d`'sinden önce uygulanıp konumu kaydırıyordu |
| 2026-10-16 | Karanlık harita = karolara CSS `invert` filtresi | İkinci karo sağlayıcısı / API anahtarı gerekmez |
| 2026-10-16 | SQLite sürücüsü `node:sqlite` (better-sqlite3 değil) — kullanıcı onayı | Native derleme yok, ek paket yok; Node 26'da uyarısız. Docker imajı Node ≥24 olmalı (A8'de kesinleşecek) |
| 2026-10-16 | Astro `checkOrigin` açık kalıyor | Tarayıcı `Sec-Fetch-Site: same-origin` gönderir; başka sitelerden sayaç şişirme engellenir. curl testlerinde bu başlık eklenmeli |
| 2026-10-16 | Astro 7 Markdown = Sätteri; eklentiler `markdown.processor: satteri({ hastPlugins })` | remark/rehype eklentileri bu işlemcide çalışmaz |
@@ -83,6 +90,7 @@
## 6. Değişiklik Günlüğü (en yeni üstte)
- 2026-10-16 | Siteyi Kur A6 | Hakkımda, İletişim (Leaflet harita, gizlenmiş e-posta), Gizlilik/Lisans/Sorumluluk Reddi, 404, LICENSE dosyaları; PageHeader + CodeCopy ortak bileşenleri; axe temiz | `src/pages/{hakkimda,iletisim,[legal],404}.astro`, `src/content/legal/`, `src/data/{about,contact,pages}.json`, `src/components/{PageHeader,CodeCopy,Card}.astro`, `LICENSE*`, `global.css`
- 2026-10-16 | Siteyi Kur A5 | Görüntülenme sayacı (node:sqlite, anonim, 24 sa tekil, bot filtresi), top API, sidebar öne çıkanlar API + yedek; uçtan uca test | `src/lib/views.ts`, `src/pages/api/views/`, `src/components/blog/Sidebar.astro`, `src/pages/blog/[slug].astro`, `src/lib/posts.ts`
- 2026-10-16 | Siteyi Kur A4 | Blog: koleksiyon, liste/kategori/etiket arşivleri + sayfalama, detay (paylaş, TOC, DIY, kod kopyala, lisans satırı), sidebar (Pagefind arama), RSS, ana sayfa son yazılar, 3 örnek yazı; axe temiz | `src/content*`, `src/pages/blog/`, `src/pages/rss.xml.ts`, `src/components/blog/`, `src/lib/{posts,dates,markdown-plugins}`, `src/data/{blog,categories}.json`, `astro.config.mjs`, `global.css`
- 2026-10-16 | Siteyi Kur A3 | Ana sayfa: hero, 4 kuruluş, Telegram, son yazılar (boş durum), site tanıtımları; axe temiz | `src/data/home.json`, `src/components/home/`, `src/components/Section.astro`, `src/pages/index.astro`, `src/lib/data.ts`
+25
View File
@@ -19,11 +19,13 @@
"@tailwindcss/vite": "^4.3.3",
"astro": "^7.4.0",
"astro-icon": "^1.2.0",
"leaflet": "^1.9.4",
"tailwindcss": "^4.3.3"
},
"devDependencies": {
"@astrojs/check": "^0.9.10",
"@tailwindcss/typography": "^0.5.20",
"@types/leaflet": "^1.9.22",
"pagefind": "^1.5.2",
"prettier": "^3.9.10",
"prettier-plugin-astro": "^1.1.1",
@@ -2603,6 +2605,13 @@
"@types/estree": "*"
}
},
"node_modules/@types/geojson": {
"version": "7946.0.16",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
"integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/hast": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz",
@@ -2612,6 +2621,16 @@
"@types/unist": "*"
}
},
"node_modules/@types/leaflet": {
"version": "1.9.22",
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.22.tgz",
"integrity": "sha512-h3lhECYEKDasG7LFHu+GiHqAvsgLuQvlJvVZzJDGONo3sEL+wUOqSFLnwkZlK0qVxnxbuGFW8iBlJNYs5wgndA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/geojson": "*"
}
},
"node_modules/@types/mdast": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
@@ -3932,6 +3951,12 @@
"node": ">=6"
}
},
"node_modules/leaflet": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
"license": "BSD-2-Clause"
},
"node_modules/lightningcss": {
"version": "1.33.0",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
+2
View File
@@ -27,11 +27,13 @@
"@tailwindcss/vite": "^4.3.3",
"astro": "^7.4.0",
"astro-icon": "^1.2.0",
"leaflet": "^1.9.4",
"tailwindcss": "^4.3.3"
},
"devDependencies": {
"@astrojs/check": "^0.9.10",
"@tailwindcss/typography": "^0.5.20",
"@types/leaflet": "^1.9.22",
"pagefind": "^1.5.2",
"prettier": "^3.9.10",
"prettier-plugin-astro": "^1.1.1",
+4 -3
View File
@@ -1,17 +1,18 @@
---
import type { HTMLTag } from 'astro/types';
import type { HTMLAttributes, HTMLTag } from 'astro/types';
export interface Props {
export interface Props extends Omit<HTMLAttributes<'div'>, 'class'> {
as?: HTMLTag;
/** Adds hover lift; the card's own link should cover it via `after:absolute after:inset-0`. */
interactive?: boolean;
class?: string;
}
const { as: Tag = 'article', interactive = false, class: className } = Astro.props;
const { as: Tag = 'article', interactive = false, class: className, ...rest } = Astro.props;
---
<Tag
{...rest}
class:list={[
'bg-surface border-line relative flex flex-col border',
interactive &&
+34
View File
@@ -0,0 +1,34 @@
---
// Wraps rendered Markdown and adds a copy button to every code block.
import { blog } from '../lib/data';
---
<div data-code-copy={blog.post.copyCode} data-code-copied={blog.post.codeCopied}>
<slot />
</div>
<script>
for (const root of document.querySelectorAll<HTMLElement>('[data-code-copy]')) {
const { codeCopy = '', codeCopied = '' } = root.dataset;
for (const pre of root.querySelectorAll('pre')) {
const wrap = document.createElement('div');
wrap.className = 'code-block';
pre.replaceWith(wrap);
wrap.append(pre);
const btn = document.createElement('button');
btn.type = 'button';
btn.className = 'code-copy';
btn.textContent = codeCopy;
btn.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(
pre.querySelector('code')?.innerText ?? pre.innerText,
);
btn.textContent = codeCopied;
setTimeout(() => (btn.textContent = codeCopy), 2000);
} catch {}
});
wrap.append(btn);
}
}
</script>
+30
View File
@@ -0,0 +1,30 @@
---
// Khaki page header with grid lines and the page's single h1.
import { Icon } from 'astro-icon/components';
import Container from './Container.astro';
import GridLines from './GridLines.astro';
import SectionHeading from './SectionHeading.astro';
export interface Props {
eyebrow: string;
title: string;
lead?: string;
icon?: string;
}
const { eyebrow, title, lead, icon } = Astro.props;
---
<section class="surface-alt relative overflow-hidden">
<GridLines />
<Container class="relative flex items-end gap-6 py-14 md:py-20">
{icon && (
<Icon name={icon} class="hidden size-20 shrink-0 sm:block md:size-24" aria-hidden="true" />
)}
<div class="flex flex-col gap-4">
<SectionHeading level={1} eyebrow={eyebrow} title={title} />
{lead && <p class="max-w-2xl text-lg">{lead}</p>}
<slot />
</div>
</Container>
</section>
+2 -9
View File
@@ -4,8 +4,7 @@ import BaseLayout from '../../layouts/BaseLayout.astro';
import { blog, fmt } from '../../lib/data';
import type { Post } from '../../lib/posts';
import Container from '../Container.astro';
import GridLines from '../GridLines.astro';
import SectionHeading from '../SectionHeading.astro';
import PageHeader from '../PageHeader.astro';
import Pager from './Pager.astro';
import PostCard from './PostCard.astro';
import Sidebar from './Sidebar.astro';
@@ -43,13 +42,7 @@ const seoTitle = current > 1 ? fmt(blog.list.pageTitle, { title, n: current }) :
---
<BaseLayout title={seoTitle} description={description} jsonLd={jsonLd}>
<section class="surface-alt relative overflow-hidden">
<GridLines />
<Container class="relative py-14 md:py-20">
<SectionHeading level={1} eyebrow={eyebrow} title={title} />
<p class="mt-4 max-w-2xl text-lg">{description}</p>
</Container>
</section>
<PageHeader eyebrow={eyebrow} title={title} lead={description} />
<Container class="grid gap-12 py-14 lg:grid-cols-[minmax(0,1fr)_20rem]">
<div>
+11 -1
View File
@@ -30,4 +30,14 @@ const blog = defineCollection({
}),
});
export const collections = { blog };
// Legal pages: src/content/legal/<slug>.md → /<slug>/
const legal = defineCollection({
loader: glob({ pattern: '*.md', base: './src/content/legal' }),
schema: z.object({
title: z.string().max(60),
description: z.string().min(50).max(160),
updated: z.coerce.date(),
}),
});
export const collections = { blog, legal };
+57
View File
@@ -0,0 +1,57 @@
---
title: 'Gizlilik Politikası'
description: 'ta1sph.info hangi verileri işler, hangilerini işlemez: çerez yok, takip yok, anonim görüntülenme sayacı. KVKK kapsamındaki haklarınız.'
updated: 2026-10-16
---
Bu sayfa, **ta1sph.info** sitesini ziyaret ettiğinizde hangi verilerin işlendiğini 6698 sayılı Kişisel Verilerin Korunması Kanunu (KVKK) çerçevesinde açıklar.
## Veri sorumlusu
Suphi Çakır (TA1SPH) · E-posta: suphi@radio.org.tr
## Kısaca
- Üyelik, yorum, iletişim formu veya bülten **yoktur**.
- Reklam, analiz (analytics) ya da üçüncü taraf takip çerezi **kullanılmaz**.
- Site çerez (cookie) yerleştirmez.
## Tarayıcınızda saklanan bilgi
Aydınlık/karanlık tema tercihiniz, yalnızca tarayıcınızın yerel depolamasında (`localStorage`, anahtar: `theme`) tutulur. Bu bilgi sunucuya gönderilmez ve kişisel veri değildir. Tarayıcınızın site verilerini silerek kaldırabilirsiniz.
## Görüntülenme sayacı
Blog yazılarının kaç kez okunduğunu saymak için anonim bir sayaç kullanılır:
- IP adresiniz **saklanmaz**. Aynı yazının 24 saat içinde birden fazla sayılmaması için IP adresi, her gün rastgele yenilenen bir değerle (tuz) birlikte tek yönlü olarak özetlenir (hash). Bu özet en fazla 24 saat tutulur ve ardından silinir; eski günlerin tuzları da silindiği için özetler sonradan kimseyle ilişkilendirilemez.
- Kalıcı olarak tutulan tek bilgi, her yazının toplam okunma sayısıdır.
- Arama motoru botları ve otomatik tarayıcılar sayılmaz.
## Site içi arama
Arama, tarayıcınızda çalışır. Yazdığınız arama ifadesi sunucuya gönderilmez ve kaydedilmez.
## Harita
İletişim sayfasındaki harita, OpenStreetMap karolarını kullanır. Harita görüntülendiğinde tarayıcınız OpenStreetMap sunucularına bağlanır ve bu sunucular IP adresinizi kendi politikalarına göre işleyebilir: [OSMF Gizlilik Politikası](https://osmfoundation.org/wiki/Privacy_Policy).
## Paylaşım butonları ve dış bağlantılar
Yazılardaki paylaşım butonları basit bağlantılardır; sayfa açılırken hiçbir sosyal ağın kodu yüklenmez. Bir butona tıkladığınızda ilgili platforma yönlendirilirsiniz. Telegram, QRZ, sosyal medya ve diğer dış siteler kendi gizlilik politikalarına tabidir.
Yazı tipleri de dahil olmak üzere sitenin tüm dosyaları bu sunucudan yüklenir; Google Fonts gibi harici servisler kullanılmaz.
## Sunucu kayıtları
Site, Türkiye'de bulunan kişisel bir sunucuda barındırılır. Sunucu erişim kayıtları (IP adresi, tarih, istenen sayfa gibi) yalnızca güvenlik ve arıza tespiti amacıyla sınırlı bir süre tutulabilir; başka bir amaçla kullanılmaz ve üçüncü kişilerle paylaşılmaz.
## Haklarınız
KVKK'nın 11. maddesi uyarınca; kişisel verilerinizin işlenip işlenmediğini öğrenme, işlenmişse buna ilişkin bilgi talep etme, işlenme amacını öğrenme, aktarıldığı üçüncü kişileri bilme, eksik veya yanlış işlenmişse düzeltilmesini, silinmesini ya da yok edilmesini isteme ve kanuna aykırı işleme nedeniyle zarara uğramanız hâlinde zararın giderilmesini talep etme haklarına sahipsiniz.
Başvurularınızı **suphi@radio.org.tr** adresine iletebilirsiniz.
## Değişiklikler
Bu politika güncellendiğinde sayfanın başındaki tarih değişir.
+35
View File
@@ -0,0 +1,35 @@
---
title: 'Lisans'
description: "ta1sph.info'nun kaynak kodu MIT, yazıları ve içeriği CC BY-SA 4.0 lisanslıdır. Kaynak göstererek nasıl kullanabileceğinizi öğrenin."
updated: 2026-10-16
---
Bu sitede iki ayrı lisans geçerlidir: biri **kaynak kod**, diğeri **yazılar ve içerik** için.
## Kaynak kod: MIT Lisansı
Sitenin kaynak kodu [MIT Lisansı](https://opensource.org/license/mit) ile lisanslanmıştır. Kodu kopyalayabilir, değiştirebilir, dağıtabilir ve ticari amaçla kullanabilirsiniz; tek şart, telif ve lisans bildiriminin korunmasıdır.
## Yazılar ve içerik: CC BY-SA 4.0
Makaleler, görseller ve sitedeki diğer içerik [Creative Commons Atıf-AynıLisanslaPaylaş 4.0 Uluslararası (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/deed.tr) lisansıyla paylaşılır.
İçeriği kopyalayabilir, yeniden düzenleyebilir ve dağıtabilirsiniz; ticari kullanım dahil. Şartlar şunlardır:
1. **Atıf:** Kaynak olarak "Suphi Çakır – TA1SPH, ta1sph.info" yazın ve ilgili yazının bağlantısını verin.
2. **Lisans bağlantısı:** CC BY-SA 4.0 lisansına bağlantı verin.
3. **Değişiklik bildirimi:** İçerikte değişiklik yaptıysanız bunu belirtin.
4. **Aynı lisansla paylaşım:** İçerikten türettiğiniz eserleri de CC BY-SA 4.0 ile paylaşın.
### Örnek atıf
Aşağıdaki metni kopyalayıp yazının adresiyle birlikte kullanabilirsiniz:
```text
Kaynak: Suphi Çakır – TA1SPH, ta1sph.info — <yazının bağlantısı>
Lisans: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/deed.tr
```
## Üçüncü taraf içerik
Sitede geçen kuruluş adları, logolar ve markalar ile dış kaynaklardan alınmış görseller kendi sahiplerinin lisanslarına tabidir; yukarıdaki lisanslar bunları kapsamaz.
+28
View File
@@ -0,0 +1,28 @@
---
title: 'Sorumluluk Reddi'
description: "ta1sph.info'daki DIY anten, cihaz modifikasyonu ve yazılım içerikleri eğitim ve hobi amaçlıdır; uygulamanın tüm sorumluluğu uygulayana aittir."
updated: 2026-10-16
---
## Bilgilerin niteliği
Bu sitedeki yazılar, özellikle **kendin yap (DIY) anten yapımı, cihaz modifikasyonu, güç kaynakları ve yazılım/firmware yükleme** konularındaki içerikler, **eğitim ve hobi amaçlıdır** ve "olduğu gibi" sunulur. Bilgilerin doğruluğu, eksiksizliği, güncelliği veya belirli bir amaca uygunluğu konusunda hiçbir garanti verilmez.
## Sorumluluk
Sitedeki uygulamaları gerçekleştirmekten doğabilecek her türlü **maddi veya manevi zarar, cihaz arızası, yaralanma, mülk hasarı, garanti kaybı ve mevzuata aykırılık** sorumluluğu tamamen uygulayan kişiye aittir. İçerikleri uygulayan kişi bu riskleri bilerek ve kabul ederek hareket etmiş sayılır.
## Lisans ve mevzuat
Yayın yapabilmek için geçerli bir amatör telsizci lisansına sahip olmak ve Bilgi Teknolojileri ve İletişim Kurumu (BTK) mevzuatına uymak kullanıcının sorumluluğundadır. Lisans sınıfınıza ait frekans ve güç sınırlarına uyun.
## Güvenlik uyarıları
- **RF maruziyeti:** Yüksek güçte ve antenlere yakın çalışırken maruziyet sınırlarına dikkat edin.
- **Yüksek gerilim:** Güç kaynakları ve amplifikatörler üzerinde çalışmadan önce cihazın enerjisini kesin; kondansatörlerin boşaldığından emin olun.
- **Yıldırım ve topraklama:** Dış antenleri ve direkleri uygun şekilde topraklayın; fırtınada anten bağlantılarını ayırın.
- **Çatı ve direk çalışmaları:** Yüksekte tek başınıza çalışmayın, uygun emniyet ekipmanı kullanın ve enerji hatlarından uzak durun.
## Dış bağlantılar
Bu siteden bağlantı verilen dış sitelerin içeriğinden ve gizlilik uygulamalarından sorumluluk kabul edilmez.
+66
View File
@@ -8,6 +8,9 @@ import socialJson from '../data/social.json';
import homeJson from '../data/home.json';
import categoriesJson from '../data/categories.json';
import blogJson from '../data/blog.json';
import aboutJson from '../data/about.json';
import contactJson from '../data/contact.json';
import pagesJson from '../data/pages.json';
const link = z.object({ label: z.string().min(1), href: z.string().min(1) });
const icon = z.string().startsWith('tabler:');
@@ -180,6 +183,66 @@ const blogSchema = z.object({
),
});
const seo = z.object({ title: z.string().max(60), description: z.string().max(160) });
const aboutSchema = z.object({
seo,
eyebrow: z.string(),
title: z.string(),
lead: z.string(),
identity: z.object({
title: z.string(),
items: z.array(z.object({ label: z.string(), value: z.string(), icon })),
}),
equipment: z.array(
z.object({
title: z.string(),
icon,
items: z.array(z.object({ name: z.string(), note: z.string().optional() })).min(1),
}),
),
});
const contactSchema = z.object({
seo,
eyebrow: z.string(),
title: z.string(),
icon,
lead: z.string(),
infoTitle: z.string(),
map: z.object({
title: z.string(),
lat: z.number().min(-90).max(90),
lng: z.number().min(-180).max(180),
zoom: z.number().int().min(1).max(19),
popup: z.string(),
ariaLabel: z.string(),
note: z.string(),
loading: z.string(),
}),
items: z.array(
z.object({
label: z.string(),
icon,
values: z.array(z.string()).optional(),
href: z.url().optional(),
email: z.email().optional(),
}),
),
});
const pagesSchema = z.object({
legal: strings(['eyebrow', 'updated', 'notice']),
notFound: z.object({
seoTitle: z.string(),
description: z.string(),
eyebrow: z.string(),
title: z.string(),
lead: z.string(),
links: z.array(link.extend({ variant: z.enum(['primary', 'secondary', 'link']), icon })),
}),
});
function parse<T>(name: string, schema: z.ZodType<T>, data: unknown): T {
const result = schema.safeParse(data);
if (!result.success) {
@@ -192,6 +255,9 @@ export const site = parse('site.json', siteSchema, siteJson);
export const home = parse('home.json', homeSchema, homeJson);
export const categories = parse('categories.json', categoriesSchema, categoriesJson);
export const blog = parse('blog.json', blogSchema, blogJson);
export const about = parse('about.json', aboutSchema, aboutJson);
export const contact = parse('contact.json', contactSchema, contactJson);
export const pages = parse('pages.json', pagesSchema, pagesJson);
export const social = parse('social.json', socialSchema, socialJson).filter((s) => s.href);
export type Site = z.infer<typeof siteSchema>;
+31
View File
@@ -0,0 +1,31 @@
---
import Button from '../components/Button.astro';
import Container from '../components/Container.astro';
import GridLines from '../components/GridLines.astro';
import SectionHeading from '../components/SectionHeading.astro';
import Numeral from '../components/home/Numeral.astro';
import BaseLayout from '../layouts/BaseLayout.astro';
import { pages } from '../lib/data';
const t = pages.notFound;
---
<BaseLayout title={t.seoTitle} description={t.description} noindex>
<section class="surface-alt relative min-h-[60vh] overflow-hidden">
<GridLines />
<Container class="relative grid gap-8 py-20 md:grid-cols-[1.4fr_1.6fr_4.2fr] md:gap-0 md:py-28">
<Numeral value="404" alt class="text-[clamp(4rem,9vw,8rem)] md:col-span-2" />
<div class="flex flex-col gap-6 md:pl-8">
<SectionHeading level={1} eyebrow={t.eyebrow} title={t.title} />
<p class="max-w-xl text-lg">{t.lead}</p>
<div class="flex flex-wrap gap-4">
{t.links.map((l) => (
<Button href={l.href} variant={l.variant} icon={l.icon}>
{l.label}
</Button>
))}
</div>
</div>
</Container>
</section>
</BaseLayout>
+36
View File
@@ -0,0 +1,36 @@
---
// /gizlilik/, /lisans/, /sorumluluk-reddi/ from src/content/legal/*.md
import type { GetStaticPaths } from 'astro';
import { getCollection, render } from 'astro:content';
import CodeCopy from '../components/CodeCopy.astro';
import Container from '../components/Container.astro';
import PageHeader from '../components/PageHeader.astro';
import BaseLayout from '../layouts/BaseLayout.astro';
import { pages } from '../lib/data';
import { formatDate, isoDay } from '../lib/dates';
export const getStaticPaths = (async () => {
const docs = await getCollection('legal');
return docs.map((doc) => ({ params: { legal: doc.id }, props: { doc } }));
}) satisfies GetStaticPaths;
const { doc } = Astro.props;
const { Content } = await render(doc);
---
<BaseLayout title={doc.data.title} description={doc.data.description}>
<PageHeader eyebrow={pages.legal.eyebrow} title={doc.data.title}>
<p class="text-sm font-semibold">
{pages.legal.updated}:{' '}
<time datetime={isoDay(doc.data.updated)}>{formatDate(doc.data.updated)}</time>
</p>
</PageHeader>
<Container class="max-w-[52rem] py-14 md:py-20">
<div class="prose article-prose md:prose-lg max-w-[72ch]">
<CodeCopy>
<Content />
</CodeCopy>
</div>
<p class="border-line text-fg-muted mt-12 border-t pt-6 text-sm">{pages.legal.notice}</p>
</Container>
</BaseLayout>
+5 -33
View File
@@ -9,6 +9,7 @@ import DateBadges from '../../components/blog/DateBadges.astro';
import DiyNotice from '../../components/blog/DiyNotice.astro';
import ShareBar from '../../components/blog/ShareBar.astro';
import Toc from '../../components/blog/Toc.astro';
import CodeCopy from '../../components/CodeCopy.astro';
import Container from '../../components/Container.astro';
import BaseLayout from '../../layouts/BaseLayout.astro';
import { blog, site } from '../../lib/data';
@@ -119,13 +120,10 @@ const jsonLd = [
<Toc headings={headings} />
</div>
<div
class="prose article-prose md:prose-lg max-w-[72ch]"
data-view-slug={post.id}
data-code-copy={blog.post.copyCode}
data-code-copied={blog.post.codeCopied}
>
<Content />
<div class="prose article-prose md:prose-lg max-w-[72ch]" data-view-slug={post.id}>
<CodeCopy>
<Content />
</CodeCopy>
</div>
<footer data-pagefind-ignore class="border-line flex flex-col gap-6 border-t pt-8">
@@ -218,30 +216,4 @@ const jsonLd = [
if (viewed && 'sendBeacon' in navigator) {
navigator.sendBeacon(`/api/views/${encodeURIComponent(viewed)}/`);
}
// Copy button on every code block.
const prose = document.querySelector<HTMLElement>('[data-code-copy]');
if (prose) {
const { codeCopy = '', codeCopied = '' } = prose.dataset;
for (const pre of prose.querySelectorAll('pre')) {
const wrap = document.createElement('div');
wrap.className = 'code-block';
pre.replaceWith(wrap);
wrap.append(pre);
const btn = document.createElement('button');
btn.type = 'button';
btn.className = 'code-copy';
btn.textContent = codeCopy;
btn.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(
pre.querySelector('code')?.innerText ?? pre.innerText,
);
btn.textContent = codeCopied;
setTimeout(() => (btn.textContent = codeCopy), 2000);
} catch {}
});
wrap.append(btn);
}
}
</script>
+64
View File
@@ -0,0 +1,64 @@
---
import { Icon } from 'astro-icon/components';
import Card from '../components/Card.astro';
import Container from '../components/Container.astro';
import PageHeader from '../components/PageHeader.astro';
import BaseLayout from '../layouts/BaseLayout.astro';
import { about, site } from '../lib/data';
const jsonLd = [
{
'@type': 'ProfilePage',
'@id': `${site.url}/hakkimda/#page`,
url: `${site.url}/hakkimda/`,
name: about.seo.title,
inLanguage: site.lang,
mainEntity: { '@id': `${site.url}/#person` },
},
];
const sectionTitle =
'font-display flex items-center gap-3 text-sm font-bold tracking-wide uppercase';
---
<BaseLayout title={about.seo.title} description={about.seo.description} jsonLd={jsonLd}>
<PageHeader eyebrow={about.eyebrow} title={about.title} lead={about.lead} />
<Container class="flex flex-col gap-14 py-14 md:py-20">
<section aria-labelledby="identity-title">
<h2 id="identity-title" class={sectionTitle}>
{about.identity.title}
<span aria-hidden="true" class="bg-accent h-0.5 w-12"></span>
</h2>
<dl class="mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
{about.identity.items.map((item) => (
<div class="bg-surface border-line flex flex-col gap-2 border p-5">
<dt class="text-fg-muted flex items-center gap-2 text-sm font-semibold">
<Icon name={item.icon} class="text-accent-text size-5" aria-hidden="true" />
{item.label}
</dt>
<dd class="font-display text-2xl leading-tight font-black">{item.value}</dd>
</div>
))}
</dl>
</section>
<div class="grid gap-6 lg:grid-cols-3">
{about.equipment.map((group, gi) => (
<Card as="section" aria-labelledby={`equipment-${gi}`} class="p-6">
<h2 id={`equipment-${gi}`} class="flex items-center gap-3 text-xl font-bold">
<Icon name={group.icon} class="text-accent-text size-7" aria-hidden="true" />
{group.title}
</h2>
<ul class="mt-5 flex flex-col">
{group.items.map((item) => (
<li class="border-line flex items-baseline justify-between gap-3 border-b py-3 last:border-b-0">
<span class="font-semibold">{item.name}</span>
{item.note && <span class="text-fg-muted text-right text-sm">{item.note}</span>}
</li>
))}
</ul>
</Card>
))}
</div>
</Container>
</BaseLayout>
+150
View File
@@ -0,0 +1,150 @@
---
import { Icon } from 'astro-icon/components';
import Container from '../components/Container.astro';
import ExternalLink from '../components/ExternalLink.astro';
import PageHeader from '../components/PageHeader.astro';
import BaseLayout from '../layouts/BaseLayout.astro';
import { contact, site } from '../lib/data';
const { map } = contact;
const jsonLd = [
{
'@type': 'ContactPage',
url: `${site.url}/iletisim/`,
name: contact.seo.title,
inLanguage: site.lang,
about: { '@id': `${site.url}/#person` },
},
];
const sectionTitle =
'font-display flex items-center gap-3 text-sm font-bold tracking-wide uppercase';
---
<BaseLayout title={contact.seo.title} description={contact.seo.description} jsonLd={jsonLd}>
<PageHeader
eyebrow={contact.eyebrow}
title={contact.title}
lead={contact.lead}
icon={contact.icon}
/>
<Container class="grid gap-12 py-14 md:py-20 lg:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]">
<section aria-labelledby="info-title">
<h2 id="info-title" class={sectionTitle}>
{contact.infoTitle}
<span aria-hidden="true" class="bg-accent h-0.5 w-12"></span>
</h2>
<dl class="mt-6 flex flex-col">
{contact.items.map((item) => {
const [user, domain] = item.email?.split('@') ?? [];
return (
<div class="border-line grid grid-cols-[2rem_minmax(0,1fr)] gap-x-3 gap-y-1 border-b py-4">
<dt class="font-display col-start-2 text-sm font-bold tracking-wide uppercase">
{item.label}
</dt>
<dd class="col-start-1 row-span-2 row-start-1">
<Icon name={item.icon} class="text-accent-text size-7" aria-hidden="true" />
</dd>
<dd class="col-start-2">
{item.email ? (
<span data-email data-u={user} data-d={domain} class="font-semibold">
{user} [at] {domain}
</span>
) : item.href ? (
<ExternalLink
href={item.href}
class="decoration-accent font-semibold underline underline-offset-4"
>
{item.values?.[0] ?? item.href}
</ExternalLink>
) : (
<ul class="flex flex-col gap-0.5">
{item.values?.map((v) => (
<li>{v}</li>
))}
</ul>
)}
</dd>
</div>
);
})}
</dl>
</section>
<section aria-labelledby="map-title" class="flex flex-col gap-4">
<h2 id="map-title" class={sectionTitle}>
{map.title}
<span aria-hidden="true" class="bg-accent h-0.5 w-12"></span>
</h2>
<div
id="map"
role="region"
aria-label={map.ariaLabel}
data-lat={map.lat}
data-lng={map.lng}
data-zoom={map.zoom}
data-popup={map.popup}
class="border-line bg-bg-alt relative z-0 h-[26rem] w-full border"
>
<p
class="text-fg-muted absolute inset-0 flex items-center justify-center text-sm"
data-map-loading
>
{map.loading}
</p>
</div>
<p class="text-fg-muted text-sm">{map.note}</p>
<template id="tower-icon">
<Icon name="tabler:building-broadcast-tower" class="size-6" aria-hidden="true" />
</template>
</section>
</Container>
</BaseLayout>
<script>
// De-obfuscate e-mail addresses (kept out of the HTML for simple bots).
for (const el of document.querySelectorAll<HTMLElement>('[data-email]')) {
const address = `${el.dataset.u}@${el.dataset.d}`;
const a = document.createElement('a');
a.href = `mailto:${address}`;
a.textContent = address;
a.className = 'decoration-accent font-semibold underline underline-offset-4';
el.replaceWith(a);
}
// Leaflet + OSM, loaded only when the map scrolls into view.
const el = document.getElementById('map');
if (el) {
const init = async () => {
const [{ default: L }] = await Promise.all([
import('leaflet'),
import('leaflet/dist/leaflet.css'),
]);
const { lat, lng, zoom, popup = '' } = el.dataset;
const center: [number, number] = [Number(lat), Number(lng)];
el.querySelector('[data-map-loading]')?.remove();
const m = L.map(el, { scrollWheelZoom: false }).setView(center, Number(zoom));
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
}).addTo(m);
const icon = L.divIcon({
html: `<span class="tower-pin">${(document.getElementById('tower-icon') as HTMLTemplateElement).innerHTML}</span>`,
className: 'tower-marker',
iconSize: [40, 40],
iconAnchor: [20, 48], // tip of the rotated pin
popupAnchor: [0, -46],
});
L.marker(center, { icon, title: popup, alt: popup }).addTo(m).bindPopup(popup);
};
new IntersectionObserver(
(entries, obs) => {
if (entries.some((e) => e.isIntersecting)) {
obs.disconnect();
void init();
}
},
{ rootMargin: '200px' },
).observe(el);
}
</script>
+50
View File
@@ -200,6 +200,10 @@
.code-block {
position: relative;
}
/* Room for the copy button so it never covers the first line. */
.code-block > pre {
padding-top: 2.5rem;
}
.code-copy {
position: absolute;
top: 0.5rem;
@@ -217,3 +221,49 @@
background: var(--accent-fill);
color: var(--on-accent-fill);
}
/* ---------- Contact map (Leaflet) ---------- */
.tower-marker {
background: none;
border: 0;
}
/* Rotate an inner element: `rotate` on the marker itself would also rotate Leaflet's translate3d. */
.tower-pin {
display: flex;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background: var(--accent-fill);
color: var(--on-accent-fill);
border: 2px solid var(--fg);
border-radius: 50% 50% 50% 0;
rotate: -45deg;
}
.tower-pin svg {
rotate: 45deg;
}
.leaflet-container .leaflet-control-attribution {
background: var(--surface);
color: var(--fg);
}
.leaflet-container .leaflet-control-attribution a {
color: var(--accent-strong);
}
.leaflet-container {
font: inherit;
background: var(--bg-alt);
}
.leaflet-popup-content {
font-family: var(--font-display);
font-weight: 700;
}
/* Dark tiles without a second tile provider. */
[data-theme='dark'] .leaflet-tile-pane {
filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9);
}
.leaflet-container .leaflet-popup-content-wrapper,
.leaflet-container .leaflet-popup-tip {
background: var(--surface);
color: var(--fg);
}