{"id":43,"date":"2026-10-15T06:53:03","date_gmt":"2026-10-15T06:53:03","guid":{"rendered":"http:\/\/mockup-church-design.local\/?page_id=18"},"modified":"2026-10-21T05:56:19","modified_gmt":"2026-10-21T05:56:19","slug":"updates","status":"publish","type":"page","link":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/updates\/","title":{"rendered":"Updates"},"content":{"rendered":"\n<div class=\"wp-block-uagb-container uagb-block-7c2a8a18 alignfull uagb-is-root-container\"><style>.gehd-scope-567dcbe29c85 #church-news-updates{\r\n  --news-orange: var(--ast-global-color-0, #FF6210);\r\n  --news-orange-dark: var(--ast-global-color-1, #F15808);\r\n  --news-heading: var(--ast-global-color-2, #1c0d0a);\r\n  --news-text: var(--ast-global-color-3, #353535);\r\n  --news-white: var(--ast-global-color-4, #ffffff);\r\n  --news-cream: var(--ast-global-color-5, #fef1e4);\r\n  --news-border: var(--ast-global-color-7, #e5d7d1);\r\n\r\n  --news-dark: #140b06;\r\n\r\n  --news-muted:\r\n    color-mix(\r\n      in srgb,\r\n      var(--news-text) 72%,\r\n      var(--news-white)\r\n    );\r\n\r\n  --news-header-clearance: 90px;\r\n\r\n  width: 100%;\r\n  max-width: 100%;\r\n\r\n  margin: 0;\r\n  padding: 0;\r\n\r\n  background: var(--news-white);\r\n  color: var(--news-text);\r\n\r\n  font-family: inherit;\r\n  font-size: 15px;\r\n  line-height: 1.6;\r\n\r\n  box-sizing: border-box;\r\n\r\n  overflow-wrap: anywhere;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates *,.gehd-scope-567dcbe29c85 #church-news-updates *::before,.gehd-scope-567dcbe29c85 #church-news-updates *::after{\r\n  box-sizing: border-box;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates img{\r\n  display: block;\r\n  max-width: 100%;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates a{\r\n  color: inherit;\r\n  text-decoration: none;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates button{\r\n  font: inherit;\r\n  cursor: pointer;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates button:focus-visible,.gehd-scope-567dcbe29c85 #church-news-updates a:focus-visible{\r\n  outline:\r\n    2px solid\r\n    var(--news-orange);\r\n\r\n  outline-offset: 3px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates [hidden]{\r\n  display: none !important;\r\n}.gehd-scope-567dcbe29c85.ast-theme-transparent-header\r\n#church-news-updates .church-news-banner{\r\n  margin-top:\r\n    var(--news-header-clearance);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-banner{\r\n  position: relative;\r\n\r\n  width: 100%;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    30px;\r\n\r\n  background:\r\n    var(--news-dark);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slider-stage{\r\n  position: relative;\r\n\r\n  width: 100%;\r\n\r\n  min-height:\r\n    clamp(\r\n      430px,\r\n      55vh,\r\n      520px\r\n    );\r\n\r\n  overflow: hidden;\r\n\r\n  background:\r\n    var(--news-dark);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide{\r\n  position: relative;\r\n\r\n  display: flex;\r\n\r\n  align-items: flex-end;\r\n\r\n  width: 100%;\r\n\r\n  min-height:\r\n    clamp(\r\n      430px,\r\n      55vh,\r\n      520px\r\n    );\r\n\r\n  overflow: hidden;\r\n\r\n  background:\r\n    var(--news-dark);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-image{\r\n  position: absolute;\r\n\r\n  inset: 0;\r\n\r\n  width: 100%;\r\n  height: 100%;\r\n\r\n  object-fit: cover;\r\n\r\n  object-position: center;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-overlay{\r\n  position: absolute;\r\n\r\n  z-index: 1;\r\n\r\n  inset: 0;\r\n\r\n  background:\r\n    linear-gradient(\r\n      90deg,\r\n      rgba(20, 11, 6, 0.93) 0%,\r\n      rgba(20, 11, 6, 0.65) 52%,\r\n      rgba(20, 11, 6, 0.15) 100%\r\n    );\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-label{\r\n  position: absolute;\r\n\r\n  z-index: 3;\r\n\r\n  top: 28px;\r\n  left: 42px;\r\n\r\n  display: inline-block;\r\n\r\n  max-width:\r\n    calc(\r\n      100% - 84px\r\n    );\r\n\r\n  margin: 0;\r\n\r\n  padding:\r\n    6px\r\n    10px;\r\n\r\n  overflow: hidden;\r\n\r\n  background:\r\n    var(--news-orange);\r\n\r\n  color:\r\n    var(--news-white);\r\n\r\n  font-size: 10px;\r\n\r\n  font-weight: 800;\r\n\r\n  line-height: 1.4;\r\n\r\n  letter-spacing: 1px;\r\n\r\n  text-overflow: ellipsis;\r\n\r\n  white-space: nowrap;\r\n\r\n  text-transform: uppercase;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-content{\r\n  position: relative;\r\n\r\n  z-index: 2;\r\n\r\n  width: 100%;\r\n\r\n  max-width: 780px;\r\n\r\n  margin-top: auto;\r\n\r\n  padding:\r\n    25px\r\n    42px\r\n    62px;\r\n\r\n  color:\r\n    var(--news-white);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-title{\r\n  display: -webkit-box;\r\n\r\n  max-width: 700px;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    10px;\r\n\r\n  padding: 0;\r\n\r\n  overflow: hidden;\r\n\r\n  color:\r\n    var(--news-white);\r\n\r\n  font-size:\r\n    clamp(\r\n      25px,\r\n      3.5vw,\r\n      42px\r\n    );\r\n\r\n  font-weight: 900;\r\n\r\n  line-height: 1.15;\r\n\r\n  letter-spacing: -0.4px;\r\n\r\n  -webkit-box-orient: vertical;\r\n  -webkit-line-clamp: 2;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-excerpt{\r\n  display: -webkit-box;\r\n\r\n  max-width: 620px;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    15px;\r\n\r\n  overflow: hidden;\r\n\r\n  color:\r\n    rgba(\r\n      255,\r\n      255,\r\n      255,\r\n      0.92\r\n    );\r\n\r\n  font-size: 13px;\r\n\r\n  line-height: 1.65;\r\n\r\n  -webkit-box-orient: vertical;\r\n  -webkit-line-clamp: 3;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slide-link{\r\n  display: inline-flex;\r\n\r\n  align-items: center;\r\n\r\n  gap: 9px;\r\n\r\n  padding:\r\n    10px\r\n    14px;\r\n\r\n  background:\r\n    var(--news-orange);\r\n\r\n  color:\r\n    #ffffff !important;\r\n\r\n  font-size: 12px;\r\n\r\n  font-weight: 800;\r\n\r\n  line-height: 1.4;\r\n\r\n  transition:\r\n    background 0.2s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-slide-link:hover{\r\n  background:\r\n    var(--news-orange-dark);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slider-dots{\r\n  position: absolute;\r\n\r\n  z-index: 5;\r\n\r\n  left: 42px;\r\n\r\n  bottom: 20px;\r\n\r\n  display: flex;\r\n\r\n  align-items: center;\r\n\r\n  gap: 7px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-dot{\r\n  width: 8px;\r\n  height: 8px;\r\n\r\n  padding: 0;\r\n\r\n  border: 0;\r\n\r\n  border-radius: 0;\r\n\r\n  background:\r\n    rgba(\r\n      255,\r\n      255,\r\n      255,\r\n      0.55\r\n    );\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-dot.is-active{\r\n  width: 23px;\r\n\r\n  background:\r\n    var(--news-orange);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-slider-controls{\r\n  position: absolute;\r\n\r\n  z-index: 5;\r\n\r\n  right: 16px;\r\n\r\n  bottom: 10px;\r\n\r\n  display: flex;\r\n\r\n  gap: 6px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-arrow{\r\n  display: flex;\r\n\r\n  align-items: center;\r\n\r\n  justify-content: center;\r\n\r\n  width: 32px;\r\n\r\n  height: 32px;\r\n\r\n  padding: 0;\r\n\r\n  border:\r\n    1px solid\r\n    rgba(\r\n      255,\r\n      255,\r\n      255,\r\n      0.6\r\n    );\r\n\r\n  border-radius: 0;\r\n\r\n  background:\r\n    rgba(\r\n      20,\r\n      11,\r\n      6,\r\n      0.45\r\n    );\r\n\r\n  color:\r\n    #ffffff;\r\n\r\n  font-size: 19px;\r\n\r\n  line-height: 1;\r\n\r\n  transition:\r\n    background 0.2s ease,\r\n    border-color 0.2s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-arrow:hover{\r\n  background:\r\n    var(--news-orange);\r\n\r\n  border-color:\r\n    var(--news-orange);\r\n}.gehd-scope-567dcbe29c85.ast-theme-transparent-header\r\n#church-news-updates .church-news-slider-stage,.gehd-scope-567dcbe29c85.ast-theme-transparent-header\r\n#church-news-updates .church-news-slide{\r\n  min-height:\r\n    clamp(\r\n      490px,\r\n      64vh,\r\n      590px\r\n    );\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-layout{\r\n  position: relative;\r\n\r\n  display: grid;\r\n\r\n  grid-template-columns:\r\n    minmax(0, 1fr)\r\n    minmax(280px, 330px);\r\n\r\n  align-items: stretch;\r\n\r\n  gap: 30px;\r\n\r\n  width: 100%;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    clamp(\r\n      56px,\r\n      6vw,\r\n      84px\r\n    );\r\n\r\n  padding:\r\n    0\r\n    clamp(\r\n      20px,\r\n      3.2vw,\r\n      42px\r\n    );\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-main{\r\n  min-width: 0;\r\n\r\n  width: 100%;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-sidebar{\r\n  position: relative;\r\n\r\n  align-self: stretch;\r\n\r\n  min-width: 0;\r\n\r\n  width: 100%;\r\n\r\n  padding-top: 132px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-sidebar::before{\r\n  content: \"\";\r\n\r\n  position: absolute;\r\n\r\n  top: 132px;\r\n\r\n  bottom: 0;\r\n\r\n  left: -15px;\r\n\r\n  width: 1px;\r\n\r\n  background:\r\n    var(--news-border);\r\n\r\n  pointer-events: none;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-header{\r\n  margin:\r\n    0\r\n    0\r\n    18px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-heading{\r\n  margin:\r\n    0\r\n    0\r\n    5px;\r\n\r\n  padding: 0;\r\n\r\n  color:\r\n    var(--news-heading);\r\n\r\n  font-size:\r\n    clamp(\r\n      25px,\r\n      3vw,\r\n      33px\r\n    );\r\n\r\n  font-weight: 900;\r\n\r\n  line-height: 1.2;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-intro{\r\n  max-width: 700px;\r\n\r\n  margin: 0;\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 13px;\r\n\r\n  line-height: 1.7;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-reference{\r\n  max-width: 760px;\r\n\r\n  margin:\r\n    8px\r\n    0\r\n    0;\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 12px;\r\n\r\n  line-height: 1.65;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-categories{\r\n  display: flex;\r\n\r\n  flex-wrap: wrap;\r\n\r\n  gap: 7px;\r\n\r\n  width: 100%;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    20px;\r\n\r\n  padding: 0;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-category{\r\n  display: inline-flex;\r\n\r\n  align-items: center;\r\n\r\n  justify-content: center;\r\n\r\n  padding:\r\n    7px\r\n    12px;\r\n\r\n  border:\r\n    1px solid\r\n    var(--news-border);\r\n\r\n  border-radius: 0;\r\n\r\n  background:\r\n    var(--news-white);\r\n\r\n  color:\r\n    var(--news-text);\r\n\r\n  font-size: 11px;\r\n\r\n  font-weight: 800;\r\n\r\n  line-height: 1.4;\r\n\r\n  transition:\r\n    background 0.2s ease,\r\n    color 0.2s ease,\r\n    border-color 0.2s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-category:hover,.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-category.is-active{\r\n  border-color:\r\n    var(--news-orange);\r\n\r\n  background:\r\n    var(--news-orange);\r\n\r\n  color:\r\n    var(--news-white);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-category-count{\r\n  margin-left: 6px;\r\n\r\n  font-size: 10px;\r\n\r\n  opacity: 0.8;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-post-grid{\r\n  display: grid;\r\n\r\n  grid-template-columns:\r\n    repeat(\r\n      2,\r\n      minmax(0, 1fr)\r\n    );\r\n\r\n  gap: 18px;\r\n\r\n  width: 100%;\r\n\r\n  margin: 0;\r\n\r\n  padding: 0;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-card{\r\n  display: flex;\r\n\r\n  flex-direction: column;\r\n\r\n  min-width: 0;\r\n\r\n  overflow: hidden;\r\n\r\n  border:\r\n    1px solid\r\n    var(--news-border);\r\n\r\n  background:\r\n    var(--news-white);\r\n\r\n  transition:\r\n    box-shadow 0.2s ease,\r\n    transform 0.2s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card:hover{\r\n  transform:\r\n    translateY(-2px);\r\n\r\n  box-shadow:\r\n    0\r\n    7px\r\n    18px\r\n    rgba(\r\n      28,\r\n      13,\r\n      10,\r\n      0.09\r\n    );\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-image-wrap{\r\n  position: relative;\r\n\r\n  display: block;\r\n\r\n  width: 100%;\r\n\r\n  aspect-ratio: 16 \/ 9;\r\n\r\n  overflow: hidden;\r\n\r\n  background:\r\n    var(--news-cream);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-image{\r\n  width: 100%;\r\n\r\n  height: 100%;\r\n\r\n  object-fit: cover;\r\n\r\n  transition:\r\n    transform 0.3s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card:hover\r\n.church-news-card-image{\r\n  transform:\r\n    scale(1.025);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-body{\r\n  display: flex;\r\n\r\n  flex: 1;\r\n\r\n  flex-direction: column;\r\n\r\n  align-items: flex-start;\r\n\r\n  min-width: 0;\r\n\r\n  padding: 14px;\r\n\r\n  background:\r\n    var(--news-white);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates .church-news-meta{\r\n  display: flex;\r\n\r\n  flex-wrap: wrap;\r\n\r\n  align-items: center;\r\n\r\n  gap: 7px;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    7px;\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 10px;\r\n\r\n  font-weight: 800;\r\n\r\n  line-height: 1.5;\r\n\r\n  letter-spacing: 0.3px;\r\n\r\n  text-transform: uppercase;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-category-tag{\r\n  display: inline-block;\r\n\r\n  padding:\r\n    3px\r\n    6px;\r\n\r\n  background:\r\n    var(--news-cream);\r\n\r\n  color:\r\n    var(--news-orange-dark);\r\n\r\n  font-size: 9px;\r\n\r\n  font-weight: 900;\r\n\r\n  letter-spacing: 0.3px;\r\n\r\n  text-transform: uppercase;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-title{\r\n  width: 100%;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    7px;\r\n\r\n  padding: 0;\r\n\r\n  color:\r\n    var(--news-heading);\r\n\r\n  font-size: 17px;\r\n\r\n  font-weight: 850;\r\n\r\n  line-height: 1.35;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-title a{\r\n  color: inherit;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-title a:hover{\r\n  color:\r\n    var(--news-orange-dark);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-card-excerpt{\r\n  display: -webkit-box;\r\n\r\n  width: 100%;\r\n\r\n  margin:\r\n    0\r\n    0\r\n    12px;\r\n\r\n  overflow: hidden;\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 12px;\r\n\r\n  line-height: 1.65;\r\n\r\n  -webkit-box-orient: vertical;\r\n  -webkit-line-clamp: 2;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-read-more{\r\n  display: inline-flex;\r\n\r\n  align-items: center;\r\n\r\n  gap: 7px;\r\n\r\n  margin-top: auto;\r\n\r\n  color:\r\n    var(--news-orange-dark);\r\n\r\n  font-size: 11px;\r\n\r\n  font-weight: 900;\r\n\r\n  letter-spacing: 0.3px;\r\n\r\n  text-transform: uppercase;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-read-more:hover{\r\n  color:\r\n    var(--news-heading);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-read-more span{\r\n  font-size: 16px;\r\n\r\n  line-height: 1;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook{\r\n  position: sticky;\r\n\r\n  top: 100px;\r\n\r\n  z-index: 2;\r\n\r\n  width: 100%;\r\n\r\n  overflow: hidden;\r\n\r\n  border:\r\n    1px solid\r\n    var(--news-border);\r\n\r\n  background:\r\n    var(--news-white);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-header{\r\n  display: flex;\r\n\r\n  flex-direction: column;\r\n\r\n  align-items: flex-start;\r\n\r\n  gap: 10px;\r\n\r\n  padding:\r\n    22px\r\n    20px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-eyebrow{\r\n  margin: 0;\r\n\r\n  color:\r\n    var(--news-orange-dark);\r\n\r\n  font-size: 10px;\r\n\r\n  font-weight: 900;\r\n\r\n  letter-spacing: 1px;\r\n\r\n  text-transform: uppercase;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-title{\r\n  margin: 0;\r\n\r\n  padding: 0;\r\n\r\n  color:\r\n    var(--news-heading);\r\n\r\n  font-size: 23px;\r\n\r\n  font-weight: 900;\r\n\r\n  line-height: 1.25;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-description{\r\n  margin: 0;\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 13px;\r\n\r\n  line-height: 1.7;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-actions{\r\n  display: flex;\r\n\r\n  flex-wrap: wrap;\r\n\r\n  align-items: center;\r\n\r\n  gap: 9px;\r\n\r\n  width: 100%;\r\n\r\n  margin-top: 5px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-follow,.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-visit{\r\n  display: inline-flex;\r\n\r\n  align-items: center;\r\n\r\n  justify-content: center;\r\n\r\n  gap: 8px;\r\n\r\n  padding:\r\n    11px\r\n    14px;\r\n\r\n  border:\r\n    1px solid\r\n    var(--news-orange);\r\n\r\n  border-radius: 0;\r\n\r\n  font-size: 11px;\r\n\r\n  font-weight: 800;\r\n\r\n  line-height: 1.45;\r\n\r\n  text-align: center;\r\n\r\n  transition:\r\n    background 0.2s ease,\r\n    color 0.2s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-follow{\r\n  background:\r\n    var(--news-orange);\r\n\r\n  color:\r\n    var(--news-white) !important;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-follow:hover{\r\n  background:\r\n    var(--news-orange-dark);\r\n\r\n  color:\r\n    var(--news-white) !important;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-visit{\r\n  background:\r\n    transparent;\r\n\r\n  color:\r\n    var(--news-orange-dark) !important;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-facebook-visit:hover{\r\n  background:\r\n    var(--news-orange);\r\n\r\n  color:\r\n    var(--news-white) !important;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-load-wrap{\r\n  display: flex;\r\n\r\n  flex-direction: column;\r\n\r\n  align-items: center;\r\n\r\n  margin:\r\n    24px\r\n    0\r\n    0;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-load-more{\r\n  display: inline-flex;\r\n\r\n  align-items: center;\r\n\r\n  justify-content: center;\r\n\r\n  min-width: 155px;\r\n\r\n  padding:\r\n    11px\r\n    19px;\r\n\r\n  border: 0;\r\n\r\n  border-radius: 0;\r\n\r\n  background:\r\n    var(--news-orange);\r\n\r\n  color:\r\n    var(--news-white);\r\n\r\n  font-size: 12px;\r\n\r\n  font-weight: 800;\r\n\r\n  transition:\r\n    background 0.2s ease;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-load-more:hover{\r\n  background:\r\n    var(--news-orange-dark);\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-load-more:disabled{\r\n  cursor: wait;\r\n\r\n  opacity: 0.6;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-load-status,.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-slider-status{\r\n  margin:\r\n    8px\r\n    0\r\n    0;\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 12px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-loading{\r\n  grid-column:\r\n    1 \/ -1;\r\n\r\n  padding:\r\n    22px\r\n    15px;\r\n\r\n  background:\r\n    var(--news-cream);\r\n\r\n  color:\r\n    var(--news-muted);\r\n\r\n  font-size: 13px;\r\n\r\n  text-align: center;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-empty{\r\n  grid-column:\r\n    1 \/ -1;\r\n\r\n  padding: 20px;\r\n\r\n  border:\r\n    1px solid\r\n    var(--news-border);\r\n\r\n  background:\r\n    var(--news-white);\r\n\r\n  color:\r\n    var(--news-text);\r\n\r\n  font-size: 13px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-error{\r\n  padding: 18px;\r\n\r\n  border:\r\n    1px solid\r\n    var(--news-border);\r\n\r\n  background:\r\n    var(--news-cream);\r\n\r\n  color:\r\n    var(--news-heading);\r\n\r\n  font-size: 13px;\r\n}.gehd-scope-567dcbe29c85 #church-news-updates\r\n.church-news-sr-only{\r\n  position: absolute;\r\n\r\n  width: 1px;\r\n  height: 1px;\r\n\r\n  padding: 0;\r\n\r\n  margin: -1px;\r\n\r\n  overflow: hidden;\r\n\r\n  clip:\r\n    rect(\r\n      0,\r\n      0,\r\n      0,\r\n      0\r\n    );\r\n\r\n  white-space: nowrap;\r\n\r\n  border: 0;\r\n}@media (max-width: 921px){.gehd-scope-567dcbe29c85 #church-news-updates{\r\n    --news-header-clearance: 80px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-layout{\r\n    grid-template-columns:\r\n      minmax(0, 1fr)\r\n      minmax(250px, 290px);\r\n\r\n    gap: 22px;\r\n\r\n    padding-inline: 26px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-sidebar{\r\n    padding-top: 145px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-sidebar::before{\r\n    top: 145px;\r\n\r\n    left: -11px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-facebook{\r\n    top: 90px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-post-grid{\r\n    gap: 14px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-label{\r\n    left: 26px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-content{\r\n    padding-left: 26px;\r\n\r\n    padding-right: 26px;\r\n  }\r\n\r\n}@media (max-width: 760px){.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-layout{\r\n    grid-template-columns:\r\n      minmax(0, 1fr);\r\n\r\n    gap: 32px;\r\n\r\n    padding-inline: 20px;\r\n\r\n    margin-bottom: 48px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-sidebar{\r\n    align-self: auto;\r\n\r\n    width: 100%;\r\n\r\n    max-width: 500px;\r\n\r\n    margin:\r\n      0\r\n      auto;\r\n\r\n    padding:\r\n      24px\r\n      0\r\n      0;\r\n\r\n    border-top:\r\n      1px solid\r\n      var(--news-border);\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-sidebar::before{\r\n    display: none;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-facebook{\r\n    position: static;\r\n\r\n    top: auto;\r\n\r\n    z-index: auto;\r\n  }\r\n\r\n}@media (max-width: 600px){.gehd-scope-567dcbe29c85 #church-news-updates{\r\n    --news-header-clearance: 72px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-banner{\r\n    margin-bottom: 24px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slider-stage,.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide{\r\n    min-height: 410px;\r\n  }.gehd-scope-567dcbe29c85.ast-theme-transparent-header\r\n  #church-news-updates\r\n  .church-news-slider-stage,.gehd-scope-567dcbe29c85.ast-theme-transparent-header\r\n  #church-news-updates\r\n  .church-news-slide{\r\n    min-height: 440px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-label{\r\n    top: 22px;\r\n\r\n    left: 20px;\r\n\r\n    max-width:\r\n      calc(\r\n        100% - 40px\r\n      );\r\n\r\n    font-size: 9px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-content{\r\n    padding:\r\n      20px\r\n      20px\r\n      62px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-overlay{\r\n    background:\r\n      linear-gradient(\r\n        0deg,\r\n        rgba(20, 11, 6, 0.95) 0%,\r\n        rgba(20, 11, 6, 0.68) 65%,\r\n        rgba(20, 11, 6, 0.18) 100%\r\n      );\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-title{\r\n    font-size: 27px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slide-excerpt{\r\n    font-size: 12px;\r\n\r\n    line-height: 1.6;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slider-dots{\r\n    left: 20px;\r\n\r\n    bottom: 17px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-slider-controls{\r\n    right: 12px;\r\n\r\n    bottom: 8px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-heading{\r\n    font-size: 27px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-categories{\r\n    gap: 6px;\r\n\r\n    margin-bottom: 15px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-category{\r\n    padding:\r\n      7px\r\n      9px;\r\n\r\n    font-size: 10px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-facebook-header{\r\n    padding:\r\n      20px\r\n      16px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-facebook-actions{\r\n    align-items: stretch;\r\n\r\n    flex-direction: column;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-facebook-follow,.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-facebook-visit{\r\n    width: 100%;\r\n  }\r\n\r\n}@media (max-width: 480px){.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-post-grid{\r\n    grid-template-columns:\r\n      minmax(0, 1fr);\r\n\r\n    gap: 14px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-card-image-wrap{\r\n    aspect-ratio: 16 \/ 8;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-card-body{\r\n    padding: 13px;\r\n  }.gehd-scope-567dcbe29c85 #church-news-updates\r\n  .church-news-card-title{\r\n    font-size: 17px;\r\n  }\r\n\r\n}@media\r\n(prefers-reduced-motion: reduce){.gehd-scope-567dcbe29c85 #church-news-updates *,.gehd-scope-567dcbe29c85 #church-news-updates *::before,.gehd-scope-567dcbe29c85 #church-news-updates *::after{\r\n    scroll-\r\n      auto !important;\r\n\r\n    transition-duration:\r\n      0.01ms !important;\r\n  }\r\n\r\n}<\/style><div class=\"gehd-design gehd-scope-567dcbe29c85 wp-block-gehd-editable-html-designer\" data-gehd-id=\"design-e4b726d0-bec4-4c\" data-gehd-instance=\"gehd-instance-1\"><section\r\n  id=\"church-news-updates\"\r\n  aria-label=\"Sta. Barbara Mission Center News and Updates\"\r\n>\r\n\r\n\r\n\r\n\r\n<!-- ========================================================\r\n     FEATURED NEWS SLIDER\r\n     ======================================================== -->\r\n\r\n<div\r\n  class=\"church-news-banner\"\r\n  aria-label=\"Featured news from Sta. Barbara Mission Center\"\r\n>\r\n\r\n  <div class=\"church-news-slider-stage\">\r\n\r\n    <div class=\"church-news-loading\">\r\n      Loading the latest news&#8230;\r\n    <\/div>\r\n\r\n  <\/div>\r\n\r\n\r\n  <div\r\n    class=\"church-news-slider-dots\"\r\n    aria-label=\"Choose featured news\"\r\n  >\r\n  <\/div>\r\n\r\n\r\n  <div class=\"church-news-slider-controls\">\r\n\r\n\r\n    <button\r\n      type=\"button\"\r\n      class=\"church-news-arrow church-news-prev\"\r\n      aria-label=\"Previous featured news\"\r\n    >\r\n      &#8592;\r\n    <\/button>\r\n\r\n\r\n    <button\r\n      type=\"button\"\r\n      class=\"church-news-arrow church-news-next\"\r\n      aria-label=\"Next featured news\"\r\n    >\r\n      &#8594;\r\n    <\/button>\r\n\r\n\r\n  <\/div>\r\n\r\n\r\n  <p\r\n    class=\"church-news-sr-only church-news-slider-status\"\r\n    aria-live=\"polite\"\r\n  >\r\n  <\/p>\r\n\r\n<\/div>\r\n\r\n\r\n<!-- ========================================================\r\n     NEWS + FACEBOOK\r\n     ======================================================== -->\r\n\r\n<div class=\"church-news-layout\">\r\n\r\n\r\n  <!-- ======================================================\r\n       LEFT \u2014 WORDPRESS NEWS\r\n       ====================================================== -->\r\n\r\n  <main\r\n    class=\"church-news-main\"\r\n    aria-label=\"Sta. Barbara Mission Center news\"\r\n  >\r\n\r\n\r\n    <header class=\"church-news-header\">\r\n\r\n\r\n      <h2 class=\"church-news-heading\">\r\n\r\n        News &amp; Updates\r\n\r\n      <\/h2>\r\n\r\n\r\n      <p class=\"church-news-intro\">\r\n\r\n        Stay updated with announcements, activities,\r\n        celebrations, and stories published on this website\r\n        for Sta. Barbara Mission Center in Casasahan Ibaba,\r\n        Gumaca, Quezon. The Catholic directory for the\r\n        Diocese of Gumaca lists \u201cCasasahan Ibaba,\r\n        Santa Barbara\u201d among its Mission Areas, identifies\r\n        Santa Barbara as titular, and names Rev. Fr.\r\n        Ronelo Meude as Priest in Charge.\r\n\r\n      <\/p>\r\n\r\n\r\n      <p class=\"church-news-reference\">\r\n\r\n        Verified mission reference:\r\n        Casasahan Ibaba, Santa Barbara \u2022\r\n        Diocese of Gumaca \u2022\r\n        Mission Area \u2022\r\n        Titular: Santa Barbara \u2022\r\n        Priest in Charge: Rev. Fr. Ronelo Meude.\r\n\r\n      <\/p>\r\n\r\n\r\n    <\/header>\r\n\r\n\r\n    <!-- ====================================================\r\n         CATEGORY FILTERS\r\n         ==================================================== -->\r\n\r\n    <nav\r\n      class=\"church-news-categories\"\r\n      aria-label=\"Filter news by category\"\r\n    >\r\n\r\n\r\n      <button\r\n        type=\"button\"\r\n        class=\"church-news-category is-active\"\r\n        data-category=\"all\"\r\n        aria-pressed=\"true\"\r\n      >\r\n\r\n        All News\r\n\r\n      <\/button>\r\n\r\n\r\n    <\/nav>\r\n\r\n\r\n    <!-- ====================================================\r\n         NEWS GRID\r\n         ==================================================== -->\r\n\r\n    <div class=\"church-post-grid\">\r\n\r\n\r\n      <div class=\"church-news-loading\">\r\n\r\n        Loading news and updates&#8230;\r\n\r\n      <\/div>\r\n\r\n\r\n    <\/div>\r\n\r\n\r\n    <!-- ====================================================\r\n         LOAD MORE\r\n         ==================================================== -->\r\n\r\n    <div class=\"church-news-load-wrap\">\r\n\r\n\r\n      <button\r\n        type=\"button\"\r\n        class=\"church-news-load-more\"\r\n      >\r\n\r\n        Load More News\r\n\r\n      <\/button>\r\n\r\n\r\n      <p\r\n        class=\"church-news-load-status\"\r\n        aria-live=\"polite\"\r\n      >\r\n      <\/p>\r\n\r\n\r\n    <\/div>\r\n\r\n\r\n  <\/main>\r\n\r\n\r\n  <!-- ======================================================\r\n       RIGHT \u2014 ACTUAL STA. BARBARA FACEBOOK PAGE\r\n       ====================================================== -->\r\n\r\n  <aside\r\n    class=\"church-news-sidebar\"\r\n    aria-label=\"STA Barbara Mission Center Facebook page\"\r\n  >\r\n\r\n\r\n    <div class=\"church-news-facebook\">\r\n\r\n\r\n      <div class=\"church-news-facebook-header\">\r\n\r\n\r\n        <p class=\"church-news-facebook-eyebrow\">\r\n\r\n          Stay Connected With The Mission\r\n\r\n        <\/p>\r\n\r\n\r\n        <h2 class=\"church-news-facebook-title\">\r\n\r\n          STA Barbara Mission Center on Facebook\r\n\r\n        <\/h2>\r\n\r\n\r\n        <p class=\"church-news-facebook-description\">\r\n\r\n          Sta. Barbara Mission Center is a Catholic Mission\r\n          Area in Casasahan Ibaba, Gumaca, Quezon, under the\r\n          Diocese of Gumaca. The Catholic directory identifies\r\n          Santa Barbara as its titular and Rev. Fr. Ronelo\r\n          Meude as Priest in Charge. Visit the mission center&#8217;s\r\n          Facebook page for community announcements, photos,\r\n          celebrations, and local pastoral updates.\r\n\r\n        <\/p>\r\n\r\n\r\n        <div class=\"church-news-facebook-actions\">\r\n\r\n\r\n          <a\r\n            class=\"church-news-facebook-follow\"\r\n            href=\"https:\/\/www.facebook.com\/Sta.BarbaraMissionCenter\"\r\n            target=\"_blank\"\r\n            rel=\"noopener noreferrer\"\r\n          >\r\n\r\n            Follow Mission Center\r\n\r\n            <span aria-hidden=\"true\">\r\n              &#8594;\r\n            <\/span>\r\n\r\n          <\/a>\r\n\r\n\r\n          <a\r\n            class=\"church-news-facebook-visit\"\r\n            href=\"https:\/\/www.facebook.com\/Sta.BarbaraMissionCenter\"\r\n            target=\"_blank\"\r\n            rel=\"noopener noreferrer\"\r\n          >\r\n\r\n            Open Mission Facebook\r\n\r\n            <span aria-hidden=\"true\">\r\n              &#8599;\r\n            <\/span>\r\n\r\n          <\/a>\r\n\r\n\r\n        <\/div>\r\n\r\n\r\n      <\/div>\r\n\r\n\r\n    <\/div>\r\n\r\n\r\n  <\/aside>\r\n\r\n\r\n<\/div>\r\n\r\n\r\n<!-- ========================================================\r\n     WORDPRESS NEWS SCRIPT\r\n     ======================================================== -->\r\n\r\n\r\n\r\n\r\n<\/section><\/div><script>window.gehdRoots=window.gehdRoots||{};window.gehdRoots[\"gehd-instance-1\"]=document.querySelector(\"[data-gehd-instance=\\\"gehd-instance-1\\\"]\");<\/script><script>(function () {\r\n\r\n  'use strict';\r\n\r\n\r\n  \/* =======================================================\r\n     ROOT\r\n     ======================================================= *\/\r\n\r\n  const root =\r\n    document.getElementById(\r\n      'church-news-updates'\r\n    );\r\n\r\n\r\n  if (\r\n    !root ||\r\n    root.dataset.initialized === 'true'\r\n  ) {\r\n\r\n    return;\r\n\r\n  }\r\n\r\n\r\n  root.dataset.initialized =\r\n    'true';\r\n\r\n\r\n  \/* =======================================================\r\n     ELEMENTS\r\n     ======================================================= *\/\r\n\r\n  const stage =\r\n    root.querySelector(\r\n      '.church-news-slider-stage'\r\n    );\r\n\r\n\r\n  const dots =\r\n    root.querySelector(\r\n      '.church-news-slider-dots'\r\n    );\r\n\r\n\r\n  const prevButton =\r\n    root.querySelector(\r\n      '.church-news-prev'\r\n    );\r\n\r\n\r\n  const nextButton =\r\n    root.querySelector(\r\n      '.church-news-next'\r\n    );\r\n\r\n\r\n  const sliderStatus =\r\n    root.querySelector(\r\n      '.church-news-slider-status'\r\n    );\r\n\r\n\r\n  const grid =\r\n    root.querySelector(\r\n      '.church-post-grid'\r\n    );\r\n\r\n\r\n  const categoryNav =\r\n    root.querySelector(\r\n      '.church-news-categories'\r\n    );\r\n\r\n\r\n  const loadMoreButton =\r\n    root.querySelector(\r\n      '.church-news-load-more'\r\n    );\r\n\r\n\r\n  const loadStatus =\r\n    root.querySelector(\r\n      '.church-news-load-status'\r\n    );\r\n\r\n\r\n  \/* =======================================================\r\n     SETTINGS\r\n     ======================================================= *\/\r\n\r\n  const PER_PAGE =\r\n    6;\r\n\r\n\r\n  const MAX_FEATURED =\r\n    5;\r\n\r\n\r\n  const REFRESH_INTERVAL =\r\n    60 * 1000;\r\n\r\n\r\n  let currentPage =\r\n    1;\r\n\r\n\r\n  let totalPages =\r\n    1;\r\n\r\n\r\n  let featuredPosts =\r\n    [];\r\n\r\n\r\n  let allPosts =\r\n    [];\r\n\r\n\r\n  let currentSlide =\r\n    0;\r\n\r\n\r\n  let sliderTimer =\r\n    null;\r\n\r\n\r\n  let loadingMore =\r\n    false;\r\n\r\n\r\n  let refreshing =\r\n    false;\r\n\r\n\r\n  let activeCategory =\r\n    'all';\r\n\r\n\r\n  let categories =\r\n    [];\r\n\r\n\r\n  let categoryNames =\r\n    {};\r\n\r\n\r\n  \/* =======================================================\r\n     WORDPRESS REST API ROOT\r\n     ======================================================= *\/\r\n\r\n  function getApiRoot() {\r\n\r\n\r\n    const link =\r\n      document.querySelector(\r\n        'link[rel=\"https:\/\/api.w.org\/\"]'\r\n      );\r\n\r\n\r\n    if (\r\n      link &&\r\n      link.href\r\n    ) {\r\n\r\n\r\n      return new URL(\r\n\r\n        'wp\/v2\/',\r\n\r\n        link.href\r\n\r\n      ).toString();\r\n\r\n\r\n    }\r\n\r\n\r\n    return new URL(\r\n\r\n      '\/wp-json\/wp\/v2\/',\r\n\r\n      window.location.origin\r\n\r\n    ).toString();\r\n\r\n\r\n  }\r\n\r\n\r\n  const apiRoot =\r\n    getApiRoot();\r\n\r\n\r\n  const postsEndpoint =\r\n    apiRoot + 'posts';\r\n\r\n\r\n  \/* =======================================================\r\n     UTILITIES\r\n     ======================================================= *\/\r\n\r\n  function escapeHTML(value) {\r\n\r\n\r\n    return String(\r\n\r\n      value == null\r\n        ? ''\r\n        : value\r\n\r\n    ).replace(\r\n\r\n      \/[&<>\"']\/g,\r\n\r\n      function (character) {\r\n\r\n\r\n        return {\r\n\r\n          '&': '&amp;',\r\n\r\n          '<': '&lt;',\r\n\r\n          '>': '&gt;',\r\n\r\n          '\"': '&quot;',\r\n\r\n          \"'\": '&#039;'\r\n\r\n        }[character];\r\n\r\n\r\n      }\r\n\r\n    );\r\n\r\n\r\n  }\r\n\r\n\r\n  function stripHTML(value) {\r\n\r\n\r\n    const documentFragment =\r\n\r\n      new DOMParser()\r\n\r\n        .parseFromString(\r\n\r\n          String(\r\n            value || ''\r\n          ),\r\n\r\n          'text\/html'\r\n\r\n        );\r\n\r\n\r\n    return (\r\n\r\n      documentFragment.body.textContent\r\n      ||\r\n      ''\r\n\r\n    )\r\n\r\n      .replace(\r\n        \/\\s+\/g,\r\n        ' '\r\n      )\r\n\r\n      .trim();\r\n\r\n\r\n  }\r\n\r\n\r\n  function formatDate(value) {\r\n\r\n\r\n    if (!value) {\r\n\r\n      return '';\r\n\r\n    }\r\n\r\n\r\n    const date =\r\n      new Date(value);\r\n\r\n\r\n    if (\r\n\r\n      Number.isNaN(\r\n        date.getTime()\r\n      )\r\n\r\n    ) {\r\n\r\n      return '';\r\n\r\n    }\r\n\r\n\r\n    return new Intl.DateTimeFormat(\r\n\r\n      undefined,\r\n\r\n      {\r\n\r\n        year:\r\n          'numeric',\r\n\r\n        month:\r\n          'short',\r\n\r\n        day:\r\n          'numeric'\r\n\r\n      }\r\n\r\n    ).format(date);\r\n\r\n\r\n  }\r\n\r\n\r\n  function getTitle(post) {\r\n\r\n\r\n    return stripHTML(\r\n\r\n      post &&\r\n      post.title\r\n\r\n        ? post.title.rendered\r\n\r\n        : ''\r\n\r\n    )\r\n\r\n    ||\r\n\r\n    'News Update';\r\n\r\n\r\n  }\r\n\r\n\r\n  function getLink(post) {\r\n\r\n\r\n    return (\r\n\r\n      post &&\r\n      post.link\r\n\r\n    )\r\n\r\n      ? post.link\r\n\r\n      : '#';\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     FEATURED IMAGE\r\n     ======================================================= *\/\r\n\r\n  function getImage(post) {\r\n\r\n\r\n    try {\r\n\r\n\r\n      const media =\r\n\r\n        post._embedded[\r\n          'wp:featuredmedia'\r\n        ][0];\r\n\r\n\r\n      const sizes =\r\n\r\n        media.media_details &&\r\n        media.media_details.sizes\r\n\r\n          ? media.media_details.sizes\r\n\r\n          : {};\r\n\r\n\r\n      if (\r\n        sizes.medium_large\r\n      ) {\r\n\r\n        return (\r\n          sizes.medium_large.source_url\r\n          ||\r\n          ''\r\n        );\r\n\r\n      }\r\n\r\n\r\n      if (\r\n        sizes.large\r\n      ) {\r\n\r\n        return (\r\n          sizes.large.source_url\r\n          ||\r\n          ''\r\n        );\r\n\r\n      }\r\n\r\n\r\n      if (\r\n        sizes.medium\r\n      ) {\r\n\r\n        return (\r\n          sizes.medium.source_url\r\n          ||\r\n          ''\r\n        );\r\n\r\n      }\r\n\r\n\r\n      return (\r\n\r\n        media.source_url\r\n        ||\r\n        ''\r\n\r\n      );\r\n\r\n\r\n    }\r\n\r\n    catch (error) {\r\n\r\n\r\n      return '';\r\n\r\n\r\n    }\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     EXCERPT\r\n     ======================================================= *\/\r\n\r\n  function getExcerpt(\r\n    post,\r\n    limit\r\n  ) {\r\n\r\n\r\n    const value =\r\n      stripHTML(\r\n\r\n        post &&\r\n        post.excerpt\r\n\r\n          ? post.excerpt.rendered\r\n\r\n          : ''\r\n\r\n      );\r\n\r\n\r\n    return (\r\n\r\n      value.length > limit\r\n\r\n    )\r\n\r\n      ? value\r\n          .slice(\r\n            0,\r\n            limit\r\n          )\r\n          .trimEnd()\r\n          +\r\n          '\u2026'\r\n\r\n      : value;\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     CATEGORIES\r\n     ======================================================= *\/\r\n\r\n  function getPostCategoryIds(post) {\r\n\r\n\r\n    return Array.isArray(\r\n      post.categories\r\n    )\r\n\r\n      ? post.categories.map(\r\n          Number\r\n        )\r\n\r\n      : [];\r\n\r\n\r\n  }\r\n\r\n\r\n  function getCategoryLabel(post) {\r\n\r\n\r\n    for (\r\n\r\n      const id of\r\n      getPostCategoryIds(post)\r\n\r\n    ) {\r\n\r\n\r\n      if (\r\n        categoryNames[id]\r\n      ) {\r\n\r\n\r\n        return (\r\n          categoryNames[id]\r\n        );\r\n\r\n\r\n      }\r\n\r\n\r\n    }\r\n\r\n\r\n    return 'Uncategorized';\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     BUILD POSTS API URL\r\n     ======================================================= *\/\r\n\r\n  function makePostsURL(page) {\r\n\r\n\r\n    const url =\r\n      new URL(\r\n        postsEndpoint\r\n      );\r\n\r\n\r\n    url.searchParams.set(\r\n      'per_page',\r\n      String(PER_PAGE)\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      'page',\r\n      String(page)\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      'orderby',\r\n      'date'\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      'order',\r\n      'desc'\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      '_embed',\r\n      '1'\r\n    );\r\n\r\n\r\n    \/*\r\n     * Prevent stale REST caching.\r\n     *\/\r\n\r\n    url.searchParams.set(\r\n      '_news_refresh',\r\n      String(\r\n        Date.now()\r\n      )\r\n    );\r\n\r\n\r\n    return (\r\n      url.toString()\r\n    );\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     FETCH POSTS\r\n     ======================================================= *\/\r\n\r\n  async function fetchPosts(page) {\r\n\r\n\r\n    const response =\r\n      await fetch(\r\n\r\n        makePostsURL(page),\r\n\r\n        {\r\n\r\n          method:\r\n            'GET',\r\n\r\n          credentials:\r\n            'same-origin',\r\n\r\n          cache:\r\n            'no-store',\r\n\r\n          headers: {\r\n\r\n            'Accept':\r\n              'application\/json',\r\n\r\n            'Cache-Control':\r\n              'no-cache'\r\n\r\n          }\r\n\r\n        }\r\n\r\n      );\r\n\r\n\r\n    if (\r\n      !response.ok\r\n    ) {\r\n\r\n\r\n      throw new Error(\r\n\r\n        'Unable to retrieve WordPress posts. HTTP '\r\n        +\r\n        response.status\r\n\r\n      );\r\n\r\n\r\n    }\r\n\r\n\r\n    const posts =\r\n      await response.json();\r\n\r\n\r\n    return {\r\n\r\n\r\n      posts:\r\n\r\n        Array.isArray(posts)\r\n\r\n          ? posts\r\n\r\n          : [],\r\n\r\n\r\n      totalPages:\r\n\r\n        Math.max(\r\n\r\n          1,\r\n\r\n          parseInt(\r\n\r\n            response.headers.get(\r\n              'X-WP-TotalPages'\r\n            )\r\n            ||\r\n            '1',\r\n\r\n            10\r\n\r\n          )\r\n\r\n        )\r\n\r\n\r\n    };\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     FETCH CATEGORIES\r\n     ======================================================= *\/\r\n\r\n  async function fetchCategories() {\r\n\r\n\r\n    const url =\r\n      new URL(\r\n\r\n        'categories',\r\n\r\n        apiRoot\r\n\r\n      );\r\n\r\n\r\n    url.searchParams.set(\r\n      'per_page',\r\n      '100'\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      'hide_empty',\r\n      'true'\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      'orderby',\r\n      'count'\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      'order',\r\n      'desc'\r\n    );\r\n\r\n\r\n    url.searchParams.set(\r\n      '_news_refresh',\r\n      String(\r\n        Date.now()\r\n      )\r\n    );\r\n\r\n\r\n    const response =\r\n      await fetch(\r\n\r\n        url.toString(),\r\n\r\n        {\r\n\r\n          method:\r\n            'GET',\r\n\r\n          credentials:\r\n            'same-origin',\r\n\r\n          cache:\r\n            'no-store',\r\n\r\n          headers: {\r\n\r\n            'Accept':\r\n              'application\/json',\r\n\r\n            'Cache-Control':\r\n              'no-cache'\r\n\r\n          }\r\n\r\n        }\r\n\r\n      );\r\n\r\n\r\n    if (\r\n      !response.ok\r\n    ) {\r\n\r\n\r\n      throw new Error(\r\n\r\n        'Unable to retrieve WordPress categories.'\r\n\r\n      );\r\n\r\n\r\n    }\r\n\r\n\r\n    const result =\r\n      await response.json();\r\n\r\n\r\n    return Array.isArray(result)\r\n\r\n      ? result\r\n\r\n      : [];\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     RENDER CATEGORY FILTERS\r\n     ======================================================= *\/\r\n\r\n  function renderCategories() {\r\n\r\n\r\n    const usedIds =\r\n      new Set();\r\n\r\n\r\n    allPosts.forEach(\r\n\r\n      function (post) {\r\n\r\n\r\n        getPostCategoryIds(post)\r\n\r\n          .forEach(\r\n\r\n            function (id) {\r\n\r\n\r\n              usedIds.add(id);\r\n\r\n\r\n            }\r\n\r\n          );\r\n\r\n\r\n      }\r\n\r\n    );\r\n\r\n\r\n    const visibleCategories =\r\n\r\n      categories.filter(\r\n\r\n        function (category) {\r\n\r\n\r\n          return usedIds.has(\r\n\r\n            Number(\r\n              category.id\r\n            )\r\n\r\n          );\r\n\r\n\r\n        }\r\n\r\n      );\r\n\r\n\r\n    let html =\r\n\r\n      '<button type=\"button\" class=\"church-news-category '\r\n\r\n      +\r\n\r\n      (\r\n\r\n        activeCategory === 'all'\r\n\r\n          ? 'is-active'\r\n\r\n          : ''\r\n\r\n      )\r\n\r\n      +\r\n\r\n      '\" data-category=\"all\" aria-pressed=\"'\r\n\r\n      +\r\n\r\n      (\r\n\r\n        activeCategory === 'all'\r\n\r\n          ? 'true'\r\n\r\n          : 'false'\r\n\r\n      )\r\n\r\n      +\r\n\r\n      '\">All News <span class=\"church-news-category-count\">'\r\n\r\n      +\r\n\r\n      allPosts.length\r\n\r\n      +\r\n\r\n      '<\/span><\/button>';\r\n\r\n\r\n    visibleCategories.forEach(\r\n\r\n      function (category) {\r\n\r\n\r\n        const id =\r\n          String(\r\n            category.id\r\n          );\r\n\r\n\r\n        const count =\r\n\r\n          allPosts.filter(\r\n\r\n            function (post) {\r\n\r\n\r\n              return getPostCategoryIds(post)\r\n\r\n                .includes(\r\n\r\n                  Number(id)\r\n\r\n                );\r\n\r\n\r\n            }\r\n\r\n          ).length;\r\n\r\n\r\n        html +=\r\n\r\n          '<button type=\"button\" class=\"church-news-category '\r\n\r\n          +\r\n\r\n          (\r\n\r\n            activeCategory === id\r\n\r\n              ? 'is-active'\r\n\r\n              : ''\r\n\r\n          )\r\n\r\n          +\r\n\r\n          '\" data-category=\"'\r\n\r\n          +\r\n\r\n          escapeHTML(id)\r\n\r\n          +\r\n\r\n          '\" aria-pressed=\"'\r\n\r\n          +\r\n\r\n          (\r\n\r\n            activeCategory === id\r\n\r\n              ? 'true'\r\n\r\n              : 'false'\r\n\r\n          )\r\n\r\n          +\r\n\r\n          '\">'\r\n\r\n          +\r\n\r\n          escapeHTML(\r\n\r\n            stripHTML(\r\n              category.name\r\n            )\r\n\r\n          )\r\n\r\n          +\r\n\r\n          ' <span class=\"church-news-category-count\">'\r\n\r\n          +\r\n\r\n          count\r\n\r\n          +\r\n\r\n          '<\/span><\/button>';\r\n\r\n\r\n      }\r\n\r\n    );\r\n\r\n\r\n    categoryNav.innerHTML =\r\n      html;\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     FEATURED SLIDE HTML\r\n     ======================================================= *\/\r\n\r\n  function renderSlide(\r\n    post,\r\n    index\r\n  ) {\r\n\r\n\r\n    const title =\r\n      getTitle(post);\r\n\r\n\r\n    const link =\r\n      getLink(post);\r\n\r\n\r\n    const image =\r\n      getImage(post);\r\n\r\n\r\n    const date =\r\n      formatDate(\r\n        post.date\r\n      );\r\n\r\n\r\n    const excerpt =\r\n      getExcerpt(\r\n        post,\r\n        175\r\n      );\r\n\r\n\r\n    const imageHTML =\r\n\r\n      image\r\n\r\n        ? '<img decoding=\"async\" class=\"church-news-slide-image\" src=\"'\r\n\r\n          +\r\n\r\n          escapeHTML(image)\r\n\r\n          +\r\n\r\n          '\" alt=\"\" '\r\n\r\n          +\r\n\r\n          (\r\n\r\n            index === 0\r\n\r\n              ? 'fetchpriority=\"high\"'\r\n\r\n              : 'loading=\"lazy\"'\r\n\r\n          )\r\n\r\n          +\r\n\r\n          '>'\r\n\r\n        : '';\r\n\r\n\r\n    return (\r\n\r\n      '<article class=\"church-news-slide\" aria-label=\"Featured news '\r\n\r\n      +\r\n\r\n      (index + 1)\r\n\r\n      +\r\n\r\n      '\">'\r\n\r\n      +\r\n\r\n      imageHTML\r\n\r\n      +\r\n\r\n      '<div class=\"church-news-slide-overlay\"><\/div>'\r\n\r\n      +\r\n\r\n      '<span class=\"church-news-slide-label\">'\r\n\r\n      +\r\n\r\n      'Sta. Barbara Mission Center News'\r\n\r\n      +\r\n\r\n      '<\/span>'\r\n\r\n      +\r\n\r\n      '<div class=\"church-news-slide-content\">'\r\n\r\n      +\r\n\r\n      '<h2 class=\"church-news-slide-title\">'\r\n\r\n      +\r\n\r\n      escapeHTML(title)\r\n\r\n      +\r\n\r\n      '<\/h2>'\r\n\r\n      +\r\n\r\n      (\r\n\r\n        date || excerpt\r\n\r\n          ? '<p class=\"church-news-slide-excerpt\">'\r\n\r\n            +\r\n\r\n            escapeHTML(date)\r\n\r\n            +\r\n\r\n            (\r\n\r\n              date && excerpt\r\n\r\n                ? ' &nbsp; | &nbsp; '\r\n\r\n                : ''\r\n\r\n            )\r\n\r\n            +\r\n\r\n            escapeHTML(excerpt)\r\n\r\n            +\r\n\r\n            '<\/p>'\r\n\r\n          : ''\r\n\r\n      )\r\n\r\n      +\r\n\r\n      '<a class=\"church-news-slide-link\" href=\"'\r\n\r\n      +\r\n\r\n      escapeHTML(link)\r\n\r\n      +\r\n\r\n      '\">'\r\n\r\n      +\r\n\r\n      'Read Full Story '\r\n\r\n      +\r\n\r\n      '<span aria-hidden=\"true\">&#8594;<\/span>'\r\n\r\n      +\r\n\r\n      '<\/a>'\r\n\r\n      +\r\n\r\n      '<\/div>'\r\n\r\n      +\r\n\r\n      '<\/article>'\r\n\r\n    );\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     RENDER FEATURED SLIDER\r\n     ======================================================= *\/\r\n\r\n  function renderFeatured() {\r\n\r\n\r\n    if (\r\n      !featuredPosts.length\r\n    ) {\r\n\r\n\r\n      stage.innerHTML =\r\n\r\n        '<div class=\"church-news-empty\">'\r\n        +\r\n        'No featured news is available yet.'\r\n        +\r\n        '<\/div>';\r\n\r\n\r\n      dots.innerHTML =\r\n        '';\r\n\r\n\r\n      prevButton.hidden =\r\n        true;\r\n\r\n\r\n      nextButton.hidden =\r\n        true;\r\n\r\n\r\n      sliderStatus.textContent =\r\n        'No featured news available.';\r\n\r\n\r\n      return;\r\n\r\n\r\n    }\r\n\r\n\r\n    currentSlide =\r\n\r\n      Math.max(\r\n\r\n        0,\r\n\r\n        Math.min(\r\n\r\n          currentSlide,\r\n\r\n          featuredPosts.length - 1\r\n\r\n        )\r\n\r\n      );\r\n\r\n\r\n    stage.innerHTML =\r\n\r\n      featuredPosts\r\n\r\n        .map(\r\n          renderSlide\r\n        )\r\n\r\n        .join('');\r\n\r\n\r\n    stage\r\n\r\n      .querySelectorAll(\r\n        '.church-news-slide'\r\n      )\r\n\r\n      .forEach(\r\n\r\n        function (\r\n          slide,\r\n          index\r\n        ) {\r\n\r\n\r\n          slide.style.display =\r\n\r\n            index === currentSlide\r\n\r\n              ? 'flex'\r\n\r\n              : 'none';\r\n\r\n\r\n          slide.setAttribute(\r\n\r\n            'aria-hidden',\r\n\r\n            index === currentSlide\r\n\r\n              ? 'false'\r\n\r\n              : 'true'\r\n\r\n          );\r\n\r\n\r\n        }\r\n\r\n      );\r\n\r\n\r\n    dots.innerHTML =\r\n\r\n      featuredPosts\r\n\r\n        .map(\r\n\r\n          function (\r\n            post,\r\n            index\r\n          ) {\r\n\r\n\r\n            return (\r\n\r\n              '<button type=\"button\" class=\"church-news-dot '\r\n\r\n              +\r\n\r\n              (\r\n\r\n                index === currentSlide\r\n\r\n                  ? 'is-active'\r\n\r\n                  : ''\r\n\r\n              )\r\n\r\n              +\r\n\r\n              '\" data-slide=\"'\r\n\r\n              +\r\n\r\n              index\r\n\r\n              +\r\n\r\n              '\" aria-label=\"Show featured news '\r\n\r\n              +\r\n\r\n              (index + 1)\r\n\r\n              +\r\n\r\n              '\" aria-current=\"'\r\n\r\n              +\r\n\r\n              (\r\n\r\n                index === currentSlide\r\n\r\n                  ? 'true'\r\n\r\n                  : 'false'\r\n\r\n              )\r\n\r\n              +\r\n\r\n              '\"><\/button>'\r\n\r\n            );\r\n\r\n\r\n          }\r\n\r\n        )\r\n\r\n        .join('');\r\n\r\n\r\n    const multiple =\r\n      featuredPosts.length > 1;\r\n\r\n\r\n    prevButton.hidden =\r\n      !multiple;\r\n\r\n\r\n    nextButton.hidden =\r\n      !multiple;\r\n\r\n\r\n    dots.style.display =\r\n\r\n      multiple\r\n\r\n        ? 'flex'\r\n\r\n        : 'none';\r\n\r\n\r\n    sliderStatus.textContent =\r\n\r\n      'Featured news '\r\n\r\n      +\r\n\r\n      (currentSlide + 1)\r\n\r\n      +\r\n\r\n      ' of '\r\n\r\n      +\r\n\r\n      featuredPosts.length;\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     AUTO SLIDER\r\n     ======================================================= *\/\r\n\r\n  function restartSlider() {\r\n\r\n\r\n    if (\r\n      sliderTimer\r\n    ) {\r\n\r\n\r\n      clearInterval(\r\n        sliderTimer\r\n      );\r\n\r\n\r\n      sliderTimer =\r\n        null;\r\n\r\n\r\n    }\r\n\r\n\r\n    if (\r\n      featuredPosts.length > 1\r\n    ) {\r\n\r\n\r\n      sliderTimer =\r\n\r\n        setInterval(\r\n\r\n          function () {\r\n\r\n\r\n            if (\r\n\r\n              !document.hidden &&\r\n\r\n              !root.matches(':hover')\r\n\r\n            ) {\r\n\r\n\r\n              currentSlide =\r\n\r\n                (\r\n                  currentSlide + 1\r\n                )\r\n\r\n                %\r\n\r\n                featuredPosts.length;\r\n\r\n\r\n              renderFeatured();\r\n\r\n\r\n            }\r\n\r\n\r\n          },\r\n\r\n          6500\r\n\r\n        );\r\n\r\n\r\n    }\r\n\r\n\r\n  }\r\n\r\n\r\n  function showSlide(index) {\r\n\r\n\r\n    if (\r\n      !featuredPosts.length\r\n    ) {\r\n\r\n      return;\r\n\r\n    }\r\n\r\n\r\n    currentSlide =\r\n\r\n      (\r\n\r\n        index\r\n\r\n        +\r\n\r\n        featuredPosts.length\r\n\r\n      )\r\n\r\n      %\r\n\r\n      featuredPosts.length;\r\n\r\n\r\n    renderFeatured();\r\n\r\n\r\n    restartSlider();\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     NEWS CARD\r\n     ======================================================= *\/\r\n\r\n  function renderCard(post) {\r\n\r\n\r\n    const title =\r\n      getTitle(post);\r\n\r\n\r\n    const link =\r\n      getLink(post);\r\n\r\n\r\n    const image =\r\n      getImage(post);\r\n\r\n\r\n    const date =\r\n      formatDate(\r\n        post.date\r\n      );\r\n\r\n\r\n    const excerpt =\r\n      getExcerpt(\r\n        post,\r\n        125\r\n      );\r\n\r\n\r\n    const category =\r\n      getCategoryLabel(post);\r\n\r\n\r\n    const imageHTML =\r\n\r\n      image\r\n\r\n        ? '<a class=\"church-news-card-image-wrap\" href=\"'\r\n\r\n          +\r\n\r\n          escapeHTML(link)\r\n\r\n          +\r\n\r\n          '\" tabindex=\"-1\" aria-hidden=\"true\">'\r\n\r\n          +\r\n\r\n          '<img decoding=\"async\" class=\"church-news-card-image\" loading=\"lazy\" src=\"'\r\n\r\n          +\r\n\r\n          escapeHTML(image)\r\n\r\n          +\r\n\r\n          '\" alt=\"\">'\r\n\r\n          +\r\n\r\n          '<\/a>'\r\n\r\n        : '';\r\n\r\n\r\n    return (\r\n\r\n      '<article class=\"church-news-card\">'\r\n\r\n      +\r\n\r\n      imageHTML\r\n\r\n      +\r\n\r\n      '<div class=\"church-news-card-body\">'\r\n\r\n      +\r\n\r\n      '<div class=\"church-news-meta\">'\r\n\r\n      +\r\n\r\n      '<span class=\"church-news-category-tag\">'\r\n\r\n      +\r\n\r\n      escapeHTML(category)\r\n\r\n      +\r\n\r\n      '<\/span>'\r\n\r\n      +\r\n\r\n      (\r\n\r\n        date\r\n\r\n          ? '<time>'\r\n\r\n            +\r\n\r\n            escapeHTML(date)\r\n\r\n            +\r\n\r\n            '<\/time>'\r\n\r\n          : ''\r\n\r\n      )\r\n\r\n      +\r\n\r\n      '<\/div>'\r\n\r\n      +\r\n\r\n      '<h3 class=\"church-news-card-title\">'\r\n\r\n      +\r\n\r\n      '<a href=\"'\r\n\r\n      +\r\n\r\n      escapeHTML(link)\r\n\r\n      +\r\n\r\n      '\">'\r\n\r\n      +\r\n\r\n      escapeHTML(title)\r\n\r\n      +\r\n\r\n      '<\/a>'\r\n\r\n      +\r\n\r\n      '<\/h3>'\r\n\r\n      +\r\n\r\n      (\r\n\r\n        excerpt\r\n\r\n          ? '<p class=\"church-news-card-excerpt\">'\r\n\r\n            +\r\n\r\n            escapeHTML(excerpt)\r\n\r\n            +\r\n\r\n            '<\/p>'\r\n\r\n          : ''\r\n\r\n      )\r\n\r\n      +\r\n\r\n      '<a class=\"church-news-read-more\" href=\"'\r\n\r\n      +\r\n\r\n      escapeHTML(link)\r\n\r\n      +\r\n\r\n      '\">'\r\n\r\n      +\r\n\r\n      'Read More '\r\n\r\n      +\r\n\r\n      '<span aria-hidden=\"true\">&#8594;<\/span>'\r\n\r\n      +\r\n\r\n      '<\/a>'\r\n\r\n      +\r\n\r\n      '<\/div>'\r\n\r\n      +\r\n\r\n      '<\/article>'\r\n\r\n    );\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     RENDER NEWS GRID\r\n     ======================================================= *\/\r\n\r\n  function renderGrid() {\r\n\r\n\r\n    let posts =\r\n      allPosts;\r\n\r\n\r\n    if (\r\n      activeCategory !== 'all'\r\n    ) {\r\n\r\n\r\n      posts =\r\n\r\n        allPosts.filter(\r\n\r\n          function (post) {\r\n\r\n\r\n            return getPostCategoryIds(post)\r\n\r\n              .includes(\r\n\r\n                Number(\r\n                  activeCategory\r\n                )\r\n\r\n              );\r\n\r\n\r\n          }\r\n\r\n        );\r\n\r\n\r\n    }\r\n\r\n\r\n    if (\r\n      !posts.length\r\n    ) {\r\n\r\n\r\n      grid.innerHTML =\r\n\r\n        '<div class=\"church-news-empty\">'\r\n        +\r\n        'No posts found in this category yet.'\r\n        +\r\n        '<\/div>';\r\n\r\n\r\n      return;\r\n\r\n\r\n    }\r\n\r\n\r\n    grid.innerHTML =\r\n\r\n      posts\r\n\r\n        .map(\r\n          renderCard\r\n        )\r\n\r\n        .join('');\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     LOAD MORE\r\n     ======================================================= *\/\r\n\r\n  function updateLoadMoreButton() {\r\n\r\n\r\n    loadMoreButton.hidden =\r\n\r\n      currentPage >= totalPages;\r\n\r\n\r\n    loadMoreButton.disabled =\r\n\r\n      loadingMore\r\n\r\n      ||\r\n\r\n      refreshing;\r\n\r\n\r\n    loadMoreButton.textContent =\r\n\r\n      loadingMore\r\n\r\n        ? 'Loading...'\r\n\r\n        : refreshing\r\n\r\n          ? 'Updating News...'\r\n\r\n          : 'Load More News';\r\n\r\n\r\n  }\r\n\r\n\r\n  async function loadMorePosts() {\r\n\r\n\r\n    if (\r\n\r\n      loadingMore\r\n\r\n      ||\r\n\r\n      refreshing\r\n\r\n      ||\r\n\r\n      currentPage >= totalPages\r\n\r\n    ) {\r\n\r\n\r\n      return;\r\n\r\n\r\n    }\r\n\r\n\r\n    loadingMore =\r\n      true;\r\n\r\n\r\n    updateLoadMoreButton();\r\n\r\n\r\n    loadStatus.textContent =\r\n      'Loading more news...';\r\n\r\n\r\n    try {\r\n\r\n\r\n      const nextPage =\r\n        currentPage + 1;\r\n\r\n\r\n      const result =\r\n        await fetchPosts(\r\n          nextPage\r\n        );\r\n\r\n\r\n      const existingIds =\r\n\r\n        new Set(\r\n\r\n          allPosts.map(\r\n\r\n            function (post) {\r\n\r\n              return post.id;\r\n\r\n            }\r\n\r\n          )\r\n\r\n        );\r\n\r\n\r\n      result.posts.forEach(\r\n\r\n        function (post) {\r\n\r\n\r\n          if (\r\n\r\n            !existingIds.has(\r\n              post.id\r\n            )\r\n\r\n          ) {\r\n\r\n\r\n            allPosts.push(\r\n              post\r\n            );\r\n\r\n\r\n            existingIds.add(\r\n              post.id\r\n            );\r\n\r\n\r\n          }\r\n\r\n\r\n        }\r\n\r\n      );\r\n\r\n\r\n      currentPage =\r\n        nextPage;\r\n\r\n\r\n      totalPages =\r\n        result.totalPages;\r\n\r\n\r\n      renderCategories();\r\n\r\n\r\n      renderGrid();\r\n\r\n\r\n      loadStatus.textContent =\r\n        '';\r\n\r\n\r\n    }\r\n\r\n    catch (error) {\r\n\r\n\r\n      loadStatus.textContent =\r\n\r\n        'Unable to load more news. Please try again.';\r\n\r\n\r\n    }\r\n\r\n    finally {\r\n\r\n\r\n      loadingMore =\r\n        false;\r\n\r\n\r\n      updateLoadMoreButton();\r\n\r\n\r\n    }\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     AUTOMATIC WORDPRESS REFRESH\r\n     ======================================================= *\/\r\n\r\n  async function refreshNews() {\r\n\r\n\r\n    if (\r\n\r\n      refreshing\r\n\r\n      ||\r\n\r\n      loadingMore\r\n\r\n      ||\r\n\r\n      document.hidden\r\n\r\n    ) {\r\n\r\n\r\n      return;\r\n\r\n\r\n    }\r\n\r\n\r\n    refreshing =\r\n      true;\r\n\r\n\r\n    updateLoadMoreButton();\r\n\r\n\r\n    try {\r\n\r\n\r\n      const results =\r\n\r\n        await Promise.allSettled(\r\n\r\n          [\r\n\r\n            fetchPosts(1),\r\n\r\n            fetchCategories()\r\n\r\n          ]\r\n\r\n        );\r\n\r\n\r\n      if (\r\n\r\n        results[0].status !==\r\n        'fulfilled'\r\n\r\n      ) {\r\n\r\n\r\n        throw results[0].reason;\r\n\r\n\r\n      }\r\n\r\n\r\n      const firstPage =\r\n        results[0].value;\r\n\r\n\r\n      const latestCategories =\r\n\r\n        results[1].status ===\r\n        'fulfilled'\r\n\r\n          ? results[1].value\r\n\r\n          : categories;\r\n\r\n\r\n      let refreshedPosts =\r\n        firstPage.posts;\r\n\r\n\r\n      const pagesToFetch =\r\n\r\n        Math.min(\r\n\r\n          Math.max(\r\n            currentPage,\r\n            1\r\n          ),\r\n\r\n          firstPage.totalPages\r\n\r\n        );\r\n\r\n\r\n      if (\r\n        pagesToFetch > 1\r\n      ) {\r\n\r\n\r\n        const remainingPages =\r\n\r\n          await Promise.all(\r\n\r\n            Array.from(\r\n\r\n              {\r\n\r\n                length:\r\n                  pagesToFetch - 1\r\n\r\n              },\r\n\r\n              function (\r\n                unused,\r\n                index\r\n              ) {\r\n\r\n\r\n                return fetchPosts(\r\n                  index + 2\r\n                );\r\n\r\n\r\n              }\r\n\r\n            )\r\n\r\n          );\r\n\r\n\r\n        refreshedPosts =\r\n\r\n          refreshedPosts.concat(\r\n\r\n            ...remainingPages.map(\r\n\r\n              function (result) {\r\n\r\n                return result.posts;\r\n\r\n              }\r\n\r\n            )\r\n\r\n          );\r\n\r\n\r\n      }\r\n\r\n\r\n      allPosts =\r\n        refreshedPosts;\r\n\r\n\r\n      currentPage =\r\n        pagesToFetch;\r\n\r\n\r\n      totalPages =\r\n        firstPage.totalPages;\r\n\r\n\r\n      categories =\r\n        latestCategories;\r\n\r\n\r\n      categoryNames =\r\n        {};\r\n\r\n\r\n      categories.forEach(\r\n\r\n        function (category) {\r\n\r\n\r\n          categoryNames[\r\n            category.id\r\n          ] =\r\n\r\n            stripHTML(\r\n              category.name\r\n            );\r\n\r\n\r\n        }\r\n\r\n      );\r\n\r\n\r\n      if (\r\n\r\n        activeCategory !== 'all'\r\n\r\n        &&\r\n\r\n        !allPosts.some(\r\n\r\n          function (post) {\r\n\r\n\r\n            return getPostCategoryIds(\r\n              post\r\n            ).includes(\r\n\r\n              Number(\r\n                activeCategory\r\n              )\r\n\r\n            );\r\n\r\n\r\n          }\r\n\r\n        )\r\n\r\n      ) {\r\n\r\n\r\n        activeCategory =\r\n          'all';\r\n\r\n\r\n      }\r\n\r\n\r\n      featuredPosts =\r\n\r\n        allPosts.slice(\r\n          0,\r\n          MAX_FEATURED\r\n        );\r\n\r\n\r\n      currentSlide =\r\n\r\n        Math.min(\r\n\r\n          currentSlide,\r\n\r\n          Math.max(\r\n\r\n            featuredPosts.length - 1,\r\n\r\n            0\r\n\r\n          )\r\n\r\n        );\r\n\r\n\r\n      renderFeatured();\r\n\r\n\r\n      renderCategories();\r\n\r\n\r\n      renderGrid();\r\n\r\n\r\n      restartSlider();\r\n\r\n\r\n      loadStatus.textContent =\r\n        '';\r\n\r\n\r\n    }\r\n\r\n    catch (error) {\r\n\r\n\r\n      console.warn(\r\n\r\n        '[Sta. Barbara Mission Center News] Refresh failed:',\r\n\r\n        error\r\n\r\n      );\r\n\r\n\r\n    }\r\n\r\n    finally {\r\n\r\n\r\n      refreshing =\r\n        false;\r\n\r\n\r\n      updateLoadMoreButton();\r\n\r\n\r\n    }\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     EVENTS\r\n     ======================================================= *\/\r\n\r\n  categoryNav.addEventListener(\r\n\r\n    'click',\r\n\r\n    function (event) {\r\n\r\n\r\n      const button =\r\n\r\n        event.target.closest(\r\n          '[data-category]'\r\n        );\r\n\r\n\r\n      if (\r\n        !button\r\n      ) {\r\n\r\n\r\n        return;\r\n\r\n\r\n      }\r\n\r\n\r\n      activeCategory =\r\n\r\n        button.getAttribute(\r\n          'data-category'\r\n        )\r\n\r\n        ||\r\n\r\n        'all';\r\n\r\n\r\n      renderCategories();\r\n\r\n\r\n      renderGrid();\r\n\r\n\r\n    }\r\n\r\n  );\r\n\r\n\r\n  prevButton.addEventListener(\r\n\r\n    'click',\r\n\r\n    function () {\r\n\r\n\r\n      showSlide(\r\n        currentSlide - 1\r\n      );\r\n\r\n\r\n    }\r\n\r\n  );\r\n\r\n\r\n  nextButton.addEventListener(\r\n\r\n    'click',\r\n\r\n    function () {\r\n\r\n\r\n      showSlide(\r\n        currentSlide + 1\r\n      );\r\n\r\n\r\n    }\r\n\r\n  );\r\n\r\n\r\n  dots.addEventListener(\r\n\r\n    'click',\r\n\r\n    function (event) {\r\n\r\n\r\n      const button =\r\n\r\n        event.target.closest(\r\n          '[data-slide]'\r\n        );\r\n\r\n\r\n      if (\r\n        button\r\n      ) {\r\n\r\n\r\n        showSlide(\r\n\r\n          parseInt(\r\n\r\n            button.getAttribute(\r\n              'data-slide'\r\n            ),\r\n\r\n            10\r\n\r\n          )\r\n\r\n          ||\r\n\r\n          0\r\n\r\n        );\r\n\r\n\r\n      }\r\n\r\n\r\n    }\r\n\r\n  );\r\n\r\n\r\n  loadMoreButton.addEventListener(\r\n\r\n    'click',\r\n\r\n    loadMorePosts\r\n\r\n  );\r\n\r\n\r\n  \/* =======================================================\r\n     INITIALIZE\r\n     ======================================================= *\/\r\n\r\n  async function initializeNews() {\r\n\r\n\r\n    try {\r\n\r\n\r\n      const results =\r\n\r\n        await Promise.allSettled(\r\n\r\n          [\r\n\r\n            fetchPosts(1),\r\n\r\n            fetchCategories()\r\n\r\n          ]\r\n\r\n        );\r\n\r\n\r\n      const postResult =\r\n        results[0];\r\n\r\n\r\n      if (\r\n\r\n        postResult.status !==\r\n        'fulfilled'\r\n\r\n      ) {\r\n\r\n\r\n        throw postResult.reason;\r\n\r\n\r\n      }\r\n\r\n\r\n      const result =\r\n        postResult.value;\r\n\r\n\r\n      currentPage =\r\n        1;\r\n\r\n\r\n      totalPages =\r\n        result.totalPages;\r\n\r\n\r\n      allPosts =\r\n        result.posts;\r\n\r\n\r\n      featuredPosts =\r\n\r\n        allPosts.slice(\r\n          0,\r\n          MAX_FEATURED\r\n        );\r\n\r\n\r\n      if (\r\n\r\n        results[1].status ===\r\n        'fulfilled'\r\n\r\n      ) {\r\n\r\n\r\n        categories =\r\n          results[1].value;\r\n\r\n\r\n        categories.forEach(\r\n\r\n          function (category) {\r\n\r\n\r\n            categoryNames[\r\n              category.id\r\n            ] =\r\n\r\n              stripHTML(\r\n                category.name\r\n              );\r\n\r\n\r\n          }\r\n\r\n        );\r\n\r\n\r\n      }\r\n\r\n      else {\r\n\r\n\r\n        categories =\r\n          [];\r\n\r\n\r\n      }\r\n\r\n\r\n      renderFeatured();\r\n\r\n\r\n      renderCategories();\r\n\r\n\r\n      renderGrid();\r\n\r\n\r\n      restartSlider();\r\n\r\n\r\n      updateLoadMoreButton();\r\n\r\n\r\n      loadStatus.textContent =\r\n\r\n        allPosts.length\r\n\r\n          ? ''\r\n\r\n          : 'No news posts are available yet.';\r\n\r\n\r\n    }\r\n\r\n    catch (error) {\r\n\r\n\r\n      console.error(\r\n\r\n        '[Sta. Barbara Mission Center News] Initial load failed:',\r\n\r\n        error\r\n\r\n      );\r\n\r\n\r\n      stage.innerHTML =\r\n\r\n        '<div class=\"church-news-error\">'\r\n        +\r\n        'Unable to load featured news. Please refresh the page and try again.'\r\n        +\r\n        '<\/div>';\r\n\r\n\r\n      grid.innerHTML =\r\n\r\n        '<div class=\"church-news-error\">'\r\n        +\r\n        'Unable to load news posts. Please refresh the page and try again.'\r\n        +\r\n        '<\/div>';\r\n\r\n\r\n      categoryNav.innerHTML =\r\n        '';\r\n\r\n\r\n      loadMoreButton.hidden =\r\n        true;\r\n\r\n\r\n    }\r\n\r\n\r\n  }\r\n\r\n\r\n  \/* =======================================================\r\n     START\r\n     ======================================================= *\/\r\n\r\n  initializeNews();\r\n\r\n\r\n  \/*\r\n   * Check for newly published WordPress posts\r\n   * every 60 seconds.\r\n   *\/\r\n\r\n  setInterval(\r\n\r\n    function () {\r\n\r\n\r\n      if (\r\n        !document.hidden\r\n      ) {\r\n\r\n\r\n        refreshNews();\r\n\r\n\r\n      }\r\n\r\n\r\n    },\r\n\r\n    REFRESH_INTERVAL\r\n\r\n  );\r\n\r\n\r\n  \/*\r\n   * Refresh again when visitor returns\r\n   * to the browser tab.\r\n   *\/\r\n\r\n  document.addEventListener(\r\n\r\n    'visibilitychange',\r\n\r\n    function () {\r\n\r\n\r\n      if (\r\n        !document.hidden\r\n      ) {\r\n\r\n\r\n        refreshNews();\r\n\r\n\r\n      }\r\n\r\n\r\n    }\r\n\r\n  );\r\n\r\n\r\n})();<\/script><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"slim_seo":{"title":"Updates - Sta. Barbara Mission Center","description":""},"footnotes":""},"class_list":["post-43","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"DioecesisGumacana@1984","author_link":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/author\/dioecesisgumacana1984\/"},"uagb_comment_info":0,"uagb_excerpt":null,"_links":{"self":[{"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/pages\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":4,"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/pages\/43\/revisions"}],"predecessor-version":[{"id":264,"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/pages\/43\/revisions\/264"}],"wp:attachment":[{"href":"https:\/\/dioceseofgumaca.com\/casasahanibaba\/wp-json\/wp\/v2\/media?parent=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}