nieyuge před 3 roky
rodič
revize
60754f5411
10 změnil soubory, kde provedl 203 přidání a 99 odebrání
  1. 1 0
      index.html
  2. 70 70
      server.js
  3. 5 7
      src/App.vue
  4. binární
      src/assets/logo.png
  5. 96 0
      src/pages/index.vue
  6. 12 22
      src/router.ts
  7. 0 0
      src/static/img/first_font.svg
  8. binární
      src/static/img/first_www.png
  9. binární
      src/static/img/goods.mp4
  10. 19 0
      src/static/img/logo.svg

+ 1 - 0
index.html

@@ -10,5 +10,6 @@
   <body>
     <div id="app"><!--app-html--></div>
     <script type="module" src="/src/entry-client.js"></script>
+    <script>!function(e,t){function n(){t.body?t.body.style.fontSize=12*o+"px":t.addEventListener("DOMContentLoaded",n)}function d(){var e=(i.clientWidth > 1280 ? 1280 : i.clientWidth)/10;i.style.fontSize=e+"px"}var i=t.documentElement,o=e.devicePixelRatio||1;if(n(),d(),e.addEventListener("resize",d),e.addEventListener("pageshow",function(e){e.persisted&&d()}),o>=2){var a=t.createElement("body"),s=t.createElement("div");s.style.border=".5px solid transparent",a.appendChild(s),i.appendChild(a),1===s.offsetHeight&&i.classList.add("hairlines"),i.removeChild(a)}}(window,document);</script>
   </body>
 </html>

+ 70 - 70
server.js

@@ -6,90 +6,90 @@ const express = require('express')
 const isTest = process.env.NODE_ENV === 'test' || !!process.env.VITE_TEST_BUILD
 
 async function createServer(
-  root = process.cwd(),
-  isProd = process.env.NODE_ENV === 'production'
+    root = process.cwd(),
+    isProd = process.env.NODE_ENV === 'production'
 ) {
-  const resolve = (p) => path.resolve(__dirname, p)
+    const resolve = (p) => path.resolve(__dirname, p)
 
-  const indexProd = isProd
-    ? fs.readFileSync(resolve('dist/client/index.html'), 'utf-8')
-    : ''
+    const indexProd = isProd
+        ? fs.readFileSync(resolve('dist/client/index.html'), 'utf-8')
+        : ''
 
-  const manifest = isProd
-    ? // @ts-ignore
-      require('./dist/client/ssr-manifest.json')
-    : {}
+    const manifest = isProd
+        ? // @ts-ignore
+        require('./dist/client/ssr-manifest.json')
+        : {}
 
-  const app = express()
+    const app = express()
 
-  /**
-   * @type {import('vite').ViteDevServer}
-   */
-  let vite
-  if (!isProd) {
-    vite = await require('vite').createServer({
-      root,
-      logLevel: isTest ? 'error' : 'info',
-      server: {
-        middlewareMode: 'ssr',
-        watch: {
-          // During tests we edit the files too fast and sometimes chokidar
-          // misses change events, so enforce polling for consistency
-          usePolling: true,
-          interval: 100
-        }
-      }
-    })
-    // use vite's connect instance as middleware
-    app.use(vite.middlewares)
-  } else {
-    app.use(require('compression')())
-    app.use(
-      require('serve-static')(resolve('dist/client'), {
-        index: false
-      })
-    )
-  }
+    /**
+     * @type {import('vite').ViteDevServer}
+     */
+    let vite
+    if (!isProd) {
+        vite = await require('vite').createServer({
+            root,
+            logLevel: isTest ? 'error' : 'info',
+            server: {
+                middlewareMode: 'ssr',
+                watch: {
+                    // During tests we edit the files too fast and sometimes chokidar
+                    // misses change events, so enforce polling for consistency
+                    usePolling: true,
+                    interval: 100
+                }
+            }
+        })
+        // use vite's connect instance as middleware
+        app.use(vite.middlewares)
+    } else {
+        app.use(require('compression')())
+        app.use(
+            require('serve-static')(resolve('dist/client'), {
+                index: false
+            })
+        )
+    }
 
-  app.use('*', async (req, res) => {
-    try {
-      const url = req.originalUrl
+    app.use('*', async (req, res) => {
+        try {
+            const url = req.originalUrl
 
-      let template, render
-      if (!isProd) {
-        // always read fresh template in dev
-        template = fs.readFileSync(resolve('index.html'), 'utf-8')
-        template = await vite.transformIndexHtml(url, template)
-        render = (await vite.ssrLoadModule('/src/entry-server.js')).render
-      } else {
-        template = indexProd
-        // @ts-ignore
-        render = require('./dist/server/entry-server.js').render
-      }
+            let template, render
+            if (!isProd) {
+                // always read fresh template in dev
+                template = fs.readFileSync(resolve('index.html'), 'utf-8')
+                template = await vite.transformIndexHtml(url, template)
+                render = (await vite.ssrLoadModule('/src/entry-server.js')).render
+            } else {
+                template = indexProd
+                // @ts-ignore
+                render = require('./dist/server/entry-server.js').render
+            }
 
-      const [appHtml, preloadLinks] = await render(url, manifest)
+            const [appHtml, preloadLinks] = await render(url, manifest)
 
-      const html = template
-        .replace(`<!--preload-links-->`, preloadLinks)
-        .replace(`<!--app-html-->`, appHtml)
+            const html = template
+                .replace(`<!--preload-links-->`, preloadLinks)
+                .replace(`<!--app-html-->`, appHtml)
 
-      res.status(200).set({ 'Content-Type': 'text/html' }).end(html)
-    } catch (e) {
-      vite && vite.ssrFixStacktrace(e)
-      console.log(e.stack)
-      res.status(500).end(e.stack)
-    }
-  })
+            res.status(200).set({ 'Content-Type': 'text/html' }).end(html)
+        } catch (e) {
+            vite && vite.ssrFixStacktrace(e)
+            console.log(e.stack)
+            res.status(500).end(e.stack)
+        }
+    })
 
-  return { app, vite }
+    return { app, vite }
 }
 
 if (!isTest) {
-  createServer().then(({ app }) =>
-    app.listen(5173, () => {
-      console.log('http://localhost:5173')
-    })
-  )
+    createServer().then(({ app }) =>
+        app.listen(5173, () => {
+            console.log('http://localhost:5173')
+        })
+    )
 }
 
 // for test use

