feat: 更新样式和功能,优化徽章、登录页面和文章页面的布局,增强可访问性和用户体验
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import { resolvePublicApiBaseUrl } from '../../lib/api/client';
|
||||
|
||||
interface Props {
|
||||
pageType: string;
|
||||
entityId?: string;
|
||||
@@ -9,11 +11,12 @@ const props = Astro.props;
|
||||
const pageType = props.pageType;
|
||||
const entityId = props.entityId ?? '';
|
||||
const postSlug = props.postSlug ?? '';
|
||||
const analyticsEndpoint = `${resolvePublicApiBaseUrl(Astro.url)}/analytics/content`;
|
||||
---
|
||||
|
||||
<script is:inline define:vars={{ pageType, entityId, postSlug }}>
|
||||
<script is:inline define:vars={{ analyticsEndpoint, pageType, entityId, postSlug }}>
|
||||
(() => {
|
||||
const endpoint = '/api/analytics/content';
|
||||
const endpoint = analyticsEndpoint;
|
||||
const storageKey = `termi:pageview:${pageType}:${entityId || postSlug || 'root'}`;
|
||||
|
||||
function ensureSessionId() {
|
||||
|
||||
Reference in New Issue
Block a user