Frontent dev env (#247)

* Added frontend development files/environment

* More items-categories related removals

* Improvements in pages templates (inc. static pages)

* Improvements in video player

* Added empty home page message + cta

* Updates in media, playlist and management pages

* Improvements in material icons font loading

* Replaced media & playlists links in frontend dev-env

* frontend package version update

* chnaged frontend dev url port

* static files update

* Changed default position of theme switcher

* enabled frontend docker container
This commit is contained in:
Yiannis Stergiou
2021-07-11 18:01:34 +03:00
committed by GitHub
parent 060bb45725
commit aa6520daac
555 changed files with 201927 additions and 66002 deletions

View File

@@ -0,0 +1,6 @@
<%- include ./partials/variables %>
<!DOCTYPE html>
<html lang="<%= htmlWebpackPlugin.options.lang %>">
<%- include ./partials/head %>
<%- include ./partials/body %>
</html>

View File

@@ -0,0 +1,92 @@
<% var item, key %>
<body>
<% if (htmlWebpackPlugin.options.unsupportedBrowser) { %>
<!-- Unsupported browser -->
<style>.unsupported-browser { display: none; }</style>
<div class="unsupported-browser">
Sorry, your browser is not supported. Please upgrade to the latest version or switch your browser to use this
site. See <a href="http://outdatedbrowser.com/">outdatedbrowser.com</a> for options.
</div>
<% } %>
<% if (htmlWebpackPlugin.options.appMountId) { %>
<!-- App mount (single) -->
<div id="<%= htmlWebpackPlugin.options.appMountId %>">
<% if (htmlWebpackPlugin.options.appMountHtmlSnippet) { %>
<%= htmlWebpackPlugin.options.appMountHtmlSnippet %>
<% } %>
</div>
<% } %>
<% if (Array.isArray(htmlWebpackPlugin.options.appMountIds) && htmlWebpackPlugin.options.appMountIds.length ) { %>
<!-- App mount ids (multiple) -->
<% for (item of htmlWebpackPlugin.options.appMountIds) { %>
<div id="<%= item %>"></div>
<% } %>
<% } %>
<% if (htmlWebpackPlugin.options.html.body.snippet && '' !== htmlWebpackPlugin.options.html.body.snippet ) { %>
<!-- Body snippet -->
<%- htmlWebpackPlugin.options.html.body.snippet %>
<% } %>
<% if (htmlWebpackPlugin.options.window && Object.keys( htmlWebpackPlugin.options.window ).length) { %>
<!-- Global object -->
<script type="text/javascript">
<% for (key in htmlWebpackPlugin.options.window) { %>
window['<%= key %>'] = <%- JSON.stringify( htmlWebpackPlugin.options.window[key] ) %>;
<% } %>
</script>
<% } %>
<% if (Array.isArray(htmlWebpackPlugin.options.html.body.scripts) && htmlWebpackPlugin.options.html.body.scripts.length ) { %>
<!-- Scripts -->
<% for (item of htmlWebpackPlugin.options.html.body.scripts) {
%><script<% for (key in item) { %> <%= key %>="<%= item[key] %>"<% } %>></script><%
}
} %>
<% if ( Array.isArray(htmlWebpackPlugin.files.chunks) && htmlWebpackPlugin.files.chunks.length ) { %>
<!-- Chunks -->
<% for (key in htmlWebpackPlugin.files.chunks) {
if (htmlWebpackPlugin.files.jsIntegrity) { %>
<script
src="<%= htmlWebpackPlugin.files.chunks[key].entry %>"
type="text/javascript"
integrity="<%= htmlWebpackPlugin.files.jsIntegrity[htmlWebpackPlugin.files.js.indexOf(htmlWebpackPlugin.files.chunks[key].entry)] %>"
crossorigin="<%= webpackConfig.output.crossOriginLoading %>"></script>
<% } else { %>
<script src="<%= htmlWebpackPlugin.files.chunks[key].entry %>" type="text/javascript"></script>
<% }
}
} %>
<% if (htmlWebpackPlugin.options.googleAnalytics) { %>
<!-- Google analytics script -->
<script type="text/javascript">
window.GoogleAnalyticsObject='ga';window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
<% if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %>
ga('create','<%= htmlWebpackPlugin.options.googleAnalytics.trackingId %>','auto');
<% } else {
throw new Error("html-webpack-template requires googleAnalytics.trackingId config");
} %>
<% if (htmlWebpackPlugin.options.googleAnalytics.pageViewOnLoad) { %>
ga('send','pageview');
<% } %>
</script>
<script async defer src="https://www.google-analytics.com/analytics.js" type="text/javascript"></script>
<% } %>
<!---->
</body>

