Skip to content

Commit e680840

Browse files
authored
Merge pull request #2 from CastleCSS/release/1.0
Release/1.0
2 parents 41af8df + 7713f08 commit e680840

18 files changed

+775
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.log
2+
thumbs.db
3+
4+
node_modules

Gruntfile.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* Grunt Task configuration */
2+
module.exports = function(grunt) {
3+
4+
/* Using jit-grunt for automatically loading all required plugins */
5+
require('jit-grunt')(grunt);
6+
7+
grunt.initConfig({
8+
pkg: grunt.file.readJSON('package.json'),
9+
10+
// Compile Sass to CSS and produce SoureMaps;
11+
sass: {
12+
options: {
13+
sourceMap: false,
14+
outputStyle: 'uncompressed'
15+
},
16+
files: {
17+
src: 'scss/main.scss',
18+
dest: 'dist/css/styles.min.css',
19+
ext: '.css'
20+
}
21+
},
22+
23+
// PostCSS for adding prefixers and setting rem to pixel
24+
postcss: {
25+
dist: {
26+
src: 'dist/css/styles.min.css'
27+
},
28+
options: {
29+
// Rewrite and save sourcemap as seperate file
30+
map: {
31+
inline: false,
32+
annotation: 'styles/'
33+
},
34+
processors: [
35+
// Add fallbacks for rem units
36+
require('pixrem')({
37+
atrules: true
38+
}),
39+
// Add vendor prefixes
40+
require('autoprefixer')({
41+
browsers: 'iOS >= 7, last 2 versions, ie > 7'
42+
}),
43+
// Minify the result
44+
require('cssnano')()
45+
]
46+
}
47+
},
48+
49+
// Watches for changes in your .scss-files and triggers the tasks sass and postcss.
50+
watch: {
51+
files: 'scss/**/*.scss',
52+
tasks: ['sass', 'postcss'],
53+
options: {
54+
spawn: false,
55+
}
56+
}
57+
})
58+
59+
// Grunt Tasks
60+
// Run these by typing 'grunt' or 'grunt <command>' in your terminal.
61+
grunt.registerTask('default', 'run');
62+
grunt.registerTask('run',
63+
[
64+
'sass',
65+
'postcss',
66+
'watch'
67+
]
68+
);
69+
grunt.registerTask('create_css',
70+
[
71+
'sass',
72+
'postcss'
73+
]
74+
);
75+
};

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# CastleCSS Boilerplate
2+
[CastleCSS](https://github.com/CastleCSS/) is a modular, updatable and easy to use HTML and SCSS framework.
3+
Use this Boilerplate to get started with your project right away!
4+
5+
![CastleCSS logo @CastleCss.com](https://www.doordarius.nl/castlecss-logo-250.png)
6+
7+
## What's included?
8+
- A simple and mobile-friendly HTML5 template to kickstart your website
9+
- Configuration for Grunt, to easily compile and minify your Sass files
10+
- [castlecss-core](https://github.com/CastleCSS/castlecss-core)
11+
- [castlecss-buttons](https://github.com/CastleCSS/castlecss-buttons)
12+
- [castlecss-notifications](https://github.com/CastleCSS/castlecss-notifications)
13+
14+
## Get started
15+
1. Clone ```git clone https://github.com/CastleCSS/castlecss.git``` or [download](https://github.com/CastleCSS/castlecss-boilerplate/archive/master.zip) CastleCSS Boilerplate.
16+
2. Set up your project directory and a basic site structure.
17+
3. Run Grunt from your directory by typing ```Grunt``` in the commandline. If you haven't used Grunt before, be sure to check out the Getting Started guide.
18+
4. Add some content, do some styling and include functionality.
19+
5. Run your site locally and see how it all works out!
20+
21+
## Basic structure
22+
The basis structure for your website should look similar like this:
23+
24+
```
25+
| Project directory/
26+
|
27+
|-- node_modules/
28+
| | -- castlecss-core/
29+
| | --castlecss-buttons/
30+
| | --castlecss-notifications/
31+
| |
32+
|-- scss/
33+
| |-- main.scss
34+
| |-- variables.scss
35+
| |
36+
|-- img/
37+
|-- dist/
38+
| |-- styles.min.css
39+
| |-- styles.min.map
40+
| |
41+
|-- index.html
42+
|-- Gruntfile.js
43+
|-- package.json
44+
```
45+
46+
### main.scss
47+
Your main.scss should have the following set-up:
48+
49+
```
50+
/* CastleCSS Core variables */
51+
@import "node_modules/castlecss-core/sass/variables";
52+
53+
/* Your variables */
54+
@import "variables";
55+
56+
/* Remaining Core files and other CastleCSS modules */
57+
@import "node_modules/castlecss-core/sass/main";
58+
@import "node_modules/castlecss-buttons/sass/main";
59+
@import "node_modules/castlecss-notifications/sass/main";
60+
61+
/* Include your own files below this line
62+
-------------------------------------- */
63+
64+
65+
66+
/* --------------------------------------
67+
Include your own files above this line */
68+
69+
@import "node_modules/castlecss-core/sass/base/utility";
70+
@import "node_modules/castlecss-core/sass/base/utility_spacers";
71+
```
72+
73+
## Documentation and examples
74+
Check out http://www.castlecss.com for an extended documentation and more examples!

clean.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<!-- Basic Page Needs -->
5+
<meta charset="utf-8">
6+
<title>Your page title - CastleCSS Clean Boilerplate</title>
7+
<meta name="description" content="">
8+
<meta name="author" content="">
9+
10+
<!-- Mobile Specific Metas -->
11+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1" />
12+
13+
<!-- Fonts -->
14+
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
15+
16+
<!-- CSS -->
17+
<link rel="stylesheet" href="dist/css/styles.min.css" />
18+
19+
<!-- Favicon -->
20+
<link rel="icon" type="image/png" href="img/favicon.png">
21+
</head>
22+
<body>
23+
<div class="wrapper">
24+
<div class="header">
25+
</div>
26+
<section class="p">
27+
<div class="container">
28+
<div class="g">
29+
<div class="b0_12">
30+
<h1>Basic Page</h1>
31+
<p>
32+
This clean.html page is a placeholder with the CSS, font and favicon. Let's add some content!
33+
</p>
34+
<p>
35+
Need help setting things up? Check out the <a href="index.html" target="_blank">CastleCSS examples and layout</a> included in this package to speed things up a bit.
36+
</p>
37+
<p>
38+
Or take a look at the documentation over at <a href="http://www.castlecss.com" target="_blank">www.castlecss.com</a>.
39+
</p>
40+
</div>
41+
</div>
42+
</div>
43+
</section>
44+
</div>
45+
</body>
46+
</html>

dist/css/styles.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/styles.min.css.map

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

img/favicon.png

1.93 KB
Loading

img/logo.png

8.18 KB
Loading

img/logo.svg

Lines changed: 52 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)