Permalink
Browse files

add sample code

  • Loading branch information...
1 parent a733b74 commit 7e1c8168d3511a90cdc0207ed9d1d036148929b6 @evenwu committed Sep 27, 2011
View
0 source/_code-code.erb
No changes.
View
4 source/_code-code1.erb
@@ -0,0 +1,4 @@
+<div>
+ <h1>標題</h1>
+ <p>今天天氣很好</p>
+</div>
View
19 source/_code.haml
@@ -1,4 +1,15 @@
-\<div>
-\ <h1>標題</h1>
-\ <p>今天天氣很好</p>
-\</div>
+%section#code
+ %h2.title
+ Code 程式碼
+ %code <code>
+ %code <pre>
+ #usage
+ %p
+ %code <pre>your code</pre>
+ #section
+ %pre= partial "code-code1"
+ #usage
+ %p
+ %code <pre class="prettyprint">your code</pre>
+ #section
+ %pre.prettyprint= partial "code-code1"
View
2 source/_header.haml
@@ -1,4 +1,4 @@
-%h1 +Golden Grid System <br>+Bootstrap <br>+Compass Framework
+%h1 +Golden Grid System <br>+Bootstrap Style <br>+Compass Framework
%nav
%h2.hide Main Navigation
%ul
View
8 source/_heading.haml
@@ -1,14 +1,20 @@
%section#heading
%h1
h1. 標題 1
+ %code &lt;h1&gt;
%section
%h2
h2. 標題 2
+ %code &lt;h2&gt;
%h3
h3. 標題 3
+ %code &lt;h3&gt;
%h4
h4. 標題 4
+ %code &lt;h4&gt;
%h5
h5. 標題 5
+ %code &lt;h5&gt;
%h6
- h6. 標題 6
+ h6. 標題 6
+ %code &lt;h6&gt;
View
6 source/_list-code1.erb
@@ -0,0 +1,6 @@
+&lt;ul&gt;
+ &lt;li&gt;item&lt;/li&gt;
+ &lt;ul&gt;
+ &lt;li&gt;item&lt;/li&gt;
+ &lt;/ul&gt;
+&lt;/ul&gt;
View
6 source/_list-code2.erb
@@ -0,0 +1,6 @@
+&lt;ul class=&quot;unstyled&quot;&gt;
+ &lt;li&gt;item&lt;/li&gt;
+ &lt;ul&gt;
+ &lt;li&gt;item&lt;/li&gt;
+ &lt;/ul&gt;
+&lt;/ul&gt;
View
6 source/_list-code3.erb
@@ -0,0 +1,6 @@
+&lt;ol&gt;
+ &lt;li&gt;item&lt;/li&gt;
+ &lt;ul&gt;
+ &lt;li&gt;item&lt;/li&gt;
+ &lt;/ul&gt;
+&lt;/ul&gt;
View
6 source/_list-code4.erb
@@ -0,0 +1,6 @@
+&lt;dl&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;Description&lt;/dd&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;Description&lt;/dd&gt;
+&lt;/dl&gt;
View
75 source/_lists.haml
@@ -0,0 +1,75 @@
+%section#lists
+ .title
+ %h2 Lists 列表
+ %section.type
+ %h3
+ Unordered
+ %code &lt;ul&gt;
+ %small
+ 無序列表 1
+ %usage
+ %pre.prettyprint= partial "list-code1";
+ .list
+ %ul
+ - 5.times do
+ %li= lorem.word
+ %li
+ = lorem.word
+ %ul
+ - 4.times do
+ %li= lorem.word
+ - 3.times do
+ %li= lorem.word
+ %section.type
+ %h3
+ Unstyled
+ %code &lt;ul.unstyled&gt;
+ %small
+ 無序列表 2
+ %usage
+ %pre.prettyprint= partial "list-code2";
+ .list
+ %ul.unstyled
+ - 5.times do
+ %li= lorem.word
+ %li
+ = lorem.word
+ %ul
+ - 4.times do
+ %li= lorem.word
+ - 3.times do
+ %li= lorem.word
+ %section.type
+ %h3
+ Ordered
+ %code &lt;ol&gt;
+ %small
+ 有序列表
+ %usage
+ %pre.prettyprint= partial "list-code3";
+ .list
+ %ol
+ - 5.times do
+ %li= lorem.word
+ %li
+ = lorem.word
+ %ol
+ - 4.times do
+ %li= lorem.word
+ - 3.times do
+ %li= lorem.word
+ %section.type
+ %h3
+ Description
+ %code &lt;dl&gt;
+ %code &lt;dt&gt;
+ %code &lt;dd&gt;
+ %small
+ 說明列表
+ %usage
+ %pre.prettyprint= partial "list-code4";
+ .list
+ %dl
+ - 3.times do
+ %dt= lorem.word
+ %dd= lorem.sentence
View
92 source/_paragraph.haml
@@ -1,85 +1,7 @@
-#paragraph
- %section
- %h2.title Paragraph 段落
- %p
- %span{ :class => "lipsum(3)" }
- %p= lorem.sentences 5
-#lists
- %section
- .title
- %h2 Lists 列表
- %section.type
- %h3
- Unordered
- %small
- 無序列表 1
- .list
- %ul
- - 5.times do
- %li= lorem.word
- %li
- = lorem.word
- %ul
- - 4.times do
- %li= lorem.word
- - 3.times do
- %li= lorem.word
- %section.type
- %h3
- Unstyled
- %small
- 無序列表 2
- .list
- %ul.unstyled
- - 5.times do
- %li= lorem.word
- %li
- = lorem.word
- %ul
- - 4.times do
- %li= lorem.word
- - 3.times do
- %li= lorem.word
- %section.type
- %h3
- Ordered
- %small
- 有序列表
- .list
- %ol
- - 5.times do
- %li= lorem.word
- %li
- = lorem.word
- %ol
- - 4.times do
- %li= lorem.word
- - 3.times do
- %li= lorem.word
- %section.type
- %h3
- Description
- %small
- 說明列表
- .list
- %dl
- - 3.times do
- %dt= lorem.word
- %dd= lorem.sentence
-#quote
- %section
- %h2.title Quote 引言
- %blockquote
- %p
- %span{ :class => "lipsum" }
- %cite= lorem.name
- %blockquote
- %p= lorem.sentence
- %cite= lorem.name
-#code
- %section
- %h2.title Code 程式碼
- #section
- %pre= partial "code"
- #section
- %pre.prettyprint= partial "code"
+%section#paragraph
+ %h2.title
+ Paragraphs 段落
+ %code &lt;p&gt;
+ %p
+ %span{ :class => "lipsum(3)" }
+ %p= lorem.sentences 5
View
4 source/_quote-code.haml
@@ -0,0 +1,4 @@
+\&lt;blockquote&gt;
+\ &lt;p&gt;Quote sentence&lt;/p&gt;
+\ &lt;cite&gt;Source&lt;/cite&gt;
+\&lt;/blockquote&gt;
View
13 source/_quote.haml
@@ -0,0 +1,13 @@
+%section#quote
+ %h2.title
+ Quotes 引言
+ %code &lt;blockquote&gt;
+ #usage
+ %pre.prettyprint= partial "quote-code"
+ %blockquote
+ %p
+ %span{ :class => "lipsum" }
+ %cite= lorem.name
+ %blockquote
+ %p= lorem.sentence
+ %cite= lorem.name
View
9 source/index.html.haml
@@ -3,9 +3,14 @@
- content_for :header do
= partial "header"
-
= partial "heading"
= partial "paragraph"
-= partial "form"
+= partial "form"
+
+= partial "lists"
+
+= partial "quote"
+
+= partial "code"
View
11 source/stylesheets/ggs/_type-size-presets.scss
@@ -97,9 +97,15 @@ blockquote {
}
}
-code, pre {
+code {
font-family: Monaco, Andale Mono, Courier New, monospace;
- @extend .font-s;
+ font-weight: normal;
+ color: #404040;
+ background: #fee9cc;
+ padding: 1px 3px;
+ @include border-radius(3px);
+ font-size: 12px;
+ line-height: 1;
}
pre {
@@ -110,4 +116,5 @@ pre {
@include border-radius(3px);
@include margin-trailer(1,$font-s);
overflow: auto;
+ @extend .font-s;
}
View
5 source/stylesheets/main.css.scss
@@ -40,6 +40,10 @@ a {
@include padding-leader(1,$font-xl);
@include margin-trailer(1,$font-xl);
background: image-url($line-img) repeat-x bottom;
+ code {
+ position: relative;
+ top: -5px;
+ }
}
#heading {
@@ -53,7 +57,6 @@ a {
#lists {
@include pie-clearfix;
.list {
- @include padding-leader(1,$font-s);
@include padding-trailer(1,$font-s);
@extend .font-s;
}

0 comments on commit 7e1c816

Please sign in to comment.