Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tsinghua
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhefu Li
Tsinghua
Commits
46c85bad
Commit
46c85bad
authored
6 months ago
by
HouTeng Chan
Browse files
Options
Downloads
Patches
Plain Diff
Update file human-practices.html
parent
05e4816d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wiki/pages/human-practices.html
+59
-108
59 additions, 108 deletions
wiki/pages/human-practices.html
with
59 additions
and
108 deletions
wiki/pages/human-practices.html
+
59
−
108
View file @
46c85bad
...
...
@@ -10,77 +10,59 @@
font-family
:
Calibri
,
sans-serif
;
line-height
:
1.6
;
margin
:
0
;
padding
:
20px
;
background-color
:
#f4f4f4
;
}
.expert-card
{
background-color
:
white
;
border-radius
:
8px
;
box-shadow
:
0
2px
10px
rgba
(
0
,
0
,
0
,
0.1
);
transition
:
box-shadow
0.3s
ease
,
transform
0.3s
ease
;
overflow
:
hidden
;
}
.expert-card
:hover
{
box-shadow
:
0
4px
20px
rgba
(
0
,
0
,
0
,
0.15
);
transform
:
translateY
(
-5px
);
}
.expert-image
{
width
:
100%
;
max-width
:
200px
;
height
:
auto
;
border-radius
:
8px
;
transition
:
transform
0.3s
ease
;
}
.expert-card
:hover
.expert-image
{
transform
:
scale
(
1.05
);
}
.expert-name
{
font-size
:
1.5rem
;
font-weight
:
bold
;
color
:
#333
;
margin-bottom
:
5px
;
}
.expert-role
{
font-size
:
1.1rem
;
color
:
#666
;
display
:
block
;
margin-bottom
:
10px
;
}
.expert-takeaway
{
background-color
:
#f9f9f9
;
padding
:
15px
;
border-radius
:
8px
;
margin-top
:
15px
;
transition
:
background-color
0.3s
ease
;
padding
:
0
;
}
.expert-card
:hover
.expert-takeaway
{
background-color
:
#f0f0f0
;
}
.expert-content
{
max-height
:
0
;
overflow
:
hidden
;
transition
:
max-height
0.5s
ease
,
padding
0.5s
ease
;
background-color
:
#fff
;
border-top
:
1px
solid
#eee
;
}
.expert-content.show
{
max-height
:
2000px
;
/* Adjust based on content length */
padding
:
15px
;
.content
{
padding
:
20px
;
max-width
:
800px
;
margin
:
0
auto
;
}
.toggle-content
{
display
:
block
;
width
:
100%
;
padding
:
10px
;
background-color
:
#007bff
;
color
:
white
;
border
:
none
;
cursor
:
pointer
;
font-size
:
1rem
;
transition
:
background-color
0.3s
ease
;
h2
{
scroll-margin-top
:
60px
;
}
.toggle-content
:hover
{
background-color
:
#0056b3
;
.row.mt-4
{
margin-right
:
100px
;
margin-left
:
130px
;
}
.expert-card
{
background-color
:
white
;
border
:
1px
solid
#ddd
;
border-radius
:
8px
;
padding
:
20px
;
margin-bottom
:
20px
;
transition
:
box-shadow
0.3s
ease
;
}
.expert-card
:hover
{
box-shadow
:
0
4px
8px
rgba
(
0
,
0
,
0
,
0.1
);
}
.expert-image
{
width
:
200px
;
height
:
200px
;
object-fit
:
cover
;
}
.expert-details
{
display
:
flex
;
flex-direction
:
column
;
}
.expert-name
{
font-size
:
1.5rem
;
font-weight
:
bold
;
}
.expert-role
{
font-size
:
1.2rem
;
color
:
#666
;
}
.expert-takeaway
{
margin-top
:
15px
;
font-weight
:
bold
;
}
.expert-content
{
margin-top
:
10px
;
display
:
none
;
}
</style>
</head>
<body>
...
...
@@ -767,47 +749,16 @@
</div>
<script>
function
toggleContent
(
element
)
{
const
card
=
element
.
closest
(
'
.expert-card
'
);
const
content
=
card
.
querySelector
(
'
.expert-content
'
);
const
button
=
card
.
querySelector
(
'
.toggle-content
'
);
content
.
classList
.
toggle
(
'
show
'
);
if
(
content
.
classList
.
contains
(
'
show
'
))
{
button
.
textContent
=
'
Hide Details
'
;
content
.
style
.
maxHeight
=
content
.
scrollHeight
+
"
px
"
;
}
else
{
button
.
textContent
=
'
Show Details
'
;
content
.
style
.
maxHeight
=
"
0
"
;
}
// Prevent the click event from bubbling up to the card
event
.
stopPropagation
();
}
// Add click event listener to the card
document
.
querySelector
(
'
.expert-card
'
).
addEventListener
(
'
click
'
,
function
(
event
)
{
if
(
event
.
target
.
classList
.
contains
(
'
toggle-content
'
))
{
return
;
// Let the button handle its own click
}
const
button
=
this
.
querySelector
(
'
.toggle-content
'
);
toggleContent
(
button
);
});
// Add the toggle button if it doesn't exist
window
.
addEventListener
(
'
load
'
,
function
()
{
const
card
=
document
.
querySelector
(
'
.expert-card
'
);
if
(
!
card
.
querySelector
(
'
.toggle-content
'
))
{
const
button
=
document
.
createElement
(
'
button
'
);
button
.
className
=
'
toggle-content
'
;
button
.
textContent
=
'
Show Details
'
;
button
.
onclick
=
function
()
{
toggleContent
(
this
);
};
card
.
appendChild
(
button
);
}
});
</script>
<script>
function
toggleContent
(
element
)
{
const
content
=
element
.
querySelector
(
'
.expert-content
'
);
if
(
content
.
style
.
display
===
'
none
'
||
content
.
style
.
display
===
''
)
{
content
.
style
.
display
=
'
block
'
;
}
else
{
content
.
style
.
display
=
'
none
'
;
}
}
</script>
</body>
</html>
{% endblock %}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment