Skip to content

Commit c671436

Browse files
author
donghwi park
committed
Merge branch 'source' of https://github.com/gulpjs/gulpjs.github.io into source
2 parents 66ba3d6 + 929a2bf commit c671436

File tree

3 files changed

+31
-84
lines changed

3 files changed

+31
-84
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Deploy
2323
# Use the SHA because I am untrustworthy
2424
# TODO: We probably should fork any non-GitHub owned actions
25-
uses: peaceiris/actions-gh-pages@1828d86
25+
uses: peaceiris/actions-gh-pages@1828d864aeb7ba79a37f40035aa6d0b7ff66254f
2626
with:
2727
github_token: ${{ secrets.GITHUB_TOKEN }}
2828
publish_dir: ./build

src/css/docs.css

Lines changed: 27 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
--ifm-global-shadow-lw: 1px 2px 5px 1px rgba(0, 0, 0, 0.1);
55
/* Font */
66
/* TODO: maybe this should be --ifm-font-family-primary */
7-
--ifm-font-family-base: 'Poppins', sans-serif;
7+
--ifm-font-family-base: "Poppins", sans-serif;
88
/* TODO: add to ifm as ifm-font-family-secondary? */
99
--font-family-secondary: "Roboto", sans-serif;
1010
--font-weight-secondary: 900;
@@ -27,7 +27,7 @@
2727
--ifm-navbar-link-color: var(--ifm-color-white);
2828
--ifm-navbar-link-hover-color: var(--ifm-color-white);
2929
--ifm-navbar-link-hover-decoration: underline;
30-
/* Search */
30+
/* Plugin(?) Search */
3131
--ifm-navbar-search-input-background-color: var(--ifm-color-primary-darkest);
3232
--ifm-navbar-search-input-color: var(--ifm-color-white);
3333
--ifm-navbar-search-input-placeholder-color: var(--ifm-color-white);
@@ -170,29 +170,39 @@ table tr td + td + td:last-child {
170170
border-radius: var(--ifm-global-radius);
171171
}
172172

173-
/* Search */
174-
.DocSearch.DocSearch-Button {
175-
width: 12.5rem;
173+
/* Navbar search */
174+
.navbar__items .DocSearch-Button {
176175
height: 2.25rem;
177176
font-size: 1rem;
178-
border-radius: 0;
179-
color: #ffffff;
180-
background-color: #9a2829;
177+
border-radius: var(--ifm-global-radius);
178+
color: var(--ifm-color-white);
179+
background-color: var(--ifm-color-primary-darkest);
181180
font-family: var(--ifm-font-family-base);
182181
}
183-
.DocSearch.DocSearch-Button:hover {
184-
background-color: #9a2829;
185-
color: #ffffff;
186-
height: 2.25rem;
182+
.navbar__items .DocSearch-Button:active,
183+
.navbar__items .DocSearch-Button:focus,
184+
.navbar__items .DocSearch-Button:hover {
185+
color: var(--ifm-color-primary-darkest);
187186
}
188187
.navbar__items .DocSearch-Button .DocSearch-Search-Icon {
189188
width: 1rem;
190189
height: 1rem;
191-
color: #ffffff;
190+
color: var(--ifm-color-white);
191+
}
192+
.navbar__items .DocSearch-Button:active .DocSearch-Search-Icon,
193+
.navbar__items .DocSearch-Button:focus .DocSearch-Search-Icon,
194+
.navbar__items .DocSearch-Button:hover .DocSearch-Search-Icon {
195+
color: var(--ifm-color-primary-darkest);
192196
}
193197
.DocSearch .DocSearch-Button-Keys {
194198
display: none;
195199
}
200+
/* More qualifiers than built-in styles */
201+
.DocSearch-Modal .DocSearch-Form,
202+
.DocSearch-Modal .DocSearch-Hit,
203+
.DocSearch-Modal .DocSearch-Hit a {
204+
border-radius: var(--ifm-global-radius);
205+
}
196206

197207
/* Footer (for logo) */
198208
.footer__col:first-of-type .footer__item {
@@ -208,43 +218,16 @@ table tr td + td + td:last-child {
208218
}
209219
}
210220

211-
/* Tons of hacks for the algolia search to look good on mobile */
212221
@media only screen and (max-width: 600px) {
213-
.DocSearch.DocSearch-Button {
222+
.navbar__items .DocSearch-Button {
214223
width: 100%;
215224
margin: 0;
216-
height: 2.25rem;
217-
font-size: 1rem;
218-
border-radius: 0;
219-
color: #ffffff;
220-
background-color: #9a2829;
221-
font-family: var(--ifm-font-family-base);
222225
}
223-
span.DocSearch-Button-Placeholder {
226+
.navbar__items .DocSearch-Button-Placeholder {
224227
display: block;
225228
}
226-
.navbar .navbar__search {
227-
width: 100%;
228-
}
229-
.search-icon-hidden {
230-
display: none !important;
231-
}
232-
.navbar .navbar__search .navbar__search-input {
233-
width: 100% !important;
234-
}
235-
236-
.navbar .algolia-autocomplete {
237-
width: 100%;
238-
display: block;
239-
}
240-
.navbar .algolia-autocomplete .ds-dropdown-menu {
241-
position: absolute !important;
242-
right: 0.5rem !important;
243-
max-width: calc(100% - 1rem);
244-
}
245229
}
246230

247-
/* TODO: These will need to be update when "Enterprise" is added */
248231
@media only screen and (max-width: 767px) {
249232
.navbar .navbar__inner {
250233
display: block;
@@ -256,31 +239,17 @@ table tr td + td + td:last-child {
256239
justify-content: space-around;
257240
flex-wrap: wrap;
258241
}
259-
260-
/* .navbar .navbar__items.navbar__items--right {
261-
justify-content: space-around;
262-
} */
263-
264-
.navbar .navbar__search {
265-
padding-left: 0;
266-
}
267242
}
268243

269244
@media only screen and (min-width: 768px) {
270-
.navbar .navbar__search .navbar__search-input {
245+
.navbar__items .DocSearch-Button {
271246
width: 9.5rem;
272247
}
273248
}
274249

275250
@media only screen and (min-width: 996px) {
276-
.navbar .navbar__search .navbar__search-input {
251+
.navbar .DocSearch-Button {
277252
width: 12.5rem;
278-
transition: width 0.5s ease 0s;
279-
}
280-
281-
.navbar .navbar__search .navbar__search-input:active,
282-
.navbar .navbar__search .navbar__search-input:focus {
283-
width: 16.5rem;
284253
}
285254
}
286255

@@ -331,8 +300,3 @@ table tr td + td + td:last-child {
331300
box-shadow: 6px 6px 0 0 var(--ifm-color-secondary);
332301
transition: box-shadow 0.1s ease-in, transform 0.1s ease-in;
333302
}
334-
335-
/* Fix: show "Copy to clipboard" button */
336-
button.copyButton_node_modules-\@docusaurus-theme-classic-src-theme-CodeBlock- {
337-
color: var(--ifm-color-white);
338-
}

src/theme/Navbar/index.js

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import React, { useCallback, useState, useEffect } from 'react';
8+
import React, { useState, useEffect } from 'react';
99
import classnames from 'classnames';
1010
import Link from '@docusaurus/Link';
1111
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
@@ -14,7 +14,6 @@ import isInternalUrl from '@docusaurus/isInternalUrl';
1414
import { useLocation } from '@docusaurus/router';
1515

1616
import SearchBar from '@theme/SearchBar';
17-
// import Toggle from '@theme/Toggle';
1817
import useThemeContext from '@theme/hooks/useThemeContext';
1918
import useHideableNavbar from '@theme/hooks/useHideableNavbar';
2019
import Logo from '@theme/Logo';
@@ -119,26 +118,18 @@ function Navbar() {
119118
const {
120119
siteConfig: {
121120
themeConfig: {
122-
navbar: { title, items = [], hideOnScroll = false } = {},
123-
disableDarkMode = false,
121+
navbar: { items = [], hideOnScroll = false } = {},
124122
},
125123
},
126-
isClient,
127124
} = useDocusaurusContext();
128125

129126
const location = useLocation();
130127
const [enableSearch, setEnableSearch] = useState(notPluginPage(location.pathname));
131128
useEffect(() => {
132129
setEnableSearch(notPluginPage(location.pathname));
133130
}, [location]);
134-
const { isDarkTheme, setLightTheme, setDarkTheme } = useThemeContext();
135131
const { navbarRef, isNavbarVisible } = useHideableNavbar(hideOnScroll);
136132

137-
// const onToggleChange = useCallback(
138-
// e => (e.target.checked ? setDarkTheme() : setLightTheme()),
139-
// [setLightTheme, setDarkTheme],
140-
// );
141-
142133
return (
143134
<nav
144135
ref={navbarRef}
@@ -148,7 +139,7 @@ function Navbar() {
148139
})}>
149140
<div className="navbar__inner">
150141
<div className="navbar__items">
151-
<Logo
142+
<Logo
152143
className="navbar__brand"
153144
imageClassName="navbar__logo"
154145
/>
@@ -164,14 +155,6 @@ function Navbar() {
164155
.map((linkItem, i) => (
165156
<NavItem {...linkItem} key={i} />
166157
))}
167-
{/* {!disableDarkMode && (
168-
<Toggle
169-
className={styles.displayOnlyInLargeViewport}
170-
aria-label="Dark mode toggle"
171-
checked={isDarkTheme}
172-
onChange={onToggleChange}
173-
/>
174-
)} */}
175158
{enableSearch && (
176159
<SearchBar
177160
handleSearchBarToggle={noop}

0 commit comments

Comments
 (0)