diff --git a/_includes/master/assets/css/defaults.css b/_includes/master/assets/css/defaults.css index 386d687ba..0808e5a0f 100644 --- a/_includes/master/assets/css/defaults.css +++ b/_includes/master/assets/css/defaults.css @@ -84,3 +84,195 @@ footer, header, hgroup, menu, nav, section { -o-transition: all .3s cubic-bezier(.2,.3,0,1); transition: all .3s cubic-bezier(.2,.3,0,1); } + +/* @keyframes opacity { + 0% { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.animation-opacity { + animation: opacity .25s ease-in-out; +} + +@keyframes opacity-long { + 0% { + opacity: 0; + } + + 90% { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.animation-opacity-long { + animation: opacity-long 3s ease-in-out; +} + +@keyframes opacity-short { + 0% { + opacity: 0; + } + + 80% { + opacity: 0; + } + + to { + opacity: 1; + } +} + +.animation-opacity-short { + animation: opacity-short 1.5s ease-in-out; +} */ + +@keyframes popup { + 0% { + transform: scale(.93); + opacity: .8; + } + + 50% { + transform: scale(1.02); + opacity: 1; + } + + to { + transform: scale(1); + opacity: 1; + } +} + +.animation-popup { + animation: popup .25s ease-in-out; +} + +@keyframes popup-long { + 0% { + transform: scale(.93); + opacity: 0; + } + + 85% { + transform: scale(.93); + opacity: 0; + } + + 90% { + transform: scale(.93); + opacity: .8; + } + + 95% { + transform: scale(1.02); + opacity: 1; + } + + to { + transform: scale(1); + opacity: 1; + } +} + +.animation-popup-long { + animation: popup-long 3s ease-in-out +} + +@keyframes popup-short { + 0% { + transform: scale(.93); + opacity: 0; + } + + 75% { + transform: scale(.93); + opacity: 0; + } + + 80% { + transform: scale(.93); + opacity: .8; + } + + 90% { + transform: scale(1.02); + opacity: 1; + } + + to { + transform: scale(1); + opacity: 1; + } +} + +.animation-popup-short { + animation: popup-short 1.5s ease-in-out; +} + +@keyframes pulse { + 50% { + opacity: .5; + } +} + +.animation-pulse { + animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; +} + +@keyframes shimmer { + 0% { + background-position: 0 50%; + } + + 50% { + background-position: 100% 50%; + } + + to { + background-position: 0 50%; + } +} + +.animation-shimmer { + animation: shimmer 3s ease-out infinite alternate; +} + +@keyframes wiggle { + 0%, + 20%, + 80%, + to { + transform: rotate(0deg); + } + + 30%, + 60% { + transform: rotate(-2deg); + } + + 40%, + 70% { + transform: rotate(2deg); + } + + 45% { + transform: rotate(-4deg); + } + + 55% { + transform: rotate(4deg); + } +} + +.animation-wiggle { + animation: wiggle 1.5s ease-in-out infinite; +} diff --git a/_includes/master/modules/user/dashboard.html b/_includes/master/modules/user/dashboard.html index 9f2d4a63c..c5c6edef5 100644 --- a/_includes/master/modules/user/dashboard.html +++ b/_includes/master/modules/user/dashboard.html @@ -36,6 +36,23 @@

Error!

'> +
+
+
Error! message = message || ''; } + // Set status self.status = status; console.log('[Dashboard] display', self.id, 'status=', status, 'state=', state, 'message=', message); @@ -282,21 +305,30 @@

Error!

.each(function ($el) { var s = $el.getAttribute('data-status'); + // If we are in the correct status if (s === status) { + + // Show the element $el.removeAttribute('hidden'); + // If no message, quit because we don't want to show empty feedback + if (!message) { return } + + // Set the status message + $statusMessage + .each(function ($el) { + $el.innerHTML = message; + }) + + // Attempt to show a toast try { var toast = new bootstrap.Toast($el, {autohide: false}) toast.show(); } catch (e) { // console.warn('[Dashboard] Unable to create error toast', e); } - - $statusMessage - .each(function ($el) { - $el.innerHTML = message; - }) } else { + // Hide the element $el.setAttribute('hidden', true); } }) @@ -330,6 +362,9 @@

Error!

} } + // Run onStatus + self._handler.onStatus(status, message); + return self; }; @@ -411,6 +446,14 @@

