Skip to content

Commit

Permalink
Merge pull request #180 from mediasanctuary/eat-qrcode-final-touches
Browse files Browse the repository at this point in the history
Eco Art Trail / qrcode final touches
  • Loading branch information
dphiffer authored Mar 14, 2024
2 parents 5967ae0 + e143e63 commit aa82545
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wp-content/themes/mediasanctuary/css/pages/_eco-art-trail.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
body.page-template-eco-art-trail {
background-color: $c-asphalt;
color: $c-white;

.content {
max-width: 700px;
margin-left: auto;
margin-right: auto;
}
}
1 change: 1 addition & 0 deletions wp-content/themes/mediasanctuary/css/pages/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
@import 'search';
@import '404';
@import 'events';
@import 'eco-art-trail';
2 changes: 2 additions & 0 deletions wp-content/themes/mediasanctuary/lib/qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ function qr_code_url($id) {
'post_status' => 'publish',
'post_type' => 'qrcode'
]);
update_post_meta($id, 'redirect_url', $target_url);

$redirect_url = get_permalink($id);
$image_url = qr_code_url($id);

Expand Down
45 changes: 45 additions & 0 deletions wp-content/themes/mediasanctuary/page-templates/eco-art-trail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/*
Template Name: Eco Art Trail
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:ital,wght@0,300;0,400;1,400&family=Noto+Sans:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="<?php asset_url('dist/main.css'); ?>">
<link rel="shortcut icon" href="<?php asset_url('img/favicon.ico'); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="content" class="main eco-art-trail">
<section class="p40">
<div class="container ">
<article class="post post--single">
<div class="content">
<?php

if (have_posts()) {
while(have_posts()) {
the_post();
?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php
}
} else {
echo "Not found.";
}

?>
</div>
</article>
</div>
</section>
<?php wp_footer(); ?>
</div>
</body>
</html>

0 comments on commit aa82545

Please sign in to comment.