diff --git a/rangeldigital/__pycache__/__init__.cpython-313.pyc b/rangeldigital/__pycache__/__init__.cpython-313.pyc index 6c4a073..1482cee 100644 Binary files a/rangeldigital/__pycache__/__init__.cpython-313.pyc and b/rangeldigital/__pycache__/__init__.cpython-313.pyc differ diff --git a/rangeldigital/__pycache__/api.cpython-313.pyc b/rangeldigital/__pycache__/api.cpython-313.pyc new file mode 100644 index 0000000..61251b8 Binary files /dev/null and b/rangeldigital/__pycache__/api.cpython-313.pyc differ diff --git a/rangeldigital/__pycache__/hooks.cpython-313.pyc b/rangeldigital/__pycache__/hooks.cpython-313.pyc index e7ca74b..16dc493 100644 Binary files a/rangeldigital/__pycache__/hooks.cpython-313.pyc and b/rangeldigital/__pycache__/hooks.cpython-313.pyc differ diff --git a/rangeldigital/api.py b/rangeldigital/api.py new file mode 100644 index 0000000..cbb2a4d --- /dev/null +++ b/rangeldigital/api.py @@ -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)} diff --git a/rangeldigital/dump.rdb b/rangeldigital/dump.rdb index c103cd6..c8c98b8 100644 Binary files a/rangeldigital/dump.rdb and b/rangeldigital/dump.rdb differ diff --git a/rangeldigital/fixtures/web_template_large_heading_section_1.json b/rangeldigital/fixtures/web_template_large_heading_section_1.json new file mode 100644 index 0000000..f8ad2b3 --- /dev/null +++ b/rangeldigital/fixtures/web_template_large_heading_section_1.json @@ -0,0 +1,39 @@ +{ + "doctype": "Web Template", + "name": "Large Heading Section - 1", + "module": "Website", + "type": "Component", +"template": "

{% set words = heading.split(' ') %}{% for word in words %}{% if loop.index == highlight_word_number %}{{ word }}{% else %}{{ word }}{% endif %} {% endfor %}

", + "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 + } + \ No newline at end of file diff --git a/rangeldigital/fixtures/web_template_multi_cards_section.json b/rangeldigital/fixtures/web_template_multi_cards_section.json new file mode 100644 index 0000000..ad881bc --- /dev/null +++ b/rangeldigital/fixtures/web_template_multi_cards_section.json @@ -0,0 +1,70 @@ +{ + "doctype": "Web Template", + "name": "Multi Cards Section - 1", + "module": "Website", + "type": "Component", + "template": "
{% if heading %}

{{ heading }}

{% endif %}{% if sub_heading %}

{{ sub_heading }}

{% endif %}
{% for card in cards %}{% endfor %}
", + "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 + } + \ No newline at end of file diff --git a/rangeldigital/fixtures/web_template_page_heading_2.json b/rangeldigital/fixtures/web_template_page_heading_2.json index ac76334..ac70d01 100644 --- a/rangeldigital/fixtures/web_template_page_heading_2.json +++ b/rangeldigital/fixtures/web_template_page_heading_2.json @@ -3,7 +3,7 @@ "name": "Page Heading - 2", "module": "Website", "type": "Component", -"template":"

{{heading}}

{{sub_heading}}

", +"template":"

{{heading}}

{{sub_heading}}

{{lead_form_code}}
", "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", diff --git a/rangeldigital/fixtures/web_template_testimonial_cards_section_one.json b/rangeldigital/fixtures/web_template_testimonial_cards_section_one.json new file mode 100644 index 0000000..3f7e47e --- /dev/null +++ b/rangeldigital/fixtures/web_template_testimonial_cards_section_one.json @@ -0,0 +1,77 @@ +{ + "doctype": "Web Template", + "name": "Testimonial Cards Section - 1", + "module": "Website", + "type": "Component", + "template": "
{% if heading %}

{{ heading }}

{% endif %}{% if sub_heading %}

{{ sub_heading }}

{% endif %}
{% for testimonial in testimonials %}

{{testimonial.testimonial_content}}

{{ testimonial.testimonial_author_name }}

{{ testimonial.testimonial_author_title }}

{% endfor %}
", + "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 + } + \ No newline at end of file diff --git a/rangeldigital/hooks.py b/rangeldigital/hooks.py index 1b79ec0..e33309a 100644 --- a/rangeldigital/hooks.py +++ b/rangeldigital/hooks.py @@ -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", diff --git a/rangeldigital/public/css/rangeldigital.css b/rangeldigital/public/css/rangeldigital.css index 1f60757..5eeb2c3 100644 --- a/rangeldigital/public/css/rangeldigital.css +++ b/rangeldigital/public/css/rangeldigital.css @@ -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} \ No newline at end of file