Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add video player #79

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Vue 3 + Vite

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
9 changes: 9 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {

}
14 changes: 14 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
export {}

declare module 'vue' {
export interface GlobalComponents {
Cherry: typeof import('./src/components/Cherry.vue')['default']
Gop: typeof import('./src/components/gop.vue')['default']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
}
}
179 changes: 179 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/fb.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="test">
<meta name="twitter:description" content="test">
<meta name="twitter:image" content="https://public-cdn.mokahr.com/72f7c42e-b069-4e14-9c29-ee20229cc256.png">
<!--<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@nytimesbits" />
<meta name="twitter:creator" content="@nickbilton" />
<meta property="og:url" content="http://bits.blogs.nytimes.com/2011/12/08/a-twitter-for-my-sister/" />
<meta property="og:title" content="A Twitter for My Sister" />
<meta property="og:description" content="In the early days, Twitter grew so quickly that it was almost impossible to add new features because engineers spent their time trying to keep the rocket ship from stalling." />
<meta property="og:image" content="http://graphics8.nytimes.com/images/2011/12/08/technology/bits-newtwitter/bits-newtwitter-tmagArticle.jpg" />-->
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
<meta name="description" content="Linz">
<meta property="og:title" content="Linz">
<meta property="og:description" content="Linz">
<meta property="og:image" content="https://public-cdn.mokahr.com/72f7c42e-b069-4e14-9c29-ee20229cc256.png">
<meta property="og:url" content="http://8.130.26.238/animation/fb.html">
<meta property="og:type" content="website">


<title>Document</title>
</head>
<body>
<input id="share_button" type="button" value="share to facebook"/>
<input onclick="shareOnTwitter()" value="share to twitter" type="button"/>
<!--<input onclick="shareOnDiscord()" value="share to discord" type="button"/>-->
<!--<input onclick="shareOnWechat()" value="share to Wechat" type="button"/>-->
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>


<script type="text/JavaScript">

wx.config({
debug: true, // 开启调试模式
appId: 'your_app_id', // 必填,企业小程序的唯一标识
timestamp: 'your_timestamp', // 必填,生成签名的时间戳
nonceStr: 'your_nonce_str', // 必填,生成签名的随机串
signature: 'your_signature',// 必填,签名,见 附录-JS-SDK使用权限签名算法
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] // 必填,需要使用的JS接口列表
});


/**
* 分享到 facebook
* @param url
* @param title「无用可忽略」
* @param w
* @param h
* @returns {Window}
*/
function popupwindow(url, title, w, h) {
wLeft = window.screenLeft ? window.screenLeft : window.screenX;
wTop = window.screenTop ? window.screenTop : window.screenY;

var left = wLeft + (window.innerWidth / 2) - (w / 2);
var top = wTop + (window.innerHeight / 2) - (h / 2);
return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}

window.onload = function () {
document.getElementById('share_button').onclick = function () {
var shareUrl = "http://www.facebook.com/sharer/sharer.php?u=http://8.130.26.238/animation/fb.html";
popupwindow(shareUrl, 'facebook', 600, 400);
}
}


function shareOnTwitter() {
// var url = encodeURIComponent('http://8.130.26.238/animation/fb.html');
// var text = encodeURIComponent('Linz');
var url = 'http://8.130.26.238/animation/fb.html';
var text = "Test"
var via = "Test";
var hashtags = "Test";
var intentUrl = "https://twitter.com/intent/tweet?text="
+ encodeURIComponent(text) + "&url=" + encodeURIComponent(url)
+ "&via=" + encodeURIComponent(via) + "&hashtags=" + encodeURIComponent(hashtags);
// var shareUrl = 'https://twitter.com/intent/tweet?text=' + text + '&url=' + url;
window.open(intentUrl, "_blank", "width=550,height=420");
}

