Skip to content

Commit 0fe1981

Browse files
authored
Add files via upload
1 parent c2b408f commit 0fe1981

File tree

20 files changed

+1315
-0
lines changed

20 files changed

+1315
-0
lines changed

themes/cactus/_config.yml

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
##############################################################################
2+
# Content
3+
##############################################################################
4+
5+
# Link to a page that gives an overview of all your projects.
6+
# This can be an external link (e.g., to you GitHub profile) or to another
7+
# page within your website.
8+
projects_url: http://github.com/probberechts
9+
10+
# Set the page direction to RTL or LTR. default is LTR. (if you set it 'rtl', the 'vazir' font will be loaded.)
11+
direction: ltr
12+
# Configure the navigation menu.
13+
# A pair 'Key: url' will result in a link to 'url' with the name 'Key' in the
14+
# navigation menu. Optionally, you can add translations for the 'Key' in
15+
# languages/*.yml
16+
nav:
17+
home: /
18+
about: /about/
19+
articles: /archives/
20+
projects: http://github.com/probberechts
21+
22+
23+
# Links to your social media accounts.
24+
# The 'icon' keys should correspond to Fontawesome icon names
25+
# (see https://fontawesome.com/icons?d=gallery&s=brands);
26+
# only 'mail' is an exception.
27+
# You can optionally add a 'label' key to set the title attribute on the link.
28+
# 'icon' value will be used as title when 'label' is missing.
29+
social_links:
30+
-
31+
icon: github
32+
link: http://github.com/probberechts/cactus-dark
33+
-
34+
icon: twitter
35+
link: /
36+
-
37+
icon: facebook
38+
link: /
39+
-
40+
icon: mail
41+
link: mailto:name@email.com
42+
-
43+
icon: mastodon
44+
label: mastodon.social
45+
link: https://mastodon.social/@alice
46+
-
47+
icon: mastodon
48+
label: fosstodon.org
49+
link: https://fosstodon.org/@alice
50+
51+
# Customize the overview with displaying a tagcloud on the index page.
52+
# Options: https://hexo.io/docs/helpers.html#tagcloud
53+
tags_overview: false
54+
55+
# Customize the overview with the most recent blog posts on the index page.
56+
# Options:
57+
# - show_all_posts: whether to show all available posts.
58+
# - post_count: whether to show only the x most recent posts.
59+
# - sort_updated: sort posts by last modification date instead of creation date.
60+
posts_overview:
61+
show_all_posts: false
62+
post_count: 5
63+
sort_updated: false
64+
65+
# Customize the archive view.
66+
# Options:
67+
# - sort_updated: sort posts by last modification date instead of creation date.
68+
# Note: this does not work together with pagination, since the pagination
69+
# plugin will sort pages by date of creation.
70+
archive:
71+
sort_updated: false
72+
73+
# Customize the article view.
74+
# Options:
75+
# - show_updated: show the last modification date.
76+
post:
77+
show_updated: false
78+
79+
# Customize the copyright years
80+
# Note: if start_year/end_year not provided, will use current year.
81+
copyright:
82+
start_year: 2016
83+
end_year:
84+
85+
# Customize the 404 page
86+
# Options:
87+
# - enabled: whether to enable the 404 page (404.html).
88+
error_404:
89+
enabled: true
90+
title: "404 Page Not Found"
91+
description: "The page you are looking for might have been removed, had its name changed, or is temporarily unavailable."
92+
93+
94+
##############################################################################
95+
# Look and Feel
96+
##############################################################################
97+
98+
# Customize the logo (i.e., the cactus) in the header.
99+
# Options:
100+
# - enabled: whether to show (true) or hide (false) the logo.
101+
# - width: width of the logo in pixel units
102+
# - height: height of the logo in pixel units
103+
# - url: where the logo can be found
104+
# - gravatar: whether to use your Gravatar as the logo
105+
# - grayout: whether to enable a hover effect on the logo
106+
logo:
107+
enabled: true
108+
width: 50
109+
height: 50
110+
url: /images/logo.png
111+
gravatar: false
112+
grayout: true
113+
114+
# Customize the favicons.
115+
# Cactus supports a limited set of the three most important icons:
116+
# - desktop: The classic favion.ico file.
117+
# - android: A 192x192 PNG file.
118+
# - apple: A 180x180 PNG file.
119+
# These can be generated with http://realfavicongenerator.net/
120+
# Options:
121+
# - url: where the icon can be found
122+
# - gravatar: whether to create a favicon from your Gravatar
123+
favicon:
124+
desktop:
125+
url: /images/favicon.ico
126+
gravatar: false
127+
android:
128+
url: /images/favicon-192x192.png
129+
gravatar: false
130+
apple:
131+
url: /images/apple-touch-icon.png
132+
gravatar: false
133+
134+
# The color scheme that should be used to highlight codeblocks.
135+
# See source/css/_highlight for a list of all available color schemes.
136+
# highlight: rainbow
137+
138+
# Set the color scheme.
139+
# Available color schemes are 'dark', 'light', 'classic' and 'white'.
140+
# Alternatively, add your own custom color scheme to source/css/_colors.
141+
colorscheme: dark
142+
143+
# Maximal width of the page in rem units.
144+
page_width: 48
145+
146+
147+
##############################################################################
148+
# Miscellaneous
149+
##############################################################################
150+
151+
# Enable or disable the RSS feed.
152+
rss: false
153+
154+
# Turn your web pages into graph objects (see http://ogp.me).
155+
open_graph:
156+
fb_app_id:
157+
fb_admins:
158+
twitter_id:
159+
google_plus:
160+
161+
162+
##############################################################################
163+
# Plugins
164+
##############################################################################
165+
166+
# Enable MathJax support for Latex
167+
mathjax:
168+
enabled: false
169+
170+
# Fill in your Disqus Comments Shortname to enable Disqus comments.
171+
disqus:
172+
enabled: false
173+
shortname: cactus-1
174+
175+
# Fill in your Utterances data to enable Utterances comments
176+
utterances:
177+
enabled: false
178+
repo: owner/githubrepo
179+
issue_term: pathname
180+
label: Comment
181+
theme: github-dark
182+
183+
# Fill in your Google Analytics tracking ID to enable Google Analytics.
184+
google_analytics:
185+
enabled: false
186+
id: UA-86660611-1
187+
188+
# Fill in your Baidu Analytics tracking ID to enable Baidu Analytics.
189+
baidu_analytics:
190+
enabled: false
191+
id: 2e6da3c375c8a87f5b664cea6d4cb29c
192+
193+
# Fill in your Cloudflare Analytics tracking ID to enable Cloudflare Analytics.
194+
cloudflare_analytics:
195+
enabled: false
196+
id: 0dabb6e21848405483a237e6a7b6ed04
197+
198+
# Fill in your Umami Analytics tracking ID to enable Umami Analytics.
199+
umami_analytics:
200+
enabled: false
201+
id: e77e68be-f6e4-4br3-9365-2b76b57cd571
202+
host: https://analytics.domain.com
203+
script_name: umami.js
204+
205+
# Fill in you Gravatar email or hash if you want to use your gravatar as the
206+
# logo and/or favicons of you website.
207+
# To generate hash: `$ echo -n "name@email.com" | md5`.
208+
gravatar:
209+
email: name@email.com
210+
hash: d41d8cd98f00b204e9800998ecf8427e
211+
212+
# loads libraries and styles from CDN instead or relying on local files
213+
cdn:
214+
enable: true
215+
jquery: https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
216+
clipboard: https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.7/clipboard.min.js
217+
font_awesome: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css
218+
justified_gallery_css: https://cdnjs.cloudflare.com/ajax/libs/justifiedGallery/3.8.1/css/justifiedGallery.min.css
219+
justified_gallery_js: https://cdnjs.cloudflare.com/ajax/libs/justifiedGallery/3.8.1/js/jquery.justifiedGallery.min.js

