Changes to web template fixtures and css

This commit is contained in:
Jeremy Rangel
2025-02-13 02:06:07 -08:00
parent d307fd1225
commit dbe873735b
11 changed files with 271 additions and 7 deletions

Binary file not shown.

38
rangeldigital/api.py Normal file
View File

@ -0,0 +1,38 @@
import frappe
@frappe.whitelist(allow_guest=True) # allow_guest=True if you want unauthenticated access
def lead_magnet(email,subject,content):
try:
# Check if a Lead with the given email exists
lead = frappe.db.get_value("Lead", {"email_id": email}, "name",)
if not lead:
# Create a new Lead if not found
lead_doc = frappe.get_doc({
"doctype": "Lead",
"first_name": "Unknown",
"email_id": email,
"status": "Open"
})
lead_doc.insert(ignore_permissions=True)
frappe.db.commit()
lead = lead_doc.name # Get the newly created lead name
# Create a Communication linked to the Lead
communication = frappe.get_doc({
"doctype": "Communication",
"subject": subject,
"content": content,
"sender": email,
"sent_or_received": "Received",
"reference_doctype": "Lead",
"reference_name": lead # Link to the existing or new lead
})
communication.insert(ignore_permissions=True)
frappe.db.commit()
return {"success": True, "message": "Lead and communication recorded successfully", "lead": lead}
except Exception as e:
frappe.log_error(f"Lead Creation Error: {str(e)}", "Lead API Error")
return {"success": False, "error": str(e)}

Binary file not shown.

View File

@ -0,0 +1,39 @@
{
"doctype": "Web Template",
"name": "Large Heading Section - 1",
"module": "Website",
"type": "Component",
"template": "<section class=\"rd-large-heading-section-one\" {% if padding_top %} style=\"padding-top: {{ padding_top }};\" {% endif %} {% if padding_bottom %} style=\"padding-bottom: {{ padding_bottom }};\" {% endif %}><div class=\"container text-center\"><h2 class=\"rd-heading\">{% set words = heading.split(' ') %}{% for word in words %}{% if loop.index == highlight_word_number %}<span class=\"text-gradient-1\">{{ word }}</span>{% else %}{{ word }}{% endif %} {% endfor %}</h2></div></section>",
"fields": [
{
"fieldname": "heading",
"fieldtype": "Data",
"label": "Heading",
"reqd": 0
},
{
"fieldname": "highlight_word_number",
"fieldtype": "Int",
"label": "Highlight Word Number",
"reqd": 0
},
{
"fieldname": "padding_top",
"fieldtype": "Data",
"label": "Padding Top",
"reqd": 0
},
{
"fieldname": "padding_bottom",
"fieldtype": "Data",
"label": "Padding Bottom",
"reqd": 0
}
],
"owner": "Administrator",
"created_by": "Administrator",
"modified": "2024-08-12 14:30:14",
"standard": 0
}

View File

@ -0,0 +1,70 @@
{
"doctype": "Web Template",
"name": "Multi Cards Section - 1",
"module": "Website",
"type": "Component",
"template": "<section class=\"rd-multi-cards-section-one\" style=\"{% if padding_top %} padding-top: {{ padding_top }}; {% endif %} {% if padding_bottom %} padding-bottom: {{ padding_bottom }}; {% endif %}\"><div class=\"container\"><div class=\"rd-heading-row text-center\">{% if heading %}<h2 class=\"rd-heading\">{{ heading }}</h2>{% endif %}{% if sub_heading %}<p class=\"rd-sub-heading\">{{ sub_heading }}</p>{% endif %}</div><div class=\"row\">{% for card in cards %}<div class=\"col-md-4\">{% if card.card_url %}<a href=\"{{ card.card_url }}\">{% endif %}<div class=\"rd card\"> <img src=\"{{ card.card_image }}\" class=\"card-img-top\" alt=\"...\"><div class=\"card-body\"> <h5 class=\"card-title\">{{ card.card_heading }}</h5> <p class=\"card-text\">{{ card.card_sub_heading }}</p></div>{% if card.card_url %}</a>{% endif %} </div> </div>{% endfor %}</div></div></section>",
"fields": [
{
"fieldname": "heading",
"fieldtype": "Data",
"label": "Heading",
"reqd": 0
},
{
"fieldname": "sub_heading",
"fieldtype": "Data",
"label": "Sub Heading",
"reqd": 0
},
{
"fieldname": "padding_top",
"fieldtype": "Data",
"label": "Padding Top",
"reqd": 0
},
{
"fieldname": "padding_bottom",
"fieldtype": "Data",
"label": "Padding Bottom",
"reqd": 0
},
{
"fieldname": "cards",
"fieldtype": "Table Break",
"label": "Cards",
"reqd": 0
},
{
"fieldname": "card_heading",
"fieldtype": "Data",
"label": "Card Heading",
"reqd": 0
},
{
"fieldname": "card_sub_heading",
"fieldtype": "Data",
"label": "Card Sub Heading",
"reqd": 0
},
{
"fieldname": "card_image",
"fieldtype": "Attach Image",
"label": "Card Image",
"reqd": 0
},
{
"fieldname": "card_url",
"fieldtype": "Data",
"label": "Card URL",
"reqd": 0
}
],
"owner": "Administrator",
"created_by": "Administrator",
"modified": "2024-08-12 14:30:14",
"standard": 0
}

