diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts
index 2a504b86..2dc52eee 100644
--- a/src/main/base/browserwindow.ts
+++ b/src/main/base/browserwindow.ts
@@ -26,6 +26,51 @@ export class BrowserWindow {
env: {
platform: process.platform,
dev: app.isPackaged,
+ components: [
+ "pages/podcasts",
+ "pages/apple-account-settings",
+ "pages/library-songs",
+ "pages/browse",
+ "pages/settings",
+ "pages/listen_now",
+ "pages/home",
+ "pages/artist-feed",
+ "pages/cider-playlist",
+ "pages/recordLabel",
+ "pages/collection-list",
+ "pages/apple-curator",
+ "pages/artist",
+ "pages/search",
+ "pages/about",
+ "pages/library-videos",
+ "components/mediaitem-artwork",
+ "components/artwork-material",
+ "components/menu-panel",
+ "components/sidebar-playlist",
+ "components/spatial-properties",
+ "components/audio-settings",
+ "components/qrcode-modal",
+ "components/equalizer",
+ "components/add-to-playlist",
+ "components/queue",
+ "components/queue-item",
+ "components/mediaitem-scroller-horizontal",
+ "components/mediaitem-scroller-horizontal-large",
+ "components/mediaitem-scroller-horizontal-sp",
+ "components/mediaitem-scroller-horizontal-mvview",
+ "components/mediaitem-list-item",
+ "components/mediaitem-hrect",
+ "components/mediaitem-square",
+ "components/mediaitem-square-sp",
+ "components/mediaitem-mvview",
+ "components/libraryartist-item",
+ "components/listennow-child",
+ "components/mediaitem-mvview-sp",
+ "components/animatedartwork-view",
+ "components/lyrics-view",
+ "components/fullscreen",
+ "components/miniplayer",
+ ]
},
};
private options: any = {
diff --git a/src/renderer/views/app/app-content.ejs b/src/renderer/views/app/app-content.ejs
new file mode 100644
index 00000000..a5781532
--- /dev/null
+++ b/src/renderer/views/app/app-content.ejs
@@ -0,0 +1,158 @@
+
+
+
+ <%- include('../svg/chevron-left.svg') %>
+
+
+ <%- include('../svg/chevron-right.svg') %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%- include('../pages/zoo') %>
+
+
+ <%- include('../pages/webview') %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{$root.getLz('term.recentStations')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%- include('../pages/library-recentlyadded') %>');
+
+
+
+
+
+
+
+
+
+ <%- include('../pages/library-albums') %>');
+ %>
+
+
+
+
+ <%- include('../pages/madeforyou') %>');
+ %>
+
+
+
+
+
+ <%- include('../pages/library-artists') %>');
+ %>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/renderer/views/app/app-navigation.ejs b/src/renderer/views/app/app-navigation.ejs
new file mode 100644
index 00000000..b7d7f654
--- /dev/null
+++ b/src/renderer/views/app/app-navigation.ejs
@@ -0,0 +1,27 @@
+
+ <%- include("sidebar") %>
+ <%- include("app-content") %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/views/app/chrome-top.ejs b/src/renderer/views/app/chrome-top.ejs
new file mode 100644
index 00000000..751ff3f0
--- /dev/null
+++ b/src/renderer/views/app/chrome-top.ejs
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ mk.nowPlayingItem["attributes"]["name"] }}
+
+
+
+
+
+ {{ mk.nowPlayingItem["attributes"]["artistName"] }}
+
+
+
{{"—"}}
+ {{(mk.nowPlayingItem["attributes"]["albumName"]) ?
+ (mk.nowPlayingItem["attributes"]["albumName"]) : "" }}
+
+
+
+
+
+
+
{{ convertToMins(getSongProgress()) }}
+
{{ convertToMins(mk.currentPlaybackDuration) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/views/app/panels.ejs b/src/renderer/views/app/panels.ejs
new file mode 100644
index 00000000..bb8a4008
--- /dev/null
+++ b/src/renderer/views/app/panels.ejs
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{((lyricon) ? ((lyrics.length > 0 && lyrics[currentLyricsLine] &&
+ lyrics[currentLyricsLine].line ) ?
+ lyrics[currentLyricsLine].line.replace('lrcInstrumental','') : "") : '') + ((lyricon) ?
+ ((lyrics.length
+ > 0 && lyrics[currentLyricsLine] && lyrics[currentLyricsLine].line ) ?
+ (lyrics[currentLyricsLine].translation ? ('\n\r' + lyrics[currentLyricsLine].translation) : ""): "")
+ :
+ '')}}
+
+
+ <%- include("../svg/pip.svg") %>
+
+
+ <%- include("../svg/fullscreen.svg") %>
+
+
+
+
\ No newline at end of file
diff --git a/src/renderer/views/app/sidebar.ejs b/src/renderer/views/app/sidebar.ejs
new file mode 100644
index 00000000..ba0ba6b2
--- /dev/null
+++ b/src/renderer/views/app/sidebar.ejs
@@ -0,0 +1,173 @@
+
diff --git a/src/renderer/views/main.ejs b/src/renderer/views/main.ejs
index 44258400..a4710132 100644
--- a/src/renderer/views/main.ejs
+++ b/src/renderer/views/main.ejs
@@ -37,681 +37,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ mk.nowPlayingItem["attributes"]["name"] }}
-
-
-
-
-
- {{ mk.nowPlayingItem["attributes"]["artistName"] }}
-
-
-
{{"—"}}
- {{(mk.nowPlayingItem["attributes"]["albumName"]) ?
- (mk.nowPlayingItem["attributes"]["albumName"]) : "" }}
-
-
-
-
-
-
-
{{ convertToMins(getSongProgress()) }}
-
{{ convertToMins(mk.currentPlaybackDuration) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%- include("svg/cast.svg") %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%- include('svg/chevron-left.svg') %>
-
-
- <%- include('svg/chevron-right.svg') %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%- include('pages/zoo') %>
-
-
- <%- include('pages/webview') %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{$root.getLz('term.recentStations')}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%- include('pages/library-recentlyadded') %>');
-
-
-
-
-
-
-
-
-
- <%- include('pages/library-albums') %>');
- %>
-
-
-
-
- <%- include('pages/madeforyou') %>');
- %>
-
-
-
-
-
- <%- include('pages/library-artists') %>');
- %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <%- include('app/chrome-top'); %>
+ <%- include('app/app-navigation'); %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{((lyricon) ? ((lyrics.length > 0 && lyrics[currentLyricsLine] &&
- lyrics[currentLyricsLine].line ) ?
- lyrics[currentLyricsLine].line.replace('lrcInstrumental','') : "") : '') + ((lyricon) ?
- ((lyrics.length
- > 0 && lyrics[currentLyricsLine] && lyrics[currentLyricsLine].line ) ?
- (lyrics[currentLyricsLine].translation ? ('\n\r' + lyrics[currentLyricsLine].translation) : ""): "")
- :
- '')}}
-
-
- <%- include("svg/pip.svg") %>
-
-
- <%- include("svg/fullscreen.svg") %>
-
-
-
-
+ <%- include('app/panels'); %>
-
-
-<%- include('pages/podcasts') %>
-
-<%- include('pages/apple-account-settings') %>
-
-<%- include('pages/library-songs') %>
-
-
-<%- include("components/mediaitem-artwork"); %>
-
-<%- include('pages/browse') %>
-
-
-<%- include('pages/settings') %>
-
-
-<%- include('pages/listen_now') %>
-
-
-<%- include('pages/home') %>
-
-
-<%- include('pages/artist-feed') %>
-
-
-<%- include('pages/cider-playlist') %>
-
-
-<%- include('pages/recordLabel') %>
-
-
-<%- include('pages/collection-list') %>
-
-
-<%- include('pages/apple-curator') %>
-
-
-<%- include('pages/artist') %>
-
-
-<%- include('pages/search') %>
-
-
-<%- include('pages/about') %>
-
-
-<%- include('pages/library-videos') %>
+<% for(var i=0; i < Object.keys(env.components).length ; i++) {%>
+ <%- include(env.components[i]); %>
+<% } %>
-
-<%- include('components/artwork-material') %>
-
-<%- include('components/menu-panel') %>
-
-<%- include('components/sidebar-playlist')
-%>
-
-<%- include('components/spatial-properties')
-%>
-
-<%- include('components/audio-settings')
-%>
-
-<%- include('components/qrcode-modal')
-%>
-
-<%- include('components/equalizer')
-%>
-
-<%- include('components/add-to-playlist')
-%>
-
-<%- include('components/queue')
-%>
-
-<%- include('components/queue-item')
-%>
-
-<%- include('components/mediaitem-scroller-horizontal')
-%>
-
-<%- include('components/mediaitem-scroller-horizontal-large')
-%>
-
-<%- include('components/mediaitem-scroller-horizontal-sp')
-%>
-
-<%- include('components/mediaitem-scroller-horizontal-mvview')
-%>
-
-<%- include('components/mediaitem-list-item')
-%>
-
-<%- include('components/mediaitem-hrect')
-%>
-
-<%- include('components/mediaitem-square')
-%>
-
-<%- include('components/mediaitem-square-sp')
-%>
-
-<%- include('components/mediaitem-mvview')
-%>
-
-<%- include('components/libraryartist-item')
-%>
-<%- include('components/listennow-child')
-%>
-
-<%- include('components/mediaitem-mvview-sp')
-%>
-
-<%- include('components/animatedartwork-view')
-%>
-
-<%- include('components/lyrics-view')
-%>
-
-<%- include('components/fullscreen')
-%>
-
-
-<%- include('components/miniplayer')
-%>
-