Skip to content

Commit 982b418

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Update docs template"
2 parents ddcc668 + deaff72 commit 982b418

11 files changed

Lines changed: 1228 additions & 1 deletion

File tree

doc/source/_static/basic.css

Lines changed: 416 additions & 0 deletions
Large diffs are not rendered by default.

doc/source/_static/default.css

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
/**
2+
* Sphinx stylesheet -- default theme
3+
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+
*/
5+
6+
@import url("basic.css");
7+
8+
/* -- page layout ----------------------------------------------------------- */
9+
10+
body {
11+
font-family: sans-serif;
12+
font-size: 100%;
13+
background-color: #11303d;
14+
color: #000;
15+
margin: 0;
16+
padding: 0;
17+
}
18+
19+
div.document {
20+
background-color: #1c4e63;
21+
}
22+
23+
div.documentwrapper {
24+
float: left;
25+
width: 100%;
26+
}
27+
28+
div.bodywrapper {
29+
margin: 0 0 0 230px;
30+
}
31+
32+
div.body {
33+
background-color: #ffffff;
34+
color: #000000;
35+
padding: 0 20px 30px 20px;
36+
}
37+
38+
div.footer {
39+
color: #ffffff;
40+
width: 100%;
41+
padding: 9px 0 9px 0;
42+
text-align: center;
43+
font-size: 75%;
44+
}
45+
46+
div.footer a {
47+
color: #ffffff;
48+
text-decoration: underline;
49+
}
50+
51+
div.related {
52+
background-color: #133f52;
53+
line-height: 30px;
54+
color: #ffffff;
55+
}
56+
57+
div.related a {
58+
color: #ffffff;
59+
}
60+
61+
div.sphinxsidebar {
62+
}
63+
64+
div.sphinxsidebar h3 {
65+
font-family: 'Trebuchet MS', sans-serif;
66+
color: #ffffff;
67+
font-size: 1.4em;
68+
font-weight: normal;
69+
margin: 0;
70+
padding: 0;
71+
}
72+
73+
div.sphinxsidebar h3 a {
74+
color: #ffffff;
75+
}
76+
77+
div.sphinxsidebar h4 {
78+
font-family: 'Trebuchet MS', sans-serif;
79+
color: #ffffff;
80+
font-size: 1.3em;
81+
font-weight: normal;
82+
margin: 5px 0 0 0;
83+
padding: 0;
84+
}
85+
86+
div.sphinxsidebar p {
87+
color: #ffffff;
88+
}
89+
90+
div.sphinxsidebar p.topless {
91+
margin: 5px 10px 10px 10px;
92+
}
93+
94+
div.sphinxsidebar ul {
95+
margin: 10px;
96+
padding: 0;
97+
color: #ffffff;
98+
}
99+
100+
div.sphinxsidebar a {
101+
color: #98dbcc;
102+
}
103+
104+
div.sphinxsidebar input {
105+
border: 1px solid #98dbcc;
106+
font-family: sans-serif;
107+
font-size: 1em;
108+
}
109+
110+
/* -- body styles ----------------------------------------------------------- */
111+
112+
a {
113+
color: #355f7c;
114+
text-decoration: none;
115+
}
116+
117+
a:hover {
118+
text-decoration: underline;
119+
}
120+
121+
div.body p, div.body dd, div.body li {
122+
text-align: left;
123+
line-height: 130%;
124+
}
125+
126+
div.body h1,
127+
div.body h2,
128+
div.body h3,
129+
div.body h4,
130+
div.body h5,
131+
div.body h6 {
132+
font-family: 'Trebuchet MS', sans-serif;
133+
background-color: #f2f2f2;
134+
font-weight: normal;
135+
color: #20435c;
136+
border-bottom: 1px solid #ccc;
137+
margin: 20px -20px 10px -20px;
138+
padding: 3px 0 3px 10px;
139+
}
140+
141+
div.body h1 { margin-top: 0; font-size: 200%; }
142+
div.body h2 { font-size: 160%; }
143+
div.body h3 { font-size: 140%; }
144+
div.body h4 { font-size: 120%; }
145+
div.body h5 { font-size: 110%; }
146+
div.body h6 { font-size: 100%; }
147+
148+
a.headerlink {
149+
color: #c60f0f;
150+
font-size: 0.8em;
151+
padding: 0 4px 0 4px;
152+
text-decoration: none;
153+
}
154+
155+
a.headerlink:hover {
156+
background-color: #c60f0f;
157+
color: white;
158+
}
159+
160+
div.body p, div.body dd, div.body li {
161+
text-align: left;
162+
line-height: 130%;
163+
}
164+
165+
div.admonition p.admonition-title + p {
166+
display: inline;
167+
}
168+
169+
div.admonition p {
170+
margin-bottom: 5px;
171+
}
172+
173+
div.admonition pre {
174+
margin-bottom: 5px;
175+
}
176+
177+
div.admonition ul, div.admonition ol {
178+
margin-bottom: 5px;
179+
}
180+
181+
div.note {
182+
background-color: #eee;
183+
border: 1px solid #ccc;
184+
}
185+
186+
div.seealso {
187+
background-color: #ffc;
188+
border: 1px solid #ff6;
189+
}
190+
191+
div.topic {
192+
background-color: #eee;
193+
}
194+
195+
div.warning {
196+
background-color: #ffe4e4;
197+
border: 1px solid #f66;
198+
}
199+
200+
p.admonition-title {
201+
display: inline;
202+
}
203+
204+
p.admonition-title:after {
205+
content: ":";
206+
}
207+
208+
pre {
209+
padding: 5px;
210+
background-color: #eeffcc;
211+
color: #333333;
212+
line-height: 120%;
213+
border: 1px solid #ac9;
214+
border-left: none;
215+
border-right: none;
216+
}
217+
218+
tt {
219+
background-color: #ecf0f3;
220+
padding: 0 1px 0 1px;
221+
font-size: 0.95em;
222+
}
223+
224+
.warning tt {
225+
background: #efc2c2;
226+
}
227+
228+
.note tt {
229+
background: #d6d6d6;
230+
}