+ 5 - 7
src/App.vue

@@ -1,13 +1,11 @@
-
 <template>
-  <div class="a">111</div>
+    <router-view></router-view>
 </template>
 
-<script setup lang="ts">
-</script>
-
 <style lang="less">
-.a {
-    color: red;
+html, body {
+    margin: 0;
+    padding: 0;
+    user-select: none;
 }
 </style>

binární
src/assets/logo.png


+ 96 - 0
src/pages/index.vue

@@ -0,0 +1,96 @@
+<template>
+    <div class="header">
+        <img class="logo" src="../static/img/logo.svg" alt="" />
+        <div class="down">
+            <div class="text">Install</div>
+        </div>
+    </div>
+    <div class="header-place"></div>
+    <div class="first-screen">
+        <img class="text" src="../static/img/first_font.svg" alt="" />
+        <img class="www" src="../static/img/first_www.png" alt="" />
+        <video class="goods" autoplay muted loop src="../static/img/goods.mp4"></video>
+        <div class="install">Install Now</div>
+    </div>
+</template>
+
+<script setup lang="ts">
+</script>
+
+<style lang="less">
+.header {
+    position: fixed;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 60px;
+    box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.1);
+    .logo {
+        height: 28px;
+        margin-left: 26px;
+    }
+    .down {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 120px;
+        height: 38px;
+        cursor: pointer;
+        margin-right: 26px;
+        border-radius: 100px;
+        background: #1D9BF0;
+        .text {
+            color: #fff;
+            font-size: 15px;
+            margin-top: -2px;
+        }
+    }
+    &-place {
+        height: 60px;
+    }
+}
+
+.first-screen {
+    position:relative;
+    height: 6.171rem;
+    background-color: #F9FDFF;
+    .text {
+        position: absolute;
+        width: 4.0625rem;
+        top: 1.8671rem;
+        left: 0.703rem;
+    }
+    .www {
+        position: absolute;
+        right: 0.703rem;
+        bottom: 1.218rem;
+        width: 6.921rem;
+    }
+    .install {
+        position: absolute;
+        top: 3.093rem;
+        left: 0.703rem;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 1.406rem;
+        height: 0.4062rem;
+        cursor: pointer;
+        color: #fff;
+        font-size: 0.156rem;
+        border-radius: 52px;
+        background: #1D9BF0;
+    }
+    .goods {
+        position: absolute;
+        top: 0;
+        right: 2.595rem;
+        width: 3.203rem;
+        height: 3.945rem;
+        mix-blend-mode: darken;
+    }
+}
+</style>

+ 12 - 22
src/router.ts

@@ -2,27 +2,17 @@ import {
     createMemoryHistory,
     createRouter as _createRouter,
     createWebHistory
-  } from 'vue-router'
-  
-  // Auto generates routes from vue files under ./pages
-  // https://vitejs.dev/guide/features.html#glob-import
-  const pages = import.meta.glob('./pages/*.vue')
-  
-  const routes = Object.keys(pages).map((path) => {
-    // @ts-ignore
-    const name = path.match(/\.\/pages(.*)\.vue$/)[1].toLowerCase()
-    return {
-      path: name === '/home' ? '/' : name,
-      component: pages[path] // () => import('./pages/*.vue')
-    }
-  })
-  
-  export function createRouter() {
+} from 'vue-router'
+
+export function createRouter() {
     return _createRouter({
-      // use appropriate history implementation for server/client
-      // import.meta.env.SSR is injected by Vite.
-      history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
-      routes
+        // use appropriate history implementation for server/client
+        // import.meta.env.SSR is injected by Vite.
+        history: import.meta.env.SSR ? createMemoryHistory() : createWebHistory(),
+        routes: [{
+            name: 'home',
+            path: '/',
+            component: () => import('./pages/index.vue')
+        }]
     })
-  }
-  
+}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
src/static/img/first_font.svg


