ms whitman

/* עיצוב למובייל ולאתר */
.vayechi-box {
font-family: system-ui, -apple-system, sans-serif;
max-width: 100%; margin: auto; padding: 15px;
border: 2px solid #2ecc71; border-radius: 12px; background: #fff; box-sizing: border-box;
}
.btn-print-vayechi {
background: #27ae60; color: white; padding: 15px; font-size: 18px;
border: none; border-radius: 8px; cursor: pointer; font-weight: bold;
width: 100%; box-shadow: 0 3px 6px rgba(0,0,0,0.1); margin-top: 10px;
}
.dict-preview {
display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 5px; margin-top: 15px; font-size: 12px; text-align: right;
}
const symbols = [
{s:"🦁", d:"אריה"}, {s:"🐍", d:"נחש"}, {s:" deer", d:"איילה"}, {s:"🐺", d:"זאב"},
{s:"🚢", d:"אונייה"}, {s:"🫏", d:"חמור"}, {s:"🛌", d:"מיטה"}, {s:"👐", d:"ידיים"},
{s:"👑", d:"כתר"}, {s:"🌾", d:"שיבולים"}, {s:"🍷", d:"גביע"}, {s:"🍇", d:"ענבים"},
{s:"🏛️", d:"מצרים"}, {s:"🐪", d:"גמל"}, {s:"💰", d:"כסף"}, {s:"📜", d:"צוואה"},
{s:"🏹", d:"קשת"}, {s:"🐟", d:"דגים"}, {s:"🌳", d:"אילן"}, {s:"🍯", d:"דבש"},
{s:"🕯️", d:"נר"}, {s:"⛺", d:"אוהל"}, {s:"🏔️", d:"מערה"}, {s:"⚖️", d:"מאזניים"},
{s:"🎁", d:"מתנה"}, {s:"💧", d:"טיפה"}, {s:"🔥", d:"אש"}, {s:"🍎", d:"תפוח"},
{s:"🧱", d:"לבנה"}, {s:"🏺", d:"כד"}, {s:"🥖", d:"לחם"}, {s:"🐂", d:"שור"},
{s:"🐑", d:"כבש"}, {s:"🧺", d:"סל"}, {s:"🥛", d:"חלב"}, {s:"👞", d:"נעל"},
{s:"⚓", d:"עוגן"}, {s:"🌞", d:"שמש"}, {s:"🌙", d:"ירח"}, {s:"⭐", d:"כוכב"},
{s:"🛡️", d:"מגן"}, {s:"⚔️", d:"חרב"}, {s:"🎨", d:"צבע"}, {s:"🔨", d:"פטיש"},
{s:"🪵", d:"עץ"}, {s:"🌊", d:"ים"}, {s:"👣", d:"צעד"}, {s:"🎒", d:"תיק"}
];
// מילוי מילון באתר
const previewDict = document.getElementById('preview-dict');
symbols.slice(0, 15).forEach(i => {
previewDict.innerHTML += `דאבל פרשת ויחי
@page { size: A4; margin: 10mm; }
body { font-family: sans-serif; margin: 0; padding: 10px; text-align: center; }
.dict-page { page-break-after: always; padding: 20px; border: 2px solid #000; margin-bottom: 20px; }
.dict-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; font-size: 14px; text-align: right; }
.cards-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10mm; }
.card {
width: 85mm; height: 85mm; border: 1.5px solid #000; border-radius: 50%;
position: relative; display: inline-block; box-sizing: border-box;
page-break-inside: avoid; margin-bottom: 10mm;
background: white;
}
.symbol { position: absolute; font-size: 32pt; }
.nav { background: #333; color: #fff; padding: 10px; position: sticky; top: 0; z-index: 100; }
button { padding: 10px 20px; font-size: 18px; cursor: pointer; }
@media print { .nav { display: none; } }


🎲 דאבל פרשת ויחי – מוכן להדפסה
הקוד מסודר ל-6 עיגולים בדף (10 דפים סך הכל) למניעת חיתוכים.
${i.s} ${i.d}
`;
});
function generateDobbleData() {
const n = 7; let cards = [];
for (let i = 0; i <= n; i++) {
let card = [0];
for (let j = 0; j < n; j++) card.push((n * i) + (j + 1));
cards.push(card);
}
for (let i = 0; i < n; i++) {
for (let j = 0; j < n; j++) {
let card = [i + 1];
for (let k = 0; k < n; k++) card.push(n + 1 + n * k + (i * k + j) % n);
cards.push(card);
}
}
return cards.slice(0, 55);
}
function openPrintWindow() {
const cards = generateDobbleData();
const win = window.open('', '_blank');
let content = `
מילון סמלים: פרשת ויחי
${symbols.map(i => `
${i.s} ${i.d}
`).join(")}
`;
const p = [
{t:'15%', l:'40%'}, {t:'32%', l:'18%'}, {t:'32%', l:'62%'},
{t:'50%', l:'40%'}, {t:'68%', l:'18%'}, {t:'68%', l:'62%'},
{t:'50%', l:'12%'}, {t:'50%', l:'68%'}
];
cards.forEach((card) => {
content += `
`;
win.document.write(content);
win.document.close();
}
`;
card.forEach((sIdx, i) => {
const symb = symbols[sIdx % symbols.length].s;
const rot = Math.floor(Math.random() * 360);
content += `
`;
});
content += `${symb}
`;
});
content += `
כמות צפיות בפוסט: 43