Compare commits

...

4 Commits

Author SHA1 Message Date
3wc
ce7fcfc1ea Initial work on showing labels for non-coffee items
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-27 10:56:16 -04:00
8e434a4fd2 change local site url
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-27 19:49:42 +05:00
3cdaaf405f link acumin font in order label html
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-27 19:40:39 +05:00
d36bb36aed add label font
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-27 19:35:05 +05:00
3 changed files with 22 additions and 7 deletions

View File

@ -35,7 +35,7 @@ USERNAME=autonomic
PROJECT_NAME=mont58
# Site URL, also just needs to be set once per project
SITE_URL=mont58-staging.smol-wp.autonomic.zone
SITE_URL=mont58.local
# Multi-site config
#WORDPRESS_CONFIG_EXTRA="define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'frms.localhost'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); define('SUNRISE', true);"

View File

@ -246,3 +246,13 @@ add_filter(
10,
3
);
// import acumin variable font
function mont58coffee_enqueue_fonts()
{
wp_enqueue_style(
"mont58coffee-fonts",
get_theme_file_uri("/fonts/acumin-variable-concept.css")
);
}
add_action("wp_enqueue_scripts", "mont58coffee_enqueue_fonts");

View File

@ -13,6 +13,7 @@ if(!is_user_logged_in()){
<title>Coffee Label</title>
<link rel="preconnect" href="https://api/fonts.coollabs.io">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@100..900&display=swap" rel="stylesheet">
<link href="<?php echo get_theme_file_uri('/fonts/acumin-variable-concept.css') ?>" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<style>
.container {
@ -38,7 +39,7 @@ if(!is_user_logged_in()){
}
.label .product-details {
font-family: 'Roboto Condensed';
font-family: 'Acumin Variable Concept', sans-serif;
font-size: calc(0.35 * 21px);
letter-spacing: calc(0.35 * 2px);
text-transform: uppercase;
@ -122,12 +123,12 @@ if(!is_user_logged_in()){
}
}
if (!$is_coffee && !$is_subscription) {
continue;
}
if ($is_coffee || $is_subscription) {
$brew_method = $item->get_meta("pa_brew-method");
$weight = $item->get_meta("weight");
} else {
$product_name = $item->get_name();
}
if ($is_coffee) {
// Non-subscription order
@ -159,11 +160,15 @@ if(!is_user_logged_in()){
<div class="label">
<div>
<div class="product-details">
<?php if ($is_coffee || $is_subscription) { ?>
<p class="weight"><?php echo $weight; ?></p>
<?php } ?>
<p class="origin"><?php echo $product_name; ?></p>
<?php if ($is_coffee || $is_subscription) { ?>
<p class="bean-type"><?php echo $brew_method; ?></p>
<p class="roast"><?php echo $roast; ?> Roast</p>
<p class="date">Roasted on: <span><?php echo $roast_date; ?></span></p>
<?php } ?>
<p class="code"><?php
echo $is_new ? "N" : "";
echo $gift_message ? "G" : "";