Browse Source

Fixed youtube player, updated Grid Miner project and published pending posts

James Peret 2 years ago
parent
commit
4781269a4d

+ 19 - 0
source/_posts/blog/grid-miner-launch-date.md

@@ -0,0 +1,19 @@
+---
+title:  "Grid Miner Launch Date"
+slug: grid-miner-launch-date
+published: true
+layout: post
+date:   2022-04-14 17:24:00
+categories: update
+excerpt: "The game is almost ready and the launch date is set!"
+cover_image: cover.png
+hero_image: hero.png
+---
+
+Last year we were going to release [Grid Miner](https://store.steampowered.com/app/1768300/Grid_Miner/) in December. But in the end we decided not to launch the game at that point. The game wasn't ready yet. It needed a little more polish before it could be released.
+
+So I continued working on the game some more this year. This week [version 0.8](https://store.steampowered.com/news/app/1768300/view/3194749759250401418) come out containing many updates like the connected buildings mechanic and Steam achievements.
+
+Also Steam has approved the game! Now I can confidently set the release date.
+
+So [Grid Miner](https://store.steampowered.com/app/1768300/Grid_Miner/) will be releasing on Steam on **May 3 2022**!

BIN
source/_posts/blog/grid-miner-launch-date/cover.jpg


BIN
source/_posts/blog/grid-miner-launch-date/hero.jpg


+ 16 - 8
source/_posts/projects/grid-miner.md

@@ -12,7 +12,7 @@ tags:
   - "games"
   - "programming"
 start_date: "2021-06-01"
-end_date: "2021-12-16"
+end_date: "2022-05-03"
 contact_types: "Team"
 contacts:
   - name: "James Peret"
@@ -20,12 +20,18 @@ contacts:
   - name: "Benjamin Peret"
     url: ""
 screenshots:
-  - url: "/projects/grid-miner/screenshot-0.png"
-    description: "Gathering resources by crushing asteroids"
-  - url: "/projects/grid-miner/screenshot-1.png"
-    description: "Building system"
-  - url: "/projects/grid-miner/screenshot-2.png"
-    description: "A large space station"
+  - url: "/projects/grid-miner/grid-miner-001.jpg"
+    description: "A large base"
+  - url: "/projects/grid-miner/grid-miner-002.jpg"
+    description: "The Tractor Beam"
+  - url: "/projects/grid-miner/grid-miner-003.jpg"
+    description: "Alternative color pallet"
+  - url: "/projects/grid-miner/grid-miner-004.jpg"
+    description: "Alternative color pallet"
+  - url: "/projects/grid-miner/grid-miner-005.jpg"
+    description: "Game story screen"
+  - url: "/projects/grid-miner/grid-miner-007.jpg"
+    description: "Construction mode"
 links:
   - name: "Buy on Steam"
     url: "https://store.steampowered.com/app/1768300/Grid_Miner/"
@@ -33,7 +39,9 @@ links:
     dropdown: false
     links: []
 files: []
-videos: []
+videos:
+  - title: "Grid Miner Trailer"
+    url: "https://www.youtube.com/watch?v=rn6jtgRvuIY"
 repositories: []
 thumbnail_image: "/projects/grid-miner/thumbnail.png"
 ---

BIN
source/_posts/projects/grid-miner/grid-miner-001.jpg


BIN
source/_posts/projects/grid-miner/grid-miner-002.jpg


BIN
source/_posts/projects/grid-miner/grid-miner-003.jpg


BIN
source/_posts/projects/grid-miner/grid-miner-004.jpg


BIN
source/_posts/projects/grid-miner/grid-miner-005.jpg


BIN
source/_posts/projects/grid-miner/grid-miner-006.jpg


BIN
source/_posts/projects/grid-miner/grid-miner-007.jpg


BIN
source/_posts/projects/grid-miner/screenshot-0.png


BIN
source/_posts/projects/grid-miner/screenshot-1.png


BIN
source/_posts/projects/grid-miner/screenshot-2.png


+ 1 - 1
themes/james-theme/layout/_partial/video-player.ejs

@@ -4,7 +4,7 @@
 <% if(is_hero) height_class = "video-height-hero" %>
 <div class="video-frame container-fluid <%= height_class %>">
     <% if(is_video_provider(url, 'youtube')) { %>
-        <iframe class="video-player" src="<%- youtube_embed_link(url) %>" width="560" height="315" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+        <iframe class="video-player" src="<%- youtube_embed_link(url) %>" width="560" height="315" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="allowfullscreen"></iframe>
     <% } else if(is_video_provider(url, 'vimeo')) { %>
         <iframe class="video-player" src="<%- vimeo_embed_link(url) %>" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
     <% } %>

+ 4 - 3
themes/james-theme/scripts/helpers.js

@@ -28,15 +28,16 @@ hexo.extend.helper.register('is_video_provider', function(url, provider){
     url = url.replace('http://', '')
     url = url.replace('https://', '')
     url = url.replace('www', '')
-    var parts = url.split('.');
-    return parts[0] == provider ? true : false;
+    return url.includes(provider)
 });
 
 hexo.extend.helper.register('youtube_embed_link', function(url){
     url = url.replace('http://', '')
     url = url.replace('https://', '')
+    url = url.replace('watch?v=', '')
+    url = url.replace(' ', '')
     var parts = url.split('/');
-    return `http://www.youtube.com/embed/${parts[2]}`;
+    return `https://www.youtube.com/embed/${parts[1]}`;
 });
 
 hexo.extend.helper.register('vimeo_embed_link', function(url){