chao hace 1 año
padre
commit
328cd13ea7

+ 7 - 6
build/asset-manifest.json

@@ -1,9 +1,10 @@
 {
   "files": {
-    "main.css": "/cocopi/static/css/main.40eb4f31.css",
-    "main.js": "/cocopi/static/js/main.eeab801f.js",
+    "main.css": "/cocopi/static/css/main.96d8588f.css",
+    "main.js": "/cocopi/static/js/main.b389f491.js",
     "static/js/453.05b8e878.chunk.js": "/cocopi/static/js/453.05b8e878.chunk.js",
     "static/media/back2.png": "/cocopi/static/media/back2.0a76cdf073fc17136493.png",
+    "static/media/title_bg.png": "/cocopi/static/media/title_bg.4bbeca1a63c351e0a1e4.png",
     "static/media/back1.png": "/cocopi/static/media/back1.185bed407aeeb1dfe2bb.png",
     "static/media/1.png": "/cocopi/static/media/1.101f35acebc32f5dc3ae.png",
     "static/media/cocopi3.png": "/cocopi/static/media/cocopi3.96fa75b6ed9045772c54.png",
@@ -41,12 +42,12 @@
     "static/media/CocoPi.png": "/cocopi/static/media/CocoPi.85027aa5998f43ff4194.png",
     "static/media/icon1.png": "/cocopi/static/media/icon1.ad19df7f1a1da0caf19b.png",
     "index.html": "/cocopi/index.html",
-    "main.40eb4f31.css.map": "/cocopi/static/css/main.40eb4f31.css.map",
-    "main.eeab801f.js.map": "/cocopi/static/js/main.eeab801f.js.map",
+    "main.96d8588f.css.map": "/cocopi/static/css/main.96d8588f.css.map",
+    "main.b389f491.js.map": "/cocopi/static/js/main.b389f491.js.map",
     "453.05b8e878.chunk.js.map": "/cocopi/static/js/453.05b8e878.chunk.js.map"
   },
   "entrypoints": [
-    "static/css/main.40eb4f31.css",
-    "static/js/main.eeab801f.js"
+    "static/css/main.96d8588f.css",
+    "static/js/main.b389f491.js"
   ]
 }

+ 1 - 1
build/index.html

@@ -1 +1 @@
-<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><title>CocoPi</title><script defer="defer" src="/cocopi/static/js/main.eeab801f.js"></script><link href="/cocopi/static/css/main.40eb4f31.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
+<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><title>CocoPi</title><script defer="defer" src="/cocopi/static/js/main.b389f491.js"></script><link href="/cocopi/static/css/main.96d8588f.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><script>var html,wH=window.innerHeight,wW=window.innerWidth,whdef=100/1920,rem=wW*whdef;wW>1400?(rem=wW*whdef,(html=document.documentElement).style.fontSize=rem+"px"):(rem=1400*whdef,(html=document.documentElement).style.fontSize=rem+"px");console.log(rem)</script>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/static/css/main.40eb4f31.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/static/css/main.40eb4f31.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/static/css/main.96d8588f.css


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/static/css/main.96d8588f.css.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
build/static/js/main.b389f491.js


+ 0 - 0
build/static/js/main.eeab801f.js.LICENSE.txt → build/static/js/main.b389f491.js.LICENSE.txt


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/static/js/main.b389f491.js.map


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1
build/static/js/main.eeab801f.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
build/static/js/main.eeab801f.js.map


BIN
build/static/media/title_bg.4bbeca1a63c351e0a1e4.png


+ 38 - 20
public/index.html

@@ -1,21 +1,19 @@
 <!DOCTYPE html>
 <html lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
-    <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <meta name="theme-color" content="#000000" />
-    <meta
-      name="description"
-      content="Web site created using create-react-app"
-    />
-    <!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
-    <!--
+
+<head>
+  <meta charset="utf-8" />
+  <!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
+  <meta name="viewport" content="width=device-width, initial-scale=1" />
+  <meta name="theme-color" content="#000000" />
+  <meta name="description" content="Web site created using create-react-app" />
+  <!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
+  <!--
       manifest.json provides metadata used when your web app is installed on a
       user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
     -->
