Skip to content

Commit 9a29aaf

Browse files
committed
starter-file dump w gulp
1 parent 2c42226 commit 9a29aaf

File tree

14 files changed

+8047
-0
lines changed

14 files changed

+8047
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.MD

Whitespace-only changes.

frontend/src/scripts/app.js

Whitespace-only changes.

frontend/src/styles/app.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import "util/index";
2+
@import "base/index";
3+
@import "components/index";

frontend/src/styles/base/_base.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@import url("https://fonts.cdnfonts.com/css/gotham-rounded");
2+
3+
* {
4+
margin: 0;
5+
padding: 0;
6+
box-sizing: border-box;
7+
font-family: "Gotham Rounded", sans-serif;
8+
&::-webkit-scrollbar {
9+
}
10+
&::-webkit-scrollbar-thumb {
11+
}
12+
}

frontend/src/styles/base/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "base";

frontend/src/styles/components/_index.scss

Whitespace-only changes.

frontend/src/styles/util/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "variables", "mixins";

frontend/src/styles/util/_mixins.scss

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
@mixin flex($direction, $wrapping, $justification, $alignment) {
2+
@content;
3+
display: flex;
4+
flex-direction: $direction;
5+
flex-wrap: $wrapping;
6+
justify-content: $justification;
7+
align-items: $alignment;
8+
}
9+
10+
@mixin center-flex() {
11+
@content;
12+
display: flex;
13+
justify-content: center;
14+
align-items: center;
15+
}
16+
17+
@mixin size($height, $width) {
18+
@content;
19+
height: $height;
20+
width: $width;
21+
}
22+
23+
@mixin simple-size($size) {
24+
@content;
25+
height: $size;
26+
width: $size;
27+
}
28+
29+
@mixin strict-height($height) {
30+
@content;
31+
height: $height;
32+
min-height: $height;
33+
max-height: $height;
34+
}
35+
36+
@mixin strict-width($width) {
37+
@content;
38+
width: $width;
39+
min-width: $width;
40+
max-width: $width;
41+
}
42+
43+
@mixin responsive($min, $max, $gap) {
44+
display: grid;
45+
grid-template-columns: repeat(auto-fill, minmax($min, $max));
46+
gap: $gap;
47+
}
48+
49+
@mixin wrapper($width) {
50+
@content;
51+
width: 100%;
52+
max-width: $width;
53+
margin: 0 auto;
54+
}
55+
56+
@mixin text-overflow($lines) {
57+
@content;
58+
display: -webkit-box;
59+
text-overflow: ellipsis;
60+
overflow: hidden;
61+
-webkit-box-orient: vertical;
62+
-webkit-line-clamp: $lines;
63+
}
64+
65+
@mixin absolute-center($position: null) {
66+
@content;
67+
position: absolute;
68+
position: $position;
69+
top: 50%;
70+
left: 50%;
71+
transform: translate(-50%, -50%);
72+
}
73+
74+
@mixin radius($radius) {
75+
@content;
76+
border-radius: $radius;
77+
}
78+
79+
@mixin bg($color) {
80+
@content;
81+
background-color: $color;
82+
}
83+
84+
@mixin glass($blur) {
85+
@content;
86+
backdrop-filter: blur($blur);
87+
}
88+
89+
@mixin bs($color) {
90+
@content;
91+
box-shadow: 0 3px 0 $color;
92+
}
93+
94+
@mixin theme-transition {
95+
@content;
96+
transition: background 0.5s ease, color 0.5s ease;
97+
}
98+
99+
@mixin break($breakpoint) {
100+
@if map-has-key($breakpoints, $breakpoint) {
101+
@media (min-width: map-get($breakpoints, $breakpoint)) {
102+
@content;
103+
}
104+
} @else {
105+
@warn "No breakpoint matching: `#{$breakpoint}`."
106+
+ "Available breakpoints are #{map-keys($breakpoints),}.";
107+
}
108+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$breakpoints: (
2+
// smalls
3+
"small": 320px,
4+
"mobile": 320px,
5+
// mediums
6+
"smedium": 500px,
7+
"medium": 768px,
8+
"tablet": 768px,
9+
// larges
10+
"large": 1024px,
11+
"desktop": 1024px,
12+
// extra larges
13+
"xlarge": 1200px,
14+
"xxlarge": 1440px,
15+
"widescreen": 1440px
16+
) !default;

gulpfile.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const packages = {
2+
gulp: { src, dest, series, watch } = require('gulp'),
3+
scss: require('gulp-sass')(require('sass')),
4+
autoPrefix: require('gulp-autoprefixer'),
5+
min: {
6+
css: require('gulp-clean-css'),
7+
js: require('gulp-terser')
8+
}
9+
};
10+
const config = {
11+
path: {
12+
styles: {
13+
src: './frontend/src/styles/**/*.scss',
14+
dest: './frontend/dist/styles/'
15+
},
16+
scripts: {
17+
src: './frontend/src/scripts/**/*.js',
18+
dest: './frontend/dist/scripts/'
19+
}
20+
},
21+
tasks: {
22+
styles: () => {
23+
return packages.gulp.src(config.path.styles.src)
24+
.pipe(packages.scss())
25+
.pipe(packages.autoPrefix('last 2 versions'))
26+
.pipe(packages.min.css())
27+
.pipe(packages.gulp.dest(config.path.styles.dest));
28+
},
29+
scripts: () => {
30+
return packages.gulp.src(config.path.scripts.src)
31+
.pipe(packages.min.js())
32+
.pipe(packages.gulp.dest(config.path.scripts.dest));
33+
},
34+
watch: () => {
35+
packages.gulp.watch(
36+
[config.path.styles.src, config.path.scripts.src],
37+
packages.gulp.series(config.tasks.styles, config.tasks.scripts)
38+
);
39+
}
40+
}
41+
}
42+
43+
exports.default = packages.gulp.series(
44+
config.tasks.styles,
45+
config.tasks.scripts,
46+
config.tasks.watch
47+
);

index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<!-- favicon -->
8+
<!-- <link rel="shortcut icon" href="./frontend/dist/images/favicon.png" type="image/x-icon"> -->
9+
<!-- animation library -->
10+
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/> -->
11+
<!-- styles -->
12+
<link rel="stylesheet" href="./frontend/dist/styles/app.css" />
13+
<!-- fontawesome library -->
14+
<!-- <script src="https://kit.fontawesome.com/6e358658ed.js" crossorigin="anonymous"></script> -->
15+
<title>Document</title>
16+
</head>
17+
<body></body>
18+
</html>

0 commit comments

Comments
 (0)