From 69945ebaf0d1fd5e345dfa769f7f90d5b05f70ac Mon Sep 17 00:00:00 2001 From: Olivier Giulieri Date: Wed, 13 Mar 2024 02:58:34 -0700 Subject: [PATCH] Cleanups. --- css/numerology.css | 66 ++++++++++++++++++++++++------------------- i18n/meaning_en.js | 2 +- i18n/meaning_fr.js | 3 +- index-dutch.html | 8 ++++-- index-french.html | 8 ++++-- index-german.html | 8 ++++-- index-indonesian.html | 8 ++++-- index-italian.html | 8 ++++-- index-japanese.html | 8 ++++-- index-portuguese.html | 8 ++++-- index-spanish.html | 8 ++++-- index-turkish.html | 8 ++++-- index.html | 8 ++++-- js/demo.js | 61 ++++++++++++++++++--------------------- js/numerology.js | 18 ++++++------ perso-ymd.html | 2 +- 16 files changed, 136 insertions(+), 96 deletions(-) diff --git a/css/numerology.css b/css/numerology.css index 6d829e6..63e0471 100644 --- a/css/numerology.css +++ b/css/numerology.css @@ -3,7 +3,9 @@ (c) 2024 Sally Faubion & Olivier Giulieri http://www.sallysnumbers.com */ - +html { + scroll-behavior: smooth; +} body { margin: 30px; font-size: 1.2em; @@ -18,10 +20,10 @@ a { text-decoration: none; border-bottom: 1px solid #0091ea; color: #1d1d1d; -} -a:hover { - background-color: rgb(241, 248, 255); - border-bottom-color: #0091ea; + &:hover { + background-color: rgb(241, 248, 255); + border-bottom-color: #0091ea; + } } h1 { margin: 10px 0 40px; @@ -34,6 +36,9 @@ h1 { h2 { margin: 12px 0 5px; font-size: 1.2em; + > span { + font-weight: 300; + } } label { color: #1d1d1d; @@ -77,9 +82,9 @@ section { } .linespace > li { margin: 10px; -} -.linespace > li > a { - font-weight: 600; + > a { + font-weight: 600; + } } .field { margin: 30px 0; @@ -97,10 +102,6 @@ section { .calc { display: block; margin: 10px 0; - > div { - color: #0091ea; - margin: 5px 0; - } > .meaning { margin: 15px 0 20px -10px; color: #1a1a1a; @@ -155,7 +156,7 @@ section { } .i18n { position: absolute; - top: 10px; + top: 5px; right: 20px; padding: 4px; > img { @@ -164,6 +165,10 @@ section { height: 11px; width: 16px; border: solid 1px grey; + transition: transform 0.5s; + &:hover { + transform: scale(1.4); + } } } @@ -302,9 +307,9 @@ section { #sally { display: none; -} -#sally li { - margin-bottom: 10px; + li { + margin-bottom: 10px; + } } .fullStar { @@ -343,6 +348,10 @@ section { .character { top: 0px; left: 95px; + > span { + left: 12px; + top: 0; + } } .soul { top: 66px; @@ -351,6 +360,10 @@ section { .agenda { top: 65px; left: 179px; + > span { + top: 22px; + left: -28px; + } } .attitude { top: 158px; @@ -363,22 +376,14 @@ section { .destiny { top: 88px; left: 95px; + > span { + left: 28px; + top: 0; + } } .purpose { display: none; } - .character > span { - left: 12px; - top: 0; - } - .destiny > span { - left: 28px; - top: 0; - } - .agenda > span { - top: 22px; - left: -28px; - } } .star > div { z-index: 110; @@ -491,7 +496,10 @@ section { #allNumbers > span:hover { transform: scale(1.4); } - +.sally { + height: 206px; + width: 195px; +} .heart { font-size: 20px; position: relative; diff --git a/i18n/meaning_en.js b/i18n/meaning_en.js index 8528c98..4e9297a 100644 --- a/i18n/meaning_en.js +++ b/i18n/meaning_en.js @@ -91,7 +91,7 @@ const meaning = { 4: "Your conscientious, organized, systematic and reliable public persona makes you a sought-after worker-bee or Chairman of the Board.", 5: "Your charming, articulate, flexible and style-conscious nature make you a trendsetter who can engage and inspire many when focused on a mission", 6: 'As a born humanitarian, community-oriented, outstanding parent/teacher/human being who always "goes the extra mile" you are an exemplary committee or cause leader.', - 7: "As a philosophically avant-garde, knowledge-seeking genius, you don't seek the limelight but are superlative teachers, professors, and career specialists.", + 7: "As a philosophically avant-garde, knowledge-seeking genius, you don't seek the limelight but are a superlative teacher, professor, and career specialist.", 8: "Your commanding, exemplary teacher-of-teachers, judge/jury, producer/director persona possesses a sixth sense that enables you to readily distinguish right from wrong in anything.", 9: 'As a born sage, aristocratic, socially pleasing humanitarian, you gravitate toward the community that can benefit most from your "selfless server" mission.', 11: "As an empathetic, enlightened and understanding counselor or community leader, you belong in the limelight; the 11 is associated with fame and illumination.", diff --git a/i18n/meaning_fr.js b/i18n/meaning_fr.js index 169e4d4..c4a099e 100644 --- a/i18n/meaning_fr.js +++ b/i18n/meaning_fr.js @@ -78,7 +78,6 @@ var meaning = { 22: "Vous êtes né avec une tendance obstinée, mais avec des encouragements, vous pouvez être un homme très déterminé, entreprenant, inspiré et ingénieux.", }, character: { - //title: "Character", title: "Personnage", description: "Ce nombre représente principalement vos qualités publiques et sociales, mais vous afficheriez également une grande partie de la même chose dans vos relations personnelles.", @@ -89,7 +88,7 @@ var meaning = { 4: "Votre personnalité publique consciencieuse, organisée, systématique et fiable fait de vous un travailleur-abeille recherché ou un président du conseil d'administration.", 5: "Votre nature charmante, articulée, flexible et soucieuse de votre style fait de vous un pionnier qui peut engager et inspirer beaucoup de monde lorsqu'il est concentré sur une mission", 6: 'En tant que parent / enseignant / être humain né humanitaire, orienté vers la communauté et exceptionnel, qui "fait toujours un effort supplémentaire", vous êtes un comité exemplaire ou un leader de cause.', - 7: "En tant que génie philosophiquement avant-gardiste et à la recherche de connaissances, vous ne recherchez pas les feux de la rampe, mais vous êtes des enseignants, des professeurs et des spécialistes de carrière exceptionnels.", + 7: "En tant que génie philosophiquement avant-gardiste et à la recherche de connaissances, vous ne recherchez pas les feux de la rampe, mais vous êtes un enseignant, professeur et spécialiste de carrière exceptionnelle.", 8: "Votre maître d'enseignants, votre juge / jury, votre personnage de producteur / réalisateur, exemplaire et exemplaire, possède un sixième sens qui vous permet de distinguer facilement le bien du mal en quoi que ce soit.", 9: 'En tant que sage né, aristocratique, humanitaire socialement agréable, vous vous dirigez vers la communauté qui peut le plus bénéficier de votre mission de "serveur désintéressé".', 11: "En tant que conseiller ou leader communautaire empathique, éclairé et compréhensif, vous êtes sous les feux de la rampe; le 11 est associé à la renommée et à l'illumination. ", diff --git a/index-dutch.html b/index-dutch.html index d5aadfd..8156b96 100644 --- a/index-dutch.html +++ b/index-dutch.html @@ -110,7 +110,7 @@

