Skip to content

Commit 51a6f81

Browse files
committed
Switch to card-style tabs to prevent SSR rendering issues of code-groups
Once [this issue]( vuejs/vuepress#2711) with VuePress is fixed, we might be able to use the prettier code-groups again :-)
1 parent 5716b4f commit 51a6f81

File tree

1 file changed

+61
-75
lines changed

1 file changed

+61
-75
lines changed

docs/developer-docs/latest/getting-started/quick-start.md

Lines changed: 61 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -84,44 +84,46 @@ next: ./troubleshooting
8484
<!-- We use the vuepress-plugin-tabs plugin but customize tabs. -->
8585
<!-- Not sure why I doesn't work if CSS is scoped 🤷 -->
8686
<style lang="scss">
87-
.el-tabs--card {
88-
.el-tabs__nav,
89-
.el-tabs__header,
90-
.el-tabs__item {
91-
border: none !important;
92-
}
93-
94-
.el-tabs__header {
95-
padding-top: 3em;
96-
}
87+
/* I know some selectors are ugly, but I needed to target the proper nav and not conflict with the other "card"-style tabs embedded */
9788

98-
.el-tabs__nav {
99-
width: 100%;
100-
}
89+
.el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav,
90+
.el-tabs--card > .el-tabs__header {
91+
border: none !important;
92+
}
10193

102-
.el-tabs__header .el-tabs__item {
103-
height: 60px;
104-
text-align: center;
105-
line-height: 60px;
106-
font-size: 110%;
107-
width: 50%;
108-
border-radius: 0 8px 8px 0 !important;
109-
border: solid 1px #bbbbba !important;
110-
111-
&.is-active {
112-
border: none;
113-
}
94+
.el-tabs--card > .el-tabs__header {
95+
padding-top: 3em;
96+
}
11497

115-
&:first-child {
116-
border-radius: 8px 0 0 8px !important;
117-
border-right: none !important;
118-
}
98+
.el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav {
99+
width: 100%;
100+
height: 62px;
101+
}
119102

120-
&:not(.is-active) {
121-
background-color: #f8f8f8;
122-
color: #787878;
123-
}
124-
}
103+
.el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav > .el-tabs__item {
104+
height: 60px;
105+
text-align: center;
106+
line-height: 60px;
107+
font-size: 110%;
108+
width: 50%;
109+
border-radius: 0 8px 8px 0 !important;
110+
border: solid 1px #bbbbba !important;
111+
}
112+
113+
.el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav > .el-tabs__item.is-active {
114+
/* border: none; */
115+
/* height: 62px; */
116+
/* border-bottom: solid 1px red !important; */
117+
}
118+
119+
.el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav > .el-tabs__item:first-child {
120+
border-radius: 8px 0 0 8px !important;
121+
border-right: none !important;
122+
}
123+
124+
.el-tabs--card > .el-tabs__header > .el-tabs__nav-wrap > .el-tabs__nav-scroll > .el-tabs__nav > .el-tabs__item:not(.is-active) {
125+
background-color: #f8f8f8;
126+
color: #787878;
125127
}
126128

127129
.image--50 {
@@ -145,10 +147,10 @@ Make sure [Node.js and npm are properly installed](/developer-docs/latest/setup-
145147
* the **Starters** path for the quickest way to spin up a fullstack application powered by a Strapi back end,
146148
* or the **Hands-on** path for a more DIY approach to run your project.
147149

148-
::::: tabs type:card
150+
:::::: tabs type:card
149151
<!-- we need 5 colons or it will conflict with the callouts markup -->
150152

151-
:::: tab Starters
153+
::::: tab Starters
152154

153155
## 🚀 Part A: Create a new project with Strapi starters
154156

@@ -160,26 +162,17 @@ This quick start guide has been specifically tailored to use the [Gatsby blog st
160162

161163
To create a [Gatsby](https://www.gatsbyjs.com/) blog using Strapi, run the following command in a terminal:
162164

163-
<ClientOnly>
164-
<code-group>
165-
<code-block title="NPM">
166-
167-
```bash
165+
:::: tabs card
166+
::: tab npm
167+
```bash
168168
npx create-strapi-starter my-project gatsby-blog
169-
```
170-
171-
</code-block>
172-
173-
<code-block title="YARN">
174-
175-
```bash
169+
```
170+
:::
171+
::: tab yarn
172+
```bash
176173
yarn create strapi-starter my-project gatsby-blog
177-
```
178-
179-
</code-block>
180-
181-
</code-group>
182-
</ClientOnly>
174+
```
175+
::::
183176

184177
During the installation, when terminal asks `Choose your installation type`: select the default `Quickstart (recommended)` option by pressing Enter. The installation then resumes — just let the magic happen!
185178

@@ -291,36 +284,29 @@ The beauty of using Strapi [starters](https://strapi.io/starters) is that the St
291284
* Read more about the [starters CLI](https://strapi.io/blog/announcing-the-strapi-starter-cli) on our blog.
292285
* Start another project! We have lots of other [Starters](https://strapi.io/starters) you can use to kickstart your blog, e-commerce, corporate website, or portfolio project.
293286

294-
::::
287+
:::::
295288

296-
:::: tab Hands-on
289+
::::: tab Hands-on
297290

298291
## 🚀 Part A: Create a new project with Strapi
299292

300293
### Step 1: Run the installation script
301294

302295
Run the following command in a terminal:
303296

304-
<ClientOnly>
305-
<code-group>
306-
<code-block title="NPM">
307-
308-
```bash
297+
:::: tabs card
298+
::: tab npm
299+
```bash
309300
npx create-strapi-app my-project --quickstart
310-
```
311-
312-
</code-block>
313-
314-
<code-block title="YARN">
301+
```
302+
:::
315303

316-
```bash
304+
::: tab yarn
305+
```bash
317306
yarn create strapi-app my-project --quickstart
318-
```
319-
320-
</code-block>
321-
322-
</code-group>
323-
</ClientOnly>
307+
```
308+
:::
309+
::::
324310

325311
### Step 2: Register the first administrator user
326312

@@ -515,6 +501,6 @@ The next step is to deploy both your Strapi back end and the front end on the pl
515501

516502
👉 You can deploy the Strapi back end on various services: Amazon AWS, Microsoft Azure, DigitalOcean, Google App Engine, Heroku, and many more (see our [Deployment guides](/developer-docs/latest/setup-deployment-guides/deployment.md)).
517503

518-
::::
519-
520504
:::::
505+
506+
::::::

0 commit comments

Comments
 (0)