-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add cli.guance.io as Homepage (#48)
- Loading branch information
1 parent
0b701b0
commit 0d50a4c
Showing
66 changed files
with
4,520 additions
and
394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.next | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Shu Ding | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# Documentation | ||
|
||
## Table of Contents | ||
This is a documentation folder for Guance CLI. | ||
|
||
- [References](./references/guance.md) | ||
## Local Development | ||
|
||
First, run `pnpm i` to install the dependencies. | ||
|
||
Then, run `pnpm dev` to start the development server and visit localhost:3000. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
interface ButtonProps { | ||
href: string | ||
title: string | ||
type: string | ||
} | ||
|
||
export default function Button(props: ButtonProps) { | ||
return <div className="mt-6"> | ||
<a href={props.href} target="_blank"> | ||
<button className={`btn btn-${props.type}`}>{props.title}</button> | ||
</a> | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
interface CardProps { | ||
title: string | ||
children: JSX.Element, | ||
type?: "future" | "complete" | "beta" | ||
} | ||
|
||
export const Cards = function(props: {children: JSX.Element[]}) { | ||
return <div className="grid grid-cols-3 gap-4"> | ||
{props.children} | ||
</div> | ||
} | ||
|
||
export const Card = function(props: CardProps) { | ||
return <div className="card w-96 bg-base-100 border mt-4 shadow-sm"> | ||
<div className="card-body"> | ||
<h2 className="card-title"> | ||
{props.title} | ||
{props.type == "future" && <span className="badge badge-lg badge-primary">FUTURE</span>} | ||
{props.type == "complete" && <span className="badge badge-lg badge-success">COMPLETE</span>} | ||
{props.type == "beta" && <span className="badge badge-lg badge-accent">BETA</span>} | ||
</h2> | ||
{props.children} | ||
</div> | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export default function Footer() { | ||
return <footer className="footer footer-center p-10 text-base-content rounded"> | ||
<nav className="grid grid-flow-col gap-4"> | ||
<a className="link link-hover" href="https://guance.io/" target="_blank">Community</a> | ||
<a className="link link-hover" href="https://github.com/GuanceCloud/guance-cli" target="_blank">GitHub</a> | ||
</nav> | ||
<nav> | ||
<div className="grid grid-flow-col gap-4"> | ||
<a href="https://github.com/GuanceCloud/guance-cli" target="_blank"> | ||
<svg width="24" height="24" fill="currentColor" viewBox="3 3 18 18"><title xt-marked="ok">GitHub</title><path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path></svg> | ||
</a> | ||
|
||
</div> | ||
</nav> | ||
<aside> | ||
<p>This project is under MIT License</p> | ||
</aside> | ||
</footer> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* .card img { | ||
aspect-ratio: 12/6.3; | ||
object-fit: cover; | ||
} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import {Cards} from 'nextra/components' | ||
import './index.module.css' | ||
import Image from "next/image"; | ||
import killerCoda from "../../public/killercoda.svg"; | ||
|
||
|
||
interface TrainingsProps { | ||
title: string | ||
description: string | ||
items: Training[] | ||
} | ||
|
||
interface Training { | ||
title: string | ||
href: string | ||
} | ||
|
||
export default function Trainings(props: TrainingsProps) { | ||
return <> | ||
<h1 className="mt-10 mb-4 text-center text-[2.5rem] font-bold tracking-tight"> | ||
{props.title} | ||
</h1> | ||
|
||
<p className="mb-16 text-center text-lg text-gray-500 dark:text-gray-400"> | ||
{props.description} | ||
</p> | ||
|
||
<Integrations> | ||
{props.items.map((item, index) => { | ||
return <Item key={index} title={item.title} href={item.href}> | ||
<div className="bg-black p-10"> | ||
<Image src={killerCoda} alt="KillerCoda"/> | ||
</div> | ||
</Item> | ||
})} | ||
|
||
</Integrations> | ||
</> | ||
} | ||
export const Integrations = (props) => { | ||
return <Cards {...props} /> | ||
} | ||
|
||
export const Item = ({children, ...props}) => { | ||
const cardProps = { | ||
...props, ...{ | ||
title: props.title || '未知', | ||
href: props.href || '', | ||
icon: props.icon || '', | ||
image: true, | ||
arrow: true, | ||
target: '_blank', | ||
} | ||
} | ||
return <Cards.Card {...cardProps}> | ||
<div className="bg-white">{children}</div> | ||
</Cards.Card> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { ChevronRightIcon } from '@heroicons/react/20/solid' | ||
|
||
export default function Example() { | ||
return ( | ||
<div className="bg-white"> | ||
<div className="relative isolate overflow-hidden bg-gradient-to-b from-indigo-100/20"> | ||
<div className="mx-auto max-w-7xl pb-24 pt-10 sm:pb-32 lg:grid lg:grid-cols-2 lg:gap-x-8 lg:px-8 lg:py-40"> | ||
<div className="px-6 lg:px-0 lg:pt-4"> | ||
<div className="mx-auto max-w-2xl"> | ||
<div className="max-w-lg"> | ||
<img | ||
className="h-11" | ||
src="/icon.png" | ||
alt="Guance Cloud" | ||
/> | ||
<div className="mt-24 sm:mt-32 lg:mt-16"> | ||
<a href="/docs/how-to-guides/grafana" className="inline-flex space-x-6"> | ||
<span className="rounded-full bg-indigo-600/10 px-3 py-1 text-sm font-semibold leading-6 text-indigo-600 ring-1 ring-inset ring-indigo-600/10"> | ||
What's new | ||
</span> | ||
<span className="inline-flex items-center space-x-2 text-sm font-medium leading-6 text-gray-600"> | ||
<span> | ||
🎉 Grafana importer is released. | ||
</span> | ||
<ChevronRightIcon className="h-5 w-5 text-gray-400" aria-hidden="true" /> | ||
</span> | ||
</a> | ||
</div> | ||
<h1 className="mt-10 text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl"> | ||
Your toolkit for Guance Cloud control-plane | ||
</h1> | ||
<p className="mt-6 text-lg leading-8 text-gray-600"> | ||
Developer-first toolkit to manage / export / import cloud resources on Guance. | ||
</p> | ||
<div className="mt-10 flex items-center gap-x-6"> | ||
<a | ||
href="/features" | ||
className="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" | ||
> | ||
View all features | ||
</a> | ||
<a href="/docs/tutorials/quickstart" className="text-sm font-semibold leading-6 text-gray-900"> | ||
Read documentation <span aria-hidden="true">→</span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="mt-20 sm:mt-24 md:mx-auto md:max-w-2xl lg:mx-0 lg:mt-0 lg:w-screen"> | ||
<div className="mockup-code min-h-full"> | ||
<pre data-prefix="$">guance login</pre> | ||
<pre data-prefix=">" className="text-success">Login as [email protected]!</pre> | ||
<pre></pre> | ||
<pre data-prefix="#" className="text-neutral-500">Import from external system</pre> | ||
<pre data-prefix="$">guance iac import grafana --search --search-tags o11y</pre> | ||
<pre data-prefix=">" className="text-warning">Found 42 dashboards.</pre> | ||
<pre data-prefix=">" className="text-success">Generate Guance code files.</pre> | ||
<pre></pre> | ||
<pre data-prefix="#" className="text-neutral-500">Manage cloud resources</pre> | ||
<pre data-prefix="$">guance api create-resource pipeline ...</pre> | ||
<pre data-prefix=">" className="text-success">Done!</pre> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="absolute inset-x-0 bottom-0 -z-10 h-24 bg-gradient-to-t from-white sm:h-32" /> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[[plugins]] | ||
package = "@netlify/plugin-nextjs" | ||
|
||
[build] | ||
publish = ".next" | ||
command = "npm run build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const withNextra = require('nextra')({ | ||
theme: 'nextra-theme-docs', | ||
themeConfig: './theme.config.tsx', | ||
defaultShowCopyCode: true, | ||
}) | ||
|
||
/** | ||
* @type {import('next').NextConfig} | ||
*/ | ||
module.exports = withNextra({ | ||
}) |
Oops, something went wrong.