Motiverende Numerologie door Sally Faubion

max="31" maxlength="2" /> - @@ -161,7 +161,11 @@

Motiverende Numerologie door Sally Faubion

Sally Faubion
diff --git a/index-french.html b/index-french.html index 064c854..735dd84 100644 --- a/index-french.html +++ b/index-french.html @@ -115,7 +115,7 @@

Numérologie Motivationnelle par Sally Faubion

max="31" maxlength="2" /> - @@ -167,7 +167,11 @@

Numérologie Motivationnelle par Sally Faubion

Sally Faubion
diff --git a/index-german.html b/index-german.html index 76a8926..73153e6 100644 --- a/index-german.html +++ b/index-german.html @@ -112,7 +112,7 @@

Motivationale Numerologie von Sally Faubion

max="31" maxlength="2" /> - @@ -164,7 +164,11 @@

Motivationale Numerologie von Sally Faubion

Sally Faubion
diff --git a/index-indonesian.html b/index-indonesian.html index 338f8c5..081b8b4 100644 --- a/index-indonesian.html +++ b/index-indonesian.html @@ -114,7 +114,7 @@

Numerologi Motivasi oleh Sally Faubion

max="31" maxlength="2" /> - @@ -166,7 +166,11 @@

Numerologi Motivasi oleh Sally Faubion

