mirror of
https://github.com/dpnmw/community-landing.git
synced 2026-03-18 09:27:16 +00:00
Minor Fixes and CSS Alignment
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// community-landing-admin-tabs v2.5.0
|
// community-landing-admin-tabs v2.6.1
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
|
|
||||||
// Setting descriptions — injected into the admin DOM since the newer
|
// Setting descriptions — injected into the admin DOM since the newer
|
||||||
@@ -71,6 +71,7 @@ const DESCRIPTIONS = {
|
|||||||
hero_subtitle: "Supporting text below the headline. Describe your community's purpose.",
|
hero_subtitle: "Supporting text below the headline. Describe your community's purpose.",
|
||||||
hero_card_enabled: "Display hero content inside a rounded card with border and shadow.",
|
hero_card_enabled: "Display hero content inside a rounded card with border and shadow.",
|
||||||
hero_image_first: "Show hero image above text on mobile / left on desktop. Off = text first.",
|
hero_image_first: "Show hero image above text on mobile / left on desktop. Off = text first.",
|
||||||
|
hero_image_weight: "Image size weight (1–3). Higher values give the image more space relative to the text. Default: 1 (equal).",
|
||||||
hero_background_image_url: "Full-bleed background image behind the hero. In card mode, fills the card with overlay.",
|
hero_background_image_url: "Full-bleed background image behind the hero. In card mode, fills the card with overlay.",
|
||||||
hero_image_url: "Single hero image displayed on the right side of the hero. Use the upload button or paste a URL.",
|
hero_image_url: "Single hero image displayed on the right side of the hero. Use the upload button or paste a URL.",
|
||||||
hero_multiple_images_enabled: "Enable multiple hero images (up to 5) that rotate randomly on each page load. Disables the single image upload.",
|
hero_multiple_images_enabled: "Enable multiple hero images (up to 5) that rotate randomly on each page load. Disables the single image upload.",
|
||||||
@@ -284,7 +285,7 @@ const TABS = [
|
|||||||
label: "Hero",
|
label: "Hero",
|
||||||
settings: new Set([
|
settings: new Set([
|
||||||
"hero_title", "hero_accent_word", "hero_subtitle", "hero_title_size",
|
"hero_title", "hero_accent_word", "hero_subtitle", "hero_title_size",
|
||||||
"hero_card_enabled", "hero_image_first",
|
"hero_card_enabled", "hero_image_first", "hero_image_weight",
|
||||||
"hero_background_image_url", "hero_image_url", "hero_multiple_images_enabled", "hero_image_urls", "hero_image_max_height",
|
"hero_background_image_url", "hero_image_url", "hero_multiple_images_enabled", "hero_image_urls", "hero_image_max_height",
|
||||||
"hero_primary_button_enabled", "hero_primary_button_label", "hero_primary_button_url",
|
"hero_primary_button_enabled", "hero_primary_button_label", "hero_primary_button_url",
|
||||||
"hero_secondary_button_enabled", "hero_secondary_button_label", "hero_secondary_button_url",
|
"hero_secondary_button_enabled", "hero_secondary_button_label", "hero_secondary_button_url",
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ en:
|
|||||||
hero_subtitle: "Supporting text below the hero headline. Describe your community's purpose or value proposition."
|
hero_subtitle: "Supporting text below the hero headline. Describe your community's purpose or value proposition."
|
||||||
hero_card_enabled: "Display the hero content inside a rounded card container with border and shadow. When off, the hero uses a flat full-width layout."
|
hero_card_enabled: "Display the hero content inside a rounded card container with border and shadow. When off, the hero uses a flat full-width layout."
|
||||||
hero_image_first: "Show the hero image above the text on mobile and to the left on desktop. When off, text appears first (default)."
|
hero_image_first: "Show the hero image above the text on mobile and to the left on desktop. When off, text appears first (default)."
|
||||||
|
hero_image_weight: "Image size weight (1–3). Higher values give the image more space relative to the text. Default: 1 (equal split)."
|
||||||
hero_background_image_url: "Full-bleed background image behind the hero section. In card mode, fills the card with a dark overlay. In flat mode, covers the entire section."
|
hero_background_image_url: "Full-bleed background image behind the hero section. In card mode, fills the card with a dark overlay. In flat mode, covers the entire section."
|
||||||
hero_image_url: "Single hero image displayed on the right side of the hero. Use the upload button or paste a URL."
|
hero_image_url: "Single hero image displayed on the right side of the hero. Use the upload button or paste a URL."
|
||||||
hero_multiple_images_enabled: "Enable multiple hero images (up to 5) that rotate randomly on each page load. Disables the single image upload."
|
hero_multiple_images_enabled: "Enable multiple hero images (up to 5) that rotate randomly on each page load. Disables the single image upload."
|
||||||
|
|||||||
@@ -211,6 +211,11 @@ plugins:
|
|||||||
hero_image_first:
|
hero_image_first:
|
||||||
default: false
|
default: false
|
||||||
type: bool
|
type: bool
|
||||||
|
hero_image_weight:
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
min: 1
|
||||||
|
max: 3
|
||||||
hero_background_image_url:
|
hero_background_image_url:
|
||||||
default: ""
|
default: ""
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -315,7 +315,9 @@ module CommunityLanding
|
|||||||
if urls.any?
|
if urls.any?
|
||||||
has_images = true
|
has_images = true
|
||||||
img_max_h = @s.hero_image_max_height rescue 500
|
img_max_h = @s.hero_image_max_height rescue 500
|
||||||
html << "<div class=\"cl-hero__image\" data-hero-images=\"#{e(urls.to_json)}\">\n"
|
img_weight = (@s.hero_image_weight rescue 1).to_i.clamp(1, 3)
|
||||||
|
img_style = img_weight > 1 ? " style=\"flex: #{img_weight}\"" : ""
|
||||||
|
html << "<div class=\"cl-hero__image\"#{img_style} data-hero-images=\"#{e(urls.to_json)}\">\n"
|
||||||
html << "<img src=\"#{urls.first}\" alt=\"#{e(site_name)}\" class=\"cl-hero__image-img\" style=\"max-height: #{img_max_h}px;\">\n"
|
html << "<img src=\"#{urls.first}\" alt=\"#{e(site_name)}\" class=\"cl-hero__image-img\" style=\"max-height: #{img_max_h}px;\">\n"
|
||||||
if hero_video
|
if hero_video
|
||||||
html << "<button class=\"cl-hero-play\" data-video-url=\"#{e(hero_video)}\"#{blur_attr} aria-label=\"Play video\">"
|
html << "<button class=\"cl-hero-play\" data-video-url=\"#{e(hero_video)}\"#{blur_attr} aria-label=\"Play video\">"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# name: community-landing
|
# name: community-landing
|
||||||
# about: Branded public landing page for unauthenticated visitors
|
# about: Branded public landing page for unauthenticated visitors
|
||||||
# version: 2.5.0
|
# version: 2.6.1
|
||||||
# authors: DPN MEDiA WORKS
|
# authors: DPN MEDiA WORKS
|
||||||
# url: https://github.com/dpnmw/community-landing
|
# url: https://github.com/dpnmw/community-landing
|
||||||
# meta_url: https://dpnmediaworks.com
|
# meta_url: https://dpnmediaworks.com
|
||||||
|
|||||||
Reference in New Issue
Block a user