Skip to content

Commit 3d67bc4

Browse files
committed
WIP: first Origin candidate
1 parent 4dec908 commit 3d67bc4

File tree

149 files changed

+3648
-2915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+3648
-2915
lines changed

Gruntfile.js

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,11 @@ module.exports = function(grunt) {
1313
},
1414
dist: {
1515
files: {
16-
'css/primer.css': 'scss/primer.scss'
16+
'assets/css/origin.css': 'assets/scss/origin.scss'
1717
}
1818
}
1919
},
2020

21-
// Handle vendor prefixing
22-
postcss: {
23-
options: {
24-
processors: [
25-
require('autoprefixer-core')({ browsers: ['last 2 versions', 'ie 8', 'ie 9'] })
26-
]
27-
},
28-
dist: {
29-
src: 'css/*.css'
30-
},
31-
docs: {
32-
src: '_site/*.css'
33-
}
34-
},
35-
3621
// Runs CSS reporting
3722
parker: {
3823
options: {
@@ -53,20 +38,20 @@ module.exports = function(grunt) {
5338
'TotalImportantKeywords',
5439
'TotalMediaQueries'
5540
],
56-
file: "css/.primer-stats.md",
41+
file: "docs/assets/css/.origin-stats.md",
5742
usePackage: true
5843
},
5944
src: [
60-
'css/*.css'
45+
'assets/css/*.css'
6146
]
6247
},
6348

6449
// Build tooling
6550

6651
watch: {
6752
sass: {
68-
files: ['scss/**/*.scss', 'docs/docs.scss'],
69-
tasks: ['sass', 'postcss', 'parker']
53+
files: ['assets/scss/*.scss', 'assets/scss/**/*.scss', 'assets/scss/**/**/*.scss'],
54+
tasks: ['sass', 'parker']
7055
}
7156
},
7257

@@ -87,24 +72,23 @@ module.exports = function(grunt) {
8772
},
8873
pages: {
8974
options: {
90-
remote: 'git@github.com:primer/primer.git',
75+
remote: 'git@github.com:fac/origin.git',
9176
branch: 'gh-pages'
9277
}
9378
}
9479
}
9580
});
9681

9782
// Load dependencies
98-
grunt.loadNpmTasks('grunt-postcss');
9983
grunt.loadNpmTasks('grunt-build-control');
10084
grunt.loadNpmTasks('grunt-contrib-watch');
10185
grunt.loadNpmTasks('grunt-jekyll');
10286
grunt.loadNpmTasks('grunt-parker');
10387
grunt.loadNpmTasks('grunt-sass');
10488

10589
// Generate and format the CSS
106-
grunt.registerTask('default', ['sass', 'jekyll', 'postcss', 'parker']);
90+
grunt.registerTask('default', ['sass', 'jekyll', 'parker']);
10791

10892
// Publish to GitHub
109-
grunt.registerTask('publish', ['jekyll', 'postcss:docs', 'buildcontrol:pages']);
93+
grunt.registerTask('publish', ['jekyll', 'buildcontrol:pages']);
11094
};

_config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ baseurl: ""
1111
version: 2.3.3
1212

1313
sass:
14-
sass_dir: ../
14+
# Directory points to root to allow the `@import` of .scss files from anywhere
15+
sass_dir: assets/scss
1516
style: compressed
1617

1718
github:

css/.primer-stats.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

