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

fix: fix style issues #117

Merged
merged 3 commits into from
Feb 6, 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
41 changes: 22 additions & 19 deletions cmd/gopcomm/yap/article_yap.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<meta property="og:title" content="GoplusCommunity">
<meta property="og:description" content="GoplusCommunity">
<meta property="og:image" content="https://public-cdn.mokahr.com/72f7c42e-b069-4e14-9c29-ee20229cc256.png">

<meta property="og:type" content="website">

<!-- UI -->
Expand Down Expand Up @@ -46,7 +46,7 @@

<body style="background-color: #f7fafc;">
<input style="display:none" id="usertoken" value="{{.usertoken}}" />
<!-- Header -->
<!-- TODO: 修改Header -->
<header class="bg-cover bg-center" style="
height: 11vh;
background-image: url('/static/img/home-background.png');
Expand Down Expand Up @@ -120,7 +120,7 @@
<n-gi :span="3">
<!-- Breadcrumb -->
<n-breadcrumb>
<n-breadcrumb-item>
<n-breadcrumb-item href="/">
<i class="ph-duotone ph-house" style="font-size: 18px; margin-right: 5px;"></i>
Home
</n-breadcrumb-item>
Expand Down Expand Up @@ -186,7 +186,7 @@
<!-- </n-badge> -->

<!-- Share Button -->
<n-button type="tertiary" style="--n-text-color-hover: #3182ce;
<!-- <n-button type="tertiary" style="--n-text-color-hover: #3182ce;
--n-text-color-pressed: #3182ce;
--n-text-color-focus: #3182ce;
--n-ripple-color: #659fd6;
Expand All @@ -196,8 +196,7 @@
height: 7vh; width: 7vh;
--n-padding: 0; --n-border-radius: 5px;">
<i class="ph-duotone ph-share-network" style="font-size: 22px;"></i>
</n-button>
<!-- </n-badge> -->
</n-button> -->
</n-gi>

<!-- Article -->
Expand Down Expand Up @@ -242,9 +241,9 @@ <h1 class="my-4 text-4xl font-extrabold leading-tight text-gray-900">
</address>

<!-- Description -->
<p class="text-gray-500">
<!-- <p class="text-gray-500">
${ article.Abstract }
</p>
</p> -->

<!-- TODO: Cover -->
</header>
Expand Down Expand Up @@ -290,14 +289,18 @@ <h1 class="my-4 text-4xl font-extrabold leading-tight text-gray-900">
<n-button text class="mr-2" style="--n-text-color-hover: #3182ce;
--n-text-color-pressed: #3182ce;
--n-text-color-focus: #3182ce;
--n-text-color: #a0aec0;">
--n-text-color: #a0aec0;" @click="shareToWeChat">
<i class="ph-fill ph-wechat-logo" style="font-size: 20px;"></i>
</n-button>
</template>
<n-space vertical>
<n-qr-code :value="currentHref" />
</n-space>
Scan qrcode to share on WeChat
<template #header>
<div class="flex flex-col items-center">
<span class="mb-1">WeChat</span>
<n-qr-code :value="currentHref" error-correction-level="H" class="mb-1">
</n-qr-code>
<span style="font-size: x-small;">scan the QR Code</span>
</div>
</template>
</n-tooltip>
</div>
</n-gi>
Expand All @@ -312,8 +315,7 @@ <h1 class="my-4 text-4xl font-extrabold leading-tight text-gray-900">
<div class="flex flex-row items-center">
<!-- Avatar -->
<a href="/user/${ author.Id }">
<img class="w-12 h-12 rounded-full ml-3 mr-2" src="author.Avatar"
alt="Rounded avatar">
<img class="w-12 h-12 rounded-full ml-3 mr-2" src="author.Avatar" alt="Rounded avatar">
</a>

<!-- Nick Name -->
Expand Down Expand Up @@ -388,9 +390,10 @@ <h1 class="my-4 text-4xl font-extrabold leading-tight text-gray-900">
Avatar: '',
Name: 'Nick_1977',
})
const currentHref = ref(window.location.href)

/*======= share related functions =======*/
const currentHref = ref(window.location.href);

function shareToFacebook() {
var w = 900;
var h = 600;
Expand All @@ -399,14 +402,14 @@ <h1 class="my-4 text-4xl font-extrabold leading-tight text-gray-900">
var left = wLeft + (window.innerWidth / 2) - (w / 2);
var top = wTop + (window.innerHeight / 2) - (h / 2);
var url = window.location.href;
var shareUrl = "http://www.facebook.com/sharer/sharer.php?u="+url;
var shareUrl = "http://www.facebook.com/sharer/sharer.php?u=" + url;
var title = 'facebook';

window.open(shareUrl, 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);
};

editMetaUrl()
function editMetaUrl(){
function editMetaUrl() {
// Get the URL of the current page
var currentUrl = window.location.href;

Expand All @@ -426,7 +429,7 @@ <h1 class="my-4 text-4xl font-extrabold leading-tight text-gray-900">
var url = window.location.href;
var hashtags = "GoplusComminty";
var intentUrl = "https://twitter.com/intent/tweet?url=" + encodeURIComponent(url)
+"&hashtags=" + encodeURIComponent(hashtags);
+ "&hashtags=" + encodeURIComponent(hashtags);
// var shareUrl = 'https://twitter.com/intent/tweet?text=' + text + '&url=' + url;
window.open(intentUrl, "_blank", "width=900, height=600");
};
Expand Down
24 changes: 0 additions & 24 deletions cmd/gopcomm/yap/community-frontend/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions cmd/gopcomm/yap/community-frontend/.vscode/extensions.json

This file was deleted.

7 changes: 0 additions & 7 deletions cmd/gopcomm/yap/community-frontend/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions cmd/gopcomm/yap/community-frontend/index.html

This file was deleted.

12 changes: 0 additions & 12 deletions cmd/gopcomm/yap/community-frontend/jsconfig.json

This file was deleted.

Loading
Loading