Skip to content

Commit b8add86

Browse files
authored
Merge pull request #91 from zevisert/staging
Release v1.5.1
2 parents 7bea096 + 202175f commit b8add86

8 files changed

Lines changed: 5621 additions & 4373 deletions

File tree

package-lock.json

Lines changed: 5524 additions & 4370 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"koa-static": "^5.0.0",
3939
"mjml": "^4.5.1",
4040
"mongoose": "^5.8.0",
41-
"nunjucks": "^3.2.0",
41+
"nunjucks": "^3.2.2",
4242
"passport-local": "^1.0.0",
4343
"passport-local-mongoose": "^5.0.1",
4444
"prpl-server": "^1.4.0",
@@ -66,7 +66,7 @@
6666
"eslint": "^5.11.0",
6767
"gulp": "^4.0.1",
6868
"gulp-concat": "^2.6.1",
69-
"gulp-nodemon": "^2.4.2",
69+
"gulp-nodemon": "^2.5.0",
7070
"gulp-rename": "^1.3.0",
7171
"gulp-replace": "^1.0.0",
7272
"gulp-sourcemaps": "^2.6.4",

server/src/config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ export const db_connect = (server) => {
7070
await mongoose.connect(process.env.MONGO_URL, {
7171
user: process.env.MONGO_USER,
7272
pass: process.env.MONGO_PW,
73-
useNewUrlParser: true
73+
useNewUrlParser: true,
74+
useUnifiedTopology: true
7475
});
7576

7677
if ((await User.countDocuments({admin: true})) < 1) {

src/actions/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ const loadPage = (page, subPage) => dispatch => {
5151
case appStr.pages.cart:
5252
import('../components/cart/index.js');
5353
break;
54+
case appStr.pages.tour:
55+
import('../components/virtual-tour/index.js');
56+
break;
5457
case appStr.pages.admin:
5558
if (subPage) {
5659
if (subPage === 'change-password') {

src/components/about/index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ class About extends connect(store)(PageViewElement) {
4343
width: 100%;
4444
}
4545
46+
.about-video {
47+
max-width: 1200px;
48+
width: 100%;
49+
/* 16:9 aspect ratio */
50+
padding-top: calc(100% * 9 / 16);
51+
position: relative;
52+
}
53+
54+
.about-video > iframe {
55+
position: absolute;
56+
top: 0;
57+
left: 0;
58+
height: 100%;
59+
width: 100%;
60+
}
61+
4662
section {
4763
font-size: xx-large;
4864
}
@@ -61,9 +77,19 @@ class About extends connect(store)(PageViewElement) {
6177
<article>
6278
<h2 class="title">Welcome to <br>Zuzana Riha Art</h2>
6379
<img class="about-img" src="images/about-bg.jpg">
80+
6481
<p>
6582
${this.__lines.map(line => html`${line}<br>`)}
6683
</p>
84+
85+
<div class="about-video">
86+
<iframe
87+
allowfullscreen
88+
src="https://player.vimeo.com/video/472820112"
89+
frameborder="0"
90+
allow="autoplay; fullscreen; picture-in-picture"
91+
></iframe>
92+
</div>
6793
</article>
6894
</section>
6995
`;
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* @license
3+
* Copyright (c) Zev Isert, All rights reserved
4+
* This code is used under the licence available at https://github.com/zevisert/zuzi-site/LICENCE.txt
5+
*/
6+
7+
import { html } from '@polymer/lit-element';
8+
import { PageViewElement } from '../page-view-element.js';
9+
10+
// These are the shared styles needed by this element.
11+
import { SharedStyles } from '../shared-styles.js';
12+
13+
class Virtual extends PageViewElement {
14+
15+
static get is() { return 'virtual-tour-page'; }
16+
17+
render() {
18+
return html`
19+
${SharedStyles}
20+
<style>
21+
22+
article {
23+
display: flex;
24+
flex-direction: column;
25+
align-items: center;
26+
height: auto;
27+
max-width: 1200px;
28+
margin: 0 auto;
29+
padding: 0;
30+
overflow: hidden;
31+
text-align: center;
32+
}
33+
34+
iframe {
35+
overflow: hidden;
36+
height: 80vh;
37+
width: 100%;
38+
}
39+
40+
</style>
41+
<section>
42+
<article>
43+
<span>November 2020 Art Show</span>
44+
<iframe
45+
width="100%"
46+
height="100%"
47+
src="https://my.matterport.com/show/?m=A8HFnGeF8Vz"
48+
frameborder="0"
49+
allowfullscreen
50+
allow="xr-spatial-tracking">
51+
</iframe>
52+
</article>
53+
</section>
54+
`;
55+
}
56+
}
57+
58+
window.customElements.define(Virtual.is, Virtual);

src/components/zuzi-app/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ class ZuziApp extends connect(store)(LitElement) {
164164
<nav-box title="About" page="${this._page}" target="${str.pages.about}"></nav-box>
165165
<nav-box title="Gallery" page="${this._page}" target="${str.pages.gallery}"></nav-box>
166166
<nav-box title="Cart" page="${this._page}" target="${str.pages.cart}"></nav-box>
167+
<nav-box title="Tour" page="${this._page}" target="${str.pages.tour}"></nav-box>
167168
${(() => {
168169
if (this._loggedIn) {
169170
return html`<nav-box title="Admin" page="${this._page}" target="${str.pages.admin}"></nav-box>`
@@ -184,6 +185,10 @@ class ZuziApp extends connect(store)(LitElement) {
184185
?active="${this._page === str.pages.gallery && this._subPage === null}">
185186
</gallery-view>
186187
188+
<virtual-tour-page class="page"
189+
?active="${this._page === str.pages.tour && this._subPage === null}">
190+
</virtual-tour-page>
191+
187192
<gallery-item class="page"
188193
?active="${this._page === str.pages.gallery && this._subPage !== null}">
189194
</gallery-item>

src/components/zuzi-app/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ export const pages = {
1010
cart: "cart",
1111
login: "login",
1212
admin: "admin",
13+
tour: "tour",
1314
none: "no-view"
1415
};

0 commit comments

Comments
 (0)