x x x
Only portrait mode is currently supported - please rotate your device.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<style>
#unpublished-events .conf-macro.output-block[data-macro-name=confiform-cleanview] {
    padding: 0px 35px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 280px);
    grid-gap: 20px;
    height: auto !important;
    justify-content: space-evenly;
}
</style>


HTML
 <script>

  const showPastWatchIndicatorsgetMinutesUntilEventStart = (startDate) => {
	    let pastEventsnowDate = new document.getElementById('scroll-section-3'Date();
    let pastCardseventStartDate = Array.from(pastEvents.getElementsByClassName('eventcard')new Date(startDate);

	for (let i = 0;let idiffMilliseconds <= pastCards.length; i++) {
eventStartDate.getTime() - nowDate.getTime();
    let diffMinutes = let currCard(diffMilliseconds = pastCards[i]/ 60000);

    return diffMinutes;
  }

  letconst liveElgetMinutesUntilEventEnd = document.createElement("div");(endDate) => {
    let nowDate  liveEl.classList.add('watch-indicator'= new Date();
    let eventEndDate liveEl.innerText= = "RECORDED";new Date(endDate);

    let diffMilliseconds currCard= eventEndDate.insertAdjacentElement('afterbegin', liveElgetTime() - nowDate.getTime();
    }
}

let diffMinutes const= getMinutesUntilEventStart = (startDate)diffMilliseconds => {/ 60000);

    let nowDate = new Date()return diffMinutes;
  }

  letconst eventStartDateshowPastWatchIndicators = new Date(startDate);

    => {
	let diffMillisecondspastEvents = eventStartDatedocument.getTime() - nowDate.getTime(getElementById('scroll-section-3');
    let diffMinutespastCards =  (diffMilliseconds / 60000)Array.from(pastEvents.getElementsByClassName('eventcard'));

	for (let i = 0; i < pastCards.length; i++) {
      let currCard = pastCards[i];

    return diffMinutes;  let liveEl = document.createElement("div");
      liveEl.classList.add('watch-indicator');
      liveEl.innerText = "RECORDED";
      currCard.insertAdjacentElement('afterbegin', liveEl);
    }

	let allEvents = document.getElementById('all-events');
	let allCards = Array.from(allEvents.getElementsByClassName('eventcard'));

	for (let i = 0; i < allCards.length; i++) {
	  let currCard = allCards[i];
      let currCardEnd = currCard.dataset.enddate;
      let minsTilEnd = getMinutesUntilEventEnd(currCardEnd);
	  if (minsTilEnd < 0) {
		let liveEl = document.createElement("div");
		liveEl.classList.add('watch-indicator');
		liveEl.innerText = "RECORDED";
		currCard.insertAdjacentElement('afterbegin', liveEl);
	  }
	}
  }

  window.addEventListener('load', () => {
    let upcomingEvents = document.getElementById('scroll-section-1');
    let upcomingCards = Array.from(upcomingEvents.getElementsByClassName('eventcard'));

    for (let i = 0; i < upcomingCards.length; i++) {
      let currCard = upcomingCards[i];
      let currCardStart = currCard.dataset.startdate;
      let minsTilStart = getMinutesUntilEventStart(currCardStart);

      if (minsTilStart <= 0) {
        let liveEl = document.createElement("div");
        liveEl.classList.add('live-circle');
        liveEl.innerText = "LIVE";
        currCard.insertAdjacentElement('afterbegin', liveEl);
      }  
    }
	
	if (AJS.params.remoteUser == "alex@gsvlabs.com") {
		showPastWatchIndicators()
	}
  });
</script>
<style>
  .live-circle {
    font-size: 13px;
    padding: 3px 13px;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #cc1f1f;
    color: white;
    position: absolute;
    z-index: 2;
    margin: 8px 8px;
    box-shadow: 1px 1px 5px #00000054;
  }
</style>
<script>

if (AJS.params.remoteUser == "alex@gsvlabs.com") {

// #7ac1b6


}


</script>

<style>
  .watch-indicator {
    font-size: 12px;
    padding: 3px 13px;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #6da79e;
    color: white;
    position: absolute;
    z-index: 2;
    margin: 8px 8px;
    box-shadow: 1px 1px 5px #00000054;
	border-radius: 3px;
  }
</style>

...