-    <!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
-    <!--
+  <!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
+  <!--
       Notice the use of %PUBLIC_URL% in the tags above.
       It will be replaced with the URL of the `public` folder during the build.
       Only files inside the `public` folder can be referenced from the HTML.
@@ -24,12 +22,13 @@
       work correctly both with client-side routing and a non-root public URL.
       Learn how to configure a non-root public URL by running `npm run build`.
     -->
-    <title>CocoPi</title>
-  </head>
-  <body>
-    <noscript>You need to enable JavaScript to run this app.</noscript>
-    <div id="root"></div>
-    <!--
+  <title>CocoPi</title>
+</head>
+
+<body>
+  <noscript>You need to enable JavaScript to run this app.</noscript>
+  <div id="root"></div>
+  <!--
       This HTML file is a template.
       If you open it directly in the browser, you will see an empty page.
 
@@ -39,5 +38,24 @@
       To begin the development, run `npm start` or `yarn start`.
       To create a production bundle, use `npm run build` or `yarn build`.
     -->
-  </body>
+</body>
+
 </html>
+<script>
+  var wH=window.innerHeight; // 当前窗口的高度
+  var wW=window.innerWidth; // 当前窗口的宽度
+  var whdef=100 / 1920; // 表示1920的设计图,使用100PX的默认值
+  var rem = wW * whdef;
+  if (wW > 1400) {
+    rem=wW * whdef; // 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
+    var html=document.documentElement;
+    html.style.fontSize=rem+"px"; //适用于PC网站
+  }
+
+  else {
+    rem=1400 * whdef;
+    var html=document.documentElement;
+    html.style.fontSize=rem+"px";
+  }
+  console.log(rem)
+</script>

+ 6 - 6
src/asstes/css/CheckeredQuery.css

