Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeekLearnMathWeapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
GeekLearnMathWeapp
Commits
eba4c7b1
Commit
eba4c7b1
authored
Mar 27, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: ui
parent
37e157cf
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
13 deletions
+122
-13
part.module.scss
src/pages/main/components/scene/part.module.scss
+0
-9
part.tsx
src/pages/main/components/scene/part.tsx
+5
-3
round.tsx
src/pages/main/components/scene/round.tsx
+2
-1
common.module.scss
src/styles/common.module.scss
+32
-0
index.tsx
src/styles/index.tsx
+16
-0
mixins.scss
src/styles/mixins.scss
+65
-0
var.scss
src/styles/var.scss
+2
-0
No files found.
src/pages/main/components/scene/part.module.scss
View file @
eba4c7b1
...
...
@@ -8,13 +8,4 @@
color
:
#FFFFFF
;
line-height
:
44px
;
padding
:
0
32px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.content
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
src/pages/main/components/scene/part.tsx
View file @
eba4c7b1
import
{
View
}
from
'@tarojs/components'
import
{
useMemo
}
from
'react'
import
classNames
from
'classnames'
import
{
cs
}
from
'@/styles'
import
LazeImage
from
'../lazy-image'
import
{
type
Part
,
type
SmallPart
,
groupRoundToSmallPart
,
getPartBg
}
from
'./constants'
import
{
type
Part
,
groupRoundToSmallPart
,
getPartBg
}
from
'./constants'
import
SceneSmallPart
from
'./small-part'
import
styles
from
'./part.module.scss'
...
...
@@ -22,8 +24,8 @@ const ScenePart = (props: ScenePartProps) => {
return
(
<
View
>
<
LazeImage
source=
{
bg
}
contentClass=
{
styles
.
content
}
>
<
View
className=
{
styles
.
partName
}
>
Part
{
part
.
number
+
1
}
</
View
>
<
LazeImage
source=
{
bg
}
contentClass=
{
classNames
(
cs
.
flex
,
cs
.
align_center
)
}
>
<
View
className=
{
classNames
(
styles
.
partName
,
cs
.
flex
,
cs
.
align_center
)
}
>
Part
{
part
.
number
+
1
}
</
View
>
</
LazeImage
>
{
smallParts
.
map
(
item
=>
{
return
(
...
...
src/pages/main/components/scene/round.tsx
View file @
eba4c7b1
import
{
View
,
Image
}
from
'@tarojs/components'
import
assets
from
'@/assets/oss/assets-round'
import
classNames
from
'classnames'
import
{
cs
}
from
'@/styles'
import
{
RoundState
,
type
Round
,
RoundType
,
type
ImageSource
,
RoundScore
,
CurrentRoundId
,
SceneContext
}
from
'./constants'
import
RoundTag
from
'./round-tag'
...
...
@@ -142,7 +143,7 @@ const RoundComp = (props: RoundProps) => {
return
(
<
SceneContext
.
Consumer
>
{
({
ready
})
=>
(
<
View
className=
{
props
.
className
}
id=
{
round
.
state
===
RoundState
.
UnLocked
?
CurrentRoundId
:
undefined
}
>
<
View
className=
{
classNames
(
props
.
className
,
cs
.
bounce_btn
)
}
hoverClass=
{
cs
.
bounce_btn_hover
}
id=
{
round
.
state
===
RoundState
.
UnLocked
?
CurrentRoundId
:
undefined
}
>
{
renderRound
(
ready
)
}
<
View
className=
{
styles
.
roundName
}
>
{
round
.
name
}
</
View
>
</
View
>
...
...
src/styles/common.module.scss
0 → 100644
View file @
eba4c7b1
.flex
{
display
:
flex
;
&
__item
{
flex
:
1
;
}
}
.align_center
{
align-items
:
center
;
justify-content
:
center
;
}
.is_hover
{
position
:
relative
;
&
:
:
after
{
position
:
absolute
;
content
:
" "
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,.
1
);
}
}
.bounce_btn
{
transition
:
transform
.3s
ease-in-out
;
will-change
:
transform
;
&
.bounce_btn_hover
{
transform
:
scale
(
.95
);
}
}
src/styles/index.tsx
0 → 100644
View file @
eba4c7b1
import
commonStyles
from
'./common.module.scss'
/** 公用样式 */
type
CommonStyles
=
{
flex
:
string
;
flex__item
:
string
;
is_hover
:
string
;
align_center
:
string
;
bounce_btn
:
string
;
bounce_btn_hover
:
string
;
[
key
:
string
]:
string
;
}
const
cs
=
commonStyles
as
CommonStyles
export
{
cs
as
commonStyles
,
cs
}
src/styles/mixins.scss
0 → 100644
View file @
eba4c7b1
@mixin
hairline-common
()
{
position
:
absolute
;
box-sizing
:
border-box
;
transform-origin
:
center
;
/* cover wechat button:after default transforn-origin */
content
:
' '
;
pointer-events
:
none
;
}
@mixin
btn
(
$bg-color
:
#FFA315
)
{
height
:
80px
;
background
:
$bg-color
;
border-radius
:
40px
;
flex
:
1
;
overflow
:
hidden
;
color
:
#FFFFFF
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
32px
;
}
@mixin
hairline
(
$border-color
:
#eee
)
{
@include
hairline-common
();
top
:
-50%
;
right
:
-50%
;
bottom
:
-50%
;
left
:
-50%
;
border
:
0
solid
$border-color
;
transform
:
scale
(
0
.5
);
}
@mixin
hairline-bottom
(
$border-color
:
#eee
,
$left
:
0
)
{
@include
hairline-common
();
top
:
auto
;
right
:
0
;
bottom
:
0
;
left
:
$left
;
border-bottom
:
1px
solid
$border-color
;
transform
:
scaleY
(
0
.5
);
}
@mixin
multi-ellipsis
(
$lines
)
{
display
:
-
webkit-box
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
-webkit-line-clamp
:
$lines
;
/*! autoprefixer: ignore next */
-webkit-box-orient
:
vertical
;
}
@mixin
ellipsis
()
{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
@mixin
flexLayout
(
$direction
:
row
,
$align
:
stretch
)
{
display
:
flex
;
flex-flow
:
$direction
;
align-items
:
$align
;
}
\ No newline at end of file
src/styles/var.scss
0 → 100644
View file @
eba4c7b1
$primary-color
:
#35B8FE
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment