Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
茶陵後
Git2
提交
76b769c8
G
Git2
项目概览
茶陵後
/
Git2
与 Fork 源项目一致
Fork自
gitcode_dev / 开源百科
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Git2
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
76b769c8
编写于
11月 12, 2020
作者:
X
xjh22222228
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style: randomBg
上级
019b2f64
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
38 addition
and
43 deletion
+38
-43
data/python/package.ts
data/python/package.ts
+5
-0
src/app/app.component.html
src/app/app.component.html
+1
-1
src/app/app.component.scss
src/app/app.component.scss
+0
-6
src/app/app.component.ts
src/app/app.component.ts
+1
-17
src/index.html
src/index.html
+3
-1
src/styles.scss
src/styles.scss
+1
-1
src/utils/index.ts
src/utils/index.ts
+23
-0
src/view/index/default/index.component.html
src/view/index/default/index.component.html
+0
-1
src/view/index/default/index.component.scss
src/view/index/default/index.component.scss
+0
-11
src/view/index/default/index.component.ts
src/view/index/default/index.component.ts
+4
-5
未找到文件。
data/python/package.ts
浏览文件 @
76b769c8
...
...
@@ -52,6 +52,11 @@ export default {
'
https://github.com/SeleniumHQ/selenium/
'
]
},
{
name
:
'
beautifulsoup
'
,
desc
:
'
可以从HTML或XML文件中提取数据的Python库
'
,
link
:
'
https://beautifulsoup.readthedocs.io/zh_CN/v4.4.0/
'
,
},
]
},
{
...
...
src/app/app.component.html
浏览文件 @
76b769c8
<div
id=
"xiejiahe"
class=
"app"
>
<div
id=
"xiejiahe"
>
<app-icon-git></app-icon-git>
<router-outlet></router-outlet>
...
...
src/app/app.component.scss
浏览文件 @
76b769c8
#xiejiahe
{
&
.app
{
color
:
#000
;
}
}
src/app/app.component.ts
浏览文件 @
76b769c8
import
nav
from
'
../../data
'
import
{
Component
}
from
'
@angular/core
'
import
{
Router
,
ActivatedRoute
}
from
'
@angular/router
'
import
{
BACKGROUND_LINEAR
,
TONGJI_URL
}
from
'
../../config
'
import
{
randomInt
}
from
'
../utils
'
import
{
TONGJI_URL
}
from
'
../../config
'
@
Component
({
selector
:
'
app-xiejiahe
'
,
...
...
@@ -26,10 +25,6 @@ export class AppComponent {
this
.
appendTongji
()
}
ngAfterViewInit
()
{
setInterval
(
this
.
setBackground
,
10000
)
}
goRoute
(
queryParams
:
object
)
{
const
screenWidth
=
window
.
innerWidth
...
...
@@ -40,17 +35,6 @@ export class AppComponent {
}
}
setBackground
()
{
const
randomBg
=
BACKGROUND_LINEAR
[
randomInt
(
BACKGROUND_LINEAR
.
length
)]
const
el
=
document
.
getElementById
(
'
index-background
'
)
if
(
!
el
)
return
el
.
style
.
opacity
=
'
.3
'
setTimeout
(()
=>
{
el
.
style
.
backgroundImage
=
randomBg
el
.
style
.
opacity
=
'
1
'
},
1000
)
}
appendTongji
()
{
if
(
document
.
getElementById
(
'
tongji_url
'
))
return
...
...
src/index.html
浏览文件 @
76b769c8
...
...
@@ -36,15 +36,17 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge, chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
>
<meta
name=
"renderer"
content=
"webkit"
>
<link
rel=
"icon"
href=
"assets/icon/logo.png"
>
<meta
name=
"description"
content=
"发现导航 - 精选实用导航网站"
>
<meta
name=
"keywords"
content=
"导航,前端资源,社区站点,设计师,实用工具,学习资源,运营,网络安全,node.js"
>
<link
rel=
"icon"
href=
"assets/icon/logo.png"
>
<link
rel =
"apple-touch-icon"
href=
"assets/icon/logo.png"
>
</head>
<body>
<app-xiejiahe>
<div
style=
"position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: #fff;text-align: center;display: flex;justify-content: center;align-items: center;font-size: 14px;"
>
L O A D I N G ...
</div>
</app-xiejiahe>
<script
src=
"./assets/js/jquery.min.js"
></script>
<script
src=
"./assets/js/ripple.min.js"
></script>
</body>
...
...
src/styles.scss
浏览文件 @
76b769c8
...
...
@@ -22,7 +22,7 @@ body {
font-family
:
-
apple-system
,
"PingFang SC"
,
"Hiragino Sans GB"
,
Arial
,
"Microsoft YaHei"
,
"Helvetica Neue"
,
sans-serif
;
font-size
:
14px
;
color
:
#333
;
overflow
:
hidden
;
transition
:
1s
linear
;
}
footer
,
...
...
src/utils/index.ts
浏览文件 @
76b769c8
import
nav
from
'
../../data
'
;
import
{
BACKGROUND_LINEAR
}
from
'
../../config
'
;
export
function
debounce
(
func
,
wait
,
immediate
)
{
let
timeout
...
...
@@ -83,3 +84,25 @@ export function totalWeb(): number {
return
total
}
export
function
randomBgImg
()
{
const
el
=
document
.
createElement
(
'
div
'
)
el
.
style
.
cssText
=
'
position:fixed;top:0;left:0;right:0;bottom:0;z-index:-3;transition: 1s linear;
'
el
.
style
.
backgroundImage
=
BACKGROUND_LINEAR
[
randomInt
(
BACKGROUND_LINEAR
.
length
)]
document
.
body
.
appendChild
(
el
)
function
setBg
()
{
const
randomBg
=
BACKGROUND_LINEAR
[
randomInt
(
BACKGROUND_LINEAR
.
length
)]
el
.
style
.
opacity
=
'
.3
'
setTimeout
(()
=>
{
el
.
style
.
backgroundImage
=
randomBg
el
.
style
.
opacity
=
'
1
'
},
1000
)
}
setInterval
(
setBg
,
10000
)
}
export
function
onImgError
(
e
:
any
)
{
e
.
target
.
src
=
'
assets/img/transparent.gif
'
}
src/view/index/default/index.component.html
浏览文件 @
76b769c8
<div
class=
"index-wrapper"
>
<main
class=
"homepage container"
>
<div
class=
"bg-color-linear"
id=
"index-background"
></div>
<input
type=
"text"
class=
"search"
...
...
src/view/index/default/index.component.scss
浏览文件 @
76b769c8
.bg-color-linear
{
z-index
:
-3
;
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
transition
:
1s
linear
;
background-image
:
linear-gradient
(
19deg
,
#3EECAC
0%
,
#EE74E1
100%
);
}
.index-wrapper
{
display
:
flex
;
flex-direction
:
column
;
...
...
src/view/index/default/index.component.ts
浏览文件 @
76b769c8
import
nav
from
'
../../../../data
'
;
import
{
Component
}
from
'
@angular/core
'
;
import
{
Router
,
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
debounce
,
fuzzySearch
}
from
'
../../../utils
'
;
import
{
debounce
,
fuzzySearch
,
randomBgImg
,
onImgError
}
from
'
../../../utils
'
;
import
{
appLanguage
,
GIT_REPO_URL
}
from
'
../../../../config
'
;
import
{
annotate
}
from
'
rough-notation
'
;
...
...
@@ -27,7 +27,8 @@ export default class HomeComponent {
GIT_REPO_URL
:
string
=
GIT_REPO_URL
;
ngOnInit
()
{
const
that
=
this
;
randomBgImg
();
const
initList
=
()
=>
{
this
.
list
=
this
.
nav
[
this
.
page
].
nav
[
this
.
id
].
nav
;
};
...
...
@@ -149,7 +150,5 @@ export default class HomeComponent {
annotation
.
show
();
}
onImgError
=
(
e
)
=>
{
e
.
target
.
src
=
'
assets/img/transparent.gif
'
}
onImgError
=
onImgError
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录