<div class="sun-newspaper-widget sun-large-mode">
<div class="sun-header">
<div class="sun-logo-box">
<h1 class="sun-logo-main">Ardahan Newspaper</h1>
</div>
</div>
<div class="sun-headline-container">
<div class="sun-header-sub-meta">
<div class="meta-item meta-left">Ardahan Newspaper | Since 1995</div>
<div class="meta-item meta-center">www.ardahangazetesi.tr</div>
<div class="meta-item meta-right" id="sun-newspaper-date">26 June 2026</div>
</div>
<div class="sun-overlay-wrapper" id="sun-headline-overlay-zone">
<div class="sun-loading">Loading latest post...</div>
</div>
</div>
<div class="sun-main-content">
<div class="sun-news-flex-container">
<div id="sun-left-column" class="sun-news-col">
</div>
<div class="sun-column-divider" style="display: none !important;"></div>
<div id="sun-right-column" style="display: none !important;"></div>
</div>
</div>
</div>
<style>
/* Şablon Tamamen Siyah Dış Çerçeve */
.sun-newspaper-widget.sun-large-mode {
background-color: #000000;
color: #FFFFFF;
font-family: 'Arial Black', Impact, sans-serif;
padding: 12px;
border: 5px solid #000000;
max-width: 100%;
margin: 0 auto;
box-sizing: border-box;
}
/* Logo Bölümü */
.sun-large-mode .sun-header {
background-color: #E30613;
padding: 18px 10px;
text-align: center;
}
.sun-large-mode .sun-logo-main {
font-size: 60px;
color: #FFFFFF;
font-weight: 900;
margin: 0;
padding: 0;
line-height: 0.85;
letter-spacing: -2px;
text-transform: uppercase;
}
/* Tamamen Siyah Manşet Konteyneri */
.sun-large-mode .sun-headline-container {
background-color: #000000;
padding: 10px 10px 0 10px;
text-align: center;
}
/* Üçlü Meta Alanı */
.sun-large-mode .sun-header-sub-meta {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #FFFFFF;
padding-bottom: 12px;
margin-bottom: 25px;
}
.sun-large-mode .meta-item {
font-family: Arial, sans-serif;
color: #FFFFFF;
font-size: 13px;
width: 33.33%;
}
.sun-large-mode .meta-left { font-weight: bold; text-align: left; }
.sun-large-mode .meta-center { font-weight: bold; text-align: center; letter-spacing: 0.5px; }
.sun-large-mode .meta-right { font-weight: normal; text-align: right; }
/* 1. Manşet Resmi */
.sun-large-mode .sun-overlay-wrapper {
position: relative;
width: 100%;
overflow: hidden;
border: 2px solid #FFFFFF;
background-color: #111111;
}
.sun-large-mode .sun-headline-under-image {
width: 100%;
height: auto;
max-height: 500px;
object-fit: cover;
display: block;
}
.sun-large-mode .sun-main-headline {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
background: linear-gradient(transparent, rgba(0,0,0,0.95) 40%);
color: #FFFFFF;
font-size: 42px;
line-height: 1.05;
text-transform: uppercase;
font-weight: 900;
letter-spacing: -1.5px;
margin: 0;
padding: 50px 20px 20px 20px;
box-sizing: border-box;
text-align: left;
}
/* Beyaz Haber Alanı */
.sun-large-mode .sun-main-content {
background-color: #FFFFFF;
color: #000000;
padding: 10px 20px 10px 20px;
border: 1px solid #FFFFFF;
}
/* Düz Akış */
.sun-large-mode .sun-news-flex-container {
display: block;
}
.sun-large-mode .sun-news-col {
width: 100% !important;
font-size: 19px;
line-height: 1.7;
font-family: 'Times New Roman', Times, serif;
text-align: justify;
color: #000000;
padding: 0 !important;
margin: 0 !important;
}
/* Üst ve Alt Boşluk Sıfırlamaları */
.sun-large-mode .sun-news-col p,
.sun-large-mode .sun-news-col div {
margin: 0 0 12px 0 !important;
padding: 0 !important;
font-size: 19px;
line-height: 1.7;
text-align: justify;
}
.sun-large-mode .sun-news-col p:first-child,
.sun-large-mode .sun-news-col div:first-child {
margin-top: 0 !important;
}
.sun-large-mode .sun-news-col p:last-child,
.sun-large-mode .sun-news-col div:last-child {
margin-bottom: 0 !important;
}
.sun-large-mode .sun-loading { color: #FFFFFF; font-family: Arial, sans-serif; font-size: 14px; padding: 40px 0; }
/* Mobil Uyum */
@media (max-width: 768px) {
.sun-large-mode .sun-logo-main { font-size: 38px; }
.sun-large-mode .sun-main-headline { font-size: 24px; padding: 20px 10px 10px 10px; }
.sun-large-mode .sun-header-sub-meta { flex-direction: column; gap: 5px; }
.sun-large-mode .meta-item { width: 100%; text-align: center; }
.sun-large-mode .sun-news-col { font-size: 17px; }
}
</style>
<script>
(function() {
var feedUrl = window.location.protocol + "//" + window.location.hostname + "/feeds/posts/default?alt=json&max-results=1";
function getHighResImage(src) {
if (!src) return "";
return src.replace(/\/s[0-9]+(-c)?\//, "/s1600/").replace(/\/w[0-9]+-h[0-9]+(-[a-z])?\//, "/s1600/");
}
var xhr = new XMLHttpRequest();
xhr.open("GET", feedUrl, true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var data = JSON.parse(xhr.responseText);
var entry = data.feed.entry ? data.feed.entry[0] : null;
if (entry) {
var title = entry.title.$t;
var content = entry.content ? entry.content.$t : (entry.summary ? entry.summary.$t : "");
if(entry.published) {
var pubDate = new Date(entry.published.$t);
var options = { year: 'numeric', month: 'long', day: 'numeric' };
document.getElementById("sun-newspaper-date").innerHTML = pubDate.toLocaleDateString('tr-TR', options);
}
var tempDiv = document.createElement('div');
tempDiv.innerHTML = content;
var images = tempDiv.getElementsByTagName('img');
if(images.length > 0) {
var firstImgNetSrc = getHighResImage(images[0].src);
document.getElementById("sun-headline-overlay-zone").innerHTML =
'<img src="' + firstImgNetSrc + '" class="sun-headline-under-image" />' +
'<h2 class="sun-main-headline">' + title + '</h2>';
// Yazı içindeki TÜM resimleri temizler (Böylece ne ikinci ne de sonraki resimler metinde görünmez)
while(images.length > 0) {
images[0].parentNode.removeChild(images[0]);
}
} else {
document.getElementById("sun-headline-overlay-zone").innerHTML = '<h2 class="sun-main-headline" style="position:static; background:transparent; padding:20px 10px;">' + title + '</h2>';
}
var finalHtml = "";
if(tempDiv.children.length > 0) {
for(var i = 0; i < tempDiv.children.length; i++) {
if(tempDiv.children[i].innerHTML.trim() !== "") {
finalHtml += tempDiv.children[i].outerHTML;
}
}
} else {
finalHtml = "<p>" + tempDiv.innerHTML + "</p>";
}
// Sadece metin içeriğini basar
document.getElementById("sun-left-column").innerHTML = finalHtml;
} else {
document.getElementById("sun-headline-overlay-zone").innerHTML = "Haber bulunamadı.";
}
}
};
xhr.send();
})();
</script>