css/primer.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/_includes/sidenav.html

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,62 @@
1+
<h4 class="menu-title">
2+
Guidance
3+
</h4>
14
<nav class="menu docs-menu">
2-
<a class="menu-item {% if page.title == "Scaffolding" %}selected{% endif %}" href="{{ site.baseurl }}/scaffolding/">
3-
Scaffolding
5+
<a class="menu-item {% if page.title == "Principles" %}selected{% endif %}" href="{{ site.baseurl }}/principles/">
6+
Principles
47
</a>
5-
<a class="menu-item {% if page.title == "Layout" %}selected{% endif %}" href="{{ site.baseurl }}/layout/">
6-
Layout
8+
<a class="menu-item {% if page.title == "Code style" %}selected{% endif %}" href="{{ site.baseurl }}/code-style/">
9+
Code style
710
</a>
8-
<a class="menu-item {% if page.title == "Typography" %}selected{% endif %}" href="{{ site.baseurl }}/type/">
9-
Type
11+
<a class="menu-item {% if page.title == "About utilities" %}selected{% endif %}" href="{{ site.baseurl }}/about-utilities/">
12+
About utilities
1013
</a>
11-
<a class="menu-item {% if page.title == "Buttons" %}selected{% endif %}" href="{{ site.baseurl }}/buttons/">
12-
Buttons
14+
<a class="menu-item {% if page.title == "About components" %}selected{% endif %}" href="{{ site.baseurl }}/about-components/">
15+
About components
1316
</a>
14-
<a class="menu-item {% if page.title == "Forms" %}selected{% endif %}" href="{{ site.baseurl }}/forms/">
15-
Forms
17+
</nav>
18+
19+
<h4 class="menu-title">
20+
Utilities
21+
</h4>
22+
<nav class="menu docs-menu">
23+
<a class="menu-item {% if page.title == "border" %}selected{% endif %}" href="{{ site.baseurl }}/border/">
24+
border
1625
</a>
17-
<a class="menu-item {% if page.title == "Navigation" %}selected{% endif %}" href="{{ site.baseurl }}/nav/">
18-
Navigation
26+
<a class="menu-item {% if page.title == "border-radius" %}selected{% endif %}" href="{{ site.baseurl }}/border-radius/">
27+
border-radius
1928
</a>
20-
<a class="menu-item {% if page.title == "Alerts" %}selected{% endif %}" href="{{ site.baseurl }}/alerts/">
21-
Alerts
29+
<a class="menu-item {% if page.title == "color" %}selected{% endif %}" href="{{ site.baseurl }}/color/">
30+
color
2231
</a>
23-
<a class="menu-item {% if page.title == "Blankslate" %}selected{% endif %}" href="{{ site.baseurl }}/blankslate/">
24-
Blankslate
32+
<a class="menu-item {% if page.title == "font-family" %}selected{% endif %}" href="{{ site.baseurl }}/font-family/">
33+
font-family
2534
</a>
26-
<a class="menu-item {% if page.title == "Avatars" %}selected{% endif %}" href="{{ site.baseurl }}/avatars/">
27-
Avatars
35+
<a class="menu-item {% if page.title == "font-size" %}selected{% endif %}" href="{{ site.baseurl }}/font-size/">
36+
font-size
2837
</a>
29-
<a class="menu-item {% if page.title == "States" %}selected{% endif %}" href="{{ site.baseurl }}/states/">
30-
States
38+
<a class="menu-item {% if page.title == "font-weight" %}selected{% endif %}" href="{{ site.baseurl }}/font-weight/">
39+
font-weight
3140
</a>
32-
<a class="menu-item {% if page.title == "Tooltips" %}selected{% endif %}" href="{{ site.baseurl }}/tooltips/">
33-
Tooltips
41+
<a class="menu-item {% if page.title == "list-item" %}selected{% endif %}" href="{{ site.baseurl }}/list-item/">
42+
list-item
3443
</a>
35-
<a class="menu-item {% if page.title == "Utilities" %}selected{% endif %}" href="{{ site.baseurl }}/utilities/">
36-
Utilities
44+
<a class="menu-item {% if page.title == "spacing" %}selected{% endif %}" href="{{ site.baseurl }}/spacing/">
45+
spacing
46+
</a>
47+
<a class="menu-item {% if page.title == "z-index" %}selected{% endif %}" href="{{ site.baseurl }}/z-index/">
48+
z-index
3749
</a>
3850
</nav>
3951

