Compare commits

..

No commits in common. "826339a610d26574e80e57abda02f543dfeebbfa" and "f1a4c41e91370ede2b5d5381e576e02f30d4c2df" have entirely different histories.

13 changed files with 731 additions and 1232 deletions

View file

@ -14,7 +14,7 @@ class Blog extends DashboardModel
public static $dashboard_type = 'edit';
public static $dashboard_display = [ 'header-image', 'title', 'created_at' ];
public static $dashboard_display = [ 'title', 'created_at' ];
public static $dashboard_columns = [
[ 'name' => 'user_id', 'type' => 'user' ],

935
composer.lock generated

File diff suppressed because it is too large Load diff

848
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -8,9 +8,9 @@
"browser-sync": "3.0.2"
},
"dependencies": {
"@babel/core": "7.24.9",
"@babel/preset-env": "7.24.8",
"@fortawesome/fontawesome-free": "6.6.0",
"@babel/core": "7.24.7",
"@babel/preset-env": "7.24.7",
"@fortawesome/fontawesome-free": "6.5.2",
"autonumeric": "4.10.5",
"autoprefixer": "10.4.19",
"axios": "1.7.2",
@ -29,21 +29,20 @@
"gulp-sass-glob": "1.1.0",
"gulp-strip-debug": "4.0.0",
"gulp-uglify-es": "3.0.0",
"gulp5-sass-plugin": "^2.0.0",
"gulp5-sass-plugin": "^1.0.0",
"jquery": "3.7.1",
"list.js": "2.3.1",
"minimist": "1.2.8",
"ordered-read-streams": "^2.0.0",
"postcss": "8.4.40",
"sass": "^1.77.8",
"postcss": "8.4.38",
"sortablejs": "1.15.2",
"spinkit": "2.0.1",
"terser-webpack-plugin": "5.3.10",
"vue": "3.4.34",
"vue": "3.4.27",
"vue-loader": "17.4.2",
"vue-router": "4.4.0",
"vue-router": "4.3.3",
"vuex": "4.1.0",
"webpack": "5.93.0",
"webpack": "5.91.0",
"what-input": "5.2.12"
}
}

View file

@ -1,5 +1,4 @@
// Sass modules
@use "sass:color";
@use "sass:math";
// Base font size

View file