function shareOnDiscord() {
// var webhookUrl = "https://discord.com/api/webhooks/1192450011699609702/Mr8cJhiIpvMjSC2ZWiPeDy3exVtCHz5AwNNhKmCh2zEtMQ14TSxrwq08PLfRWColhKo-"; // 替换为您的 Webhook URL
var webhookUrl = "https://discord.com/api/webhooks/1193448349815275520/ZwCQaJHOlD__WYhIFTde-LjJj8mKakgujkvZvnFlCFUnnbYHSES-F6tkfsylVgqbs7vy"; // 替换为您的 Webhook URL
var content = "这是Linz的测试\n ";
// var imageUrl = "https://public-cdn.mokahr.com/72f7c42e-b069-4e14-9c29-ee20229cc256.png"; // 可选,要分享的图片链接
var payload = {
content: content,
embeds: [
{
title: 'QiNiu Official Website',
description: 'This is the description of the QiNiu card.',
url: "https://www.qiniu.com/",
/* thumbnail: {
url: 'https://public-cdn.mokahr.com/72f7c42e-b069-4e14-9c29-ee20229cc256.png',
},*/
image: {
url: "https://public-cdn.mokahr.com/72f7c42e-b069-4e14-9c29-ee20229cc256.png",
// proxy_url: "https://www.qiniu.com/",
},
fields: [
{
name: 'Go+ ?',
value: '+GO !',
inline: true,
},
{
name: 'Hello',
value: 'Hi',
inline: true,
},
],
footer: {
text: 'https://www.qiniu.com/',
},
}
]
};
var xhr = new XMLHttpRequest();
xhr.open("POST", webhookUrl);
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(JSON.stringify(payload));
alert("分享到discord成功")
console.log("https://discord.com/channels/1192449635265036409/1192449635265036412")
}

/*const axios = require('axios');

const webhookUrl = 'YOUR_DISCORD_WEBHOOK_URL';

const message = {
content: 'Check out this card!',
embeds: [
{
title: 'Card Title',
description: 'This is the description of the card.',
url: 'https://example.com',
thumbnail: {
url: 'https://example.com/thumbnail.png',
},
image: {
url: 'https://example.com/image.png',
},
fields: [
{
name: 'Field 1',
value: 'Value 1',
inline: true,
},
{
name: 'Field 2',
value: 'Value 2',
inline: true,
},
],
footer: {
text: 'Card Footer',
},
},
],
};

axios
.post(webhookUrl, message)
.then(() => {
console.log('Message sent successfully.');
})
.catch((error) => {
console.error('Failed to send message:', error);
});

*/
</script>
</body>
</html>
84 changes: 84 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/gop.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<html>
<head>
<!-- <script data-widgets="code" src="https://goplus.org/widgets/loader.js"></script> -->
</head>
<body>

<goplus-code half-code language="gop">
fields := [
"engineering",
"STEM education",
"and data science",
]

println "The Go+ language for", fields.join(", ")
</goplus-code>
</body>
<script>

!function(){

console.log(((null===(t=document.currentScript)||void 0===t?void 0:'code')||"").split(","))

var t,e={
code:[
"https://goplus.org/_next/static/widgets/code.f81abac15122c88e65d7.css",
"https://goplus.org/_next/static/widgets/code.85827e18ab6a0fa63bdc.js"
],
footer:[
"https://goplus.org/_next/static/widgets/footer.5f76b11115203767e7c3.css",
"https://goplus.org/_next/static/widgets/footer.64aca03204c8ae8ad97e.js"
],
header:[
"https://goplus.org/_next/static/widgets/header.5445867c6da0bcd5587b.css",
"https://goplus.org/_next/static/widgets/header.9ea108e482eb1e740a30.js"
]
};
console.log("a",t,e)


var t,e={
code:[
"https://goplus.org/_next/static/widgets/code.f81abac15122c88e65d7.css",
"https://goplus.org/_next/static/widgets/code.85827e18ab6a0fa63bdc.js"
],
footer:[
"https://goplus.org/_next/static/widgets/footer.5f76b11115203767e7c3.css",
"https://goplus.org/_next/static/widgets/footer.64aca03204c8ae8ad97e.js"
],
header:[
"https://goplus.org/_next/static/widgets/header.5445867c6da0bcd5587b.css",
"https://goplus.org/_next/static/widgets/header.9ea108e482eb1e740a30.js"
]
};





((null===(t=document.currentScript)
||
void 0===t?void 0:'code')
||"").split(",")
.map((function(t){
return t.trim()
}))
.filter(Boolean)
.forEach((
function(t){
var s=e[t]||[];
console.log(s)
function o(){
var t=s.find((function(t){return/\.js$/.test(t)})),
e=s.find((function(t){return/\.css$/.test(t)}));
if(null!=t){
var o=document.createElement("script");
o.src=t,null!=e&&o.setAttribute("data-style-url",e),document.body.appendChild(o)
}
}
"loading"!==document.readyState?o():window.addEventListener("DOMContentLoaded",o)
}
))
}();
</script>
</html>
12 changes: 12 additions & 0 deletions cmd/gopcomm/yap/markdown-vue/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Markdown</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Loading
Loading