Skip to content

Commit 616d3f0

Browse files
committed
WIP: Grand site structure refactoring
* Getting rid of Pelican - merge codebases (css, js). removed a lot of garbage - ported pages from pelican to sphinx - /en and /ru now, rules must be configurated in nginx - Create plugins for dropdown menus and sections () * Extract theme to separate directory (for reuse in other projects) * Add Less for CSS preprocessing * A lot of little style refactoring and fixes TODO: * Review mobile and tablet design, again A lot of style fixes. sphinx-webserver, sphinx-linkcheck. becnhmarks/careers/doc pages. page buttons. closes gh-78 closes gh-55 closes gh-82 closes gh-81 closes gh-66
1 parent c6a4241 commit 616d3f0

File tree

350 files changed

+8058
-25849
lines changed

Some content is hidden

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

350 files changed

+8058
-25849
lines changed

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ CMakeCache.txt
22
CMakeFiles
33
Makefile
44
cmake_install.cmake
5-
sphinx/locale/ru/LC_MESSAGES/*.mo
5+
locale/ru/LC_MESSAGES/*.mo
66
.DS_Store
7-
sphinx/_html_ru_build/
8-
sphinx/_single_ru_build/
7+
_*_build/
98
deploy_key
9+
.venv
10+
output
11+
*.pyc
File renamed without changes.

.travis.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
language: generic # don't install any environment
2+
sudo: false
3+
4+
addons:
5+
apt:
6+
sources:
7+
- george-edison55-precise-backports
8+
packages:
9+
- cmake
10+
- cmake-data
11+
212
install:
3-
- pip install sphinx==1.4.4 pelican BeautifulSoup sphinx-intl PyYAML --user
13+
- cmake --version
14+
- pip install sphinx sphinx-intl --user
15+
416
script: bash ./documentation.sh
17+
518
env:
619
global:
720
- ENCRYPTION_LABEL: "cc37864fc395"
8-

CMakeLists.txt

Lines changed: 112 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cmake_minimum_required(VERSION 2.8)
1+
cmake_minimum_required(VERSION 2.8.12)
22

3-
project(tarantoold-doc)
3+
project(tarantool-doc)
44

55
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
66
set(CMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_INCLUDE_PATH})
@@ -9,11 +9,9 @@ include(FindOptionalPackage)
99
include(FindPackageMessage)
1010

1111
include(cmake/FindSphinx.cmake)
12+
find_package(Sphinx REQUIRED)
1213

13-
#
1414
# Get version
15-
#
16-
1715
set (PACKAGE_VERSION "")
1816
set (TARANTOOL_VERSION "")
1917

@@ -30,9 +28,7 @@ if (NOT TARANTOOL_VERSION)
3028
message (FATAL_ERROR "Unable to retrive version from git or ${VERSION_FILE} file.")
3129
endif()
3230

33-
#
3431
# Split full version (git describe --long) to get components
35-
#
3632
string(REPLACE "-" "." TARANTOOL_VERSION_LIST ${TARANTOOL_VERSION})
3733
string(REPLACE "." ";" TARANTOOL_VERSION_LIST ${TARANTOOL_VERSION_LIST})
3834
LIST(GET TARANTOOL_VERSION_LIST 0 CPACK_PACKAGE_VERSION_MAJOR)
@@ -47,5 +43,112 @@ find_package_message(TARANTOOL_VERSION
4743
"Tarantool version is ${TARANTOOL_VERSION} (${PACKAGE_VERSION})"
4844
"${PACKAGE_VERSION}")
4945

50-
add_subdirectory(sphinx)
51-
add_subdirectory(www)
46+
set(SPHINX_BUILD_SINGLEHTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/_single_build/")
47+
set(SPHINX_BUILD_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/_html_build/")
48+
set(SPHINX_BUILD_LOCALE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_locale_build/")
49+
set(SPHINX_BUILD_SINGLEHTML_RU_DIR "${CMAKE_CURRENT_BINARY_DIR}/_single_ru_build/")
50+
set(SPHINX_BUILD_HTML_RU_DIR "${CMAKE_CURRENT_BINARY_DIR}/_html_ru_build/")
51+
set(SPHINX_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/output")
52+
set(SPHINX_EN_HTML_DIR "${SPHINX_OUTPUT_DIR}/en/")
53+
set(SPHINX_RU_HTML_DIR "${SPHINX_OUTPUT_DIR}/ru/")
54+
55+
add_custom_target(sphinx-html ALL
56+
COMMAND "${SPHINX_EXECUTABLE}"
57+
-b html
58+
-d "${SPHINX_BUILD_HTML_DIR}"
59+
-a
60+
-c html/
61+
"${CMAKE_CURRENT_SOURCE_DIR}"
62+
"${SPHINX_EN_HTML_DIR}"
63+
COMMENT "Building HTML documentation with Sphinx"
64+
)
65+
66+
add_custom_target(sphinx-singlehtml ALL
67+
COMMAND "${SPHINX_EXECUTABLE}"
68+
-b singlehtml
69+
-d "${SPHINX_BUILD_SINGLEHTML_DIR}"
70+
-c singlehtml/
71+
"${CMAKE_CURRENT_SOURCE_DIR}"
72+
"${SPHINX_EN_HTML_DIR}/doc"
73+
doc/singlehtml.rst
74+
COMMENT "Building HTML documentation with Sphinx"
75+
)
76+
77+
add_custom_target(sphinx-html-ru ALL
78+
COMMAND "${SPHINX_EXECUTABLE}"
79+
-b html
80+
-d "${SPHINX_BUILD_HTML_RU_DIR}"
81+
-c html/
82+
"${CMAKE_CURRENT_SOURCE_DIR}"
83+
"${SPHINX_RU_HTML_DIR}"
84+
-Dlanguage=ru
85+
COMMENT "Building HTML documentation with Sphinx"
86+
)
87+
88+
add_custom_target(sphinx-singlehtml-ru ALL
89+
COMMAND "${SPHINX_EXECUTABLE}"
90+
-b singlehtml
91+
-d "${SPHINX_BUILD_SINGLEHTML_RU_DIR}"
92+
-c singlehtml/
93+
"${CMAKE_CURRENT_SOURCE_DIR}"
94+
"${SPHINX_RU_HTML_DIR}/doc"
95+
doc/singlehtml.rst
96+
-Dlanguage=ru
97+
COMMENT "Building HTML documentation with Sphinx"
98+
)
99+
100+
add_custom_target(sphinx-update-pot
101+
COMMAND "${SPHINX_EXECUTABLE}"
102+
-b gettext
103+
-d "${SPHINX_BUILD_LOCALE_DIR}"
104+
-c locale/
105+
"${CMAKE_CURRENT_SOURCE_DIR}"
106+
"${CMAKE_CURRENT_SOURCE_DIR}/locale"
107+
COMMENT "Generate localization templates"
108+
)
109+
110+
add_custom_target(sphinx-update-po
111+
COMMAND "${SPHINX_INTL_EXECUTABLE}"
112+
update
113+
-p ${CMAKE_CURRENT_SOURCE_DIR}/locale
114+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
115+
COMMENT "Regenerate localization files from templates"
116+
DEPENDS sphinx-update-pot
117+
)
118+
119+
add_custom_target(sphinx-linkcheck
120+
COMMAND "${SPHINX_EXECUTABLE}"
121+
-b linkcheck
122+
-d "${SPHINX_BUILD_LOCALE_DIR}"
123+
-c html
124+
"${CMAKE_CURRENT_SOURCE_DIR}"
125+
"${SPHINX_BUILD_HTML_DIR}"
126+
COMMENT "Linkcheck filter"
127+
)
128+
129+
add_custom_target(sphinx-webserver
130+
COMMAND screen -dmS sphinx-webserver python -m SimpleHTTPServer 8000
131+
WORKING_DIRECTORY ${SPHINX_OUTPUT_DIR})
132+
133+
set(STATIC_FILES
134+
.nojekyll
135+
CNAME
136+
robots.txt
137+
_downloads/license.docx
138+
_downloads/license_eng.docx
139+
_downloads/terms.docx
140+
_downloads/terms_eng.docx
141+
)
142+
143+
add_custom_target(copy-static COMMENT "Copy static files" ALL)
144+
foreach(FILE_PATH ${STATIC_FILES})
145+
get_filename_component(FILE_DIR ${FILE_PATH} DIRECTORY)
146+
add_custom_command(TARGET copy-static PRE_BUILD
147+
COMMAND ${CMAKE_COMMAND} -E make_directory
148+
${SPHINX_OUTPUT_DIR}/${FILE_DIR})
149+
add_custom_command(TARGET copy-static PRE_BUILD
150+
COMMAND ${CMAKE_COMMAND} -E copy
151+
${CMAKE_CURRENT_SOURCE_DIR}/${FILE_PATH}
152+
${SPHINX_OUTPUT_DIR}/${FILE_PATH}
153+
)
154+
endforeach()

www/content/CNAME renamed to CNAME

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

_theme/tarantool/_less/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
all:
2+
lessc --source-map --source-map-less-inline --strict-imports \
3+
--autoprefix="last 3 versions" \
4+
design.less design.css
5+
cleancss --s1 design.css > design.min.css
6+
mv design.min.css design.css
7+
mv design.css** ../static/

_theme/tarantool/_less/base.less

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
html {
2+
height:100%;
3+
font-size:100%;
4+
overflow-y: scroll;
5+
-webkit-text-size-adjust:100%;
6+
-ms-text-size-adjust:100%;
7+
-webkit-font-smoothing:antialiased;
8+
}
9+
body {
10+
font-family: "Helvetica Neue", Arial, Tahoma, Verdana;
11+
font-size:1em;
12+
font-style:normal;
13+
font-weight: 300;
14+
color: #262626;
15+
position:relative;
16+
height:100%;
17+
background:#FFF;
18+
margin:0;
19+
}
20+
a, img, input, textarea, select {
21+
outline:none;
22+
}
23+
label {
24+
cursor:pointer;
25+
}
26+
img {
27+
border:0;
28+
vertical-align:bottom;
29+
}
30+
form {
31+
margin:0;
32+
}
33+
header, nav, section, article, aside, footer {
34+
display:block;
35+
}
36+
a {
37+
color: #168de2;
38+
text-decoration: underline;
39+
}
40+
a:hover {
41+
color:#168de2;
42+
text-decoration: none;
43+
}
44+
textarea, input {
45+
font: inherit;
46+
resize:none;
47+
}
48+
p {
49+
margin:0;
50+
padding:0 0 20px 0;
51+
}
52+
table {
53+
border-collapse: collapse;
54+
}
55+
h1, h2, h3, h4, h5 {
56+
margin-top:0;
57+
font-weight:normal;
58+
}
59+
@font-face {
60+
font-family: 'helvetica-r';
61+
src: url('fonts/HelveticaNeue.eot');
62+
src: url('fonts/HelveticaNeue.eot?#iefix') format('embedded-opentype'),
63+
url('fonts/HelveticaNeue.woff') format('woff'),
64+
url('fonts/HelveticaNeue.ttf') format('truetype'),
65+
url('fonts/HelveticaNeue.svg#helveticaneuecyrroman') format('svg');
66+
font-weight: normal;
67+
font-style: normal;
68+
}
69+
@font-face {
70+
font-family: 'helvetica-b';
71+
src: url('fonts/HelveticaNeue-Bold.eot');
72+
src: url('fonts/HelveticaNeue-Bold.eot?#iefix') format('embedded-opentype'),
73+
url('fonts/HelveticaNeue-Bold.woff') format('woff'),
74+
url('fonts/HelveticaNeue-Bold.ttf') format('truetype'),
75+
url('fonts/HelveticaNeue-Bold.svg#helioscompressedregular') format('svg');
76+
font-weight: normal;
77+
font-style: normal;
78+
}

_theme/tarantool/_less/design.less

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// @import (less, once) "font-awesome/font-awesome.less";
2+
@import (inline) "font-awesome.min.css";
3+
4+
@import (less, once) "base.less";
5+
@import (less, once) "page-base.less";
6+
@import (less, once) "page-index.less";
7+
@import (less, once) "page-download.less";
8+
@import (less, once) "page-job.less";
9+
@import (less, once) "page-rocks.less";
10+
@import (less, once) "page-try.less";
11+
@import (less, once) "page-doc.less";
12+
@import (less, once) "page-benchmark.less";
13+
14+
@import (less, once) "pygmentize.less";
15+
@import (less, once) "dropdown.less";
16+
17+
/* TODO: port them too */
18+
@import (inline) "old_design.css";
19+
@import (inline) "sphinx_design.css";
20+
21+
/* @import "obsolete.less"; */

