Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit bff8c39

Browse files
committed
1.16.1
1 parent 5e75a5a commit bff8c39

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

stats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ async function getAccount(username, dark=false) {
634634
const repos = Object.values(await cache.requestWithCache(`/users/${username}/repos`)).filter(repo => !repo.fork);
635635
return {
636636
dark : dark,
637-
locs: response['location'],
637+
location: response['location'],
638638
stars: decConvert(sum(repos.map(repo => repo['stargazers_count']))),
639639
forks: decConvert(sum(repos.map(repo => repo['forks_count']))),
640640
issues: decConvert(sum(repos.map(repo => repo['open_issues_count']))),

views/index.ejs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<!DOCTYPE html>
22
<html lang="en" class="dark">
3-
<head><title>Code Statistic</title><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-plus/2.2.32/index.css"><link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-plus/2.2.32/theme-chalk/base.css"><style>html, body {padding: 0;margin: 0;display: flex;align-items: center;justify-content: center;gap: 8px;width: 100%;height: 100%;overflow: auto;background: #fafcf1;}#app {position: absolute;top: 8px;display: flex;flex-direction: column;gap: 8px;margin: 30px;width: 80%;min-width: 220px;max-width: 500px}#generate {margin: 0 auto;transform: translateY(20px)}#preview {width: 100%}* {font-family: Consolas, Nunito, monospace, Serif}</style><script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.47/vue.global.js"></script><script src="https://cdn.bootcdn.net/ajax/libs/element-plus/2.2.32/index.full.js"></script></head>
3+
<head><title>Code Statistic</title><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-plus/2.2.32/index.css"><link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-plus/2.2.32/theme-chalk/base.css"><style>html, body {padding: 0;margin: 0;display: flex;align-items: center;justify-content: center;gap: 8px;width: 100%;height: 100%;overflow: auto;background: #fafcf1;}#app {position: absolute;top: 8px;display: flex;flex-direction: column;gap: 8px;margin: 30px;width: 80%;min-width: 220px;max-width: 500px}#generate {margin: 0 auto;transform: translateY(20px)}#preview {width: 100%}#format {width: 100%; justify-content: center; margin-bottom: 8px}* {font-family: Consolas, Nunito, monospace, Serif}</style><script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.47/vue.global.js"></script><script src="https://cdn.bootcdn.net/ajax/libs/element-plus/2.2.32/index.full.js"></script></head>
44
<body>
55
<div id="app">
66
<el-card>
77
<el-form label-width="auto">
88
<el-form-item label="Username"><el-input v-model="form.username"></el-input></el-form-item>
99
<el-form-item label="Repo" v-if="isRepo"><el-input v-model="form.repo"></el-input></el-form-item>
1010
<el-form-item label="Type"><el-radio-group v-model="form.type"><el-radio-button border label="User"></el-radio-button><el-radio-button border label="Repo"></el-radio-button></el-radio-group></el-form-item>
11-
<el-form-item label="Theme"><el-radio-group v-model="form.theme"><el-radio-button border label="Light"></el-radio-button><el-radio-button border label="Dark"></el-radio-button></el-radio-group></el-form-item>
11+
<el-form-item label="Theme"><el-radio-group v-model="form.theme"><el-radio border label="Light"></el-radio><el-radio border label="Dark"></el-radio></el-radio-group></el-form-item>
1212
<el-form-item><el-button type="primary" @click="generate" id="generate">Generate</el-button></el-form-item>
1313
</el-form>
1414
</el-card>
15-
<el-card>
16-
<template v-if="! link"><el-empty image-size="80"></el-empty></template>
17-
<template v-else><el-radio-group @change="refresh" class="type" v-model="form.format"><el-radio-button border label="URL"></el-radio-button><el-radio-button border label="Markdown"></el-radio-button><el-radio-button border label="HTML"></el-radio-button><el-radio-button border label="AsciiDoc"></el-radio-button></el-radio-group><el-input readonly v-model="content"></el-input><img id="preview" :src="link" alt></template>
15+
<el-card style="display: grid">
16+
<template v-if="! link"><el-empty image-size=80></el-empty></template>
17+
<template v-else><el-radio-group @change="refresh" id="format" v-model="form.format"><el-radio-button border label="URL"></el-radio-button><el-radio-button border label="Markdown"></el-radio-button><el-radio-button border label="HTML"></el-radio-button><el-radio-button border label="AsciiDoc"></el-radio-button></el-radio-group><el-input readonly v-model="content"></el-input><img id="preview" :src="link" alt></template>
1818
</el-card>
1919
</div>
2020
<script>

views/user.ejs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
<desc id="descId">User Code Statistics</desc>
55
<style>.oct-icon{display:block;fill:#8b849e;}.header{font:600 18px 'Segoe UI',Ubuntu,Sans-Serif;fill:#2f80ed;animation:fadeInAnimation 0.8s ease-in-out forwards;}@supports(-moz-appearance:auto){.header{font-size:15.5px;}}.stat{font:600 14px 'Segoe UI',Ubuntu,"Helvetica Neue",Sans-Serif;fill:<%- dark ? "#fff":"#434d58" %>;}@supports(-moz-appearance:auto){.stat{font-size:12px;}}.stagger{opacity:0;animation:fadeInAnimation 0.3s ease-in-out forwards;}.bold{font-weight:700}.icon{fill:#4c71f2;display:none;}@keyframes growWidthAnimation{from{width:0;}to{width:100%;}}.lang-name{font:400 11px "Segoe UI",Ubuntu,Sans-Serif;fill:<%- dark ? "#fff":"#434d58" %>;}.stagger{opacity:0;animation:fadeInAnimation 0.3s ease-in-out forwards;}#rect-mask rect{animation:fadeInAnimation 1s ease-in-out forwards;}@keyframes scaleInAnimation{from{transform:translate(-5px,5px) scale(0);}to{transform:translate(-5px,5px) scale(1);}}@keyframes rankAnimation{from{stroke-dashoffset:251.32741228718345;}to{stroke-dashoffset:125.45405959298056;}}@keyframes scaleInAnimation{from{transform:translate(-5px,5px) scale(0);}to{transform:translate(-5px,5px) scale(1);}}@keyframes fadeInAnimation{from{opacity:0;}to{opacity:1;}}</style>
66
<rect data-testid="card-bg" x="0.5" y="0.5" rx="4.5" height="99%" stroke="#e4e2e2" width="659" fill="<%- dark ? "#000" : "#fffefe" %>" stroke-opacity="1"/>
7-
<g data-testid="card-title" transform="translate(40, 35)"><g transform="translate(0, 0)"><text x="0" y="0" class="header" data-testid="header"><a href="https://github.com/<%- username %>/"><%- username %></a></text></g></g>
7+
<g data-testid="card-title" transform="translate(40, 35)">
8+
<g transform="translate(0, 0)"><text x="0" y="0" class="header" data-testid="header"><a href="https://github.com/<%- username %>/"><%- username %></a></text></g>
9+
<% if (location) { %>><g transform="translate(150, 0)" class="stagger"><svg y="-12" text="muted" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="oct-icon"><path fill-rule="evenodd" d="M11.536 3.464a5 5 0 010 7.072L8 14.07l-3.536-3.535a5 5 0 117.072-7.072v.001zm1.06 8.132a6.5 6.5 0 10-9.192 0l3.535 3.536a1.5 1.5 0 002.122 0l3.535-3.536zM8 9a2 2 0 100-4 2 2 0 000 4z"></path></svg><text x="20" class="stat bold"><%- location %></text></g><% } %>
10+
</g>
811
<g data-testid="main-card-info" transform="translate(0, 55)"><svg x="0" y="0">
912
<g transform="translate(0, 0)">
1013
<g class="stagger" style="animation-delay: 450ms" transform="translate(25, 0)">

0 commit comments

Comments
 (0)