summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel g. siegel2019-12-12 15:09:54 +0100
committerdaniel g. siegel2019-12-12 16:30:09 +0100
commite05882a5defdb42bba28a4484150d033f4c6a371 (patch)
treedc625751f0a9b3858014c0461732a1481d21d903
parent02ee554eb8a51b6cd11cd569e4103b1182bfe673 (diff)
downloadwp-remulus-e05882a5defdb42bba28a4484150d033f4c6a371.tar.gz
wp-remulus-e05882a5defdb42bba28a4484150d033f4c6a371.tar.bz2
wp-remulus-e05882a5defdb42bba28a4484150d033f4c6a371.zip
remove links from work images and use css grid
-rw-r--r--content-movie.php4
-rw-r--r--style.css49
2 files changed, 17 insertions, 36 deletions
diff --git a/content-movie.php b/content-movie.php
index fe32326..1d41c8b 100644
--- a/content-movie.php
+++ b/content-movie.php
@@ -27,9 +27,9 @@ if (sizeof($colors) >= 2) {
foreach ($images as $image) {
if ($single) {
$thumb = wp_get_attachment_image_src($image['ID'], 'remulus-movie');
- echo "<a href='{$image['full_url']}' title='{$image['title']}'><img src='{$thumb[0]}' alt='{$image['alt']}'></a>";
+ echo "<img src='{$thumb[0]}' alt='{$image['alt']}'>";
} else {
- echo "<a href='{$image['full_url']}' title='{$image['title']}'><img src='{$image['url']}' alt='{$image['alt']}'></a>";
+ echo "<img src='{$image['url']}' alt='{$image['alt']}'>";
}
}
?>
diff --git a/style.css b/style.css
index 7c50f97..2e7ba3b 100644
--- a/style.css
+++ b/style.css
@@ -344,11 +344,12 @@ article .navigation .nav-next {
.work section .container {
margin: 0 auto;
width: 56em;
+ display: grid;
+ grid-template-columns: 35% auto;
+ grid-column-gap: 2em;
}
.work section .container .description {
- width: 35%;
- float: left;
}
.work section .container .description p {
@@ -356,23 +357,14 @@ article .navigation .nav-next {
}
.work section .container .media {
- width: 65%;
- float: left;
- padding-left: 2em;
+ display: grid;
+ grid-gap: 1em;
+ grid-template-columns: auto auto;
+ align-content: start;
}
-.work section .container .media a {
- width: 50%;
- float: left;
- padding-left: 1em;
- padding-bottom: 1em;
- border-bottom: none;
-}
-
-.work section .container .media.media-single a {
- width: 100%;
- padding: 0;
- padding-left: 1em;
+.work section .container .media.media-single {
+ grid-template-columns: 1fr;
}
.work section .container:after {
@@ -384,35 +376,24 @@ article .navigation .nav-next {
/* responsive */
-
@media (max-width: 1200px){
.work section .container { width: 45em; }
-
- .work section .container .description { width: 40%; }
-
- .work section .container .media {
- padding-left: 1em;
- width: 60%;
- }
}
@media (max-width: 960px){
- .work section .container { width: 90%; }
+ .work section {
+ padding: 4em 0;
+ }
- .work section .container .description {
+ .work section .container {
width: 100%;
- display: block;
+ padding: 0 1em;
+ grid-template-columns: 1fr;
}
.work section .container .description h3 {
text-align: center;
}
-
- .work section .container .media {
- width: calc(100% + 2em);
- margin-left: -2em;
- display: block;
- }
}
@media (max-width: 768px){