Compare commits

..

7 Commits

Author SHA1 Message Date
babfc15c24 Badge color adjustments 2026-03-11 17:02:25 -04:00
70cf5099d4 UI changes for badge 2026-03-11 12:48:18 -04:00
81971b70fc Tooltip animation fix 2026-03-11 12:05:57 -04:00
9b3fdd80c3 Badge icon and tooltip adjustment 2026-03-11 11:50:24 -04:00
9029396fca Badge Refinement 2026-03-11 11:22:41 -04:00
de19c2e2b6 Badge logo Update 2026-03-11 11:02:11 -04:00
81785aecf9 Logo base64 encoding 2026-03-11 10:46:34 -04:00
6 changed files with 50 additions and 48 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
assets/images/badge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -2319,75 +2319,75 @@ html, .cl-body {
bottom: 20px;
right: 20px;
z-index: 9999;
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--cl-glass);
backdrop-filter: var(--cl-blur);
-webkit-backdrop-filter: var(--cl-blur);
border: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0.4;
transition: transform 0.3s ease, opacity 0.3s ease;
opacity: 0.7;
}
.cl-designer-badge:hover {
opacity: 1;
transform: scale(1.1);
}
.cl-designer-badge__logo {
width: 36px;
height: 36px;
display: block;
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}
.cl-designer-badge__logo--dark {
display: block;
}
.cl-designer-badge__logo--light {
display: none;
}
[data-theme="light"] .cl-designer-badge__logo--dark {
display: none;
}
[data-theme="light"] .cl-designer-badge__logo--light {
width: 26px;
height: 26px;
display: block;
border-radius: 50%;
object-fit: contain;
}
.cl-designer-badge__tooltip {
position: absolute;
bottom: calc(100% + 10px);
right: 0;
background: var(--cl-glass, rgba(12, 12, 25, 0.85));
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--cl-border, rgba(255, 255, 255, 0.08));
border-radius: var(--cl-radius-sm, 10px);
padding: 10px 14px;
background: var(--cl-glass);
border: 1px solid var(--cl-glass-border);
border-radius: 40px;
padding: 0px 12px 4px;
white-space: nowrap;
pointer-events: none;
opacity: 0;
transform: translateY(6px);
transition: opacity 0.25s ease, transform 0.25s ease;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
transition: opacity 0.2s ease;
text-align: left;
}
.cl-designer-badge__tooltip.active {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.cl-designer-badge__tooltip::after {
content: "";
position: absolute;
bottom: -6px;
right: 12px;
width: 12px;
height: 12px;
background: var(--cl-glass, rgba(12, 12, 25, 0.85));
border-right: 1px solid var(--cl-border, rgba(255, 255, 255, 0.08));
border-bottom: 1px solid var(--cl-border, rgba(255, 255, 255, 0.08));
bottom: -5px;
right: 16px;
width: 8px;
height: 8px;
background: inherit;
border-right: 1px solid var(--cl-glass-border);
border-bottom: 1px solid var(--cl-glass-border);
transform: rotate(45deg);
}
.cl-designer-badge__tooltip a {
color: var(--cl-accent, #d4a24e);
color: #fff;
text-decoration: none;
font-size: 13px;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.02em;
transition: color 0.2s ease;
letter-spacing: 0.06em;
display: inline-flex;
align-items: center;
}
.cl-designer-badge__tooltip a:hover {
color: var(--cl-accent-hover, #c4922e);
text-decoration: underline;
color: #b0b0b0;
}
[data-theme="light"] .cl-designer-badge__tooltip a {
color: #000;
}
[data-theme="light"] .cl-designer-badge__tooltip a:hover {
color: #444;
}

View File

@@ -863,20 +863,20 @@ module CommunityLanding
end
def render_designer_badge
dark_logo = File.join(CommunityLanding::PLUGIN_DIR, "..", "logo-dark.png")
light_logo = File.join(CommunityLanding::PLUGIN_DIR, "..", "logo-light.png")
return "" unless File.exist?(dark_logo) && File.exist?(light_logo)
logo_path = File.join(CommunityLanding::PLUGIN_DIR, "assets", "images", "badge.png")
dark_b64 = Base64.strict_encode64(File.binread(dark_logo))
light_b64 = Base64.strict_encode64(File.binread(light_logo))
begin
logo_b64 = Base64.strict_encode64(File.binread(logo_path))
rescue StandardError
return ""
end
html = +""
html << "<div class=\"cl-designer-badge\" id=\"cl-designer-badge\">\n"
html << " <div class=\"cl-designer-badge__tooltip\" id=\"cl-designer-tooltip\">\n"
html << " <a href=\"https://www.dpnmw.com\" target=\"_blank\" rel=\"noopener noreferrer\">Interface design by dpnmw.com</a>\n"
html << " <a href=\"https://www.dpnmw.com\" target=\"_blank\" rel=\"noopener noreferrer\">Interface By DPN MW <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 -960 960 960\" fill=\"currentColor\" style=\"vertical-align:middle;margin-left:2px\"><path d=\"M186.67-120q-27 0-46.84-19.83Q120-159.67 120-186.67v-586.66q0-27 19.83-46.84Q159.67-840 186.67-840H466v66.67H186.67v586.66h586.66V-466H840v279.33q0 27-19.83 46.84Q800.33-120 773.33-120H186.67ZM384-336.67 337.33-384l389.34-389.33h-194V-840H840v307.33h-66.67V-726L384-336.67Z\"/></svg></a>\n"
html << " </div>\n"
html << " <img class=\"cl-designer-badge__logo cl-designer-badge__logo--dark\" src=\"data:image/png;base64,#{dark_b64}\" alt=\"Designer\">\n"
html << " <img class=\"cl-designer-badge__logo cl-designer-badge__logo--light\" src=\"data:image/png;base64,#{light_b64}\" alt=\"Designer\">\n"
html << " <img class=\"cl-designer-badge__logo\" src=\"data:image/png;base64,#{logo_b64}\" alt=\"Designer\">\n"
html << "</div>\n"
html
end

View File

@@ -11,6 +11,8 @@ enabled_site_setting :community_landing_enabled
register_asset "stylesheets/community_landing/admin.css", :admin
require "base64"
after_initialize do
module ::CommunityLanding
PLUGIN_NAME = "community-landing"