Error!

return self; }; + Dashboard.prototype.onChange = function (fn) { + var self = this; + + self._handler.onChange = fn; + + return self; + }; + Dashboard.prototype.onSubmit = function (fn) { var self = this; @@ -419,10 +462,10 @@

Error!

return self; }; - Dashboard.prototype.onChange = function (fn) { + Dashboard.prototype.onStatus = function (fn) { var self = this; - self._handler.onChange = fn; + self._handler.onStatus = fn; return self; }; diff --git a/_websrc/gulp_tasks/master/_prefill.js b/_websrc/gulp_tasks/master/_prefill.js index e9d743269..963ceadfd 100644 --- a/_websrc/gulp_tasks/master/_prefill.js +++ b/_websrc/gulp_tasks/master/_prefill.js @@ -136,7 +136,7 @@ gulp.task('_prefill', () => { // only create these files if NOT on template if (!tools.isTemplate) { - + await createFile(`.vscode/settings.json`, await readFile('./_websrc/templates/master/vscode/settings.json')); } // only create these files if IS ON template and IS NOT server @@ -254,25 +254,28 @@ function generateCommonModules() { return contents; } -async function createFile(file, contents) { +async function createFile(file, contents, options) { const response = { exists: false, - error: null, } + options = options || {}; + options.overwrite = typeof options.overwrite === 'undefined' ? false : options.overwrite; + return new Promise(function(resolve, reject) { try { - if (jetpack.exists(file)) { - response.exists = true; + // Check if file exists + response.exists = jetpack.exists(file); + + // If file exists and force is not true, resolve + if (response.exists && !options.overwrite) { resolve(response) } else { - jetpack.write(file, contents); - response.exists = false; - resolve(response); + jetpack.write(file, contents); + resolve(response); } } catch (e) { - response.error = e; - reject(response); + reject(e); } }); } diff --git a/_websrc/templates/master/vscode/settings.json b/_websrc/templates/master/vscode/settings.json new file mode 100644 index 000000000..a0f34cce0 --- /dev/null +++ b/_websrc/templates/master/vscode/settings.json @@ -0,0 +1,8 @@ +// Workspace settings +{ + // The following will hide certian files from the file explorer + "files.exclude": { + // Hide any files with /master/ in the path + "**/master/**": true, + } +} diff --git a/package.json b/package.json index b95e9e013..0d6a70687 100755 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Ultimate Jekyll starter project including full setup for gulp, Sass, Autoprefixer, PostCSS, webpack, imagemin, Browsersync etc.", "main": "index.js", "scripts": { - "preinstall": "bundle update && bundle install", + "preinstall": "bundle install && bundle update", "start": "npm run _start -- --skipImageMin='true' --skipESLint='true' --skipJSMin='true'", "_start": "bundle exec gulp clean:jekyll && bundle exec gulp", "dist": "git add . && git commit -m 'Published pages' && git push origin", diff --git a/special/master/feeds/posts-copy.xml b/special/master/feeds/posts-copy.xml new file mode 100644 index 000000000..7c345fd6d --- /dev/null +++ b/special/master/feeds/posts-copy.xml @@ -0,0 +1,56 @@ +--- +layout: null +permalink: /feeds/posts-old.xml +--- + + + Jekyll + + + {{ site.time | date_to_xmlschema }} + {{ site.url }}{{ post.url }} + {{ site.brand.name }} + + {{ site.brand.description }} + + + {% assign sortedFeed = site.posts | limit:10 | sort: 'date' | reverse %} + + {% for post in sortedFeed %} + {%- capture post-title -%} + {%- if post.meta.title -%} + {{ post.meta.title }} + {%- else -%} + {{ post.post.title }} + {%- endif -%} + {%- endcapture -%} + + + {{ post-title }} + + {{ post.date | date_to_xmlschema }} + {{ post.date | date_to_xmlschema }} + + {{ site.url }}{{ post.url }} + + {{ site.url }}/assets/images/blog/posts/post-{{ post.post.id }}/{{ post.url | split: "/" | last }}.jpg + {{ site.url }}/assets/images/blog/posts/post-{{ post.post.id }}/{{ post.url | split: "/" | last }}.jpg + + {{ post.content | liquify | markdownify }} + + + {{ site.brand.name }} + + + + {% if post.meta.description %} + {{ post.meta.description }} + {% else %} + {{ post.post.excerpt }} + {% endif %} + + + + {% endfor %} + + diff --git a/special/master/feeds/posts.xml b/special/master/feeds/posts.xml index 5cdb77569..e230c6e05 100644 --- a/special/master/feeds/posts.xml +++ b/special/master/feeds/posts.xml @@ -3,54 +3,79 @@ layout: null permalink: /feeds/posts.xml --- - - Jekyll - - - {{ site.time | date_to_xmlschema }} - {{ site.url }}{{ post.url }} - {{ site.brand.name }} - - {{ site.brand.description }} - + + + + + <![CDATA[ + {{ site.brand.name }} Blog + ]]> + + + + + + {{ site.url }}/blog + + + Jekyll {{ jekyll.version }} + + + {{ site.time | date: "%a, %d %b %Y %H:%M:%S" }} GMT + - {% assign sortedFeed = site.posts | limit:10 | sort: 'date' | reverse %} + {% assign sortedFeed = site.posts | limit:10 | sort: 'date' | reverse %} - {% for post in sortedFeed %} - {%- capture post-title -%} - {%- if post.meta.title -%} - {{ post.meta.title }} - {%- else -%} - {{ post.post.title }} - {%- endif -%} - {%- endcapture -%} - - - {{ post-title }} - - {{ post.date | date_to_xmlschema }} - {{ post.date | date_to_xmlschema }} - - {{ site.url }}{{ post.url }} - - {{ site.url }}/assets/images/blog/posts/post-{{ post.post.id }}/{{ post.url | split: "/" | last }}.jpg - {{ site.url }}/assets/images/blog/posts/post-{{ post.post.id }}/{{ post.url | split: "/" | last }}.jpg - - {{ post.content | liquify | markdownify }} - - - {{ site.brand.name }} - - - - {% if post.meta.description %} - {{ post.meta.description }} - {% else %} - {{ post.post.excerpt }} - {% endif %} - - - - {% endfor %} - - + {% for post in sortedFeed %} + {%- capture post-title -%} + {%- if post.meta.title -%} + {{ post.meta.title }} + {%- else -%} + {{ post.post.title }} + {%- endif -%} + {%- endcapture -%} + + + <![CDATA[ + {{ post-title }} + ]]> + + + {{ site.url }}{{ post.url }} + + + {{ site.url }}{{ post.url }} + + + {{ post.date | date: "%a, %d %b %Y %H:%M:%S" }} GMT + + + + + + + + + + + + + + + {% endfor %} + + diff --git a/special/master/pages/admin/posts/create.html b/special/master/pages/admin/posts/create.html index 472d2d2d6..0df53ac06 100644 --- a/special/master/pages/admin/posts/create.html +++ b/special/master/pages/admin/posts/create.html @@ -1383,8 +1383,8 @@

Aw snap!

} function randomizeHeaderImage() { - var search = dom.select('#headerImageKeywords').getValue() || dom.select('#excerpt').getValue() || dom.select('#title').getValue() - var url = 'https://api.unsplash.com/photos/random?client_id=' + UNSPLASH_API_KEY + '&orientation=landscape&query=' + encodeURIComponent(search) + var search = dom.select('#headerImageKeywords').getValue() || dom.select('#excerpt').getValue() || dom.select('#title').getValue(); + var url = 'https://api.unsplash.com/photos/random?client_id=' + UNSPLASH_API_KEY + '&orientation=landscape&query=' + encodeURIComponent(search); var $unsplashCredits = dom.select('#unsplash-credits'); var $unsplashCreditsArtist = dom.select('#unsplash-credits-artist'); // console.log('===url', url);