@@ -5,7 +5,7 @@
     .experience {
         position: relative;
         /* bottom: 64px; */
-        font-size: 24px;
+        font-size: 0.24rem;
         font-weight: 500;
         /* right: 64px; */
         display: flex;
@@ -98,7 +98,7 @@
         position: relative;
         top: 0;
         display: inline-block;
-        font-size: 64px;
+        font-size: 0.64rem;
         font-weight: 500;
         line-height: 92.67px;
         padding-left: 100px;
@@ -135,7 +135,7 @@
         p {
             display: block;
             margin-top: 48px;
-            font-size: 20px;
+            font-size: 0.20rem;
             font-weight: 400;
             line-height: 40px;
             text-align: left;
@@ -151,7 +151,7 @@
 
             h2 {
                 font-family: Noto Sans SC;
-                font-size: 44px;
+                font-size: 0.44rem;
                 font-weight: 500;
                 line-height: 52.8px;
                 letter-spacing: 0.02em;
@@ -178,7 +178,7 @@
 
                 h2 {
                     font-family: Noto Sans SC;
-                    font-size: 44px;
+                    font-size: 0.44rem;
                     font-weight: 500;
                     line-height: 52.8px;
                     letter-spacing: 0.02em;
@@ -195,7 +195,7 @@
                     display: block;
                     margin-top: 48px;
                     font-family: Noto Sans SC;
-                    font-size: 20px;
+                    font-size: 0.20rem;
                     font-weight: 400;
                     line-height: 40px;
                     text-align: left;

+ 3 - 3
src/asstes/css/Compare.css

@@ -2,7 +2,7 @@ h1 {
     position: relative;
     top: 0;
     display: inline-block;
-    font-size: 64px;
+    font-size: 0.64rem;
     font-weight: 500;
     line-height: 92.67px;
     padding-left: 100px;
@@ -25,14 +25,14 @@ h1::after {
 
 .compare_p{
     font-weight: bold;
-    font-size: 20px;
+    font-size: 0.20rem;
     margin-bottom: 10px;
 }
 
 .compare_button{
     padding: 10px 15px;
     border-radius: 10px;
-    font-size: 18px;
+    font-size: 0.18rem;
     border: none;
     cursor: pointer;
     color: #fff;

+ 1 - 1
src/asstes/css/Example.css

@@ -8,7 +8,7 @@
         position: relative;
         top: 0;
         display: inline-block;
-        font-size: 64px;
+        font-size: 0.64rem;
         font-weight: 500;
         line-height: 92.67px;
         padding-left: 100px;

+ 14 - 10
src/asstes/css/Introduction.css

@@ -2,12 +2,14 @@
     width: 100%;
     height: auto;
     padding-top: 160px;
-
+    background-image: url('../img/title_bg.png');
+    background-repeat: no-repeat;
+    background-position: 100% 0;
     .experience {
         position: absolute;
         bottom: 64px;
         font-family: Noto Sans SC;
-        font-size: 24px;
+        font-size: 0.24rem;
         font-weight: 500;
         right: 64px;
 
@@ -25,6 +27,7 @@
         position: relative;
         display: flex;
         justify-content: space-between;
+        min-width: 1400px;
 
         .Introduction_top_img {
             /* background: #D2ECFF; */
@@ -49,7 +52,7 @@
         }
 
         .Introduction_top_title {
-            font-size: 64px;
+            font-size: 0.64rem;
             font-weight: 700;
             line-height: 76.8px;
             letter-spacing: 0.04em;
@@ -57,6 +60,7 @@
             position: relative;
             top: 0;
             display: inline-block;
+            padding-left:0
         }
 
         .Introduction_top_title::after {
@@ -72,7 +76,7 @@
         p {
             margin-top: 32px;
             font-family: Noto Sans SC;
-            font-size: 64px;
+            font-size: 0.64rem;
             font-weight: 500;
             line-height: 76.8px;
             letter-spacing: 0.04em;
@@ -87,7 +91,7 @@
         .Learning {
             margin-top: 32px;
             font-family: PingFang SC;
-            font-size: 32px;
+            font-size: 0.32rem;
             font-weight: 500;
             line-height: 48px;
             letter-spacing: 0.1em;
@@ -107,7 +111,7 @@
         h2 {
             margin-top: 40px;
             width: 20%;
-            font-size: 44px;
+            font-size: 0.44rem;
             font-weight: 700;
             line-height: 52.8px;
             letter-spacing: 0.02em;
@@ -117,7 +121,7 @@
 
         .Introduction_bottom_span {
             width: 20%;
-            font-size: 24px;
+            font-size: 0.24rem;
             font-weight: 400;
             line-height: 36px;
             /* text-align: left; */
@@ -128,7 +132,7 @@
         span {
             background: url('../img/011.png') no-repeat;
             display: inline-block;
-            font-size: 96px;
+            font-size: 0.96rem;
             font-style: italic;
             font-weight: 400;
             line-height: 113.47px;
@@ -155,14 +159,14 @@
                 width: 20%;
 
                 p {
-                    font-size: 20px;
+                    font-size: 0.20rem;
                     line-height: 30px;
                     padding: 10px 0;
                 }
 
                 img {
-                    margin-bottom: 12px;
                     max-width: 100%;
+                    margin-bottom: 12px;
                     padding: 10px;
                 }
             }

+ 3 - 3
src/asstes/css/ProcessFlow.css

@@ -8,7 +8,7 @@
         position: relative;
         top: 0;
         display: inline-block;
-        font-size: 64px;
+        font-size: 0.64rem;
         font-weight: 500;
         line-height: 92.67px;
         padding-left: 100px;
@@ -53,7 +53,7 @@
                     cursor: pointer;
 
                     span:nth-child(1) {
-                        font-size: 24px;
+                        font-size: 0.24rem;
                         font-weight: 400;
                         line-height: 24px;
                         text-align: right;
@@ -61,7 +61,7 @@
                     }
 
                     span:nth-child(2) {
-                        font-size: 18px;
+                        font-size: 0.18rem;
                         font-weight: 400;
                         line-height: 28px;
                         text-align: right;

+ 3 - 3
src/asstes/css/Sidebar.css

@@ -8,7 +8,7 @@
     box-shadow: 0px 4px 10px 0px #1D398314;
     box-shadow: 1px 1px 20px 4px #1D39830D;
     padding: 20px 0;
-    font-size: 10px;
+    font-size: 0.10rem;
 
     div {
         padding: 10px;
@@ -22,7 +22,7 @@
 .Model_h3_title {
     font-weight: 600;
     text-align: center;
-    font-size: 16px;
+    font-size: 0.16rem;
     margin-bottom: 32px;
 }
 .model_checkbox_i{
@@ -34,7 +34,7 @@
 }
 
 .model_p_text{
-    font-size: 12px;
+    font-size: 0.12rem;
     font-weight: 400;
     line-height: 20px;
     color: #00000099;

+ 3 - 3
src/asstes/css/contact.css

@@ -3,7 +3,7 @@
         position: relative;
         top: 0;
         display: inline-block;
-        font-size: 64px;
+        font-size: 0.64rem;
         font-weight: 500;
         line-height: 92.67px;
         padding-left: 100px;
@@ -33,7 +33,7 @@
 
             p {
                 margin-top: 16px;
-                font-size: 20px;
+                font-size: 0.20rem;
                 font-weight: 400;
                 line-height: 28px;
                 letter-spacing: 8%;
@@ -55,7 +55,7 @@
             }
 
             span {
-                font-size: 36px;
+                font-size: 0.36rem;
                 font-weight: 700;
                 line-height: 48px;
                 color: #000;

+ 2 - 2
src/asstes/css/header.css

@@ -7,7 +7,7 @@
         /* display: inline-block; */
         padding-left: 8px;
         border-left: 1px solid #00000033;
-        font-size: 20px;
+        font-size: 0.20rem;
         font-weight: 650;
         line-height: 24px;
         text-align: left;
@@ -22,7 +22,7 @@
 
         li {
             padding: 0 10px;
-            font-size: 16px;
+            font-size: 0.16rem;
             font-weight: 600;
             position: relative;
             cursor: pointer;

BIN
src/asstes/img/title_bg.png


+ 3 - 3
src/complates/Introduction.js

@@ -24,11 +24,11 @@ function Introduction() {
                 <div>
                     <h1 className='Introduction_top_title'>CocoPi</h1>
                     <p>用于AIoT教学、运行 <br /> Linux系统的<i>掌上计算机</i></p>
-                    <p className='Learning'>All-in-One Product in Technology Innovation Education</p>
+                    <p className='Learning'>All-in-One Product in <br/>Technology Innovation Education</p>
                 </div>
-                <div className="Introduction_top_img">
+                {/* <div className="Introduction_top_img">
                     <img src={imgTop} alt="" />
-                </div>
+                </div> */}
             </div>
             <div className="Introduction_bottom">
                 <h2>人工智能</h2>

+ 28 - 3
src/view/home.js

@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { useCallback, useEffect } from 'react';
 import { Flex, Layout } from 'antd';
 import HeaderLeft from '../complates/HeaderLeft'
 import HeaderRight from '../complates/HeaderRight'
@@ -8,7 +8,7 @@ import Example from '../complates/Examples'
 import CheckeredQuery from '../complates/CheckeredQuery'
 import Contact from '../complates/Contact'
 import Sidebar from '../complates/Sidebar'
-import Compare from '../complates/Compare'
+import Compare from '../complates/Compare';
 
 const { Header, Footer, Content } = Layout;
 const headerStyle = {
@@ -25,7 +25,7 @@ const headerStyle = {
 };
 
 const contentStyle = {
-    marginTop:64,
+    marginTop: 64,
     backgroundColor: '#fff',
 };
 const footerStyle = {
@@ -38,6 +38,31 @@ const layoutStyle = {
     width: '100%',
 };
 function Home() {
+    const onResize = useCallback(() => {
+        var wH = window.innerHeight; // 当前窗口的高度
+        var wW = window.innerWidth; // 当前窗口的宽度
+        var whdef = 100 / 1920; // 表示1920的设计图,使用100PX的默认值
+        var rem = wW * whdef;
+        var html
+        if (wW > 1400) {
+            rem = wW * whdef; // 以默认比例值乘以当前窗口宽度,得到该宽度下的相应FONT-SIZE值
+            html = document.documentElement;
+            html.style.fontSize = rem + "px"; //适用于PC网站
+        }
+
+        else {
+            rem = 1400 * whdef;
+            html = document.documentElement;
+            html.style.fontSize = rem + "px";
+        }
+    }, [])
+
+    useEffect(() => {
+        window.addEventListener('resize', onResize);
+        return (() => {
+            window.removeEventListener('resize', onResize)
+        })
+    }, [])
     return (
         <Flex gap="middle" wrap>
             <Layout style={layoutStyle}>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio