omi/index.html

446 lines
13 KiB
HTML
Raw Normal View History

2019-03-05 11:18:51 +08:00
<!DOCTYPE html>
<html>
2019-08-29 09:57:46 +08:00
2019-03-05 11:18:51 +08:00
<head>
2020-04-25 17:53:54 +08:00
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<title>Omi - Front End Cross-Frameworks Framework</title>
<link rel="shortcut icon" href="https://tencent.github.io/omi/packages/omiu/examples/build/favicon.ico">
<style>
html,
body {
padding: 0;
margin: 0;
overflow-x: hidden;
}
canvas {
padding: 0;
margin: 0;
border: 0;
}
#container {
text-align: center;
}
</style>
<style>
body {
background-color: #302f33;
/*opacity: 0;*/
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
text-transform: uppercase;
font-size: 12px;
letter-spacing: 2px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/*body.ready { opacity: 1; }*/
.icon-text path,
.icon-text polygon {
/*opacity: 0;*/
}
.info {
text-align: center;
}
.description {
/*opacity: 0;*/
color: white;
margin-top: 20px;
}
.links {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
@media (min-width: 700px) {
.links {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
}
}
.button {
/*opacity: 0;*/
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
width: 180px;
height: 60px;
text-decoration: none;
}
.button.blue {
color: #5E89FB;
}
.button.green {
color: #07C160;
}
.button.red {
color: #F95050;
}
.button svg {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
stroke-width: 1;
fill: none;
fill-rule: evenodd;
stroke: currentColor;
}
.button.green svg {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}
.button path {
scale: .9;
transform-origin: 50% 50%;
}
.credits {
/*opacity: 0;*/
margin-top: 20px;
color: #979797;
}
.credits a {
position: relative;
color: currentColor;
text-decoration: none;
}
.credits a:after {
content: "";
/*opacity: 0;*/
display: block;
position: absolute;
left: 0;
bottom: -3px;
width: 100%;
border-bottom: 1px solid currentColor;
transition: opacity .75s ease;
}
/*.credits a:hover:after {
2019-03-05 11:18:51 +08:00
opacity: 1;
transition: opacity .25s ease;
}*/
2020-04-25 17:53:54 +08:00
.credits a,
.credits span {
transition: color .75s ease;
}
2019-08-29 09:57:46 +08:00
2020-04-25 17:53:54 +08:00
.credits a:hover,
.highlighted {
color: white;
transition: color .25s ease;
}
2019-08-29 09:57:46 +08:00
2020-04-25 17:53:54 +08:00
#container {
margin-top: 100px;
}
2019-08-29 09:57:46 +08:00
2020-04-25 17:53:54 +08:00
#container img {
width: 150px;
}
2019-10-03 16:51:22 +08:00
2020-04-25 17:53:54 +08:00
@media only screen and (max-width: 500px) {
#container canvas {
width: 100%;
}
2019-10-03 16:51:22 +08:00
2020-04-25 17:53:54 +08:00
#container img {
width: 80px;
}
2019-10-03 16:51:22 +08:00
2020-04-25 17:53:54 +08:00
#container {
margin-top: 25px;
}
2019-10-03 16:51:22 +08:00
2020-04-25 17:53:54 +08:00
}
2019-08-29 09:57:46 +08:00
2020-04-25 17:53:54 +08:00
#wp {
z-index: 10;
}
</style>
2019-03-05 11:18:51 +08:00
</head>
<body>
2020-04-25 17:53:54 +08:00
<div id="wp">
<div id="container">
<img src="https://tencent.github.io/omi/assets/omi-logo2019.svg">
</div>
<div class="info">
<p class="description">
Front End Cross-Frameworks Framework
</p>
<div class="links">
2020-04-25 20:06:31 +08:00
<a class="button" style='color: #07c160;' href="https://tencent.github.io/omi/site/docs/index.html"
2020-04-25 17:53:54 +08:00
target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span>Omi Docs</span>
</a>
2021-08-06 15:23:22 +08:00
<a class="button" style='color: #07c160;' href="https://github.com/Tencent/omi/tree/master/packages/admin"
target="_blank">
2020-04-25 17:53:54 +08:00
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
2021-08-06 15:23:22 +08:00
<span>Omi Admin</span>
2020-04-25 17:53:54 +08:00
</a>
2021-05-17 11:11:01 +08:00
2021-08-16 12:49:56 +08:00
<a class="button" style='color: #07c160;'
href="https://tencent.github.io/omi/packages/admin/dist/index.html#/docs/introduction" target="_blank">
2020-04-25 17:53:54 +08:00
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
2021-08-06 15:23:22 +08:00
<span>Omiu Docs</span>
2020-04-25 17:53:54 +08:00
</a>
2021-06-26 08:49:21 +08:00
2021-08-06 15:23:22 +08:00
<a class="button" style='color: #07c160;' href="https://github.com/Tencent/omi/tree/master/packages/omi-cli"
2021-06-26 08:49:21 +08:00
target="_blank">
2020-05-26 09:08:44 +08:00
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
2021-08-06 15:23:22 +08:00
<span>Omi CLI</span>
2020-05-26 09:08:44 +08:00
</a>
2021-06-26 08:49:21 +08:00
2021-08-06 15:23:22 +08:00
2020-04-27 08:28:34 +08:00
</div>
2021-06-23 21:18:06 +08:00
2020-04-27 08:28:34 +08:00
<div class="links">
2021-06-26 08:49:21 +08:00
2021-08-06 15:23:22 +08:00
<a class="button" style='color: #07c160;' href="https://github.com/Tencent/omi/tree/master/packages/omi-router"
2021-06-26 08:49:21 +08:00
target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
2021-08-06 15:23:22 +08:00
<span>Omi Router</span>
2021-06-26 08:49:21 +08:00
</a>
<a class="button" style='color: #5bbebd;' href="https://components.studio/" target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span style="transform:scale(0.9) ">Components.Studio</span>
</a>
<a class="button " style='color: #5bbebd;' href="https://webcomponents.dev/" target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span style="transform: scale(0.9);">webcomponents.dev</span>
</a>
2021-06-23 21:18:06 +08:00
<!-- <a class="button" style='color: #07c160;' href="https://github.com/Tencent/omi/tree/master/packages/omi-kbone"
2020-04-25 17:53:54 +08:00
target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span>Omi + Kbone</span>
</a>
2020-04-27 08:28:34 +08:00
2021-05-17 11:11:01 +08:00
<a class="button" style='color: #07c160;' href="https://github.com/Tencent/omi/tree/master/packages/omix"
2020-04-25 17:53:54 +08:00
target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
2021-05-17 11:11:01 +08:00
<span>Omix + 小程序</span>
2021-06-23 21:18:06 +08:00
</a> -->
2020-04-25 17:53:54 +08:00
2020-04-27 08:28:34 +08:00
<!--
2020-04-25 20:06:31 +08:00
<a class="button" style='color: #6cb0f5'
2020-04-25 17:53:54 +08:00
href="https://tencent.github.io/omi/packages/omim/docs/build/index.html" target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span>Omim Docs</span>
2020-04-27 08:28:34 +08:00
</a> -->
2021-06-23 21:18:06 +08:00
<!-- <a class="button" style='color: #61dafb;' href="https://github.com/Tencent/omi/tree/master/packages/omis"
2020-04-25 17:53:54 +08:00
target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span>Omis + React</span>
2021-06-23 21:18:06 +08:00
</a> -->
2020-04-25 17:53:54 +08:00
<a class="button" style='color:white;' href="https://github.com/Tencent/omi" target="_blank">
<svg viewBox="0 0 180 60">
<path
d="M10,10 C10,10 50,9.98999977 90,9.98999977 C130,9.98999977 170,10 170,10 C170,10 170.009995,20 170.009995,30 C170.009995,40 170,50 170,50 C170,50 130,50.0099983 90,50.0099983 C50,50.0099983 10,50 10,50 C10,50 9.98999977,40 9.98999977,30 C9.98999977,20 10,10 10,10 Z">
</path>
</svg>
<span>GitHub</span>
</a>
</div>
<p class="credits">
2021-05-17 11:11:49 +08:00
Copyright<span class="version"></span> © <span class="date">2021</span> Tencent
2020-04-25 17:53:54 +08:00
</p>
</div>
</div>
<pre style="position:absolute;left:40px;top:40px;transform:rotateZ(5deg);pointer-events: none;text-transform:none;">
2019-03-05 11:18:51 +08:00
<code>
2021-06-17 10:47:28 +08:00
import { tag, WeElement, h, extractClass } from 'omi'
import * as css from './index.scss'
interface Props {
size?: 'medium' | 'small' | 'mini',
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'
plain?: boolean,
round?: boolean,
circle?: boolean,
loading?: boolean,
disabled?: boolean,
icon?: string,
autofocus?: boolean,
nativeType?: 'button' | 'submit' | 'reset',
block?: boolean
text?: string
}
2019-03-05 11:18:51 +08:00
2021-06-17 10:47:28 +08:00
@tag('o-button')
export default class Button extends WeElement&lt;Props&gt;{
static css = css
static defaultProps = {
plain: false,
round: false,
circle: false,
loading: false,
disabled: false,
autofocus: false,
nativeType: 'button',
block: false
2019-03-05 11:18:51 +08:00
}
2021-06-17 10:47:28 +08:00
static propTypes = {
size: String,
type: String,
plain: Boolean,
round: Boolean,
circle: Boolean,
loading: Boolean,
disabled: Boolean,
icon: String,
autofocus: Boolean,
nativeType: String,
block: Boolean,
text: String
2019-10-25 15:49:07 +08:00
}
2019-03-05 11:18:51 +08:00
2021-06-17 10:47:28 +08:00
render(props) {
return &lt;button disabled={props.disabled} {...extractClass(props, 'o-button', {
['o-button-' + props.type]: props.type,
['o-button-' + props.size]: props.size,
'is-plain': props.plain,
'is-round': props.round,
'is-circle': props.circle,
'is-disabled': props.disabled,
'is-block': props.block
})} type={props.nativeType} &gt;
{props.loading && &lt;i class='icon-loading'&gt;&lt;/i&gt;}
{props.text}
&lt;slot&gt;&lt;/slot&gt;
&lt;/button&gt;
}
}</code>
2019-03-05 11:18:51 +08:00
</pre>
2019-03-05 11:18:51 +08:00
2020-04-25 17:53:54 +08:00
<script>
function detectMobile() {
if (window.innerWidth <= 800 && window.innerHeight <= 900) {
return true;
} else {
return false;
}
}
2019-10-03 16:51:22 +08:00
2020-04-25 17:53:54 +08:00
if (detectMobile()) {
2020-04-27 08:28:34 +08:00
document.getElementById('wp').style.marginTop = (window.innerHeight - 600) / 2 + 'px'
2019-04-02 08:57:35 +08:00
2020-04-25 17:53:54 +08:00
} else {
document.getElementById('wp').style.marginTop = (window.innerHeight - 700) / 2 + 'px'
2019-04-02 08:57:35 +08:00
2020-04-25 17:53:54 +08:00
}
2019-04-02 08:57:35 +08:00
2020-04-25 17:53:54 +08:00
</script>
2019-03-05 11:18:51 +08:00
</body>
2019-08-29 09:57:46 +08:00
2021-06-23 21:18:06 +08:00
</html>