View File

@ -3,7 +3,7 @@
"name": "Page Heading - 2",
"module": "Website",
"type": "Component",
"template":"<section class=\"rd-page-heading-2\"><div class=\"container text-center\"><h1 class=\"rd-heading\">{{heading}}</h1><p class=\"rd-sub-heading\">{{sub_heading}}</p><img src=\"{{featured_image}}\"/></div></section>",
"template":"<section class=\"rd-page-heading-2\"><div class=\"container text-center\"><h1 class=\"rd-heading\">{{heading}}</h1><p class=\"rd-sub-heading\">{{sub_heading}}</p>{{lead_form_code}}<img src=\"{{featured_image}}\"/></div></section>",
"fields": [
{
"fieldname": "heading",
@ -22,6 +22,12 @@
"fieldtype": "Attach Image",
"label": "Featured Image",
"reqd": 0
},
{
"fieldname": "lead_form_code",
"fieldtype": "Code",
"label": "Lead Form Code",
"reqd": 0
}
],
"owner": "Administrator",

View File

@ -0,0 +1,77 @@
{
"doctype": "Web Template",
"name": "Testimonial Cards Section - 1",
"module": "Website",
"type": "Component",
"template": "<section class=\"rd-testimonial-cards-one\" style=\"{% if padding_top %} padding-top: {{ padding_top }}; {% endif %} {% if padding_bottom %} padding-bottom: {{ padding_bottom }}; {% endif %}\"><div class=\"container\"><div class=\"rd-heading-row text-center\">{% if heading %}<h2 class=\"rd-heading\">{{ heading }}</h2>{% endif %}{% if sub_heading %}<p class=\"rd-sub-heading\">{{ sub_heading }}</p>{% endif %}</div><div class=\"row\">{% for testimonial in testimonials %}<div class=\"col-md-4\"><div class=\"rd card\"><div class=\"rd-testimonial-rating\"> </div><div class=\"card-body\"> <p class=\"rd-testimonial-content\">{{testimonial.testimonial_content}}</p><div class=\"rd-testimonial-author-row row\"><div class=\"col-4\"><img src=\"{{ testimonial.testimonial_author_image }}\"></div><div class=\"col-8\"><p class=\"rd-testimonial-author-name\">{{ testimonial.testimonial_author_name }}</p><p class=\"rd-testimonial-author-title\">{{ testimonial.testimonial_author_title }}</p></div></div></div></div></div>{% endfor %}</div></div></section>",
"fields": [
{
"fieldname": "heading",
"fieldtype": "Data",
"label": "Heading",
"reqd": 0
},
{
"fieldname": "sub_heading",
"fieldtype": "Data",
"label": "Sub Heading",
"reqd": 0
},
{
"fieldname": "padding_top",
"fieldtype": "Data",
"label": "Padding Top",
"reqd": 0
},
{
"fieldname": "padding_bottom",
"fieldtype": "Data",
"label": "Padding Bottom",
"reqd": 0
},
{
"fieldname": "testimonials",
"fieldtype": "Table Break",
"label": "Testimonials",
"reqd": 0
},
{
"fieldname": "testimonial_content",
"fieldtype": "Text",
"label": "Content",
"reqd": 0
},
{
"fieldname": "testimonial_rating",
"fieldtype": "Select",
"label": "Rating",
"options": "1\n1.5\n2\n2.5\n3\n3.5\n4\n4.5\n5",
"reqd": 0
},
{
"fieldname": "testimonial_author_image",
"fieldtype": "Attach Image",
"label": "Author Image",
"reqd": 0
},
{
"fieldname": "testimonial_author_name",
"fieldtype": "Data",
"label": "Author Name",
"reqd": 0
},
{
"fieldname": "testimonial_author_title",
"fieldtype": "Data",
"label": "Author Title",
"reqd": 0
}
],
"owner": "Administrator",
"created_by": "Administrator",
"modified": "2024-08-12 14:30:14",
"standard": 0
}

View File