@ -1,5 +1,4 @@
// Sass modules
@use "sass:color";
@use "sass:math";
// Base font size
@ -25,9 +24,9 @@ $enable-smooth-scroll: false;
// Colours
$c-text: #111; // text
$c-text-inactive: color.adjust($c-text, $alpha: -0.25); // inactive text
$c-text-inactive: fade-out($c-text, 0.25); // inactive text
$c-text-light: #fff; // light text
$c-text-light-inactive: color.adjust($c-text-light, $alpha: -0.25); // inactive light text
$c-text-light-inactive: fade-out($c-text-light, 0.25); // inactive light text
$c-input-bg: #fff; // white
$c-dashboard-error: #a80000;
$c-dashboard-dark: #111;
@ -202,7 +201,7 @@ body {
@include media-breakpoint-down(lg) {
padding-right: pxrem(8);
padding-left: pxrem(8);
background-color: color.adjust($c-dashboard-dark, $lightness: -2%);
background-color: darken($c-dashboard-dark, 2%);
color: $c-text-light-inactive;
}
@ -216,13 +215,13 @@ body {
&:hover, &:focus {
@include media-breakpoint-up(lg) {
background-color: color.adjust(#000, $alpha: -0.97);
background-color: fade-out(#000, 0.97);
}
}
&.active {
@include media-breakpoint-up(lg) {
background-color: color.adjust(#000, $alpha: -0.93);
background-color: fade-out(#000, 0.93);
}
}
}
@ -259,9 +258,9 @@ body {
@include font-sans-bold;
position: relative;
padding: pxrem(9) pxrem(15);
border-top: 1px solid color.adjust($c-dashboard-dark, $lightness: -5%);
border-right: 1px solid color.adjust($c-dashboard-dark, $lightness: -5%);
border-left: 1px solid color.adjust($c-dashboard-dark, $lightness: -5%);
border-top: 1px solid darken($c-dashboard-dark, 5%);
border-right: 1px solid darken($c-dashboard-dark, 5%);
border-left: 1px solid darken($c-dashboard-dark, 5%);
background-color: $c-dashboard-dark;
color: $c-dashboard-light;
font-size: pxrem(14);
@ -288,7 +287,7 @@ body {
.card-body {
padding: pxrem(15);
background-color: color.adjust($c-dashboard-light, $lightness: 1%);
background-color: lighten($c-dashboard-light, 1%);
&.dashboard {
@include media-breakpoint-down(md) {
@ -313,7 +312,7 @@ body {
margin-top: pxrem(2);
margin-left: pxrem(10);
height: pxrem(32);
border: 1px solid color.adjust($c-text, $alpha: -0.75);
border: 1px solid fade-out($c-text, 0.75);
border-radius: pxrem(4);
}
}
@ -322,7 +321,7 @@ body {
margin-bottom: pxrem(10);
width: 100%;
padding: pxrem(3) pxrem(8);
border: 1px solid color.adjust(#000, $alpha: -0.875);
border: 1px solid fade-out(#000, 0.875);
border-radius: 0.25rem;
@include media-breakpoint-down(md) {
@ -335,7 +334,7 @@ body {
margin-top: pxrem(10);
margin-bottom: pxrem(10);
padding: pxrem(5) pxrem(10);
border: 1px solid color.adjust($c-dashboard-dark, $lightness: -5%);
border: 1px solid darken($c-dashboard-dark, 5%);
border-radius: pxrem(5);
background-color: $c-dashboard-dark;
color: $c-text-light;
@ -363,7 +362,7 @@ body {
&:focus {
border-color: $c-dashboard-dark;
box-shadow: inset 0 pxrem(1) pxrem(1) color.adjust(#000, $alpha: -0.925), 0 0 pxrem(8) color.adjust($c-dashboard-dark, $alpha: -0.4);
box-shadow: inset 0 pxrem(1) pxrem(1) fade-out(#000, 0.925), 0 0 pxrem(8) fade-out($c-dashboard-dark, 0.4);
}
}
@ -390,7 +389,7 @@ body {
}
span {
border: 1px solid color.adjust($c-text, $lightness: 50%);
border: 1px solid lighten($c-text, 50%);
border-radius: pxrem(4);
background-color: $c-input-bg;
pointer-events: none;
@ -459,18 +458,18 @@ body {
}
.btn {
border-color: color.adjust($c-dashboard-dark, $lightness: -5%);
border-color: darken($c-dashboard-dark, 5%);
background-color: $c-dashboard-dark;
color: $c-text-light;
font-size: pxrem(14);
transition: background-color 100ms;
&:hover {
background-color: color.adjust($c-dashboard-dark, $lightness: -5%);
background-color: darken($c-dashboard-dark, 5%);
}
&:focus {
background-color: color.adjust($c-dashboard-dark, $lightness: 5%);
background-color: lighten($c-dashboard-dark, 5%);
}
&, &:hover, &:focus {
@ -489,42 +488,42 @@ body {
}
&.btn-warning {
border-color: color.adjust($c-dashboard-edit, $lightness: -10%);
border-color: darken($c-dashboard-edit, 10%);
background-color: $c-dashboard-edit;
&:hover {
background-color: color.adjust($c-dashboard-edit, $lightness: -5%);
background-color: darken($c-dashboard-edit, 5%);
}
&:focus {
background-color: color.adjust($c-dashboard-edit, $lightness: 5%);
background-color: lighten($c-dashboard-edit, 5%);
}
}
&.btn-danger {
border-color: color.adjust($c-dashboard-delete, $lightness: -10%);
border-color: darken($c-dashboard-delete, 10%);
background-color: $c-dashboard-delete;
&:hover {
background-color: color.adjust($c-dashboard-delete, $lightness: -5%);
background-color: darken($c-dashboard-delete, 5%);
}
&:focus {
background-color: color.adjust($c-dashboard-delete, $lightness: 5%);
background-color: lighten($c-dashboard-delete, 5%);
}
}
&.btn-secondary {
border-color: color.adjust($c-dashboard-light, $lightness: -10%);
border-color: darken($c-dashboard-light, 10%);
background-color: $c-dashboard-light;
color: $c-text;
&:hover {
background-color: color.adjust($c-dashboard-light, $lightness: -5%);
background-color: darken($c-dashboard-light, 5%);
}
&:focus {
background-color: color.adjust($c-dashboard-light, $lightness: 5%);
background-color: lighten($c-dashboard-light, 5%);
}
}
@ -766,7 +765,7 @@ body {
transition: background-color 150ms;
&:hover {
background-color: color.adjust(#000, $alpha: -0.97);
background-color: fade-out(#000, 0.97);
text-decoration: none;
}
}
@ -856,8 +855,8 @@ body {
display: inline-block;
.image-preview {
@include aspect-ratio(16, 9);
display: block;
aspect-ratio: 16/9;
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
@ -954,7 +953,7 @@ form {
.list {
margin-bottom: pxrem(15);
padding-bottom: pxrem(15);
border-bottom: 1px solid color.adjust($c-text, $alpha: -0.9);
border-bottom: 1px solid fade-out($c-text, 0.9);
&-template, &-data {
display: none;
@ -965,7 +964,7 @@ form {
margin-bottom: pxrem(10);
padding: pxrem(8) pxrem(8) pxrem(8) pxrem(33);
border-radius: pxrem(6);
background-color: color.adjust($c-input-bg, $lightness: -2%);
background-color: darken($c-input-bg, 2%);
@include media-breakpoint-up(lg) {
display: flex;
@ -1093,7 +1092,7 @@ form {
&-delete {
min-width: pxrem(70);
height: $label-height;
border: 1px solid color.adjust($c-text, $alpha: -0.75);
border: 1px solid fade-out($c-text, 0.75);
border-radius: pxrem(4);
background-color: $c-dashboard-delete;
color: $c-text-light;
@ -1103,7 +1102,7 @@ form {
&-add-button {
height: $label-height;
border: 1px solid color.adjust($c-text, $alpha: -0.75);
border: 1px solid fade-out($c-text, 0.75);
border-radius: pxrem(4);
@include media-breakpoint-down(lg) {
@ -1152,7 +1151,7 @@ form {
&:not([type="file"]) {
padding: pxrem(5) pxrem(8);
border: 1px solid color.adjust($c-dashboard-light, $lightness: -10%);
border: 1px solid darken($c-dashboard-light, 10%);
border-radius: pxrem(2);
transition: border-color 150ms;
@ -1238,22 +1237,22 @@ form {
}
&.view {
border: 1px solid color.adjust($c-dashboard-dark, $lightness: -5%);
border: 1px solid darken($c-dashboard-dark, 5%);
background-color: $c-dashboard-dark;
color: $c-text-light;
&:hover {
background-color: color.adjust($c-dashboard-dark, $lightness: 5%);
background-color: lighten($c-dashboard-dark, 5%);
}
}
&.delete {
border: 1px solid color.adjust($c-dashboard-delete, $lightness: -5%);
border: 1px solid darken($c-dashboard-delete, 5%);
background-color: $c-dashboard-delete;
color: $c-text-light;
&:hover {
background-color: color.adjust($c-dashboard-delete, $lightness: 5%);
background-color: lighten($c-dashboard-delete, 5%);
}
}
}
@ -1321,10 +1320,10 @@ form {
}
.image-display {
@include aspect-ratio(1, 1);
position: relative;
width: 100%;
aspect-ratio: 1/1;
border: 1px solid color.adjust($c-dashboard-light, $lightness: -10%);
border: 1px solid darken($c-dashboard-light, 10%);
border-radius: pxrem(3);
background-position: center center;
background-size: cover;
@ -1345,14 +1344,14 @@ form {
width: pxrem(40);
height: pxrem(40);
min-height: 0;
border: 1px solid color.adjust($c-dashboard-light, $lightness: -14%);
border: 1px solid darken($c-dashboard-light, 14%);
border-radius: pxrem(3);
background-color: color.adjust($c-dashboard-light, $lightness: -10%);
background-color: darken($c-dashboard-light, 10%);
line-height: 1;
cursor: pointer;
&:hover {
background-color: color.adjust($c-dashboard-light, $lightness: -7%);
background-color: darken($c-dashboard-light, 7%);
}
}
@ -1377,8 +1376,8 @@ form {
&.user-profile-update {
@include media-breakpoint-down(lg) {
border-top: 1px solid color.adjust($c-dashboard-light, $lightness: -10%);
border-bottom: 1px solid color.adjust($c-dashboard-light, $lightness: -10%);
border-top: 1px solid darken($c-dashboard-light, 10%);
border-bottom: 1px solid darken($c-dashboard-light, 10%);
}
@include media-breakpoint-up(lg) {
@ -1387,8 +1386,8 @@ form {
width: 100%;
padding: 0px $grid-gutter-width;
flex-grow: 1;
border-right: 1px solid color.adjust($c-dashboard-light, $lightness: -10%);
border-left: 1px solid color.adjust($c-dashboard-light, $lightness: -10%);
border-right: 1px solid darken($c-dashboard-light, 10%);
border-left: 1px solid darken($c-dashboard-light, 10%);
}
}
@ -1430,7 +1429,7 @@ form {
visibility: hidden;
width: 100%;
height: 100%;
background-color: color.adjust(color.adjust($c-dashboard-light, $lightness: 1%), $alpha: -0.6);
background-color: fade-out(lighten($c-dashboard-light, 1%), 0.6);
opacity: 0;
transition: opacity 250ms;
@ -1454,7 +1453,7 @@ form {
padding: $grid-gutter-width;
justify-content: center;
align-items: center;
background-color: color.adjust(color.adjust($c-dashboard-light, $lightness: 1%), $alpha: -0.3);
background-color: fade-out(lighten($c-dashboard-light, 1%), 0.3);
opacity: 0;
transition: opacity 250ms;

View file

@ -0,0 +1,8 @@
@mixin aspect-ratio($width, $height) {
&:before {
content: "";
display: block;
width: 100%;
padding-top: (math.div($height, $width) * 100%);
}
}

View file

@ -6,7 +6,7 @@
}
.blog-entry {
border: 1px solid color.adjust($c-base, $lightness: 75%);
border: 1px solid lighten($c-base, 75%);
border-radius: pxrem(5);
@include media-breakpoint-up(md) {
@ -24,8 +24,8 @@
background-repeat: no-repeat;
@include media-breakpoint-down(md) {
@include aspect-ratio(3, 1);
width: 100%;
aspect-ratio: 3/1;
}
@include media-breakpoint-up(md) {
@ -55,7 +55,7 @@
}
&-info {
color: color.adjust($c-text, $lightness: 30%);
color: lighten($c-text, 30%);
}
&-body {

View file

@ -7,13 +7,13 @@
margin-bottom: pxrem(20);
width: 100%;
padding: pxrem(5) pxrem(10);
border: pxrem(2) solid color.adjust($c-base, $alpha: -0.75);
border: pxrem(2) solid fade-out($c-base, 0.75);
background-color: rgba(255, 255, 255, 0.8);
font-size: pxrem(14);
transition: border $trans-speed;
&:focus {
border: pxrem(2) solid color.adjust($c-accent, $alpha: -0.4);
border: pxrem(2) solid fade-out($c-accent, 0.4);
}
&.error {
@ -28,7 +28,7 @@
.submit {
@include font-sans-bold;
background-color: color.adjust($c-accent, $lightness: 5%);
background-color: lighten($c-accent, 5%);
color: $c-text-light;
text-align: center;
transition: background-color $trans-speed;
@ -46,7 +46,7 @@
.notification {
margin: 0px auto pxrem(15) auto;
padding: pxrem(5) pxrem(10);
background-color: color.adjust($c-error, $lightness: 15%);
background-color: lighten($c-error, 15%);
color: $c-text-light;
font-size: pxrem(14);
text-align: center;

View file

@ -133,7 +133,7 @@
transition: background-color 150ms;
&:not(.active):hover {
background-color: color.adjust($c-base, $lightness: 5%);
background-color: lighten($c-base, 5%);
}
}
@ -150,7 +150,7 @@
}
&:not(.active):hover {
color: color.adjust($c-text-light, $lightness: -5%);
color: darken($c-text-light, 5%);
}
}

View file

@ -1,9 +1,9 @@
.subscription-form-section-component {
$trans-speed: 100ms;
width: pxrem(200);
border: pxrem(2) solid color.adjust($c-base, $alpha: -0.75);
border: pxrem(2) solid fade-out($c-base, 0.75);
border-radius: pxrem(3);
background-color: color.adjust($c-base, $lightness: 75%);
background-color: lighten($c-base, 75%);
.notification {
padding: pxrem(2);
@ -14,7 +14,7 @@
margin: pxrem(5);
width: calc(100% - #{pxrem(10)});
padding: pxrem(3);
border: pxrem(2) solid color.adjust($c-base, $alpha: -0.75);
border: pxrem(2) solid fade-out($c-base, 0.75);
font-size: pxrem(14);
text-align: center;
transition: border-color $trans-speed;

View file

@ -24,7 +24,8 @@ const babel = require("gulp-babel"),
const isProduction = minimist(process.argv.slice(2)).production !== undefined;
// Declare plugin settings
const sassPaths = "node_modules",
const sassOutputStyle = isProduction ? "compressed" : "expanded",
sassPaths = "node_modules",
autoprefixerSettings = { remove: false, cascade: false };
// Include browsersync when gulp has not been run with --production
@ -79,8 +80,8 @@ const cssDashboardLibs = [
// Paths to folders containing fonts that should be copied to public/fonts/
const fontPaths = [
"resources/fonts/*",
"node_modules/@fortawesome/fontawesome-free/webfonts/*"
"resources/fonts/**",
"node_modules/@fortawesome/fontawesome-free/webfonts/**"
];
// Handle errors
@ -101,15 +102,10 @@ function processSass(filename) {
const css = gulp.src(`resources/sass/${filename}.scss`)
.pipe(plumber(handleError))
.pipe(sassGlob())
.pipe(sass({ quietDeps: true }))
.pipe(sass({ outputStyle: sassOutputStyle }))
.pipe(postCSS([ autoprefixer(autoprefixerSettings) ]))
.pipe(concat(`${filename}.css`));
if (isProduction) {
css.pipe(cleanCSS());
}
css.pipe(gulp.dest("public/css/"));
.pipe(concat(`${filename}.css`))
.pipe(gulp.dest("public/css/"));
if (!isProduction) {
css.pipe(browserSync.stream({ match: `**/${filename}.css` }));
@ -204,7 +200,7 @@ gulp.task("js-dashboard-libs", () => {
// Task to copy fonts
gulp.task("fonts", (done) => {
gulp.src(fontPaths, { encoding: false })
gulp.src(fontPaths)
.pipe(plumber(handleError))
.pipe(gulp.dest("public/fonts/"));

View file

@ -8,9 +8,9 @@
"browser-sync": "3.0.2"
},
"dependencies": {
"@babel/core": "7.24.9",
"@babel/preset-env": "7.24.8",
"@fortawesome/fontawesome-free": "6.6.0",
"@babel/core": "7.24.7",
"@babel/preset-env": "7.24.7",
"@fortawesome/fontawesome-free": "6.5.2",
"autonumeric": "4.10.5",
"autoprefixer": "10.4.19",
"bootstrap": "5.3.3",
@ -27,13 +27,12 @@
"gulp-sass-glob": "1.1.0",
"gulp-strip-debug": "4.0.0",
"gulp-uglify-es": "3.0.0",
"gulp5-sass-plugin": "^2.0.0",
"gulp5-sass-plugin": "^1.0.0",
"jquery": "3.7.1",
"list.js": "2.3.1",
"minimist": "1.2.8",
"ordered-read-streams": "^2.0.0",
"postcss": "8.4.40",
"sass": "^1.77.8",
"postcss": "8.4.38",
"sortablejs": "1.15.2",
"spinkit": "2.0.1",
"what-input": "5.2.12"