Sally Faubion
diff --git a/index-italian.html b/index-italian.html index 53fd028..eb0e90b 100644 --- a/index-italian.html +++ b/index-italian.html @@ -112,7 +112,7 @@

Numerologia Motivazionale di Sally Faubion

max="31" maxlength="2" /> - @@ -164,7 +164,11 @@

Numerologia Motivazionale di Sally Faubion

Sally Faubion
diff --git a/index-japanese.html b/index-japanese.html index ea829cc..2807b3c 100644 --- a/index-japanese.html +++ b/index-japanese.html @@ -107,7 +107,7 @@

やる気をそそる数秘術 サリーフォービオン

min="0" maxlength="4" /> - @@ -160,7 +160,11 @@

やる気をそそる数秘術 サリーフォービオン

Sally Faubion
diff --git a/index-portuguese.html b/index-portuguese.html index 80a813b..f59caea 100644 --- a/index-portuguese.html +++ b/index-portuguese.html @@ -112,7 +112,7 @@

Numerologia Motivacional por Sally Faubion

max="31" maxlength="2" /> - @@ -164,7 +164,11 @@

Numerologia Motivacional por Sally Faubion

Sally Faubion
diff --git a/index-spanish.html b/index-spanish.html index 07c3448..0b5549b 100644 --- a/index-spanish.html +++ b/index-spanish.html @@ -112,7 +112,7 @@

Numerología Motivacional por Sally Faubion

max="31" maxlength="2" /> - @@ -163,7 +163,11 @@

Numerología Motivacional por Sally Faubion

Sally Faubion
diff --git a/index-turkish.html b/index-turkish.html index 1c9a112..47aa4b4 100644 --- a/index-turkish.html +++ b/index-turkish.html @@ -107,7 +107,7 @@

Motivasyonel Numeroloji Sally Faubion

max="31" maxlength="2" /> - @@ -159,7 +159,11 @@

Motivasyonel Numeroloji Sally Faubion

Sally Faubion
diff --git a/index.html b/index.html index a96cee3..793fa07 100644 --- a/index.html +++ b/index.html @@ -138,7 +138,7 @@

Motivational Numerology by Sally Faubion

- @@ -199,7 +199,11 @@

Motivational Numerology by Sally Faubion

