Skip to content

Commit 4eb59bd

Browse files
author
DNZ\darius
committed
no message
1 parent 41af8df commit 4eb59bd

File tree

12 files changed

+486
-0
lines changed

12 files changed

+486
-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 pixels;
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')({ browsers: 'iOS >= 7, last 2 versions, ie > 7' }),
41+
// minify the result
42+
require('cssnano')()
43+
]
44+
},
45+
},
46+
47+
watch: {
48+
files: 'scss/**/*.scss',
49+
tasks: ['sass', 'postcss'],
50+
options: {
51+
spawn: false,
52+
},
53+
},
54+
55+
});
56+
/*
57+
* Grunt tasks
58+
* Run with grunt or grunt <command> in terminal
59+
*/
60+
grunt.registerTask('default', 'run');
61+
grunt.registerTask('run',
62+
[
63+
'sass',
64+
'postcss',
65+
'watch'
66+
67+
]
68+
);
69+
grunt.registerTask('create_css',
70+
[
71+
'sass',
72+
'postcss'
73+
]
74+
);
75+
};

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# CastleCSS (Full package)
2+
A modular, updatable, easy to use HTML and SCSS framework.
3+
4+
![CastleCSS logo @CastleCss.com](https://www.doordarius.nl/castlecss-logo-250.png)
5+
6+
## What's included?
7+
Included in this package:
8+
- Example project setup
9+
- Gruntfile.js and tasks
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+
- [castlecss-docs (documentation)](https://github.com/CastleCSS/castlecss-docs)
14+
15+
## How to install
16+
CastleCSS is built with easy updating in mind.
17+
You can download the full package and make adjustments as long as you don't update the dependencies (core, buttons, notifications and docs). When you decide to adjust the dependencies, you will lose them with the next update.
18+
19+
There are a few ways to install:
20+
21+
- [Download the latest release](https://github.com/CastleCSS/castlecss/archive/master.zip)
22+
- Clone the package ```git clone https://github.com/CastleCSS/castlecss.git```
23+
- Install via [npm](https://www.npmjs.com/): ```npm install castlecss```
24+
- Add it to your package.json in your own npm package
25+
26+
When downloading or cloning CastleCSS, you have to run ```npm install``` from the directory to get the full package (core, buttons, notifications and docs).
27+
28+
## Updating files
29+
30+
NOTE: Only update the dependencies so that you don't overwrite your own SCSS files. If you do update the full package you'll overwrite everything.
31+
32+
We recommend downloading the full package and updating the dependencies like:
33+
```
34+
npm update castlecss-core
35+
npm update castlecss-buttons
36+
npm update castlecss-notifications
37+
npm update castlecss-docs
38+
```
39+
40+
## Documentation and examples
41+
You can find the documentation and examples at http://www.castlecss.com and included in this package (castlecss-docs)
42+
43+
## Setup
44+
Your project should have a setup similair to this (included in the Full package):
45+
With this you make sure your own variables overwrite the castle-core variables and your setup is still updatable.
46+
47+
```
48+
| Your project/
49+
|
50+
|-- scss/
51+
| |-- /* Custom project specific scss files here */
52+
| |-- main.scss
53+
| |
54+
|-- node_modules/
55+
| |
56+
| | /* CastleCSS files included automatically here */
57+
| | castlecss-core/
58+
| | castlecss-buttons/
59+
| | castlecss-etc ;)/
60+
```
61+
62+
### main.scss
63+
Your main.scss should have a setup similar to this (included in the [CastleCSS (Full package)](https://github.com/CastleCSS/castlecss)):
64+
65+
```
66+
/* castlecss variable files */
67+
@import "path/to/castlecss-core/sass/variables";
68+
69+
70+
/* Your own variables so they overwrite the core */
71+
@import "variables";
72+
/* rest of castle files */
73+
@import "path/to/castlecss-core/sass/main";
74+
@import "path/to/castlecss-buttons/sass/variables";
75+
@import "path/to/castlecss-notifications/sass/variables";
76+
77+
/* Include your own files below this line
78+
--------------------------------------
79+
*/
80+
```

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.

index.html

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title></title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, maximum-scale=1" />
6+
<link rel="stylesheet" href="dist/css/styles.min.css" />
7+
</head>
8+
<body>
9+
<div class="wrapper">
10+
<div class="header">
11+
12+
</div>
13+
<div class="container">
14+
15+
<div id="basicexamples" class="p p-b3-0 mb-2x">
16+
<h2>Basic grid examples</h2>
17+
<p>Here are a few basic grid examples</p>
18+
<div class="g">
19+
<div class="b0_12"><div class="block-small">b0_12</div></div>
20+
<div class="b0_06 b3_12"><div class="block-small">b0_06 b3_12</div></div>
21+
<div class="b0_06 b3_12"><div class="block-small">b0_06 b3_12</div></div>
22+
<div class="b0_06 b3_06"><div class="block-small">b0_06 b3_06</div></div>
23+
<div class="b0_06 b3_18"><div class="block-small">b0_06 b3_18</div></div>
24+
<div class="b0_12 b3_06"><div class="block-small">b0_12 b3_06</div></div>
25+
<div class="b0_12 b3_06"><div class="block-small">b0_12 b3_06</div></div>
26+
<div class="b0_12 b3_06"><div class="block-small">b0_12 b3_06</div></div>
27+
<div class="b0_12 b3_06"><div class="block-small">b0_12 b3_06</div></div>
28+
<div class="b0_12 b3_03"><div class="block-small">b0_12 b3_03</div></div>
29+
<div class="b0_12 b3_03"><div class="block-small">b0_12 b3_03</div></div>
30+
<div class="b0_12 b3_03"><div class="block-small">b0_12 b3_03</div></div>
31+
<div class="b0_12 b3_03"><div class="block-small">b0_12 b3_03</div></div>
32+
<div class="b0_12 b3_06"><div class="block-small">b0_12 b3_06</div></div>
33+
<div class="b0_12 b3_06"><div class="block-small">b0_12 b3_06</div></div>
34+
<div><div class="block-small">auto</div></div>
35+
</div>
36+
<code>
37+
<div class="g">
38+
<div class="b0_12"></div>
39+
<div class="b0_12 b3_12"></div>
40+
<div class="b0_12 b3_12"></div>
41+
<div class="b0_12 b3_06"></div>
42+
<div class="b0_12 b3_18"></div>
43+
<div class="b0_12 b3_06"></div>
44+
<div class="b0_12 b3_06"></div>
45+
<div class="b0_12 b3_06"></div>
46+
<div class="b0_12 b3_06"></div>
47+
<div class="b0_12 b3_03"></div>
48+
<div class="b0_12 b3_03"></div>
49+
<div class="b0_12 b3_03"></div>
50+
<div class="b0_12 b3_03"></div>
51+
<div class="b0_12 b3_06"></div>
52+
<div class="b0_12 b3_06"></div>
53+
<div>auto</div>
54+
</div>
55+
</code>
56+
57+
</div>
58+
59+
<div class="p p-b3-0 mb-2x ta-center">
60+
<h3>More grid examples?</h3>
61+
<a href="http://castlecss.com/grid.html" class="btn">Learn more about the grid</a>
62+
</div>
63+
64+
65+
</div>
66+
<hr />
67+
&nbsp;
68+
<div class="container">
69+
70+
<div id="basiclayout" class="p p-b3-0 mb-2x">
71+
<div class="g">
72+
<div class="b0_12 b3_06">
73+
<div class="block block-border p">
74+
<h2>Menu</h2>
75+
<ul class="list-unstyled">
76+
<li><a href="#1">Link1</a></li>
77+
<li><a href="#2">Link2</a></li>
78+
<li><a href="#3">Link3</a></li>
79+
<li><a href="#4">Link4</a></li>
80+
<li><a href="#5">Link5</a></li>
81+
</ul>
82+
</div>
83+
</div>
84+
<div class="b0_12 b3_18">
85+
<div class="block block-border p">
86+
<h1>Basic layout</h1>
87+
88+
<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>
89+
90+
<h2>Header Level 2</h2>
91+
92+
<ol>
93+
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
94+
<li>Aliquam tincidunt mauris eu risus.</li>
95+
</ol>
96+
97+
<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.</p></blockquote>
98+
99+
<h3>Header Level 3</h3>
100+
101+
<ul>
102+
<li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li>
103+
<li>Aliquam tincidunt mauris eu risus.</li>
104+
</ul>
105+
106+
<pre><code>
107+
#header h1 a {
108+
display: block;
109+
width: 300px;
110+
height: 80px;
111+
}
112+
</code></pre>
113+
</div>
114+
115+
</div>
116+
117+
<div class="p p-b3-0 mb-2x ta-center">
118+
<h3>More examples?</h3>
119+
<a href="http://castlecss.com/grid.html" class="btn">Read the documentation</a>
120+
</div>
121+
</div>
122+
<hr />
123+
&nbsp;
124+
<div class="p p-b3-0 mb-2x ta-center">
125+
<h2>Standard buttons</h2>
126+
<div class="block-small">
127+
128+
<ul class="p-3x list-unstyled">
129+
<a href="#" class="mb btn">standard button</a></li>
130+
<a href="#" class="mb btn-theme01">btn-theme01</a>
131+
<a href="#" class="mb btn-theme02">btn-theme02</a>
132+
<a href="#" class="mb btn-theme03">btn-theme03</a>
133+
<a href="#" class="mb btn-theme04">btn-theme04</a>
134+
<a href="#" class="mb btn-theme05">btn-theme05</a>
135+
</ul>
136+
</div>
137+
</div>
138+
139+
</div>
140+
141+
</div>
142+
143+
</body>
144+
</html>

package.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "castlecss",
3+
"version": "1.0.0",
4+
"description": "CastleCSS is a modulular, mobile first, upgradable SCSS framework",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/CastleCSS/castlecss.git"
12+
},
13+
"keywords": [
14+
"castlecss",
15+
"castle",
16+
"css",
17+
"scss",
18+
"framework",
19+
"building",
20+
"blocks",
21+
"modular"
22+
],
23+
"author": "Darius Rosendahl <darius@denieuwezaak.nl> (http://www.castlecss.com)",
24+
"license": "MIT",
25+
"bugs": {
26+
"url": "https://github.com/CastleCSS/castlecss/issues"
27+
},
28+
"homepage": "http://www.castlecss.com",
29+
"dependencies": {
30+
"castlecss-buttons": "^0.4.1",
31+
"castlecss-core": "^1.7.3",
32+
"castlecss-notifications": "^0.3.0"
33+
},
34+
"devDependencies": {
35+
"autoprefixer": "^6.3.6",
36+
"cssnano": "^3.7.3",
37+
"grunt": "^1.0.1",
38+
"grunt-contrib-watch": "~1.0.0",
39+
"grunt-postcss": "^0.8.0",
40+
"grunt-sass": "^1.0.0",
41+
"jit-grunt": "^0.10.0",
42+
"pixrem": "^3.0.0"
43+
}
44+
}

scss/layout/example.blocks.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* Basic block styling for demo purposes */
2+
.block {
3+
margin-bottom: $margin-default;
4+
padding: $padding-default;
5+
background-color: $color03;
6+
color: $color04;
7+
border-radius: $radius;
8+
}
9+
.block-small {
10+
@extend .block;
11+
font-size: 1.4rem;
12+
}
13+
14+
/* Add a border on a block */
15+
// .block-border {
16+
// border: 1px solid $color02;
17+
// }

scss/layout/example.header.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.header {
2+
width: 100%; height: 100px;
3+
background-color: $theme01;
4+
color: $color01;
5+
}

0 commit comments

Comments
 (0)