View File

@@ -0,0 +1,32 @@
<% var item, key %>
<head>
<% if (htmlWebpackPlugin.options.title) { %>
<!-- Title -->
<title><%= htmlWebpackPlugin.options.title %></title>
<% } %>
<% if (htmlWebpackPlugin.options.baseUrl) { %>
<!-- Base -->
<base href="<%= htmlWebpackPlugin.options.baseUrl %>">
<% } %>
<% if (Array.isArray(htmlWebpackPlugin.options.html.head.meta) && htmlWebpackPlugin.options.html.head.meta.length ) { %>
<!-- Meta -->
<% for (item of htmlWebpackPlugin.options.html.head.meta) { %><meta<% for (key in item) { %> <%= key %>="<%= item[key] %>"<% } %> /><% }
} %>
<% if (Array.isArray(htmlWebpackPlugin.options.html.head.links) && htmlWebpackPlugin.options.html.head.links.length ) { %>
<!-- Links -->
<% for (item of htmlWebpackPlugin.options.html.head.links) { %><link<% for (key in item) { %> <%= key %>="<%= item[key] %>"<% } %> /><% }
} %>
<% if (Array.isArray(htmlWebpackPlugin.options.html.head.scripts) && htmlWebpackPlugin.options.html.head.scripts.length ) { %>
<!-- Scripts -->
<% for (item of htmlWebpackPlugin.options.html.head.scripts) { %>
<script<% for (key in item) { %> <%= key %>="<%= item[key] %>"<% } %>></script><%
}
} %>
</head>

View File

@@ -0,0 +1,25 @@
<% htmlWebpackPlugin.options.appMountId = htmlWebpackPlugin.options.appMountId || null %>
<% htmlWebpackPlugin.options.appMountIds = htmlWebpackPlugin.options.appMountIds || [] %>
<% htmlWebpackPlugin.options.files = htmlWebpackPlugin.options.files || [] %>
<% htmlWebpackPlugin.options.files.chunks = htmlWebpackPlugin.options.files.chunks || [] %>
<% htmlWebpackPlugin.options.files.jsIntegrity = htmlWebpackPlugin.options.files.jsIntegrity || false %>
<% htmlWebpackPlugin.options.unsupportedBrowser = htmlWebpackPlugin.options.unsupportedBrowser || false %>
<% htmlWebpackPlugin.options.lang = htmlWebpackPlugin.options.lang || "en" %>
<% htmlWebpackPlugin.options.html = htmlWebpackPlugin.options.html || {} %>
<% htmlWebpackPlugin.options.html.head = htmlWebpackPlugin.options.html.head || {} %>
<% htmlWebpackPlugin.options.html.head.meta = htmlWebpackPlugin.options.html.head.meta || [] %>
<% htmlWebpackPlugin.options.html.head.links = htmlWebpackPlugin.options.html.head.links || [] %>
<% htmlWebpackPlugin.options.html.head.scripts = htmlWebpackPlugin.options.html.head.scripts || [] %>
<% htmlWebpackPlugin.options.html.body = htmlWebpackPlugin.options.html.body || {} %>
<% htmlWebpackPlugin.options.html.body.scripts = htmlWebpackPlugin.options.html.body.scripts || [] %>
<% htmlWebpackPlugin.options.html.body.snippet = htmlWebpackPlugin.options.html.body.snippet || '' %>
<% htmlWebpackPlugin.options.window = htmlWebpackPlugin.options.window || {} %>
<% htmlWebpackPlugin.options.googleAnalytics = htmlWebpackPlugin.options.googleAnalytics || false %>

View File

@@ -0,0 +1,23 @@
<% pages = pages || [] %>
<% if (pages.length) { %>
<div id="app-header"></div>
<div id="app-sidebar"></div>
<div class="page-main-wrap">
<div class="page-main-inner">
<div class="custom-page-wrapper">
<h2>Sitemap</h2>
<hr>
<h3>Pages</h3>
<ol>
<% for (p of pages) { %>
<li><a href="./<%= p %>.html"><%= p %></a></li>
<% } %>
</ol>
</div>
</div>
</div>
<% } %>