-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:reearth/reearth-visualizer into fix…
…/text-input
- Loading branch information
Showing
18 changed files
with
1,789 additions
and
1,023 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
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,86 @@ | ||
import { FileType, PluginType } from "../../constants"; | ||
import { PRESET_PLUGIN_COMMON_STYLE } from "../common"; | ||
|
||
const yamlFile: FileType = { | ||
id: "ui-header-reearth-yml", | ||
title: "reearth.yml", | ||
sourceCode: `id: header-plugin | ||
name: Header | ||
version: 1.0.0 | ||
extensions: | ||
- id: header | ||
type: widget | ||
name: Header Widget | ||
description: Header Widget | ||
widgetLayout: | ||
extended: true | ||
defaultLocation: | ||
zone: outer | ||
section: center | ||
area: top | ||
`, | ||
disableEdit: true, | ||
disableDelete: true | ||
}; | ||
|
||
const widgetFile: FileType = { | ||
id: "ui-header-widget", | ||
title: "header.js", | ||
sourceCode: `reearth.ui.show(\` | ||
${PRESET_PLUGIN_COMMON_STYLE} | ||
<style> | ||
.header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 10px 16px; | ||
position: sticky; | ||
top: 0; | ||
} | ||
.header-logo img { | ||
height: 40px; | ||
cursor: pointer; | ||
} | ||
.header-menu { | ||
list-style: none; | ||
display: flex; | ||
gap: 15px; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.header-menu li { | ||
font-size: 14px; | ||
color: #555; | ||
cursor: pointer; | ||
transition: color 0.3s ease; | ||
} | ||
.header-menu li:active { | ||
color: #000; | ||
} | ||
</style> | ||
<div id="wrapper"> | ||
<div class="header"> | ||
<div class="header-logo"> | ||
<p>Re:Earth</p> | ||
</div> | ||
<ul class="header-menu"> | ||
<li>Home</li> | ||
<li>About</li> | ||
<li>Services</li> | ||
<li>Contact</li> | ||
<li>FAQ</li> | ||
</ul> | ||
</div> | ||
</div> | ||
\`); ` | ||
}; | ||
|
||
export const header: PluginType = { | ||
id: "header", | ||
title: "Header", | ||
files: [widgetFile, yamlFile] | ||
}; |
Oops, something went wrong.