<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:media="http://search.yahoo.com/mrss/"
	
	>

<channel>
	<title>Ed James Harding</title>
	<link>https://edjamesharding.com</link>
	<description>Ed James Harding</description>
	<pubDate>Wed, 24 Nov 2021 17:12:00 +0000</pubDate>
	<generator>https://edjamesharding.com</generator>
	<language>en</language>
	
		
	<item>
		<title>video</title>
				
		<link>https://edjamesharding.com/video</link>

		<pubDate>Wed, 24 Nov 2021 17:12:00 +0000</pubDate>

		<dc:creator>Ed James Harding</dc:creator>

		<guid isPermaLink="true">https://edjamesharding.com/video</guid>

		<description>

  
    
  






/* ======================================
   MAIN GALLERY
====================================== */

#cargo-video-portfolio {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 12px;
  box-sizing: border-box;
}

.cargo-video-section {
  width: 100%;
  margin: 0 0 45px;
}

.cargo-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
  align-items: start;
  width: 100%;
}

.cargo-video-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  background: transparent;
}


/* ======================================
   WIDE FEATURED VIDEOS
   VIDEO 1 AND NEW VIDEO 14
====================================== */

.cargo-video-card.cargo-video-featured {
  grid-column: 1 / -1;
  width: 66.6667%;
  max-width: none;
  margin: 0 auto;
}

.cargo-video-featured .cargo-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}


/* ======================================
   YOUTUBE AND VIMEO
====================================== */

.cargo-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #111;
}

.cargo-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* ======================================
   DRAG AND DROP
====================================== */

.cargo-video-card.sortable-ghost {
  opacity: .25;
}

.cargo-video-card.sortable-chosen {
  outline: 2px solid #999;
}


/* ======================================
   MOBILE
====================================== */

@media (max-width: 600px) {

  #cargo-video-portfolio {
    padding: 12px 8px;
  }

  .cargo-video-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
  }

  .cargo-video-card.cargo-video-featured {
    grid-column: 1 / -1;
    width: 100%;
  }

  .cargo-video-section {
    margin-bottom: 30px;
  }

}









(function () {

  // ======================================
  // MAIN VIDEO COLLECTION
  // 28 VIDEOS
  // ORIGINAL CHRONOLOGICAL ORDER
  // ======================================

  const mainVideos = [

    // POSITION 1 - WIDE FEATURED VIDEO
    {type:"youtube", id:"5YZO_s4MK4k", featured:true},

    // POSITIONS 2-7
    {type:"youtube", id:"5A9bxW9dieU"},
    {type:"youtube", id:"a9ZSdWVE2D8"},
    {type:"youtube", id:"GfJf4sFe550"},
    {type:"youtube", id:"zotGzcBjEyU"},
    {type:"youtube", id:"Hcldp9BVeus"},
    {type:"youtube", id:"YsurQCwBSnE"},

    // POSITIONS 8-13
    {type:"youtube", id:"VRUykQLWzBY"},
    {type:"youtube", id:"jxHQoc3n9sk"},
    {type:"youtube", id:"As0ZZP67rxw"},
    {type:"youtube", id:"F-sxOh5re88"},
    {type:"youtube", id:"PyGOfwrKGuw"},
    {type:"youtube", id:"_AbBvnIdQ2w"},

    // POSITION 14 - NEW WIDE FEATURED VIDEO
    {type:"youtube", id:"mVA-bqRMD5Q", featured:true},

    // POSITIONS 15-21
    {type:"youtube", id:"hhmYd23uuzw"},
    {type:"youtube", id:"FpvPxo6doKI"},
    {type:"youtube", id:"yVy2oZka5Us"},
    {type:"youtube", id:"zbXek1KcHjg"},
    {type:"youtube", id:"4bm6gpTlxC0"},
    {type:"youtube", id:"N-7rQtNd5LE"},
    {type:"youtube", id:"J2Ui6CqpaWM"},

    // POSITION 22
    {type:"youtube", id:"wMeaa3hkduI"},

    // POSITIONS 23-26
    {type:"youtube", id:"BvusTzq6H_0"},
    {type:"youtube", id:"AVumio1vXzo"},
    {type:"youtube", id:"dQpb_2DFsv0"},
    {type:"youtube", id:"9zawt87Vp2I"},

    // POSITION 27
    {type:"vimeo", id:"649597763"},

    // POSITION 28
    {type:"vimeo", id:"649598774"}

  ];


  // ======================================
  // FIND GALLERY CONTAINER
  // ======================================

  const mainGrid =
    document.getElementById("cargo-main-grid");

  if (!mainGrid) return;


  // ======================================
  // CLEAR EXISTING CONTENT
  // ======================================

  mainGrid.replaceChildren();


  // DESTROY PREVIOUS SORTING INSTANCES

  if (window.cargoVideoSortables) {

    window.cargoVideoSortables.forEach(sortable =&#62; {
      sortable.destroy();
    });

  }

  window.cargoVideoSortables = [];


  // ======================================
  // CREATE VIDEO CARDS
  // ======================================

  function makeCard(type, id, number, featured) {

    const card = document.createElement("div");

    card.className = "cargo-video-card";

    card.dataset.key = "video-" + number;
    card.dataset.reference = number;


    // WIDE FEATURED VIDEOS

    if (featured) {
      card.classList.add("cargo-video-featured");
    }


    // VIDEO FRAME

    const frame = document.createElement("div");

    frame.className = "cargo-video-frame";


    const iframe = document.createElement("iframe");


    // YOUTUBE

    if (type === "youtube") {

      iframe.src =
        "https://www.youtube-nocookie.com/embed/" +
        encodeURIComponent(id);

      iframe.title = "YouTube video";

      iframe.allow =
        "accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share";

    }


    // VIMEO

    else if (type === "vimeo") {

      iframe.src =
        "https://player.vimeo.com/video/" +
        encodeURIComponent(id);

      iframe.title = "Vimeo video";

      iframe.allow =
        "fullscreen; picture-in-picture";

    }


    // NO AUTOPLAY

    iframe.allowFullscreen = true;

    iframe.loading = "lazy";


    frame.appendChild(iframe);

    card.appendChild(frame);

    return card;

  }


  // ======================================
  // BUILD VIDEO COLLECTION
  // POSITIONS 1-28
  // ======================================

  mainVideos.forEach((video, index) =&#62; {

    const number = index + 1;

    const card = makeCard(
      video.type,
      video.id,
      number,
      video.featured === true
    );

    mainGrid.appendChild(card);

  });


  // ======================================
  // DRAG AND DROP
  // ======================================

  if (window.Sortable) {

    const sortable = new Sortable(mainGrid, {

      animation: 180,

      ghostClass: "sortable-ghost",

      chosenClass: "sortable-chosen",

      group: {
        name: "cargo-main-video-gallery",
        pull: false,
        put: false
      }

    });

    window.cargoVideoSortables.push(sortable);

  }


})();

</description>
		
	</item>
		
	</channel>
</rss>