_theme/tarantool/_less/dropdown.less

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
@import (reference) "mixins";
2+
3+
@dropdown-open : data-uri('data:image/png;base64', 'icons/dropdown-open.png');
4+
@dropdown-close: data-uri('data:image/png;base64', 'icons/dropdown-close.png');
5+
6+
// dropdown-list:
7+
// * dropdown-list-item ->
8+
// -> dropdown-list-item-url
9+
// -> dropdown-list-item-content
10+
// * ...
11+
12+
.dropdown-list-item-content {
13+
.transition-ease();
14+
}
15+
16+
.dropdown-list {
17+
margin: 0;
18+
padding: 0;
19+
display: block;
20+
list-style: none;
21+
border-top: 1px solid #e5e5e5;
22+
23+
.dropdown-list-item {
24+
color: #404040;
25+
padding: 14px 0;
26+
font-size: 18px;
27+
border-bottom: 1px solid #e5e5e5;
28+
.b-example-code {
29+
margin-left: 14px;
30+
}
31+
}
32+
}
33+
34+
.dropdown-list-item-content {
35+
color: #404040;
36+
filter: alpha(opacity=0);
37+
height: 0px;
38+
opacity: 0;
39+
overflow: hidden;
40+
font-size: 14px;
41+
padding-left: 17px;
42+
padding-right: 40px;
43+
.transition-ease();
44+
a {
45+
text-decoration: none;
46+
}
47+
a:hover {
48+
text-decoration: underline;
49+
}
50+
ul {
51+
padding-left: 18px;
52+
}
53+
&.dropdown-open {
54+
filter: alpha(opacity=100);
55+
height: auto;
56+
opacity: 1;
57+
padding-top: 17px;
58+
padding-bottom: 12px;
59+
}
60+
}
61+
62+
.dropdown-list-item-url {
63+
color: inherit;
64+
display: block;
65+
text-decoration: none;
66+
&.dropdown-close {
67+
background-image: @dropdown-close;
68+
}
69+
&.dropdown-open {
70+
color: #168de2;
71+
background-image: @dropdown-open;
72+
}
73+
&.dropdown-close,
74+
&.dropdown-open {
75+
padding-right: 40px;
76+
background-repeat: no-repeat;
77+
background-position: 100% 50%;
78+
}
79+
}
80+
81+
@media screen and (max-width: 992px) {
82+
.dropdown-list-item {
83+
font-size: 16px;
84+
padding: 11px 0;
85+
}
86+
.dropdown-list-item-content.dropdown-open {
87+
padding: 25px 0 15px;
88+
}
89+
}

www/theme/static/font-awesome.min.css renamed to _theme/tarantool/_less/font-awesome.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
142 Bytes
Loading
251 Bytes
Loading
260 Bytes
Loading
625 Bytes
Loading
135 Bytes
Loading
236 Bytes
Loading
152 Bytes
Loading
1.13 KB
Loading
1.16 KB
Loading
396 Bytes
Loading
216 Bytes
Loading
1.16 KB
Loading
File renamed without changes.

_theme/tarantool/_less/mixins.less

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.transition-ease() {
2+
-webkit-transition: all 0.2s ease-in-out;
3+
-moz-transition: all 0.2s ease-in-out;
4+
-o-transition: all 0.2s ease-in-out;
5+
-ms-transition: all 0.2s ease-in-out;
6+
transition: all 0.2s ease-in-out;
7+
}
8+
9+
.block-list() {
10+
margin: 0;
11+
padding: 0;
12+
display: block;
13+
list-style: none;
14+
}

0 commit comments

Comments
 (0)