Skip to content

Commit 1654469

Browse files
authored
Merge pull request #5 from dynamsoft-docs/jenny-branch
layout & header
2 parents 023ff0d + 8183d31 commit 1654469

File tree

5 files changed

+34
-61
lines changed

5 files changed

+34
-61
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview
4444
cp -rfp ./code-parser-docs-js/* ./DCPDocJS/
4545
cp -rfp ./Docs-Template-Repo-Preview/* ./DCPDocJS/
46-
cd DCPDocJS && bundle exec jekyll build
46+
cd DCPDocJS && bundle install && bundle exec jekyll build
4747
4848
- name: Sync files
4949
uses: SamKirkland/FTP-Deploy-Action@4.3.0
@@ -86,7 +86,7 @@ jobs:
8686
cp -rfp ./Docs-Template-Repo-Preview/* ./DCPDocJSPreview/
8787
sed -i -e "1,3s/blob\/master$/blob\/preview/" \
8888
-e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/DCPDocJSPreview/_config.yml
89-
cd DCPDocJSPreview && bundle exec jekyll build
89+
cd DCPDocJSPreview && bundle install && bundle exec jekyll build
9090
9191
- name: Sync files
9292
uses: SamKirkland/FTP-Deploy-Action@4.3.0

_includes/dcpNav.html

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,14 @@
11
<style>
2-
#cp-header .action-buttons {
3-
display: none;
4-
}
5-
6-
#mdHeader {
7-
border-bottom: 0!important;
8-
}
9-
10-
#sideBarCnt.sidebar-fixed {
11-
position: fixed;
12-
top: 88px;
13-
max-height: unset;
14-
}
15-
16-
.rightSideMenu.rsm-fixed {
17-
position: fixed;
18-
top: 100px;
19-
}
20-
21-
#docHead {
22-
top: 186px;
23-
}
24-
25-
.productMenu .downloadBtn:hover {
26-
color: #ffffff!important;
27-
}
28-
29-
@media (max-width: 1679px) {
30-
#docHead {
31-
top: 145px;
32-
}
2+
#cp-header .action-buttons { display: none; }
3+
#mdHeader { border-bottom: 0!important; }
4+
#sideBarCnt.sidebar-fixed { position: fixed; top: 88px; max-height: unset; }
5+
.rightSideMenu.rsm-fixed { position: fixed; top: 100px; }
6+
#docHead { top: 151px; }
7+
.productMenu .downloadBtn:hover { color: #ffffff!important; }
8+
@media (max-width: 1679px){
9+
#docHead {
10+
top: 145px;
11+
}
3312
}
3413
</style>
3514

_layouts/default-layout.html

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,14 @@
44
{%- include head.html -%}
55

66
<body class="dlrDoc">
7-
<div class="headWrapper">
8-
{%- include page_header.html -%}
9-
</div>
7+
{% assign url = 'https://www.dynamsoft.com/shared/head/' %}
8+
{% remote_include {{ url }} %}
9+
1010
{%- include dcpNav.html -%}
1111
<div class="sideBarIcon"><i class="fa fa-list" style="margin-right: 5px;"></i> Table of contents</div>
1212
<div class="container" id="categoryMenuTree">
1313
<div class="row">
14-
<div class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
15-
<div id="sideBarCnt">
16-
<div class="docSearchPart" style="margin-top: 30px;">
17-
<input id="txtSearch" class="search" type="text">
18-
</div>
19-
<div class="mainPage">
20-
<ul id="fullTreeMenuListContainer" name="listLevel1">
21-
</ul>
22-
</div>
23-
</div>
24-
</div>
25-
<div class="docContainer col-xs-12 col-md-9">
14+
<main class="docContainer col-xs-12 col-md-9">
2615
<div id="docHead" class = "head row hide-xs hide-sm">
2716
{%- include main-page-head.html -%}
2817
</div>
@@ -52,7 +41,18 @@
5241
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
5342
</div>
5443
</div>
55-
</div>
44+
</main>
45+
<aside class="sideBar col-xs-12 col-md-3 hide-xs hide-sm">
46+
<div id="sideBarCnt">
47+
<div class="docSearchPart" style="margin-top: 30px;">
48+
<input id="txtSearch" class="search" type="text">
49+
</div>
50+
<div class="mainPage">
51+
<ul id="fullTreeMenuListContainer" name="listLevel1">
52+
</ul>
53+
</div>
54+
</div>
55+
</aside>
5656
</div>
5757
</div>
5858
<div class="history list" id="categoryMenuTree_history">
@@ -71,13 +71,7 @@
7171

7272
<script type="text/javascript">
7373
anchors.add();
74-
</script>
75-
76-
<script type="text/javascript">
7774
UrlReplace();
78-
</script>
79-
80-
<script type="text/javascript">
8175
FullTreeMenuList('{{ page.needAutoGenerateSidebar }}', '{{ page.needGenerateH3Content }}', '{{ page.pageStartVer }}', '{{ site.useVersionTree }}');
8276
</script>
8377

_layouts/home-page.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
</style>
1818

1919
<body>
20-
<div class="headWrapper">
21-
{%- include page_header.html -%}
22-
</div>
20+
{% assign url = 'https://www.dynamsoft.com/shared/head/' %}
21+
{% remote_include {{ url }} %}
22+
2323
<div class="markdown-body homepageContainer container">
2424
<div class="row">
2525
<div class="col-xs-12 col-md-10 col-md-offset-1 col-xl-8 col-xl-offset-2">

_layouts/search-page.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@
108108
}
109109
</style>
110110
<body>
111-
<div class="headWrapper">
112-
{%- include page_header.html -%}
113-
</div>
111+
{% assign url = 'https://www.dynamsoft.com/shared/head/' %}
112+
{% remote_include {{ url }} %}
113+
114114
<div class="subHeadWrapper">
115115
<div id="DLRMenu" class="productMenu">
116116
<div class="container pcProductMenu">

0 commit comments

Comments
 (0)