52+
<h4 class="menu-title">
53+
Components
54+
</h4>
4055
<nav class="menu docs-menu">
41-
<a class="menu-item {% if page.title == "Guidelines" %}selected{% endif %}" href="{{ site.baseurl }}/guidelines/">
42-
Code guidelines
43-
</a>
44-
<a class="menu-item {% if page.title == "Colors" %}selected{% endif %}" href="{{ site.baseurl }}/colors/">
45-
Colors
56+
<a class="menu-item {% if page.title == "Button" %}selected{% endif %}" href="{{ site.baseurl }}/button/">
57+
Button
4658
</a>
47-
<a class="menu-item {% if page.title == "Markdown" %}selected{% endif %}" href="{{ site.baseurl }}/markdown/">
48-
Markdown
59+
<a class="menu-item {% if page.title == "Segmented Control" %}selected{% endif %}" href="{{ site.baseurl }}/segmented-control/">
60+
Segmented Control
4961
</a>
5062
</nav>

docs/_layouts/default.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
{{ page.title }} &middot; Origin
1414
</title>
1515

16-
<link rel="stylesheet" href="{{ site.baseurl }}/docs.css">
16+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/scss/origin.css">
1717

1818
<!-- Favicons -->
19-
<link rel="apple-touch-icon-precomposed" href="{{ site.baseurl }}/img/apple-touch-icon-precomposed.png">
2019
<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
20+
21+
<!-- Typekit embed code for Effra and Swister -->
22+
<script src="https://use.typekit.net/hnj7chl.js"></script>
23+
<script>try{Typekit.load({ async: true });}catch(e){}</script>
2124
</head>
2225
<body>
2326

@@ -41,9 +44,9 @@
4144
<div class="jumbotron">
4245
<div class="container">
4346
<h1>Origin</h1>
44-
<p>The CSS toolkit and guidelines that power GitHub.</p>
47+
<p>The CSS utilities, components, and guidelines that power FreeAgent.</p>
4548

46-
<a href="{{ site.baseurl }}/scaffolding/" class="btn btn-reverse">
49+
<a href="{{ site.baseurl }}/principles/" class="btn btn-reverse">
4750
Read the docs
4851
</a>
4952
</div>
@@ -52,15 +55,15 @@ <h1>Origin</h1>
5255
<div class="container about-that">
5356
<div class="columns">
5457
<div class="one-third column">
55-
<h2>Made at GitHub</h2>
58+
<h2>Utilities and utility classes</h2>
5659
<p>Primer is the basecoat of GitHub, made by nerds just like you who share a passion for HTML and CSS.</p>
5760
</div>
5861
<div class="one-third column">
59-
<h2>Open source</h2>
62+
<h2>Components</h2>
6063
<p>Available for use under the MIT license and built with open source projects like SCSS, Jekyll, Grunt, and more.</p>
6164
</div>
6265
<div class="one-third column">
63-
<h2>Build tools</h2>
66+
<h2>Guidance</h2>
6467
<p>Includes a small Gruntfile for compiling our SCSS, Autoprefixer for vendor prefixes, and Parker for CSS stats.</p>
6568
</div>
6669
</div>
@@ -76,7 +79,7 @@ <h2>Build tools</h2>
7679
</footer>
7780
</div>
7881

79-
<script src="{{ site.baseurl }}/js/anchor.min.js"></script>
82+
<script src="{{ site.baseurl }}/assets/js/anchor.min.js"></script>
8083
<script>
8184
var selector = '.markdown-body h2, .markdown-body h3';
8285
anchors.options = {

docs/_plugins/example.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def render(context)
5555
end
5656

5757
def example(output)
58-
"<div class=\"docs-example clearfix\">#{output}</div>"
58+
"<div class=\"DocsExample-render clearfix\">#{output}</div>"
5959
end
6060

6161
def render_rouge(code)

0 commit comments

Comments
 (0)