[fusion_builder_container type=”flex” hundred_percent=”no” hundred_percent_height=”no” min_height=”” hundred_percent_height_scroll=”no” align_content=”stretch” flex_align_items=”flex-start” flex_justify_content=”flex-start” flex_column_spacing=”” hundred_percent_height_center_content=”yes” equal_height_columns=”no” container_tag=”div” menu_anchor=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” status=”published” publish_date=”” class=”” id=”” link_color=”” link_hover_color=”” border_sizes=”” border_sizes_top=”” border_sizes_right=”” border_sizes_bottom=”” border_sizes_left=”” border_color=”” border_style=”solid” spacing_medium=”” margin_top_medium=”” margin_bottom_medium=”” spacing_small=”” margin_top_small=”” margin_bottom_small=”” margin_top=”” margin_bottom=”” padding_dimensions_medium=”” padding_top_medium=”” padding_right_medium=”” padding_bottom_medium=”” padding_left_medium=”” padding_dimensions_small=”” padding_top_small=”” padding_right_small=”” padding_bottom_small=”” padding_left_small=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” box_shadow=”no” box_shadow_vertical=”” box_shadow_horizontal=”” box_shadow_blur=”0″ box_shadow_spread=”0″ box_shadow_color=”” box_shadow_style=”” z_index=”” overflow=”” gradient_start_color=”” gradient_end_color=”” gradient_start_position=”0″ gradient_end_position=”100″ gradient_type=”linear” radial_direction=”center center” linear_angle=”180″ background_color=”” background_image=”” background_position=”center center” background_repeat=”no-repeat” fade=”no” background_parallax=”none” enable_mobile=”no” parallax_speed=”0.3″ background_blend_mode=”none” video_mp4=”” video_webm=”” video_ogv=”” video_url=”” video_aspect_ratio=”16:9″ video_loop=”yes” video_mute=”yes” video_preview_image=”” absolute=”off” absolute_devices=”small,medium,large” sticky=”off” sticky_devices=”small-visibility,medium-visibility,large-visibility” sticky_background_color=”” sticky_height=”” sticky_offset=”” sticky_transition_offset=”0″ scroll_offset=”0″ animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” filter_hue=”0″ filter_saturation=”100″ filter_brightness=”100″ filter_contrast=”100″ filter_invert=”0″ filter_sepia=”0″ filter_opacity=”100″ filter_blur=”0″ filter_hue_hover=”0″ filter_saturation_hover=”100″ filter_brightness_hover=”100″ filter_contrast_hover=”100″ filter_invert_hover=”0″ filter_sepia_hover=”0″ filter_opacity_hover=”100″ filter_blur_hover=”0″][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ align_self=”auto” content_layout=”column” align_content=”flex-start” content_wrap=”wrap” spacing=”” center_content=”no” link=”” target=”_self” min_height=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”” id=”” type_medium=”” type_small=”” order_medium=”0″ order_small=”0″ dimension_spacing_medium=”” dimension_spacing_small=”” dimension_spacing=”” dimension_margin_medium=”” dimension_margin_small=”” margin_top=”” margin_bottom=”” padding_medium=”” padding_small=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” hover_type=”none” border_sizes=”” border_color=”” border_style=”solid” border_radius=”” box_shadow=”no” dimension_box_shadow=”” box_shadow_blur=”0″ box_shadow_spread=”0″ box_shadow_color=”” box_shadow_style=”” background_type=”single” gradient_start_color=”” gradient_end_color=”” gradient_start_position=”0″ gradient_end_position=”100″ gradient_type=”linear” radial_direction=”center center” linear_angle=”180″ background_color=”” background_image=”” background_image_id=”” background_position=”left top” background_repeat=”no-repeat” background_blend_mode=”none” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” filter_type=”regular” filter_hue=”0″ filter_saturation=”100″ filter_brightness=”100″ filter_contrast=”100″ filter_invert=”0″ filter_sepia=”0″ filter_opacity=”100″ filter_blur=”0″ filter_hue_hover=”0″ filter_saturation_hover=”100″ filter_brightness_hover=”100″ filter_contrast_hover=”100″ filter_invert_hover=”0″ filter_sepia_hover=”0″ filter_opacity_hover=”100″ filter_blur_hover=”0″ last=”true” border_position=”all” first=”true”][fusion_code]<!– Firebase SDK –>
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-auth-compat.js"></script>