doc/source/_static/header-line.gif

48 Bytes
Loading

doc/source/_static/header_bg.jpg

3.65 KB
Loading

doc/source/_static/jquery.tweet.js

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
(function($) {
2+
3+
$.fn.tweet = function(o){
4+
var s = {
5+
username: ["seaofclouds"], // [string] required, unless you want to display our tweets. :) it can be an array, just do ["username1","username2","etc"]
6+
list: null, //[string] optional name of list belonging to username
7+
avatar_size: null, // [integer] height and width of avatar if displayed (48px max)
8+
count: 3, // [integer] how many tweets to display?
9+
intro_text: null, // [string] do you want text BEFORE your your tweets?
10+
outro_text: null, // [string] do you want text AFTER your tweets?
11+
join_text: null, // [string] optional text in between date and tweet, try setting to "auto"
12+
auto_join_text_default: "i said,", // [string] auto text for non verb: "i said" bullocks
13+
auto_join_text_ed: "i", // [string] auto text for past tense: "i" surfed
14+
auto_join_text_ing: "i am", // [string] auto tense for present tense: "i was" surfing
15+
auto_join_text_reply: "i replied to", // [string] auto tense for replies: "i replied to" @someone "with"
16+
auto_join_text_url: "i was looking at", // [string] auto tense for urls: "i was looking at" http:...
17+
loading_text: null, // [string] optional loading text, displayed while tweets load
18+
query: null // [string] optional search query
19+
};
20+
21+
if(o) $.extend(s, o);
22+
23+
$.fn.extend({
24+
linkUrl: function() {
25+
var returning = [];
26+
var regexp = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
27+
this.each(function() {
28+
returning.push(this.replace(regexp,"<a href=\"$1\">$1</a>"));
29+
});
30+
return $(returning);
31+
},
32+
linkUser: function() {
33+
var returning = [];
34+
var regexp = /[\@]+([A-Za-z0-9-_]+)/gi;
35+
this.each(function() {
36+
returning.push(this.replace(regexp,"<a href=\"http://twitter.com/$1\">@$1</a>"));
37+
});
38+
return $(returning);
39+
},
40+
linkHash: function() {
41+
var returning = [];
42+
var regexp = / [\#]+([A-Za-z0-9-_]+)/gi;
43+
this.each(function() {
44+
returning.push(this.replace(regexp, ' <a href="http://search.twitter.com/search?q=&tag=$1&lang=all&from='+s.username.join("%2BOR%2B")+'">#$1</a>'));
45+
});
46+
return $(returning);
47+
},
48+
capAwesome: function() {
49+
var returning = [];
50+
this.each(function() {
51+
returning.push(this.replace(/\b(awesome)\b/gi, '<span class="awesome">$1</span>'));
52+
});
53+
return $(returning);
54+
},
55+
capEpic: function() {
56+
var returning = [];
57+
this.each(function() {
58+
returning.push(this.replace(/\b(epic)\b/gi, '<span class="epic">$1</span>'));
59+
});
60+
return $(returning);
61+
},
62+
makeHeart: function() {
63+
var returning = [];
64+
this.each(function() {
65+
returning.push(this.replace(/(&lt;)+[3]/gi, "<tt class='heart'>&#x2665;</tt>"));
66+
});
67+
return $(returning);
68+
}
69+
});
70+
71+
function relative_time(time_value) {
72+
var parsed_date = Date.parse(time_value);
73+
var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
74+
var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
75+
var pluralize = function (singular, n) {
76+
return '' + n + ' ' + singular + (n == 1 ? '' : 's');
77+
};
78+
if(delta < 60) {
79+
return 'less than a minute ago';
80+
} else if(delta < (45*60)) {
81+
return 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago';
82+
} else if(delta < (24*60*60)) {
83+
return 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago';
84+
} else {
85+
return 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago';
86+
}
87+
}
88+
89+
function build_url() {
90+
var proto = ('https:' == document.location.protocol ? 'https:' : 'http:');
91+
if (s.list) {
92+
return proto+"//api.twitter.com/1/"+s.username[0]+"/lists/"+s.list+"/statuses.json?per_page="+s.count+"&callback=?";
93+
} else if (s.query == null && s.username.length == 1) {
94+
return proto+'//twitter.com/status/user_timeline/'+s.username[0]+'.json?count='+s.count+'&callback=?';
95+
} else {
96+
var query = (s.query || 'from:'+s.username.join('%20OR%20from:'));
97+
return proto+'//search.twitter.com/search.json?&q='+query+'&rpp='+s.count+'&callback=?';
98+
}
99+
}
100+
101+
return this.each(function(){
102+
var list = $('<ul class="tweet_list">').appendTo(this);
103+
var intro = '<p class="tweet_intro">'+s.intro_text+'</p>';
104+
var outro = '<p class="tweet_outro">'+s.outro_text+'</p>';
105+
var loading = $('<p class="loading">'+s.loading_text+'</p>');
106+
107+
if(typeof(s.username) == "string"){
108+
s.username = [s.username];
109+
}
110+
111+
if (s.loading_text) $(this).append(loading);
112+
$.getJSON(build_url(), function(data){
113+
if (s.loading_text) loading.remove();
114+
if (s.intro_text) list.before(intro);
115+
$.each((data.results || data), function(i,item){
116+
// auto join text based on verb tense and content
117+
if (s.join_text == "auto") {
118+
if (item.text.match(/^(@([A-Za-z0-9-_]+)) .*/i)) {
119+
var join_text = s.auto_join_text_reply;
120+
} else if (item.text.match(/(^\w+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+) .*/i)) {
121+
var join_text = s.auto_join_text_url;
122+
} else if (item.text.match(/^((\w+ed)|just) .*/im)) {
123+
var join_text = s.auto_join_text_ed;
124+
} else if (item.text.match(/^(\w*ing) .*/i)) {
125+
var join_text = s.auto_join_text_ing;
126+
} else {
127+
var join_text = s.auto_join_text_default;
128+
}
129+
} else {
130+
var join_text = s.join_text;
131+
};
132+
133+
var from_user = item.from_user || item.user.screen_name;
134+
var profile_image_url = item.profile_image_url || item.user.profile_image_url;
135+
var join_template = '<span class="tweet_join"> '+join_text+' </span>';
136+
var join = ((s.join_text) ? join_template : ' ');
137+
var avatar_template = '<a class="tweet_avatar" href="http://twitter.com/'+from_user+'"><img src="'+profile_image_url+'" height="'+s.avatar_size+'" width="'+s.avatar_size+'" alt="'+from_user+'\'s avatar" title="'+from_user+'\'s avatar" border="0"/></a>';
138+
var avatar = (s.avatar_size ? avatar_template : '');
139+
var date = '<a href="http://twitter.com/'+from_user+'/statuses/'+item.id+'" title="view tweet on twitter">'+relative_time(item.created_at)+'</a>';
140+
var text = '<span class="tweet_text">' +$([item.text]).linkUrl().linkUser().linkHash().makeHeart().capAwesome().capEpic()[0]+ '</span>';
141+
142+
// until we create a template option, arrange the items below to alter a tweet's display.
143+
list.append('<li>' + avatar + date + join + text + '</li>');
144+
145+
list.children('li:first').addClass('tweet_first');
146+
list.children('li:odd').addClass('tweet_even');
147+
list.children('li:even').addClass('tweet_odd');
148+
});
149+
if (s.outro_text) list.after(outro);
150+
});
151+
152+
});
153+
};
154+
})(jQuery);

0 commit comments

Comments
 (0)