
style.css
/*
Theme Name: rest
Author: rest
Version: 2.0
*/
/* 1. Reset & Global */
body {
background-color: #050505;
background-image:
linear-gradient(rgba(0, 212, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 212, 255, 0.02) 1px, transparent 1px),
radial-gradient(circle at center, #0e051a 0%, #050505 100%);
background-size: 30px 30px, 30px 30px, 100% 100%;
color: #e0e0e0;
font-family: 'Segoe UI', system-ui, sans-serif;
margin: 0;
overflow-x: hidden;
}
.cyber-header {
background: rgba(0, 0, 0, 0.9);
border-bottom: 1px solid #00d4ff;
padding: 20px 0;
text-align: center;
position: sticky;
top: 0;
z-index: 1000;
backdrop-filter: blur(8px);
}
.header-content {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
}
.main-logo a {
color: #fff;
text-decoration: none;
font-family: 'Courier New', monospace;
font-size: 1.8rem;
font-weight: 800;
letter-spacing: 4px;
text-shadow: 1px 1px #ff0055, -1px -1px #00d4ff;
display: inline-block;
}
.header-bracket {
color: #ff0055;
font-size: 2rem;
font-family: monospace;
opacity: 0.6;
}
.header-sub {
margin-top: 8px;
font-family: monospace;
font-size: 10px;
color: #00ff41;
}
.pulse-dot {
display: inline-block;
width: 6px; height: 6px;
background: #00ff41;
border-radius: 50%;
animation: blink 1s infinite;
}
.container {
max-width: 800px;
margin: 30px auto;
padding: 0 15px;
}
article {
background: rgba(15, 15, 20, 0.8);
border: 1px solid rgba(255, 255, 255, 0.05);
padding: 25px;
margin-bottom: 25px;
position: relative;
border-left: 3px solid #ff0055;
transition: 0.3s;
}
article:hover {
border-color: #00d4ff;
transform: translateX(5px);
background: rgba(20, 20, 30, 0.95);
}
article h2 a {
color: #00d4ff;
text-decoration: none;
font-size: 1.5rem;
}
.excerpt {
color: #bbb;
margin: 15px 0;
font-size: 0.95rem;
}
.post-meta {
font-family: monospace;
font-size: 0.75rem;
color: #00ff41;
}
@media (max-width: 768px) {
.main-logo a {
font-size: 1.4rem;
letter-spacing: 2px;
}
.header-bracket {
display: none;
}
article {
padding: 20px;
}
article h2 a {
font-size: 1.3rem;
}
}
@keyframes blink {
0%, 100% { opacity: 1; box-shadow: 0 0 5px #00ff41; }
50% { opacity: 0.3; }
}
.cyber-footer {
text-align: center;
padding: 30px;
font-family: monospace;
font-size: 11px;
color: #444;
}
functions.php
PHP:
<?php
/**
* CyberPress Functions - v2.0
*/
function cyberpress_setup() {
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
}
add_action('after_setup_theme', 'cyberpress_setup');
function cyberpress_enqueue_styles() {
wp_enqueue_style('cyber-style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'cyberpress_enqueue_styles');
function cyber_scramble_footer_script() {
?>
<script>
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%&*";
let interval = null;
document.addEventListener('DOMContentLoaded', () => {
const logo = document.querySelector("#cyber-logo");
if (!logo) return;
logo.onmouseover = event => {
let iteration = 0;
clearInterval(interval);
const targetValue = logo.getAttribute('data-value');
interval = setInterval(() => {
logo.innerText = targetValue
.split("")
.map((letter, index) => {
if(index < iteration) return targetValue[index];
return letters[Math.floor(Math.random() * letters.length)]
})
.join("");
if(iteration >= targetValue.length) clearInterval(interval);
iteration += 1 / 3;
}, 30);
};
});
</script>
<?php
}
add_action('wp_footer', 'cyber_scramble_footer_script');
index.php
PHP:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<header class="cyber-header">
<div class="header-decor-line top"></div>
<div class="header-content">
<div class="header-bracket left">[</div>
<h1 class="main-logo">
<a href="<?php echo esc_url(home_url('/')); ?>" id="cyber-logo" data-value="<?php bloginfo('name'); ?>">
<?php bloginfo('name'); ?>
</a>
</h1>
<div class="header-bracket right">]</div>
</div>
<div class="header-sub">
<span class="pulse-dot"></span>
<span class="system-text">SYSTEM_STABLE_V2.0</span>
</div>
<div class="header-decor-line bottom"></div>
</header>
<main class="container">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post-glow"></div>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="excerpt">
<?php the_excerpt(); ?>
</div>
<div class="post-meta">
[TIMESTAMP: <?php the_time('Y.m.d'); ?>] // [REF: <?php the_author(); ?>]
</div>
</article>
<?php endwhile; else : ?>
<p class="no-data">// HATA: VERI_BULUNAMADI</p>
<?php endif; ?>
</main>
<footer class="cyber-footer">
© <?php echo date('Y'); ?> <?php bloginfo('name'); ?> | TERMINAL_V2
</footer>
<?php wp_footer(); ?>
</body>
</html>
Bu içeriği görmek için giriş yapın.