Sally Faubion
diff --git a/js/demo.js b/js/demo.js index 1528064..af2aa01 100644 --- a/js/demo.js +++ b/js/demo.js @@ -22,16 +22,16 @@ const dimensionsMain = [ "soul", ]; -var showPurpose = true; // use showPurpose = true to show "Divine Purpose" number -var myNumbers = {}; -var dest, char; +const showPurpose = true; // use showPurpose = true to show "Divine Purpose" number +const myNumbers = {}; +let dest, char; const mn = "Motivational Numerology"; function dateReport(month, day, year) { const cats = ["destiny", "personality", "attitude"]; const d = parseInt(day); if (month && day && year && d > 0 && d < 32 && parseInt(year) > 0) { - var info = dateInfo(month, day, year); + const info = dateInfo(month, day, year); cats.forEach((cat) => (myNumbers[cat] = info[cat])); dest = info.destiny.number; return cats.map((id) => htmlSection(info[id])).join(""); @@ -48,6 +48,10 @@ function nameReport(name) { dimensionsName.forEach((cat) => (myNumbers[cat] = info[cat])); char = info.character.number; return dimensionsName.map((id) => htmlSection(info[id])).join(""); + } else { + myNumbers.character = null; + myNumbers.agenda = null; + myNumbers.soul = null; } char = ""; myNumbers.purpose = null; @@ -64,27 +68,25 @@ function purposeReport() { return ""; } -function htmlMeaning(number, meaning) { - return ( - '
' + - number + - "
" + - (meaning || "N/A") + - "
" - ); -} +const htmlMeaning = (number, meaning) => + '
' + + number + + "
" + + (meaning || "N/A") + + "
"; + +const ms = (master, meaning) => + master ? `(${meaning.master})` : ""; function htmlSection(rpt) { - html = `
-

${rpt.title} = ${rpt.number}

+ let html = ` +
+

${rpt.title} = ${rpt.number} ${ms(rpt.master, meaning)}

${rpt.description}
`; if (rpt.meaning) { - html += - '
' + - (rpt.master ? `
${meaning.master}
` : "") + - htmlMeaning(rpt.number, rpt.meaning); + html += '
' + htmlMeaning(rpt.number, rpt.meaning); } html += "
"; return html; @@ -98,7 +100,7 @@ const setValue = (id, value) => { function calcName(skipExtra) { const name = getValue("name"); - document.title = name ? name + " - " + mn : mn; + document.title = name ? `${name} - ${mn}` : mn; elem("report1").innerHTML = nameReport(name); if (!skipExtra) { calcExtra(); @@ -127,15 +129,8 @@ function calcExtra() { return ""; }) .join(""); - var h = ""; - if (myNumbers.destiny) { - h += - ''; - } else { - h += ''; - } + const css = "t0" + (myNumbers.destiny ? " c" + myNumbers.destiny.number : ""); + let h = ``; dimensionsMain.forEach((cat, idx) => { const num = myNumbers[cat] ? myNumbers[cat].number : ""; h += `
`; @@ -161,9 +156,7 @@ function calcExtra() { if (myNumbers) { dimensions.forEach(collectNumbers(myNumbers)); } - numNumbers = numNumbers.sort(function (a, b) { - return a - b; - }); + numNumbers = numNumbers.sort((a, b) => a - b); elem("allNumbers").innerHTML = numNumbers .map((num) => `${num}`) .join(""); diff --git a/js/numerology.js b/js/numerology.js index 1127e71..2f541c2 100644 --- a/js/numerology.js +++ b/js/numerology.js @@ -181,13 +181,13 @@ const dateInfo = (month, day, year) => ({ attitude: makeReport("attitude", reduceNumber(month + day)), }); -const fullInfo = (name, month, day, year) => { - const rpt = dateInfo(month, day, year), - buffer = nameInfo(name); +// const fullInfo = (name, month, day, year) => { +// const rpt = dateInfo(month, day, year), +// buffer = nameInfo(name); - rpt.character = buffer.character; - rpt.soul = buffer.soul; - rpt.agenda = buffer.agenda; - rpt.purpose = purposeInfo(rpt.destiny.number, rpt.character.number); - return rpt; -}; +// rpt.character = buffer.character; +// rpt.soul = buffer.soul; +// rpt.agenda = buffer.agenda; +// rpt.purpose = purposeInfo(rpt.destiny.number, rpt.character.number); +// return rpt; +// }; diff --git a/perso-ymd.html b/perso-ymd.html index 99dd8b4..4eb6d0f 100644 --- a/perso-ymd.html +++ b/perso-ymd.html @@ -19,7 +19,7 @@

Personal Year, Month, Day

-