@ -12,7 +12,7 @@ web_include_js = [
#"/assets/rangeldigital/js/jquery-3.6.0.min.js",
#"/assets/rangeldigital/js/popper.min.js",
#"/assets/rangeldigital/js/bootstrap.min.js",
"/assets/rangeldigital/js/bootstrap.min.js",
#"/assets/rangeldigital/js/slick.min.js",
#"/assets/rangeldigital/js/jquery.parallax-scroll.js",
"/assets/rangeldigital/js/gsap.min.js",

View File

@ -1,16 +1,17 @@
body {background:#01071C!important}
section {padding:40px 0px;background:#01071C}
section {background:#01071C}
.row {margin-bottom:20px}
.rd-heading-row {margin-bottom:50px}
.row {margin-bottom:20px;row-gap:20px}
.rd-heading-row {margin-bottom:40px}
.rd.card {background-color:#1C2037}
h1,h2,h3,h4,h5,h6,p {color:#E0E0E0}
h1,h2,h3,h4,h5,h6,p {color:white}
h2.rd {color:#E0E0E0}
.rd-button-one {padding:10px 20px;font-weight:bold;border-radius:3px;color:black;background-image: linear-gradient(134deg, #008AFC 27%, #97F8F4 100%)}
.text-gradient-1 {background-clip:text;-webkit-background-clip: text !important;padding-top:10px;padding-bottom:20px;background: -webkit-linear-gradient(#119CFF, #97F8F4);-webkit-text-fill-color: transparent}
/* ----- Gradients ----- */
.rd-background-gradient-1 {background-color:transparent;background-image:linear-gradient(45deg, rgb(0, 138, 252) 0%, rgb(28, 31, 55) 100%);border-bottom-color:rgb(17, 156, 255)}
.rd-background-gradient-1 {background-color:transparent;background-image:linear-gradient(45deg, #119Cff 0%, #97F8F4 100%)
}
.rd-background-gradient-left-1 {position:relative}
.rd-background-gradient-left-1:before {content:"";display:block;position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-size:contain;background-position: center left;background-image:url(/assets/rangeldigital/files/img/bg-gradient-left-1.jpg)}
@ -92,6 +93,7 @@ section.rd-four-blurb-box-one > .container {background:blue;overflow:hidden;posi
.rd-six-card-section-one .card {min-height:300px}
.rd-six-card-section-one h2 {font-size:3rem;margin-bottom:60px;color:white}
.rd-six-card-section-one h5 {font-size:1.5rem;color:#008AFC}
.rd-six-card-section-one .card-two p,.rd-six-card-section-one .card-two h5 {color:black}
.rd-six-card-section-one p {color:white}
@media only screen and (max-width: 767px) {
.rd-six-card-section-one .row {gap:20px}
@ -127,11 +129,43 @@ section.rd-page-heading-2 {padding-top:255px;padding-bottom:120px}
.rd-page-heading-2 .rd-heading {font-size:2rem}
}
/* ---------- Multi Cards Section - 1 ---------- */
.rd-multi-cards-section-one {row-gap:20px}
.rd-multi-cards-section-one .card {background:#1C2037;border-radius:10px;padding:20px;min-height:300px}
.rd-multi-cards-section-one .card-body {padding:0;margin-top:20px}
.rd-multi-cards-section-one h2 {font-size:3rem;margin-bottom:60px;color:white}
.rd-multi-cards-section-one .card-img-top {border-radius:10px}
.rd-multi-cards-section-one .card:hover {border:1px solid #119CFF}
/* ----- Testimonial Cards Section - 1 ----- */
.rd-testimonial-cards-one .rd-testimonial-author-row img {height:60px;width:60px;border-radius:50%}
.rd-testimonial-cards-one .rd-testimonial-content {margin-bottom:5px;font-size:1rem;font-style:italic}
.rd-testimonial-cards-one .rd-heading {font-size:3rem;margin-bottom:60px;color:white}
.rd-testimonial-cards-one .col-4 {flex:0 1 33.333%}
.rd-testimonial-cards-one .col-8 {flex:1}
/* ---------- Large Heading Section - 1 ---------- */
section.rd-large-heading-section-one {position:relative}
.rd-large-heading-section-one:before {opacity:0.5;content:"";background-color: transparent;
--background-overlay: '';
background-image: radial-gradient(at center center, #004BAD 0%, #01071A 70%);
position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;
}
.rd-large-heading-section-one .rd-heading {font-size:4rem;font-weight:bold}
.rd-large-heading-section-one .container {width:70%}
.rd-large-heading-section-one h2 {z-index:1;position:relative;padding-top:100px;padding-bottom:100px}
@media only screen and (max-width: 767px) {
.rd-large-heading-section-one .rd-heading {font-size:2rem;padding-top:60px;padding-bottom:60px}
}
/* ---------- Footers ---------- */
footer.rd-footer-1 {position:relative;padding-top:100px;min-height:400px;background:#01071C}
footer.rd-footer-1:before {opacity:0.5;content:"";display:block;position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;background-size:cover;background-image:url(/assets/rangeldigital/files/img/bg-gradient-waves-1.jpg)}
footer.rd-footer-1 .rd-heading {font-size:3rem;font-weight:bold}
footer.rd-footer-1 .rd-sub-heading {font-size:1.5rem;color:white}
footer.rd-footer-1 ul {padding:0;list-style:none}
footer.rd-footer-1 ul {padding:0;list-style:none;margin-top:10px}
footer.rd-footer-1 ul li {color:white}
footer.rd-footer-1 .rd-footer-column-heading {color:white;font-weight:bold}