This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @* | |
| Image Processor's WebP plugin must be installed via nuget first. | |
| https://www.nuget.org/packages/ImageProcessor.Plugins.WebP/ | |
| *@ | |
| <picture> | |
| <source srcset="@Model.Image.GetCropUrl(300, 300, furtherOptions: "&format=webp&quality=80")" type="image/webp"> | |
| <img src="@Model.Image.GetCropUrl(300, 300)" width="300" height="300" loading="lazy" alt="@Model.Image.Name" /> | |
| </picture> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @* /Views/Partials/ResponsiveImage.cshtml *@ | |
| @inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage | |
| @using Umbraco.Cms.Core.Media | |
| @using Umbraco.Cms.Core.Models.PublishedContent | |
| @using Umbraco.Cms.Core.Routing | |
| @{ | |
| var publishedContent = @ViewData["publishedContent"] as IPublishedContent ?? null; | |
| var lazyLoading = @ViewData["lazyLoading"] ?? false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function () { | |
| var lazyloadBgImages = document.querySelectorAll(".lazybg"); | |
| if ("IntersectionObserver" in window) { | |
| var bgImageObserver = new IntersectionObserver(function (entries, observer) { | |
| entries.forEach(function (entry) { | |
| if (entry.isIntersecting) { | |
| var image = entry.target; | |
| image.style["background-image"] = "url('" + image.dataset.bgsrc + "')"; | |
| image.classList.remove("lazybg"); | |
| bgImageObserver.unobserve(image); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @using Newtonsoft.Json.Linq | |
| @{ | |
| var questions = Model.Value<IEnumerable<IPublishedElement>>("questions"); | |
| } | |
| <script type="application/ld+json"> | |
| @{ | |
| var structuredData = | |
| new JObject( | |
| new JProperty("@context", "https://schema.org"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "functions", | |
| "description": "Cloud Functions for Firebase", | |
| "scripts": { | |
| "lint": "eslint .", | |
| "serve": "firebase serve --only functions", | |
| "shell": "firebase functions:shell", | |
| "start": "npm run shell", | |
| "deploy": "firebase deploy --only functions", | |
| "logs": "firebase functions:log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| // So that you have access to the dialogflow and conversation object | |
| const { dialogflow } = require('actions-on-google'); | |
| // So you have access to the request response stuff >> functions.https.onRequest(app) | |
| const functions = require('firebase-functions'); | |
| // Create an instance of dialogflow for your app | |
| const app = dialogflow({debug: true}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Gulp 3 Task | |
| var gulp = require("gulp"); | |
| var rename = require('gulp-rename'); | |
| var coreScripts = []; // your main scripts | |
| gulp.task('scripts', function () { | |
| return gulp.src(coreScripts) | |
| .pipe(concat('global.js')) | |
| .pipe(gulp.dest('blah/html/js')) | |
| .pipe(rename('global.min.js')) | |
| .pipe(gulp.dest('blah/html/js')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ReadMe in msbuild repo: https://github.com/jhaker/nodejs-msbuild | |
| var gulp = require("gulp"); | |
| var _msbuild = require('msbuild'); | |
| var config = require("./gulp-config.json"); // use this to store all your .csproj/.sln related project details | |
| const msbuildTask = function (cb) { | |
| var msbuild = new _msbuild(cb); | |
| msbuild.sourcePath = config.project; | |
| msbuild.config('version', '16.0'); | |
| msbuild.configuration = config.buildConfiguration; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="application/ld+json"> | |
| @{ | |
| JObject structuredData = | |
| new JObject( | |
| new JProperty("@context", "https://schema.org"), | |
| new JProperty("@type", "FAQPage"), | |
| new JProperty("mainEntity", | |
| new JArray( | |
| from item in questions | |
| select new JObject( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const gulp = require('gulp'); | |
| // SCSS related requires | |
| const sass = require('gulp-sass'); | |
| const autoprefixer = require('gulp-autoprefixer'); | |
| const sassCompiler = require('./gulp-tasks/scss-compiler'); | |
| const changed = require('gulp-changed'); | |
| const defaulSCSSTasks = gulp.parallel( | |
| sassCompiler(gulp, sass, changed, autoprefixer, 'scss/*.scss'), |
NewerOlder