<!– Google Giriş Butonu –>
<button id="google-login-btn" style="padding: 12px 24px; font-size: 16px; background-color: #4285F4; color: white; border: none; border-radius: 4px;">
Google ile Giriş Yap
</button>

<script>
const firebaseConfig = {
apiKey: "AIzaSyCLdVZdVH0diQuQ8mpy744kOyq_idY4TFI",
authDomain: "kahvecim-net-egitim.firebaseapp.com",
projectId: "kahvecim-net-egitim",
storageBucket: "kahvecim-net-egitim.firebasestorage.app",
messagingSenderId: "939465676370",
appId: "1:939465676370:web:8162d1854fe8050aa6b18b",
measurementId: "G-395DRLV1HT"
};

firebase.initializeApp(firebaseConfig);
const provider = new firebase.auth.GoogleAuthProvider();

// Buton yüklendiğinde login olayını tanımla
function waitForButtonAndInitLogin() {
const btn = document.getElementById("google-login-btn");
if (btn) {
console.log("Buton bulundu, tıklama olayı atanıyor.");
btn.addEventListener("click", function () {
firebase.auth().signInWithPopup(provider)
.then((result) => {
const user = result.user;
localStorage.setItem("egitim_user", JSON.stringify({
name: user.displayName,
email: user.email
}));
alert(`Hoş geldin ${user.displayName}`);
window.location.href = "/basvuru";
})
.catch((error) => {
alert("Giriş başarısız: " + error.message);
});
});
} else {
// Buton henüz yüklenmediyse 500ms sonra tekrar dene
console.log("Buton henüz gelmedi, tekrar denenecek…");
setTimeout(waitForButtonAndInitLogin, 500);
}
}

waitForButtonAndInitLogin();
</script>
[/fusion_code][fusion_code]<!– Firebase SDK (compat) –>
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-auth-compat.js"></script>

<!– Google Giriş Butonu –>
<button id="google-login-btn" style="padding: 12px 24px; font-size: 16px; background-color: #4285F4; color: white; border: none; border-radius: 4px;">
Google ile Giriş Yap
</button>

<script>
const firebaseConfig = {
apiKey: "AIzaSyCLdVZdVH0diQuQ8mpy744kOyq_idY4TFI",
authDomain: "kahvecim-net-egitim.firebaseapp.com",
projectId: "kahvecim-net-egitim",
storageBucket: "kahvecim-net-egitim.firebasestorage.app",
messagingSenderId: "939465676370",
appId: "1:939465676370:web:8162d1854fe8050aa6b18b",
measurementId: "G-395DRLV1HT"
};

firebase.initializeApp(firebaseConfig);
const provider = new firebase.auth.GoogleAuthProvider();

document.addEventListener("DOMContentLoaded", function () {
const loginBtn = document.getElementById("google-login-btn");
if (loginBtn) {
loginBtn.addEventListener("click", function () {
firebase.auth().signInWithPopup(provider)
.then((result) => {
const user = result.user;
localStorage.setItem("egitim_user", JSON.stringify({
name: user.displayName,
email: user.email
}));
alert(`Hoş geldin ${user.displayName}`);
window.location.href = "/basvuru";
})
.catch((error) => {
alert("Giriş başarısız: " + error.message);
});
});
}
});
</script>
[/fusion_code][fusion_code]<div id="form-container">
<p>Yükleniyor…</p>
</div>

<script>
const userData = localStorage.getItem("egitim_user");
const container = document.getElementById("form-container");

if (!userData) {
container.innerHTML = `<p style="color: red;">Eğitim başvurusu için lütfen <a href='/'>Google hesabınızla giriş yapınız</a>.</p>`;
} else {
const user = JSON.parse(userData);
container.innerHTML = `
<h3>Eğitim Başvuru Formu</h3>
<form>
<label>Ad Soyad</label><br>
<input type="text" value="${user.name}" readonly><br><br>

<label>E-posta</label><br>
<input type="email" value="${user.email}" readonly><br><br>

<label>Eğitim Seçiniz</label><br>
<select>
<option>Robotik Kodlama</option>
<option>3D Yazıcı Eğitimi</option>
<option>Teknoloji Atölyesi</option>
</select><br><br>

<button type="submit">Başvur</button>
</form>
`;
}
</script>
[/fusion_code][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]