binární
src/static/img/first_www.png


binární
src/static/img/goods.mp4


+ 19 - 0
src/static/img/logo.svg

@@ -0,0 +1,19 @@
+<svg width="96" height="30" viewBox="0 0 96 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path opacity="0.7" d="M41.2988 7.9082V22H46.2695C50.4688 22 52.9395 19.3828 52.9395 14.9297C52.9395 10.4863 50.459 7.9082 46.2695 7.9082H41.2988ZM43.4863 9.79297H46.0645C49.043 9.79297 50.7031 11.6289 50.7031 14.9492C50.7031 18.2793 49.0527 20.1055 46.0645 20.1055H43.4863V9.79297ZM59.0723 13.2402C60.5469 13.2402 61.543 14.3438 61.5918 15.916H56.4551C56.5625 14.3633 57.5977 13.2402 59.0723 13.2402ZM61.582 18.9824C61.2988 19.8809 60.4102 20.4863 59.209 20.4863C57.5195 20.4863 56.4453 19.3047 56.4453 17.5176V17.3906H63.7012V16.668C63.7012 13.5527 61.9238 11.541 59.0723 11.541C56.1719 11.541 54.3164 13.6895 54.3164 16.9121C54.3164 20.1543 56.1426 22.1953 59.1602 22.1953C61.5137 22.1953 63.291 20.8574 63.584 18.9824H61.582ZM67.7246 22V11.6191H67.8125L75.1172 22H77.0898V7.9082H74.9609V18.2988H74.8828L67.5781 7.9082H65.5957V22H67.7246ZM83.7402 13.2402C85.2148 13.2402 86.2109 14.3438 86.2598 15.916H81.123C81.2305 14.3633 82.2656 13.2402 83.7402 13.2402ZM86.25 18.9824C85.9668 19.8809 85.0781 20.4863 83.877 20.4863C82.1875 20.4863 81.1133 19.3047 81.1133 17.5176V17.3906H88.3691V16.668C88.3691 13.5527 86.5918 11.541 83.7402 11.541C80.8398 11.541 78.9844 13.6895 78.9844 16.9121C78.9844 20.1543 80.8105 22.1953 83.8281 22.1953C86.1816 22.1953 87.959 20.8574 88.252 18.9824H86.25ZM90.625 9.29492V11.7266H89.1309V13.3965H90.625V19.2949C90.625 21.2773 91.4355 22.0684 93.5156 22.0684C93.9844 22.0684 94.4531 22.0293 94.6875 21.9707V20.3008C94.5508 20.3301 94.209 20.3496 93.9941 20.3496C93.1348 20.3496 92.7441 19.9492 92.7441 19.0605V13.3965H94.6973V11.7266H92.7441V9.29492H90.625Z" fill="black"/>
+<g clip-path="url(#clip0_14299_11434)">
+<circle cx="14.6621" cy="14.0625" r="13.125" fill="url(#paint0_linear_14299_11434)" stroke="#28ACFC" stroke-width="1.875"/>
+<path opacity="0.7" fill-rule="evenodd" clip-rule="evenodd" d="M14.6602 24.375C20.3556 24.375 24.9727 19.7579 24.9727 14.0625C24.9727 8.36706 20.3556 3.75 14.6602 3.75V24.375Z" fill="#00A3FF"/>
+<path d="M3.41211 9.84375C5.22429 9.84375 6.69336 8.37468 6.69336 6.5625C6.69336 4.75032 5.22429 3.28125 3.41211 3.28125C1.59992 3.28125 0.130859 4.75032 0.130859 6.5625C0.130859 8.37468 1.59992 9.84375 3.41211 9.84375Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="0.9375"/>
+<path d="M14.6621 30.4688C16.4743 30.4688 17.9434 28.9997 17.9434 27.1875C17.9434 25.3753 16.4743 23.9062 14.6621 23.9062C12.8499 23.9062 11.3809 25.3753 11.3809 27.1875C11.3809 28.9997 12.8499 30.4688 14.6621 30.4688Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="0.9375"/>
+<path d="M26.8496 9.84375C28.6618 9.84375 30.1309 8.37468 30.1309 6.5625C30.1309 4.75032 28.6618 3.28125 26.8496 3.28125C25.0374 3.28125 23.5684 4.75032 23.5684 6.5625C23.5684 8.37468 25.0374 9.84375 26.8496 9.84375Z" fill="#44BBFF" stroke="#F7FCFF" stroke-width="0.9375"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_14299_11434" x1="14.6621" y1="0" x2="14.6621" y2="28.125" gradientUnits="userSpaceOnUse">
+<stop stop-color="#ADE0FF"/>
+<stop offset="1" stop-color="#ADE0FF" stop-opacity="0"/>
+</linearGradient>
+<clipPath id="clip0_14299_11434">
+<rect width="30" height="30" fill="white"/>
+</clipPath>
+</defs>
+</svg>

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů