{"id":1,"date":"2024-03-13T10:39:46","date_gmt":"2024-03-13T10:39:46","guid":{"rendered":"https:\/\/citycapitaltraders.com\/?p=1"},"modified":"2024-04-11T01:39:55","modified_gmt":"2024-04-11T01:39:55","slug":"hello-world","status":"publish","type":"post","link":"https:\/\/citycapitaltraders.com\/?p=1","title":{"rendered":"Hello world!"},"content":{"rendered":"\n<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!<\/p>\n\n\n<div id=\"gwd-animation\">\n  <!-- Logos will be dynamically generated here -->\n<\/div>\n\n<style>\n  body, html {\n    margin: 0;\n    padding: 0;\n    width: 100%;\n    height: 100%;\n    overflow: hidden;\n  }\n\n  #gwd-animation {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    transform: translate(-50%, -50%);\n  }\n\n  .logoBox {\n    position: relative;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    cursor: pointer;\n    transition: transform 1s linear 0s;\n    white-space: nowrap;\n  }\n\n  .logoText {\n    font-size: 24px;\n    color: rgb(0, 0, 0);\n    transition: color 1s linear 0s;\n  }\n\n  .mailtoButton {\n    position: fixed;\n    bottom: 20px;\n    left: 120px;\n    background-color: rgba(125, 125, 125, 0.4);\n    color: rgb(0, 17, 17);\n    border: none;\n    border-radius: 5px;\n    padding: 10px 20px;\n    font-size: 16px;\n    cursor: pointer;\n    transition: transform 3s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s, opacity 1s ease-in-out 0s;\n    opacity: 0.5;\n    display: flex;\n    align-items: center;\n    z-index: 100;\n  }\n\n  .mailtoButton:hover {\n    background-color: rgba(255, 255, 255, 0.3);\n    opacity: 0.8;\n  }\n\n  .mailtoButton:active {\n    transform: scale(0.95);\n  }\n\n  .material-icons-outlined {\n    font-family: \"Material Icons Outlined\";\n    font-weight: normal;\n    font-style: normal;\n    font-size: 24px;\n    line-height: 1;\n    letter-spacing: normal;\n    text-transform: none;\n    display: inline-block;\n    white-space: nowrap;\n    overflow-wrap: normal;\n    direction: ltr;\n    font-feature-settings: \"liga\";\n    -webkit-font-smoothing: antialiased;\n    margin-right: 5px;\n  }\n<\/style>\n\n<script>\n  \/\/ Function to generate a random number between min and max\n  function getRandom(min, max) {\n    return Math.random() * (max - min) + min;\n  }\n\n  \/\/ Function to generate a random color in hexadecimal format\n  function getRandomColor() {\n    return '#' + Math.floor(Math.random() * 16777215).toString(16);\n  }\n\n  \/\/ Function to animate logos with additional effects and motion paths\n  function animateLogo(logoElement, speed, direction) {\n    let angle = Math.random() * 2 * Math.PI; \/\/ Random initial angle\n    let radiusX = getRandom(100, 300); \/\/ Random radius for oval motion in X direction\n    let radiusY = getRandom(100, 300); \/\/ Random radius for oval motion in Y direction\n    let rotation = 0; \/\/ Initial rotation angle\n    let scale = 1; \/\/ Initial scale\n\n    setInterval(() => {\n      let x, y;\n      if (direction === 'clockwise') {\n        x = radiusX * Math.cos(angle);\n        y = radiusY * Math.sin(angle);\n        angle += speed; \/\/ Adjust the speed of rotation\n      } else if (direction === 'counterclockwise') {\n        x = radiusX * Math.cos(angle);\n        y = -radiusY * Math.sin(angle);\n        angle -= speed; \/\/ Adjust the speed of rotation in counter-clockwise direction\n      }\n\n      logoElement.style.left = '50%';\n      logoElement.style.top = '50%';\n      logoElement.style.transform = 'translate(-50%, -50%) translate(' + x + 'px, ' + y + 'px)';\n\n      \/\/ Transition the color slightly in each animation frame\n      const currentColor = logoElement.querySelector('.logoText').style.color;\n      const newColor = getRandomColor();\n      logoElement.querySelector('.logoText').style.color = newColor;\n\n      \/\/ Smoothly transition scaling\n      scale = 0.9 + Math.sin(Date.now() * speed) * 0.05; \/\/ Smooth sinusoidal scaling between 0.85 and 0.95\n      logoElement.style.transform += ' scale(' + scale + ')';\n\n      \/\/ Apply rotation effect by changing the rotation angle\n      rotation += speed * 100; \/\/ Adjust rotation speed\n    }, 50); \/\/ Adjust the interval for smoother animation\n  }\n\n  \/\/ Generate random number of logos (3 to 20)\n  const numLogos = Math.floor(Math.random() * 18) + 3; \/\/ Random number between 3 and 20\n  const logoContainer = document.getElementById('gwd-animation');\n  for (let i = 1; i <= numLogos; i++) {\n    const logoBox = document.createElement('div');\n    logoBox.className = 'logoBox';\n    const logoText = document.createElement('div');\n    logoText.className = 'logoText';\n    logoText.textContent = 'City Capital Traders';\n    logoBox.appendChild(logoText);\n    logoContainer.appendChild(logoBox);\n    const direction = i % 2 === 0 ? 'clockwise' : 'counterclockwise'; \/\/ Alternate direction for each logo\n    animateLogo(logoBox, getRandom(0.005, 0.03), direction); \/\/ Apply animation to each logo\n\n    \/\/ Add click event listener to each logo box\n    logoBox.addEventListener('click', sendMail);\n  }\n\n  \/\/ Function to open mail client when the button is clicked\n  function sendMail() {\n    window.location.href = \"mailto:hello@citycapitaltraders.com\";\n  }\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=\/wp\/v2\/posts\/1","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1"}],"version-history":[{"count":14,"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=\/wp\/v2\/posts\/1\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=\/wp\/v2\/posts\/1\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/citycapitaltraders.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}