themes/cactus/gulpfile.js

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
import decompress from 'gulp-decompress';
2+
import { deleteAsync } from 'del';
3+
import download from "gulp-download-stream";
4+
import fs from 'fs';
5+
import gulp from 'gulp';
6+
import path from 'path';
7+
import stylint from 'gulp-stylint';
8+
import stylelintFormatter from 'stylelint-formatter-pretty';
9+
import jshint from 'gulp-jshint';
10+
import jshintFormatter from 'jshint-stylish';
11+
import yaml from 'js-yaml';
12+
13+
14+
gulp.task('lib:clean',function(){
15+
return deleteAsync([ './source/lib/*' ]);
16+
})
17+
18+
gulp.task('lib:fontAwesome',function(){
19+
return gulp.src([
20+
'node_modules/@fortawesome/fontawesome-free/webfonts/*',
21+
'node_modules/@fortawesome/fontawesome-free/css/all.min.css'
22+
], {base: 'node_modules/@fortawesome/fontawesome-free'})
23+
.pipe(gulp.dest('./source/lib/font-awesome'))
24+
})
25+
26+
gulp.task('lib:download_mesloFont', function () {
27+
return download('https://github.com/andreberg/Meslo-Font/raw/master/dist/v1.2.1/Meslo%20LG%20v1.2.1.zip?raw=true')
28+
.pipe(gulp.dest("/tmp"));
29+
})
30+
31+
gulp.task('lib:install_mesloFont', function () {
32+
return gulp.src('/tmp/Meslo%20LG%20v1.2.1.zip')
33+
.pipe(decompress({
34+
filter: file => path.extname(file.path) == '.ttf',
35+
strip: 1
36+
}))
37+
.pipe(gulp.dest('./source/lib/meslo-LG'));
38+
});
39+
40+
gulp.task('lib:vazirFont',function(){
41+
return gulp.src([
42+
'node_modules/vazir-font/dist/*',
43+
], {base: 'node_modules/vazir-font/dist'})
44+
.pipe(gulp.dest('./source/lib/vazir-font'))
45+
})
46+
47+
gulp.task('lib:justifiedGallery',function(){
48+
return gulp.src([
49+
'node_modules/justifiedGallery/dist/css/*.min.css',
50+
'node_modules/justifiedGallery/dist/js/*.min.js'
51+
], {base: 'node_modules/justifiedGallery/dist'})
52+
.pipe(gulp.dest('./source/lib/justified-gallery'))
53+
})
54+
55+
gulp.task('lib:jQuery',function(){
56+
return gulp.src(['node_modules/jquery/dist/jquery.min.js'])
57+
.pipe(gulp.dest('./source/lib/jquery'))
58+
})
59+
60+
gulp.task('lib:clipboard',function(){
61+
return gulp.src(['node_modules/clipboard/dist/clipboard.min.js'])
62+
.pipe(gulp.dest('./source/lib/clipboard'))
63+
})
64+
65+
gulp.task('lint:js', function() {
66+
return gulp.src([
67+
'./source/js/**/*.js',
68+
]).pipe(jshint())
69+
.pipe(jshint.reporter(jshintFormatter));
70+
});
71+
72+
gulp.task('lint:stylus', function () {
73+
return gulp.src([
74+
'./source/css/*.styl',
75+
'./source/css/_partial/*.styl',
76+
'./source/css/_colors/*.styl'
77+
]).pipe(stylint({
78+
config: '.stylintrc',
79+
reporters: [
80+
{formatter: stylelintFormatter, console: true}
81+
]
82+
}))
83+
});
84+
85+
gulp.task('validate:config', function(cb) {
86+
var themeConfig = fs.readFileSync(path.join(path.resolve(), '_config.yml'));
87+
88+
try {
89+
yaml.load(themeConfig);
90+
cb();
91+
} catch(error) {
92+
cb(new Error(error));
93+
}
94+
});
95+
96+
gulp.task('validate:languages', function(cb) {
97+
var languagesPath = path.join(path.resolve(), 'languages');
98+
var languages = fs.readdirSync(languagesPath);
99+
var errors = [];
100+
for (var i in languages) {
101+
var languagePath = path.join(languagesPath, languages[i]);
102+
try {
103+
yaml.load(fs.readFileSync(languagePath), {
104+
filename: path.relative(path.resolve(), languagePath)
105+
});
106+
} catch(error) {
107+
errors.push(error);
108+
}
109+
}
110+
if (errors.length == 0) {
111+
cb();
112+
} else {
113+
cb(errors);
114+
}
115+
});
116+
117+
gulp.task('lib', gulp.series(
118+
'lib:clean', 'lib:jQuery', 'lib:clipboard', 'lib:fontAwesome',
119+
'lib:download_mesloFont', 'lib:install_mesloFont', 'lib:vazirFont',
120+
'lib:justifiedGallery'));
121+
gulp.task('lint', gulp.parallel('lint:js', 'lint:stylus'));
122+
gulp.task('validate', gulp.parallel('validate:config', 'validate:languages'));
123+
gulp.task('default', gulp.parallel('lint', 'validate'));

0 commit comments

Comments
 (0)