Skip to content

Commit 31bb739

Browse files
add navidrome and update gulpfile
1 parent 7705406 commit 31bb739

File tree

4 files changed

+77
-59
lines changed

4 files changed

+77
-59
lines changed

gulpfile.js

+64-48
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,30 @@ const header = require("gulp-header");
1010
const merge = require("merge-stream");
1111
const plumber = require("gulp-plumber");
1212
const rename = require("gulp-rename");
13-
const sass = require("gulp-sass");
13+
const sass = require("gulp-sass")(require("sass"));
1414
const uglify = require("gulp-uglify");
1515

1616
// Load package.json for banner
17-
const pkg = require('./package.json');
17+
const pkg = require("./package.json");
1818

1919
// Set the banner content
20-
const banner = ['/*!\n',
21-
' * Start Bootstrap - <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n',
22-
' * Copyright 2013-' + (new Date()).getFullYear(), ' <%= pkg.author %>\n',
23-
' * Licensed under <%= pkg.license %> (https://github.com/BlackrockDigital/<%= pkg.name %>/blob/master/LICENSE)\n',
24-
' */\n',
25-
'\n'
26-
].join('');
20+
const banner = [
21+
"/*!\n",
22+
" * Start Bootstrap - <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n",
23+
" * Copyright 2013-" + new Date().getFullYear(),
24+
" <%= pkg.author %>\n",
25+
" * Licensed under <%= pkg.license %> (https://github.com/BlackrockDigital/<%= pkg.name %>/blob/master/LICENSE)\n",
26+
" */\n",
27+
"\n",
28+
].join("");
2729

