From 29d465fafe9d4640b00d6068b7aa46677655abd7 Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Mon, 5 Mar 2012 11:03:20 -0800 Subject: [PATCH] GH-88 Add github ribbon --- Makefile | 2 +- Makefile.targ | 12 ++-- docs/branding/footer.html.in | 61 +++++++++++++++++++++ docs/branding/header.html.in | 18 ++++++ docs/{ => branding}/media/css/restdown.css | 35 +++++++----- docs/{guide.restdown => index.restdown} | 0 docs/media/img/tab.gif | Bin 1288 -> 0 bytes 7 files changed, 107 insertions(+), 21 deletions(-) create mode 100644 docs/branding/footer.html.in create mode 100644 docs/branding/header.html.in rename docs/{ => branding}/media/css/restdown.css (79%) rename docs/{guide.restdown => index.restdown} (100%) delete mode 100644 docs/media/img/tab.gif diff --git a/Makefile b/Makefile index ec038bf6a..ad45df681 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ TAP := ./node_modules/.bin/tap # # Files # -DOC_FILES = guide.restdown +DOC_FILES = index.restdown JS_FILES := $(shell find lib test -name '*.js') JSL_CONF_NODE = tools/jsl.node.conf JSL_FILES_NODE = $(JS_FILES) diff --git a/Makefile.targ b/Makefile.targ index 2cb62e665..4dccd0f7f 100644 --- a/Makefile.targ +++ b/Makefile.targ @@ -121,12 +121,12 @@ clean: # identify the subdirectories in docs/media, recreate them in # $(DOC_BUILD)/media, then do the same with the files. # -DOC_MEDIA_DIRS := $(shell find docs/media -type d | grep -v "^docs/media$$") -DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%) +DOC_MEDIA_DIRS := $(shell find docs/branding/media -type d | grep -v "^docs/branding/media$$") +DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/branding/media/%=%) DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%) -DOC_MEDIA_FILES := $(shell find docs/media -type f) -DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%) +DOC_MEDIA_FILES := $(shell find docs/branding/media -type f) +DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/branding/media/%=%) DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%) # @@ -165,10 +165,10 @@ CLEAN_FILES += \ $(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD) $(DOC_BUILD)/%: docs/% | $(DOC_BUILD) - $(CP) $< $@ + $(MV) $< $@ docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD) - $(RESTDOWN) -m $(DOC_BUILD) $< + $(RESTDOWN) -b docs/branding -m $(DOC_BUILD) $< $(DOC_BUILD): $(MKDIR) $@ diff --git a/docs/branding/footer.html.in b/docs/branding/footer.html.in new file mode 100644 index 000000000..c10b19573 --- /dev/null +++ b/docs/branding/footer.html.in @@ -0,0 +1,61 @@ + + + + diff --git a/docs/branding/header.html.in b/docs/branding/header.html.in new file mode 100644 index 000000000..bdbb17756 --- /dev/null +++ b/docs/branding/header.html.in @@ -0,0 +1,18 @@ + + + + %(title)s + + + + + + + Fork me on GitHub + + + diff --git a/docs/media/css/restdown.css b/docs/branding/media/css/restdown.css similarity index 79% rename from docs/media/css/restdown.css rename to docs/branding/media/css/restdown.css index d3eb4bd48..71db3650c 100644 --- a/docs/media/css/restdown.css +++ b/docs/branding/media/css/restdown.css @@ -32,7 +32,6 @@ ul { ul > li { list-style:disc; - list-style-position:inside; margin:10px 0px; } @@ -88,6 +87,7 @@ h4 { /* tables still need cellspacing="0" in the markup */ table { border-collapse:collapse; border-spacing:0; + margin: 20px 0; } th, td { @@ -96,6 +96,7 @@ td { line-height: 23px; padding: 0 12px; text-align: left; + vertical-align: text-bottom; } th { border-collapse: separate; @@ -203,26 +204,33 @@ pre.shell code::before { #sidebar li { list-style:none; padding:1px 0px 1px 0px; + white-space: nowrap; } #sidebar li span.verb { - color:#aaa; - padding:2px 3px 0px; - width:30px; - display:block; - float:left; + color: #999; + width:4em; + display:inline-block; font-size:9px; font-family:verdana; - -moz-border-radius:3px; - -webkit-border-radius:3px; - margin-left:0px; margin-right:5px; } +#sidebar span.both .endpoint { + display: none; +} +#content span.both .endpoint { + color: #999; + font-size: 80%; +} -#sidebar li.current { - background-image: url(../img/tab.gif); - background-repeat: no-repeat; - background-position: right top; +#sidebar li div.current { + background: -moz-linear-gradient(left, rgba(227,222,217,0) 0%, rgba(193,185,173,1) 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(227,222,217,0)), color-stop(100%,rgba(193,185,173,1))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(227,222,217,0) 0%,rgba(193,185,173,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, rgba(227,222,217,0) 0%,rgba(193,185,173,1) 100%); /* Opera11.10+ */ + background: -ms-linear-gradient(left, rgba(227,222,217,0) 0%,rgba(193,185,173,1) 100%); /* IE10+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00e3ded9', endColorstr='#c1b9ad',GradientType=1 ); /* IE6-9 */ + background: linear-gradient(left, rgba(227,222,217,0) 0%,rgba(193,185,173,1) 100%); /* W3C */ } @@ -312,4 +320,3 @@ h3:first-child { color: black !important; } } - diff --git a/docs/guide.restdown b/docs/index.restdown similarity index 100% rename from docs/guide.restdown rename to docs/index.restdown diff --git a/docs/media/img/tab.gif b/docs/media/img/tab.gif deleted file mode 100644 index bdc7eb25c02b6fbdb092181aec37464a925e0de0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1288 zcmZ?wbhEHb`QqjCXAke+d;IXhm(QP`J$d}#-rc8s)|yBtNcQe ztFn_VQ=?Nk^)#sNw%$$BS=C4 zWT$g}QL2Keo`G(%fti7VnW3Jcv5C34xsHO7fuVuEfswwUk*=Y+m9dePfq?=PC;@FN zN=dT{a&d#&1?1T(Wt5Z@Sn2DRmzV368|&p4rRy77T3Uk4Ff!5ws?aU2%qvN((9J7W zhMC}!TAW;zSx}OhpQivaF)=B>w8T~k=u(Imatq+b<`wIKy`z_$pQ~SySfFpHX8`gN zOrftYex*CYFYVE^dy-PG*iymWECyjxHAFPUbMZF8Rr&xv6<2Fuf@Vy%sq2f|5dR0nlcb z)S}F?)D*X({9FaFm#s2!yTufzc~HG6xZPrgQ?EYIG5Vm0MT%&c5HR(CnDAr^-^T&5!&H`nm_wU}mdHw3;i|4>>_W04m2lwyYy>t84%^TOR zUA=Po(!~qs&z(JU`qar2$B!L7a`@1}1N-;w-Lrew&K=vgZQZhY)5ZeMTG_VdAT{+S(zE>X{jm6Nr?&Zaj`McQIQehVWAmo_rKzE=rmCW>q^KY-Co3Z@B`F~;CMqH&FX#K^#)_>%=liZked$_`L@#K4;QK(+75(N5qA=1XO(4IoX++jI)G