Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'fj/master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
retif committed Nov 23, 2020
2 parents 3884048 + d33a2be commit c63eaff
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 24 deletions.
1 change: 1 addition & 0 deletions js/gated-content/.browserslistrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
IE 11
> 1%
last 2 versions
not dead
5 changes: 5 additions & 0 deletions js/gated-content/.postcssrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": {
"autoprefixer": {"grid": "autoplace"}
}
}
10 changes: 9 additions & 1 deletion js/gated-content/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
[
'@vue/cli-plugin-babel/preset', {
useBuiltIns: 'entry',
corejs: {
version: 3,
proposals: true,
},
},
],
],
};
2 changes: 1 addition & 1 deletion js/gated-content/dist/gated-content.css

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions js/gated-content/dist/gated-content.umd.min.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion js/gated-content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@
"dev": "vue-cli-service build --target lib --formats umd-min --name gated-content src/main.js --watch"
},
"dependencies": {
"@vue/babel-preset-app": "^3.12.1",
"axios": "^0.19.2",
"babel-polyfill": "^6.26.0",
"bootstrap": "^4.4.1",
"calendar-link": "^1.3.0",
"core-js": "^3.6.4",
"core-js": "^3.7.0",
"qs": "^6.9.4",
"regenerator-runtime": "^0.13.7",
"vue": "^2.6.11",
"vue-router": "^3.1.6",
"vue-video-wrapper": "^1.0.10",
"vuex": "^3.1.3"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/preset-env": "^7.6.2",
"@vue/cli-plugin-babel": "~4.3.0",
"@vue/cli-plugin-eslint": "~4.3.0",
"@vue/cli-plugin-router": "~4.3.0",
Expand Down
17 changes: 17 additions & 0 deletions js/gated-content/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import router from './router';
import store from './store';
import filters from './filters';
import Log from './plugins/log';
import 'core-js/stable';
import 'regenerator-runtime/runtime';

Vue.use(Log);

Expand All @@ -19,4 +21,19 @@ new Vue({
components: {
App,
},
mounted() {
const app = this;

if ('-ms-scroll-limit' in document.documentElement.style
&& '-ms-ime-align' in document.documentElement.style) {
window.addEventListener('hashchange',
() => {
const currentPath = window.location.hash.slice(1);
if (app.$route.path !== currentPath) {
app.$router.replace(currentPath);
}
},
false);
}
},
}).$mount('#gated-content');
21 changes: 17 additions & 4 deletions js/gated-content/src/scss/components/_blog-listing.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
.blog-listing {
padding-top: 30px;
display: grid;
grid-gap: 30px;
grid-column-gap: 30px;
grid-template-columns: 1fr;
grid-template-rows: repeat(10, auto);

> * {
margin-top: 30px;
}

@media all and (max-width: 600px) {
grid-gap: 10px;
padding-top: 10px;
grid-column-gap: 10px;
grid-template-columns: 1fr;
grid-template-rows: repeat(10, auto);

> * {
margin-top: 10px;
}
}

@media all and (min-width: 600px) {
grid-column-gap: 30px;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(10, auto);
}

@media all and (min-width: 1200px) {
grid-column-gap: 30px;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(10, auto);
}
}
22 changes: 17 additions & 5 deletions js/gated-content/src/scss/components/_category-listing.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
.category-listing {
padding-top: 30px;
display: grid;
grid-gap: 30px;
grid-template-columns: 1fr;
grid-column-gap: 30px;
grid-template-rows: repeat(10, auto);

> * {
margin-top: 30px;
}

@media all and (max-width: 600px) {
grid-gap: 10px;
padding-top: 10px;
grid-column-gap: 10px;
grid-template-columns: 1fr;
grid-template-rows: repeat(10, auto);

> * {
margin-top: 10px;
}
}

@media all and (min-width: 600px) {
grid-column-gap: 30px;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(10, auto);
}

@media all and (min-width: 1200px) {
grid-column-gap: 30px;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(10, auto);
}
}
12 changes: 10 additions & 2 deletions js/gated-content/src/scss/components/_video-listing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,25 @@
}

.video-listing {
padding-top: 30px;
display: grid;
grid-gap: 30px;
grid-column-gap: 30px;
grid-template-columns: 1fr;
grid-template-rows: repeat(10, auto);

> * {
margin-top: 30px;
}

@media all and (min-width: 600px) {
grid-column-gap: 30px;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(10, auto);
}

@media all and (min-width: 1200px) {
grid-column-gap: 30px;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(10, auto);
}
}

Expand Down
2 changes: 2 additions & 0 deletions js/gated-content/src/scss/views/_video-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
display: grid;
grid-gap: 10px;
grid-template-columns: 1fr;
grid-template-rows: auto;
color: $gallery;

@media all and (min-width: 600px) {
grid-template-columns: 3fr 1.2fr;
grid-template-rows: auto;
grid-gap: 30px;
}

Expand Down
3 changes: 3 additions & 0 deletions js/gated-content/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ module.exports = {
patterns: [path.resolve(__dirname, './src/scss/global.scss')],
},
},
transpileDependencies: [
/\w+/,
],
};
6 changes: 5 additions & 1 deletion modules/openy_gc_log/js/logger.behaviors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
(function ($, Drupal) {
Drupal.behaviors.openy_gc_log_subscribe = {
attach: function (context) {
document.body.addEventListener('virtual-y-log', (event) => {
// Only run this script on full documents, not ajax requests.
if (context !== document) {
return;
}
document.body.addEventListener('virtual-y-log', function (event) {
$.ajax({
url: "/virtual-y/log",
method: "POST",
Expand Down

0 comments on commit c63eaff

Please sign in to comment.