Skip to content

Commit

Permalink
Merge pull request #17 from danrusu/image-cards
Browse files Browse the repository at this point in the history
card layout
  • Loading branch information
danrusu authored Jan 20, 2025
2 parents ca5ba37 + 37569b9 commit 4049238
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
13 changes: 7 additions & 6 deletions src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ <h2>

<main>
<section id="js4testers">
<h3>JS4Testers Workshop</h3>
<div>
<a href="https://github.com/danrusu/js-for-testers">GitHub Repository</a>
</div>
<div>
<a href="/feedback">Anonymous feedback</a>
<div class="card-title">
<img src="images/js-small.png" alt="JS" />
<span class="card-subtitle">4testers workshop<span>
</div>

<a href="https://github.com/danrusu/js-for-testers">GitHub Repository</a>

<a class="card-footer" href="/feedback">Anonymous feedback</a>
</section>
</main>

Expand Down
Binary file added src/html/public/images/js-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 31 additions & 12 deletions src/html/public/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
/* vars */
--main-text-color: black;
--main-background-color: white;
--link-color: darkblue;

--header-background: white;
Expand All @@ -11,8 +12,8 @@
box-sizing: border-box;
}

*,
*:before,
*,
*:before,
*:after {
box-sizing: inherit;
margin: 0;
Expand All @@ -25,7 +26,7 @@ body {
line-height: 1.5;
color: var(--main-text-color);
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-rows: auto 1fr auto;
}

header {
Expand All @@ -52,7 +53,7 @@ footer address {
section {
display: inline-block;
margin: var(--small-padding);
padding: 0 var(--small-padding);
/* padding: 0 var(--small-padding); */
border: 2px solid var(--main-text-color);
border-radius: 5px;
text-align: center;
Expand All @@ -70,18 +71,36 @@ h2 {
}

a {
color: var(--link-color);
text-decoration: none;
cursor: pointer;
}

#js4testers div {
margin-bottom: var(--small-padding);
text-align: center;
@media (max-width: 400px) {
main {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
}
}

@media (max-width: 500px) {
section {
display: block;
}
/* card */
.card-title {
font-size: 1.1rem;
font-weight: bold;
display: grid;
grid-template-columns: 1fr 3fr;
gap: 0;
align-items: end;
justify-items: start;
}

.card-subtitle {
padding-bottom: 5px;
}

section a {
display: block;
background-color: var(--main-text-color);
color: var(--main-background-color);
border-top: 1px solid yellow;
}

0 comments on commit 4049238

Please sign in to comment.