<commit_before>= stylesheet_link_tag 'weather-icons'

h1.now__title Where can you find me right now?

- flags = { \
  'Italy' => '🇮🇹', \
  'United Kingdom' => '🇬🇧', \
  'Greece' => '🇬🇷', \
  'Spain' => '🇪🇸', \
  'Poland' => '🇵🇱', \
  'United States' => '🇺🇸', \
}

.now__location
  .now__location-flag = flags[address[:country]]
  .now__city
    = address[:city]
    .now__city-state
      = "#{address[:region]}, #{address[:country]}"


- weather_icon_map = { \
  '01d' => 'wi-day-sunny', \
  '02d' => 'wi-day-cloudy', \
  '03d' => 'wi-cloud', \
  '04d' => 'wi-cloudy', \
  '09d' => 'wi-showers', \
  '10d' => 'wi-day-showers', \
  '11d' => 'wi-thunderstorm', \
  '13d' => 'wi-snow', \
  \
  '01n' => 'wi-night-clear', \
  '02n' => 'wi-night-cloudy', \
  '03n' => 'wi-cloud', \
  '04n' => 'wi-cloudy', \
  '09n' => 'wi-showers', \
  '10n' => 'wi-night-showers', \
  '11n' => 'wi-thunderstorm', \
  '13n' => 'wi-snow' \
}

.now__weather
  .now__weather-cell
    .now__weather-value
      i.wi class=weather_icon_map[weather.weather[0]['icon']]
    b.now__label = weather.weather[0]['description'].titleize

  .now__weather-cell
    .now__weather-value
      = weather.temperature
      | ° C
    b.now__label Temperature

  .now__weather-cell
    .now__weather-value
      = weather.humidity
      | %
    b.now__label Humidity

  .now__weather-cell
    .now__weather-value
      i.wi.wi-wind style="transform: rotate(#{weather.wind['deg']}deg)"
    b.now__label Wind: #{weather.wind['speed']} km/h

  .now__weather-cell
    .now__weather-value
      = (weather.sunrise + 2.hours).strftime('%H:%M')
    b.now__label Sunrise
  .now__weather-cell
    .now__weather-value
      = (weather.sunset + 2.hours).strftime('%H:%M')
    b.now__label Sunset

#map style="height: 300px"

h2 What am I up to?

ul
  li I'm working at CurrencyCloud in London
  li I'm #{link_to 'studying', 'https://francescoboffa.com/i-will-study-to-get-aws-certified'} to become and AWS Certified Solution Architect - Associate...
  li ...and in the meantime I'm writing study notes about it
  li I'm reading the #{link_to '4 Hours Work Week by <NAME>', 'https://www.amazon.co.uk/4-Hour-Work-Week-Escape-Anywhere/dp/0091929113'}

javascript:
  function initMap() {
    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 13,
      center: { lat: #{location.latitude}, lng: #{location.longitude} }
    });
    
    var marker = new google.maps.Marker({
      position: { lat: #{location.latitude}, lng: #{location.longitude} },
      map: map
    });
  }

= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{Rails.application.secrets.google_api_web_key}&callback=initMap", async: true
<commit_msg>Updated now page<commit_after>= stylesheet_link_tag 'weather-icons'

h1.now__title Where can you find me right now?

- flags = { \
  'Italy' => '🇮🇹', \
  'United Kingdom' => '🇬🇧', \
  'Greece' => '🇬🇷', \
  'Spain' => '🇪🇸', \
  'Poland' => '🇵🇱', \
  'United States' => '🇺🇸', \
}

.now__location
  .now__location-flag = flags[address[:country]]
  .now__city
    = address[:city]
    .now__city-state
      = "#{address[:region]}, #{address[:country]}"


- weather_icon_map = { \
  '01d' => 'wi-day-sunny', \
  '02d' => 'wi-day-cloudy', \
  '03d' => 'wi-cloud', \
  '04d' => 'wi-cloudy', \
  '09d' => 'wi-showers', \
  '10d' => 'wi-day-showers', \
  '11d' => 'wi-thunderstorm', \
  '13d' => 'wi-snow', \
  \
  '01n' => 'wi-night-clear', \
  '02n' => 'wi-night-cloudy', \
  '03n' => 'wi-cloud', \
  '04n' => 'wi-cloudy', \
  '09n' => 'wi-showers', \
  '10n' => 'wi-night-showers', \
  '11n' => 'wi-thunderstorm', \
  '13n' => 'wi-snow' \
}

.now__weather
  .now__weather-cell
    .now__weather-value
      i.wi class=weather_icon_map[weather.weather[0]['icon']]
    b.now__label = weather.weather[0]['description'].titleize

  .now__weather-cell
    .now__weather-value
      = weather.temperature
      | ° C
    b.now__label Temperature

  .now__weather-cell
    .now__weather-value
      = weather.humidity
      | %
    b.now__label Humidity

  .now__weather-cell
    .now__weather-value
      i.wi.wi-wind style="transform: rotate(#{weather.wind['deg']}deg)"
    b.now__label Wind: #{weather.wind['speed']} km/h

  .now__weather-cell
    .now__weather-value
      = (weather.sunrise + 2.hours).strftime('%H:%M')
    b.now__label Sunrise
  .now__weather-cell
    .now__weather-value
      = (weather.sunset + 2.hours).strftime('%H:%M')
    b.now__label Sunset

#map style="height: 300px"

h2 What am I up to?

ul
  li I'm working at CurrencyCloud in London
  li I'm #{link_to 'studying', 'https://francescoboffa.com/i-will-study-to-get-aws-certified'} to be an AWS Certified Solution Architect - Associate...
  li ...and in the meantime I'm writing study notes about it
  li I'm reading #{link_to 'Origin by <NAME>', 'https://www.amazon.co.uk/Origin-Robert-Langdon-Book-5/dp/0593078756'}

javascript:
  function initMap() {
    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 13,
      center: { lat: #{location.latitude}, lng: #{location.longitude} }
    });

    var marker = new google.maps.Marker({
      position: { lat: #{location.latitude}, lng: #{location.longitude} },
      map: map
    });
  }

= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{Rails.application.secrets.google_api_web_key}&callback=initMap", async: true

{'fraction_non_alphanumeric': 0.19161565572250047, 'fraction_numerical': 0.020218883324058617, 'mean_word_length': 3.048048048048048, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4201136', 'n_tokens_mistral': 2259, 'n_tokens_neox': 2096, 'n_words': 376}