2830
// BrowserSync
2931
function browserSync(done) {
3032
browsersync.init({
3133
server: {
32-
baseDir: "./"
34+
baseDir: "./",
3335
},
34-
port: 3000
36+
port: 3000,
3537
});
3638
done();
3739
}
@@ -50,23 +52,28 @@ function clean() {
5052
// Bring third party dependencies from node_modules into vendor directory
5153
function modules() {
5254
// Bootstrap JS
53-
var bootstrap = gulp.src('./node_modules/bootstrap/dist/js/**/*')
54-
.pipe(gulp.dest('./vendor/bootstrap/js'));
55+
var bootstrap = gulp
56+
.src("./node_modules/bootstrap/dist/js/**/*")
57+
.pipe(gulp.dest("./vendor/bootstrap/js"));
5558
// Font Awesome
56-
var fontAwesome = gulp.src('./node_modules/@fortawesome/**/*')
57-
.pipe(gulp.dest('./vendor'));
59+
var fontAwesome = gulp
60+
.src("./node_modules/@fortawesome/**/*")
61+
.pipe(gulp.dest("./vendor"));
5862
// jQuery Easing
59-
var jqueryEasing = gulp.src('./node_modules/jquery.easing/*.js')
60-
.pipe(gulp.dest('./vendor/jquery-easing'));
63+
var jqueryEasing = gulp
64+
.src("./node_modules/jquery.easing/*.js")
65+
.pipe(gulp.dest("./vendor/jquery-easing"));
6166
// Magnific Popup
62-
var magnificPopup = gulp.src('./node_modules/magnific-popup/dist/*')
63-
.pipe(gulp.dest('./vendor/magnific-popup'));
67+
var magnificPopup = gulp
68+
.src("./node_modules/magnific-popup/dist/*")
69+
.pipe(gulp.dest("./vendor/magnific-popup"));
6470
// jQuery
65-
var jquery = gulp.src([
66-
'./node_modules/jquery/dist/*',
67-
'!./node_modules/jquery/dist/core.js'
71+
var jquery = gulp
72+
.src([
73+
"./node_modules/jquery/dist/*",
74+
"!./node_modules/jquery/dist/core.js",
6875
])
69-
.pipe(gulp.dest('./vendor/jquery'));
76+
.pipe(gulp.dest("./vendor/jquery"));
7077
return merge(bootstrap, fontAwesome, jquery, jqueryEasing, magnificPopup);
7178
}
7279

@@ -75,22 +82,30 @@ function css() {
7582
return gulp
7683
.src("./scss/**/*.scss")
7784
.pipe(plumber())
78-
.pipe(sass({
79-
outputStyle: "expanded",
80-
includePaths: "./node_modules",
81-
}))
85+
.pipe(
86+
sass({
87+
outputStyle: "expanded",
88+
includePaths: "./node_modules",
89+
})
90+
)
8291
.on("error", sass.logError)
83-
.pipe(autoprefixer({
84-
browsers: ['last 2 versions'],
85-
cascade: false
86-
}))
87-
.pipe(header(banner, {
88-
pkg: pkg
89-
}))
92+
.pipe(
93+
autoprefixer({
94+
browsers: ["last 2 versions"],
95+
cascade: false,
96+
})
97+
)
98+
.pipe(
99+
header(banner, {
100+
pkg: pkg,
101+
})
102+
)
90103
.pipe(gulp.dest("./css"))
91-
.pipe(rename({
92-
suffix: ".min"
93-
}))
104+
.pipe(
105+
rename({
106+
suffix: ".min",
107+
})
108+
)
94109
.pipe(cleanCSS())
95110
.pipe(gulp.dest("./css"))
96111
.pipe(browsersync.stream());
@@ -99,18 +114,19 @@ function css() {
99114
// JS task
100115
function js() {
101116
return gulp
102-
.src([
103-
'./js/*.js',
104-
'!./js/*.min.js'
105-
])
117+
.src(["./js/*.js", "!./js/*.min.js"])
106118
.pipe(uglify())
107-
.pipe(header(banner, {
108-
pkg: pkg
109-
}))
110-
.pipe(rename({
111-
suffix: '.min'
112-
}))
113-
.pipe(gulp.dest('./js'))
119+
.pipe(
120+
header(banner, {
121+
pkg: pkg,
122+
})
123+
)
124+
.pipe(
125+
rename({
126+
suffix: ".min",
127+
})
128+
)
129+
.pipe(gulp.dest("./js"))
114130
.pipe(browsersync.stream());
115131
}
116132

Loading
388 KB
Loading

index.html

+13-11
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,23 @@
7878
</div>
7979
</section>
8080

81-
<!-- About Section -->
82-
<!-- <section class="about" id="about">
83-
<div class="intro">
84-
<h2>Hi, I'm James!</h2>
85-
<hr class="divider_left light my-4">
86-
<p>I'm an MSCi Computer Science graduate from the University of Birmingham. I have a keen interest in
87-
software development and programming. This is my personal site so feel free to have a look at some of the
88-
projects I've done.</p>
89-
</div>
90-
</section> -->
91-
9281
<!-- Projects Section -->
9382
<div class="projects" id="portfolio">
9483
<div class="container-fluid p-0">
9584
<div class="row no-gutters">
85+
<div class="col-lg-4 col-sm-6">
86+
<a class="portfolio-box" href="https://medium.com/@curlyw42/self-hosted-music-streaming-on-a-raspberry-pi-9f3ab7568352" target="_blank">
87+
<img class="img-fluid" src="img/portfolio/thumbnails/navidrome.png" alt=""> <!--Credit: Harrison Broadbent (https://unsplash.com/photos/c3YpscwJb04)-->
88+
<div class="portfolio-box-caption">
89+
<div class="project-category text-white-50">
90+
Raspberry Pi
91+
</div>
92+
<div class="project-name">
93+
Self-hosted music streaming
94+
</div>
95+
</div>
96+
</a>
97+
</div>
9698
<div class="col-lg-4 col-sm-6">
9799
<a class="portfolio-box" href="https://jamesatk.in/which-zelda" target="_blank">
98100
<img class="img-fluid" src="img/portfolio/thumbnails/which_zelda.png" alt="">

0 commit comments

Comments
 (0)