Skip to content

Commit

Permalink
improve homepage on smaller screens
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Nov 6, 2023
1 parent 3178430 commit 9aaf10d
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 11 deletions.
35 changes: 35 additions & 0 deletions docs/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<script setup>
import DefaultTheme from 'vitepress/theme'
const { Layout } = DefaultTheme
</script>

<template>
<Layout>
<template #home-hero-image>
<div class="video-wrapper">
<video class="demo" autoplay muted loop>
<source src="/assets/demo.webm" type="video/webm">
</video>
</div>
</template>
</Layout>
</template>

<style>
.video-wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%; /* Adjust the height as needed to match the parent div's height */
}
.demo {
margin: auto;
border: double 4px transparent;
border-radius: 10px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00, #3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}
</style>
10 changes: 8 additions & 2 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import DefaultTheme from 'vitepress/theme'
import './custom.css'
import { Theme } from 'vitepress'
// @ts-ignore
import Layout from './Layout.vue'

export default DefaultTheme

export default {
extends: DefaultTheme,
Layout,
} as Theme
Binary file modified docs/assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/demo.webm
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
Require sunbeam

Output ./assets/demo.gif
Output ./assets/demo.webm

Set Framerate 30
Set Shell "bash"
Expand All @@ -63,7 +64,6 @@ Set Width 1200
Set Height 630
Set Padding 20
Set Theme "Tomorrow Night"
Set BorderRadius 20

Type "sunbeam" Sleep 500ms Enter

Expand Down
6 changes: 3 additions & 3 deletions docs/developer-guide/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo "Not implemented" >&2
exit 1
```

Here we define a single command named `search-docsets`, with a `view` mode.
Here we define a single command named `search-docsets`, with a mode set to `list`.

We can run our script to see the generated manifest:

Expand Down Expand Up @@ -80,7 +80,7 @@ Use "extension [command] --help" for more information about a command.

When the user run a command, the script is called with the command name as first argument.

Here the command name is `search-docsets`, and the command mode is `view`, so the script must return a view when called with this argument.
Here the command name is `search-docsets`, and the command mode is `list`, so the script must return a view when called with this argument.

We will use the `sunbeam fetch` command to fetch the list of docsets from the devdocs api. The `fetch` command allows you to perform http requests (with an api similar to curl).

Expand Down Expand Up @@ -210,7 +210,7 @@ elif [ "$COMMAND" = "search-entries" ]; then
fi
```

Here we add a new command named `search-entries`, with a `view` mode. We also add a `docset` parameter, which is required.
Here we add a new command named `search-entries`, with a `list` mode. We also add a `docset` parameter, which is required.

When the user run this command, the script is called with the command name as first argument, and the parameters as json on stdin.

Expand Down
7 changes: 2 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ hero:
name: Sunbeam
text: CLI Launcher
tagline: Elevate Your Command Line Experience
image:
src: /demo.gif
alt: VitePress
actions:
- theme: brand
text: Get Started
Expand All @@ -21,7 +18,7 @@ hero:
features:
- title: Augment your tools
icon: 🦾
details: Wrap your tools in slicks, keyboard-driven UIs with a few lines of code, using the language of your choice.
details: Wrap your tools in slick, keyboard-driven TUIs with a few lines of code, using the language of your choice.
- title: Cross-platform
icon: 🌍
details: Sunbeam is distributed as a single binary, available for windows, macos and linux.
Expand All @@ -32,7 +29,7 @@ features:
details: Since sunbeam extensions are just scripts, they are easy to write, easy to share, and easy to install.
- title: UNIX philosophy
icon: 🐧
details: Sunbeams relies on shebangs to run scripts. It integrates well with the rest of the UNIX ecosystem.
details: Sunbeam relies on shebangs to run scripts. It integrates well with the rest of the UNIX ecosystem.
link: /developer-guide/guidelines
linkText: Learn more
---
Expand Down
Binary file modified docs/public/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9aaf10d

Please sign in to comment.