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
05e4816d
Commit
05e4816d
authored
6 months ago
by
HouTeng Chan
Browse files
Options
Downloads
Patches
Plain Diff
Update file human-practices.html
parent
5e677c72
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
+121
-92
121 additions, 92 deletions
wiki/pages/human-practices.html
with
121 additions
and
92 deletions
wiki/pages/human-practices.html
+
121
−
92
View file @
05e4816d
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Expert Card - Li Peng
</title>
<style>
body
{
font-family
:
Calibri
,
sans-serif
;
line-height
:
1.6
;
margin
:
0
;
padding
:
20px
;
background-color
:
#f4f4f4
;
}
.row
{
display
:
flex
;
flex-wrap
:
wrap
;
}
.col-lg-12
{
width
:
100%
;
padding
:
15px
;
}
.expert-card
{
background-color
:
white
;
border-radius
:
8px
;
box-shadow
:
0
2px
10px
rgba
(
0
,
0
,
0
,
0.1
);
overflow
:
hidden
;
transition
:
box-shadow
0.3s
ease
;
}
.expert-card
:hover
{
box-shadow
:
0
4px
20px
rgba
(
0
,
0
,
0
,
0.15
);
}
.col-md-3
,
.col-md-9
{
padding
:
15px
;
}
.expert-image
{
width
:
100%
;
max-width
:
200px
;
height
:
auto
;
border-radius
:
8px
;
}
.expert-name
{
font-size
:
1.5rem
;
font-weight
:
bold
;
color
:
#333
;
}
.expert-role
{
font-size
:
1.1rem
;
color
:
#666
;
}
.expert-takeaway
{
background-color
:
#f9f9f9
;
padding
:
15px
;
border-radius
:
8px
;
margin-top
:
15px
;
}
.expert-content
{
display
:
none
;
padding
:
15px
;
background-color
:
#fff
;
border-top
:
1px
solid
#eee
;
animation
:
fadeIn
0.5s
ease
;
}
@keyframes
fadeIn
{
from
{
opacity
:
0
;
}
to
{
opacity
:
1
;
}
}
.toggle-btn
{
display
:
block
;
width
:
100%
;
padding
:
10px
;
background-color
:
#007bff
;
color
:
white
;
border
:
none
;
border-radius
:
0
0
8px
8px
;
cursor
:
pointer
;
font-size
:
1rem
;
transition
:
background-color
0.3s
ease
;
}
.toggle-btn
:hover
{
background-color
:
#0056b3
;
}
</style>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"https://static.igem.wiki/teams/5187/art/icon.png"
>
<title>
Tsinghua - IGEM 2024
</title>
<style>
body
{
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
;
}
.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
;
}
.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
;
}
.toggle-content
:hover
{
background-color
:
#0056b3
;
}
</style>
</head>
<body>
{% extends "layout.html" %}
...
...
@@ -180,7 +181,6 @@
</div>
</div>
</div>
<button
class=
"toggle-btn"
onclick=
"toggleContent(this)"
>
Show Details
</button>
</div>
</div>
</div>
...
...
@@ -766,19 +766,48 @@
</div>
</div>
<script>
function
toggleContent
(
button
)
{
const
card
=
button
.
closest
(
'
.expert-card
'
);
const
content
=
card
.
querySelector
(
'
.expert-content
'
);
if
(
content
.
style
.
display
===
'
none
'
||
content
.
style
.
display
===
''
)
{
content
.
style
.
display
=
'
block
'
;
button
.
textContent
=
'
Hide Details
'
;
}
else
{
content
.
style
.
display
=
'
none
'
;
button
.
textContent
=
'
Show Details
'
;
}
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
();
}
</script>
// 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>
</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