diff --git a/assets/splash_art.png b/assets/splash_art.png new file mode 100644 index 000000000..b948a7a25 Binary files /dev/null and b/assets/splash_art.png differ diff --git a/content/news.json b/content/news.json index d188e3757..b672272a6 100644 --- a/content/news.json +++ b/content/news.json @@ -1,35 +1,27 @@ { "new_version": { - "color": "#12182a", - "text_color": "#e8ddcd", - "graphic": { - "type": "image", - "source": "https://web.blockbench.net/content/splash_art.png?41", - "width": 1000, - "aspect_ratio": "21/9", - "description": "Splash Art by [MisterGriimm](https://twitter.com/MisterGriimm) and [MidnitePixel_](https://twitter.com/MidnitePixel_)", - "text_color": "#aba4a3" - }, + "color": "var(--color-bright_ui)", + "text_color": "var(--color-bright_ui_text)", "layout": "vertical", + "insert_after": "splash_screen", "text": [ - {"text": "Happy Holidays!", "type": "h1"}, - {"text": "...and welcome to Blockbench 4.1, the Inverse Kinematics Update!", "type": "h2"}, - {"text": "Check out the [full changelog](https://github.com/JannisX11/blockbench/releases/tag/v4.1.0)"} + {"text": "Welcome to Blockbench 4.2, the Panel Update!", "type": "h1"}, + {"text": "Check out the [full changelog](https://github.com/JannisX11/blockbench/releases/tag/v4.2.0)!"} ], "features": [ { "image": "https://web.blockbench.net/content/inverse_kinematics.png", - "title": "Inverse Kinematics!", + "title": "Moveable Panels!", "text": "Inverse Kinematics allow you to animate a chain of bones by just moving the end point!" }, { "image": "https://web.blockbench.net/content/gif_crop.png", - "title": "GIF Cropping!", + "title": "Texture Editing!", "text": "The new GIF recorder allows you to crop your GIF to just the content you need!" }, { "image": "https://web.blockbench.net/content/collada.png", - "title": "Collada Export", + "title": "Move Texture with UV", "text": "With Collada support you can export your models directly into Unity and other programs!" } ] diff --git a/content/splash_art.png b/content/splash_art.png index 184df6093..b948a7a25 100644 Binary files a/content/splash_art.png and b/content/splash_art.png differ diff --git a/js/interface/start_screen.js b/js/interface/start_screen.js index 9fcad76d5..36691cc46 100644 --- a/js/interface/start_screen.js +++ b/js/interface/start_screen.js @@ -107,9 +107,16 @@ function addStartScreenSection(id, data) { } if (data.last) { $('#start_screen content').append(obj); + } else if (data.insert_after) { + $('#start_screen content').find(`#${data.insert_after}`).after(obj); + } else if (data.insert_before) { + $('#start_screen content').find(`#${data.insert_before}`).before(obj); } else { $('#start_screen content').prepend(obj); } + if (!obj[0].parentElement) { + $('#start_screen content').append(obj); + } } onVueSetup(function() { @@ -241,37 +248,6 @@ onVueSetup(function() { url: 'https://web.blockbench.net/content/news.json', dataType: 'json' }); - Promise.all([news_call, documentReady]).then((data) => { - if (!data || !data[0]) return; - data = data[0]; - - //Update Screen - if (Blockbench.hasFlag('after_update') && data.new_version) { - addStartScreenSection(data.new_version) - jQuery.ajax({ - url: 'https://blckbn.ch/api/event/successful_update', - type: 'POST', - data: { - version: Blockbench.version - } - }) - } - if (data.psa) { - (function() { - if (typeof data.psa.version == 'string') { - if (data.psa.version.includes('-')) { - limits = data.psa.version.split('-'); - if (limits[0] && compareVersions(limits[0], Blockbench.version)) return; - if (limits[1] && compareVersions(Blockbench.version, limits[1])) return; - } else { - if (data.psa.version != Blockbench.version) return; - } - } - addStartScreenSection(data.psa) - })() - } - - }) documentReady.then(() => { Blockbench.startup_count = parseInt(localStorage.getItem('startups')||0) @@ -295,6 +271,20 @@ onVueSetup(function() { if (settings.streamer_mode.value) { updateStreamerModeNotification() } + addStartScreenSection('splash_screen', { + "text_color": '#000000', + "graphic": { + "type": "image", + "source": "./assets/splash_art.png?42", + "width": 1000, + "aspect_ratio": "21/9", + "description": "Splash Art by [Shroomy](https://twitter.com/ShroomyArts) and [RedstoneMvv](https://twitter.com/Redstone_mvv)", + "text_color": '#cfcfcf' + } + }) + if (!Blockbench.hasFlag('after_update')) { + document.getElementById('start_screen').scrollTop = 100; + } //Twitter let twitter_ad; @@ -330,7 +320,6 @@ onVueSetup(function() { let section = Interface.createElement('section', {id: 'quick_setup'}); $('#start_screen content').prepend(section); - console.log(section) new Vue({ data() {return { @@ -416,4 +405,36 @@ onVueSetup(function() { }).$mount(section); } }) + Promise.all([news_call, documentReady]).then((data) => { + if (!data || !data[0]) return; + data = data[0]; + + //Update Screen + if (Blockbench.hasFlag('after_update') && data.new_version) { + data.new_version.insert_after = 'splash_screen' + addStartScreenSection('new_version', data.new_version); + jQuery.ajax({ + url: 'https://blckbn.ch/api/event/successful_update', + type: 'POST', + data: { + version: Blockbench.version + } + }) + } + if (data.psa) { + (function() { + if (typeof data.psa.version == 'string') { + if (data.psa.version.includes('-')) { + limits = data.psa.version.split('-'); + if (limits[0] && compareVersions(limits[0], Blockbench.version)) return; + if (limits[1] && compareVersions(Blockbench.version, limits[1])) return; + } else { + if (data.psa.version != Blockbench.version) return; + } + } + addStartScreenSection(data.psa) + })() + } + + }) })()