This commit is contained in:
krahets
2024-01-23 19:20:03 +08:00
parent 183f12fcf5
commit edb3fe6d8c
9 changed files with 371 additions and 297 deletions

View File

@@ -112,6 +112,11 @@
text-transform: none;
}
.md-typeset a:hover {
color: var(--md-typeset-a-color);
text-decoration: underline;
}
.md-typeset code {
border-radius: 0.2rem;
}
@@ -150,34 +155,6 @@ body {
width: 100%; /* Default to full width */
}
/* rounded button */
.rounded-button {
display: inline-flex; /* Use flexbox for alignment */
align-items: center; /* Align items vertically */
justify-content: center; /* Center items horizontally */
border-radius: 100px; /* Circular corners */
padding: 9px 18px; /* Padding around the text */
margin: 0.15em 0;
border: none; /* Removes default border */
background-color: var(--md-typeset-btn-color); /* Background color */
color: var(--md-primary-fg-color) !important; /* Text color */
font-size: 0.85em; /* Font size */
text-align: center; /* Center the text */
text-decoration: none; /* Remove underline from anchor text */
cursor: pointer; /* Pointer cursor on hover */
}
.rounded-button:hover {
background-color: var(--md-typeset-btn-hover-color);
}
.rounded-button svg {
fill: var(--md-primary-fg-color); /* Fill SVG icon with text color */
width: 1.2em;
height: auto;
margin-right: 0.5em; /* Add some space between the SVG icon and the text */
}
/* Admonition for python tutor */
.md-typeset .admonition.pythontutor,
.md-typeset details.pythontutor {
@@ -237,10 +214,69 @@ body {
max-width: 70vw;
}
.hero-btn {
/* rounded button */
.rounded-button {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 10em;
margin: 0 0.1em;
padding: 0.5em 1.3em;
font-size: 0.85em;
border: none;
background-color: var(--md-typeset-btn-color);
color: var(--md-primary-fg-color) !important;
text-align: center;
text-decoration: none;
cursor: pointer;
}
.rounded-button:hover {
background-color: var(--md-typeset-btn-hover-color);
}
.rounded-button p {
margin: 0;
margin-bottom: 0.1em;
}
.rounded-button svg {
fill: var(--md-primary-fg-color);
width: auto;
height: 1.2em;
margin-right: 0.5em;
}
/* text button */
.text-button-container {
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
height: auto;
margin: 0 auto;
}
.text-button {
display: flex;
flex-direction: row;
align-items: center;
color: var(--md-typeset-btn-color);
text-decoration: none;
margin: 0 1em;
}
.text-button:hover {
text-decoration: underline;
}
.text-button svg {
display: inline-block;
fill: var(--md-typeset-btn-color);
width: auto;
height: 0.9em;
background-size: cover;
padding-top: 0.17em;
margin-left: 0.4em;
}
/* hero image */
@@ -284,8 +320,8 @@ a:hover .hero-on-hover {
}
a:hover .hero-caption {
text-decoration: underline;
color: var(--md-typeset-btn-color);
font-weight: bold;
}
/* code badge */