欢迎使用 Typecho

· 默认分类

测试

[LivePhoto photo="https://static.jdaa.xyz/20190904T_4412892704686278_1.jpg-jpg" video="https://static.jdaa.xyz/20190904T_4412892704686278_1.mov"]

如果您看到这篇文章,表示您的 blog 已经安装成功.

<style>
    .aisummary {
        background-color: var(--muted-color);
        border-radius: 12px;
        padding: 12px;
        border: 1px solid var(--border-color);
        margin-bottom: 0!important;
        color: var(--text-color)
    }

    .aisummary + :not(h1) {
        padding-top: 2em!important
    }

    .ai-text-container {
        background-color: var(--bg-color);
        border-radius: 8px;
        padding: 12px 15px;
        border: 1px solid var(--border-color);
        margin-bottom: 8px
    }

    .ai-header {
        margin-bottom: 8px;
        padding-bottom: 0!important;
        text-align: left;
        display: flex;
        align-items: center;
        text-indent: 0
    }

    .ai-footer {
        font-size: .92857em;
        color: var(--secondary-color);
        margin-bottom: 0;
        padding-bottom: 0!important;
        text-align: left;
        text-indent: 0
    }

    .ai-hidden-text {
        display: none
    }

    .ai-typewriter-text {
        display: inline;
        text-indent: 2em
    }

    .ai-cursor {
        display: inline-block;
        width: 2px;
        height: 1em;
        background-color: var(--link-color);
        margin-left: 2px;
        animation: ai-blink 0.7s infinite;
        vertical-align: middle
    }

    @keyframes ai-blink {
        0% { opacity: 1; }
        50% { opacity: 0; }
        100% { opacity: 1; }
    }
</style>

<script>
    let aiSummaryTypingTimeoutId = null;

    function initAISummary() {
        const typewriterElement = document.querySelector('.ai-typewriter-text');
        const sourceTextElement = document.querySelector('.ai-hidden-text');
        const typingSpeed = 50;

        if (!typewriterElement || !sourceTextElement) return;

        if (aiSummaryTypingTimeoutId) {
            clearTimeout(aiSummaryTypingTimeoutId);
        }

        let textToType = sourceTextElement.textContent.trim();

        if (textToType.length > 0) {
            textToType = '  ' + textToType;
        }

        typewriterElement.textContent = '';
        let charIndex = 0;

        function typeNextCharacter() {
            if (charIndex < textToType.length) {
                typewriterElement.textContent += textToType.charAt(charIndex);
                charIndex++;
                aiSummaryTypingTimeoutId = setTimeout(typeNextCharacter, typingSpeed);
            } else {
                aiSummaryTypingTimeoutId = null;
            }
        }
        typeNextCharacter();
    }
</script>