From 1227a705cd4901bcff137ad7d613f99d6533f291 Mon Sep 17 00:00:00 2001 From: Firisy Feng Date: Wed, 3 Jul 2024 14:58:20 +0800 Subject: [PATCH] add typewriter --- docs/javascripts/typewriter.js | 37 + docs/stylesheets/singlePageTemplate.css | 37 + material/overrides/home.html | 24 +- site/404.html | 81 +- .../Final/Final/index.html" | 87 +- .../index.html" | 93 +- .../index.html" | 237 +- .../index.html" | 742 ++- .../index.html" | 257 +- .../index.html" | 93 +- .../index.html" | 348 +- .../WLab1/WLab1/index.html" | 87 +- .../WLab2/WLab2/index.html" | 87 +- .../WLab3/WLab3/index.html" | 87 +- .../WLab4/WLab4/index.html" | 91 +- .../WLab6/WLab6/index.html" | 91 +- .../WLab7/WLab7/index.html" | 91 +- .../lab7/index.html" | 455 +- .../preview/index.html" | 93 +- .../Lab1/Lab1/index.html" | 81 +- .../Lab10/Lab10/index.html" | 81 +- .../Lab11/Lab11/index.html" | 81 +- .../Lab12/Lab12/index.html" | 81 +- .../Lab13/Lab13/index.html" | 81 +- .../Lab14/Lab14/index.html" | 81 +- .../Lab2/Lab2/index.html" | 81 +- .../Lab3/Lab3/index.html" | 81 +- .../Lab4/Lab4/index.html" | 81 +- .../Lab5/Lab5/index.html" | 81 +- .../Lab6/Lab6/index.html" | 81 +- .../Lab7/Lab7/index.html" | 81 +- .../Lab8/Lab8/index.html" | 81 +- .../Lab9/Lab9/index.html" | 81 +- site/JY_FENG/JY-Feng/index.html | 171 +- .../index.html" | 81 +- .../index.html" | 81 +- .../exams/15-16-middle/index.html" | 81 +- .../exams/16-17-middle/index.html" | 81 +- .../exams/17-18-middle/index.html" | 81 +- .../exams/18-19-middle/index.html" | 81 +- .../exams/19-20-middle/index.html" | 81 +- .../labs&hw/FDS Lab&hw review/index.html" | 81 +- .../mynotes/FDS-notes/index.html" | 2332 ++++++--- .../mynotes/midterm/index.html" | 1161 +++-- .../webnotes/DS WEEK01/index.html" | 231 +- .../webnotes/DS WEEK02/index.html" | 815 ++-- .../webnotes/DS WEEK03/index.html" | 524 ++- .../webnotes/DS WEEK04/index.html" | 270 +- .../webnotes/DS WEEK05/index.html" | 348 +- .../webnotes/DS WEEK06/index.html" | 326 +- .../webnotes/DS WEEK07/index.html" | 323 +- .../webnotes/DS WEEK08/index.html" | 200 +- .../webnotes/DS WEEK09/index.html" | 424 +- .../webnotes/DS WEEK10/index.html" | 210 +- .../webnotes/DS WEEK11/index.html" | 337 +- .../webnotes/DS WEEK12/index.html" | 320 +- .../webnotes/DS WEEK13/index.html" | 375 +- .../webnotes/DS WEEK14/index.html" | 326 +- .../webnotes/DS WEEK15/index.html" | 283 +- .../Foundation-of-Data-Structure/index.html" | 4178 +++++++++++------ .../webnotes/index.html" | 81 +- .../3 ZJU-AI-ML/Approach almost/index.html | 81 +- site/JY_HU/3 ZJU-AI-ML/ML-zju/index.html | 81 +- .../index.html | 81 +- .../3 ZJU-AI-ML/labs & hw review/index.html | 81 +- .../notes for ZJU-AI-ML/index.html | 81 +- .../DIP/index.html" | 85 +- site/Others/CS61A-python/index.html | 455 +- site/Others/content block example/index.html | 168 +- .../index.html" | 81 +- .../index.html" | 299 +- site/Others/memories/index.html | 81 +- site/artifacts/test/index.html | 81 +- site/index.html | 173 +- site/javascripts/typewriter.js | 37 + site/mkdocs-guide/index.html | 114 +- site/sitemap.xml.gz | Bin 127 -> 127 bytes site/stylesheets/singlePageTemplate.css | 37 + 78 files changed, 14735 insertions(+), 5416 deletions(-) create mode 100644 docs/javascripts/typewriter.js create mode 100644 docs/stylesheets/singlePageTemplate.css create mode 100644 site/javascripts/typewriter.js create mode 100644 site/stylesheets/singlePageTemplate.css diff --git a/docs/javascripts/typewriter.js b/docs/javascripts/typewriter.js new file mode 100644 index 00000000..44054354 --- /dev/null +++ b/docs/javascripts/typewriter.js @@ -0,0 +1,37 @@ +document.addEventListener("DOMContentLoaded", function() { + function typeWriter(element, text, speed, callback) { + let i = 0; + function type() { + if (i < text.length) { + element.innerHTML += text.charAt(i).replace('\n', '
'); // Replace newline with
for line breaks + i++; + setTimeout(type, speed); + } else { + console.log('Typing complete, pausing cursor animation for', element); // Debug output + if (callback) callback(); + } + } + type(); + } + + const headerElement = document.querySelector('.hero_header'); + const taglineElement = document.querySelector('.tagline'); + + const headerText = 'JY-HF Learning Site___'; + const headerHTML = 'JY-HF Learning Site___'; + const taglineText = 'Share the knowledge to you and Us'; + const taglineHTML = 'Share the knowledge to you and Us'; + + headerElement.textContent = ''; + taglineElement.textContent = ''; + + typeWriter(headerElement, headerText, 300, () => { + headerElement.innerHTML = headerHTML; + headerElement.style.animationPlayState = 'paused'; // Pause the cursor animation + headerElement.style.borderRightColor = 'transparent'; // Make the cursor transparent + typeWriter(taglineElement, taglineText, 300, () => { + taglineElement.innerHTML = taglineHTML; + + }); + }); +}); diff --git a/docs/stylesheets/singlePageTemplate.css b/docs/stylesheets/singlePageTemplate.css new file mode 100644 index 00000000..47f34297 --- /dev/null +++ b/docs/stylesheets/singlePageTemplate.css @@ -0,0 +1,37 @@ +/* Hero Section */ +.hero { + background-color: #CBE3F7; + padding-top: 150px; + padding-bottom: 150px; + text-align: center; +} + +.pink { + color: #3693CD; +} + +.light { + font-weight: bold; + color: #0B3ADC; +} + +.tagline { + color: #16273d; + margin-top: 4px; + font-weight: lighter; + text-transform: uppercase; + letter-spacing: 1px; +} + +.typewriter { + display: inline-block; + overflow: hidden; + border-right: solid black; /* Cursor effect */ + animation: blink-caret 0.75s step-end infinite; + word-wrap: break-word; /* Ensure words break and wrap correctly */ +} + +@keyframes blink-caret { + from, to { border-color: transparent; } + 50% { border-color: black; } +} \ No newline at end of file diff --git a/material/overrides/home.html b/material/overrides/home.html index 22d244bf..505d0aaf 100644 --- a/material/overrides/home.html +++ b/material/overrides/home.html @@ -29,18 +29,22 @@ @media screen and (min-width:76.25em) { .md-sidebar--primary { - display: none + display: none· } }
-
- -
+ +
+

JY-HF Learning Site___ +

+
+

Share the knowledge to you and Us

+
+

Welcome to the coding space of JY-HF!

@@ -55,10 +59,14 @@

Get Insiders +

{% endblock %} -{% block content %}{% endblock %} -{% block footer %}{% endblock %} \ No newline at end of file +{% block content %} +{% endblock %} +{% block footer %} +{{ super() }} +{% endblock %} \ No newline at end of file diff --git a/site/404.html b/site/404.html index 3f0d06db..d583f5e4 100644 --- a/site/404.html +++ b/site/404.html @@ -262,7 +262,7 @@
  • - + Jy Feng EE @@ -1523,7 +1523,7 @@ - 1 电路电子技术I实验(爱迪生班) + Preview @@ -1532,6 +1532,73 @@ + +
  • + + + + + + + + + + + + + + + + + +
  • + + + + + + + + +
  • -

    ```matlab - % 使用xlsread函数从Excel文件中读取数据 - data1 = readtable('./1016all.xlsx', 'Sheet','0V','Range', 'C2:D17'); - data2 = readtable('./1016all.xlsx', 'Sheet','15V', 'Range','C2:D19');

    -

    % 提取电压和电流数据 - vbe1 = data1{:, 1}; - ib1 = data1{:, 2}; - vbe2 = data2{:,1}; - ib2 = data2{:,2};

    -

    % 绘制伏安特性曲线 - plot(vbe1, ib1, 'o'); % 绘制数据点和连接线 - title('固定VCE下三极管输出VA曲线'); % 添加标题 - xlabel('V_{BE}(V)'); % 添加x轴标签 - ylabel('I_B(uA)'); % 添加y轴标签 - grid on; % 添加网格线

    -

    % 对曲线进行平滑处理 - smoothed_ib1 = smooth(ib1, 5, 'loess'); - hold on; % 在同一图中叠加平滑曲线 - plot(vbe1, smoothed_ib1, 'b-', 'LineWidth', 1); % 绘制平滑曲线

    -

    %绘制曲线2 - hold on; - plot(vbe2, ib2, 'o'); % 绘制数据点和连接线 - grid on; % 添加网格线

    -

    % 对曲线进行平滑处理 - smoothed_ib2 = smooth(ib2, 5, 'loess'); % 使用rloess平滑算法 - hold on; % 在同一图中叠加平滑曲线 - plot(vbe2, smoothed_ib2, 'r-', 'LineWidth', 1); % 绘制平滑曲线 - legend('原始数据(0V)', '曲线(0V下)','原始数据(15V)', '曲线(15V下)'); - ```

    +
    Matlab
     1
    + 2
    + 3
    + 4
    + 5
    + 6
    + 7
    + 8
    + 9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    +23
    +24
    +25
    +26
    +27
    +28
    +29
    +30
    +31
    +32
    % 使用xlsread函数从Excel文件中读取数据
    +data1 = readtable('./1016all.xlsx', 'Sheet','0V','Range', 'C2:D17');
    +data2 = readtable('./1016all.xlsx', 'Sheet','15V', 'Range','C2:D19');
    +
    +% 提取电压和电流数据
    +vbe1 = data1{:, 1};
    +ib1 = data1{:, 2};
    +vbe2 = data2{:,1};
    +ib2 = data2{:,2};
    +
    +% 绘制伏安特性曲线
    +plot(vbe1, ib1, 'o'); % 绘制数据点和连接线
    +title('固定VCE下三极管输出VA曲线'); % 添加标题
    +xlabel('V_{BE}(V)'); % 添加x轴标签
    +ylabel('I_B(uA)'); % 添加y轴标签
    +grid on; % 添加网格线
    +
    +% 对曲线进行平滑处理
    +smoothed_ib1 = smooth(ib1, 5, 'loess'); 
    +hold on; % 在同一图中叠加平滑曲线
    +plot(vbe1, smoothed_ib1, 'b-', 'LineWidth', 1); % 绘制平滑曲线
    +
    +%绘制曲线2
    +hold on;
    +plot(vbe2, ib2, 'o'); % 绘制数据点和连接线
    +grid on; % 添加网格线
    +
    +% 对曲线进行平滑处理
    +smoothed_ib2 = smooth(ib2, 5, 'loess'); % 使用rloess平滑算法
    +hold on; % 在同一图中叠加平滑曲线
    +plot(vbe2, smoothed_ib2, 'r-', 'LineWidth', 1); % 绘制平滑曲线
    +legend('原始数据(0V)', '曲线(0V下)','原始数据(15V)', '曲线(15V下)');
    +
    实验结果与分析

    实验数据如下:

    VCE=0V

    @@ -2940,29 +3042,50 @@

    仿真过程

  • 利用matlab进行数据处理,获得最终值。
  • 固定Vce

    -
    data1 = readmatrix('./1016/1_0V.csv','NumHeaderLines',1);
    -% 提取电压和电流数据
    -vbe1 = data1(:, 5);
    -ib1 = data1(:, 2);
    -
    -% 对曲线进行平滑处理
    -smoothed_ib1 = smooth(ib1, 5, 'loess'); 
    -plot(vbe1, smoothed_ib1, 'b-', 'LineWidth', 1); % 绘制平滑曲线
    -title('固定VCE下三极管输出VA曲线'); % 添加标题
    -xlabel('V_{BE}(V)'); % 添加x轴标签
    -ylabel('I_B(uA)'); % 添加y轴标签
    -grid on; % 添加网格线
    -
    -data2 = readmatrix('./1016/2_15V.csv','NumHeaderLines',1);
    -% 提取电压和电流数据
    -vbe2 = data2(:,5);
    -ib2 = data2(:,2);
    -% 对曲线进行平滑处理
    -smoothed_ib2 = smooth(ib2, 5, 'loess'); % 使用rloess平滑算法
    -hold on; % 在同一图中叠加平滑曲线
    -plot(vbe2, smoothed_ib2, 'r-', 'LineWidth', 1); % 绘制平滑曲线
    -legend('V_{CE}=0V','V_{CE}=15V');
    -
    +
    Matlab
     1
    + 2
    + 3
    + 4
    + 5
    + 6
    + 7
    + 8
    + 9
    +10
    +11
    +12
    +13
    +14
    +15
    +16
    +17
    +18
    +19
    +20
    +21
    +22
    data1 = readmatrix('./1016/1_0V.csv','NumHeaderLines',1);
    +% 提取电压和电流数据
    +vbe1 = data1(:, 5);
    +ib1 = data1(:, 2);
    +
    +% 对曲线进行平滑处理
    +smoothed_ib1 = smooth(ib1, 5, 'loess'); 
    +plot(vbe1, smoothed_ib1, 'b-', 'LineWidth', 1); % 绘制平滑曲线
    +title('固定VCE下三极管输出VA曲线'); % 添加标题
    +xlabel('V_{BE}(V)'); % 添加x轴标签
    +ylabel('I_B(uA)'); % 添加y轴标签
    +grid on; % 添加网格线
    +
    +data2 = readmatrix('./1016/2_15V.csv','NumHeaderLines',1);
    +% 提取电压和电流数据
    +vbe2 = data2(:,5);
    +ib2 = data2(:,2);
    +% 对曲线进行平滑处理
    +smoothed_ib2 = smooth(ib2, 5, 'loess'); % 使用rloess平滑算法
    +hold on; % 在同一图中叠加平滑曲线
    +plot(vbe2, smoothed_ib2, 'r-', 'LineWidth', 1); % 绘制平滑曲线
    +legend('V_{CE}=0V','V_{CE}=15V');
    +

    实验结果

    @@ -3009,7 +3132,7 @@

    (1)逐点输入直流电压,测量其传输特性。

    记录数据,并根据数据绘制图线。

    -

    截屏2023-10-22 20.57.37

    +

    截屏2023-10-22 20.57.37

    (2)输入0至5V变化的电压,利用扫描法测量传输特性

      @@ -3054,7 +3177,7 @@

      测试过程与结果

      1. 利用万用表测量电压,并记录数据
      -

      +

      结果分析

    实验结果与分析

    -

    +

    image-20231022220805720

    可以看到与非门输出在外端串联电阻时,尤其是小电阻,输出并不是标准的高电平或者低电平。与非门内部呈现一定的定值电阻特性(由两段曲线呈现直线可以看出)。经过一定的计算,可以得出与非门内部的电阻可以近似估计为0.02Ω。

    -

    +

    @@ -3112,7 +3235,7 @@

    实验结果与分析

    - 2024-07-02 + 2024-07-02 @@ -3244,7 +3367,7 @@

    实验结果与分析

    - + diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html" index 6b2d6e03..6eb58189 100644 --- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html" +++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html" @@ -275,7 +275,7 @@
  • - + Jy Feng EE @@ -1521,6 +1521,73 @@ + + + + + + + + + +
  • + + + + + + + + + + +
  • + + + + + + + + @@ -1536,10 +1603,10 @@ - + -