diff --git a/company_site/company_site/settings.py b/company_site/company_site/settings.py index 1a50939..92ff30c 100644 --- a/company_site/company_site/settings.py +++ b/company_site/company_site/settings.py @@ -69,6 +69,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'public.context_processors.tianji_tracking', ], }, }, @@ -153,3 +154,7 @@ EMAIL_USE_TLS = True # Authentication Redirects LOGIN_REDIRECT_URL = '/' LOGOUT_REDIRECT_URL = '/' + +# Tianji analytics (loaded only after user consent in production) +TIANJI_TRACKER_URL = 'https://tianji.aimloperations.com/tracker.js' +TIANJI_WEBSITE_ID = 'cm7w80pyy020oddswy2evl957' diff --git a/company_site/financial/templates/financial/index.html b/company_site/financial/templates/financial/index.html index 15467f3..a283858 100644 --- a/company_site/financial/templates/financial/index.html +++ b/company_site/financial/templates/financial/index.html @@ -9,23 +9,28 @@

Dashboard

- + View Contracts

Overview of all active and past contracts and their scopes.

- + New Contract

Establish a new project contract to track budgets.

- + New Employee

Add a new personnel member to your organization.

- + Log Time

Record work hours against specific contracts.

- + Manage Time Logs

Review and edit submitted time entries.

diff --git a/company_site/planning/templates/planning/board.html b/company_site/planning/templates/planning/board.html index e3d3bc0..13e2b22 100644 --- a/company_site/planning/templates/planning/board.html +++ b/company_site/planning/templates/planning/board.html @@ -226,7 +226,8 @@
- + @@ -328,9 +329,11 @@ .then(data => { if (data.status !== 'success') { alert('Failed to update status'); - } else { - // Update counts if necessary, though reloading or dynamic updates are better. - // Simple approach: user just sees it moved. + } else if (window.aimlTrack) { + window.aimlTrack('planning_item_status_change', { + status: newStatus, + item_id: id + }); } }); }); diff --git a/company_site/public/context_processors.py b/company_site/public/context_processors.py new file mode 100644 index 0000000..8092b04 --- /dev/null +++ b/company_site/public/context_processors.py @@ -0,0 +1,18 @@ +from django.conf import settings + + +def tianji_tracking(request): + return { + 'tianji_enabled': not settings.DEBUG, + 'tianji_tracker_url': getattr( + settings, + 'TIANJI_TRACKER_URL', + 'https://tianji.aimloperations.com/tracker.js', + ), + 'tianji_website_id': getattr( + settings, + 'TIANJI_WEBSITE_ID', + 'cm7w80pyy020oddswy2evl957', + ), + 'page_name': getattr(getattr(request, 'resolver_match', None), 'url_name', ''), + } diff --git a/company_site/public/static/public/css/style.css b/company_site/public/static/public/css/style.css index d4a57ba..5fd3fd1 100644 --- a/company_site/public/static/public/css/style.css +++ b/company_site/public/static/public/css/style.css @@ -583,4 +583,118 @@ input:focus, select:focus, textarea:focus { display: block; margin-bottom: 1rem; margin-top: -0.5rem; +} + +/* Footer links */ +.footer-links { + margin: 0.5rem 0; + font-size: 0.9rem; +} + +.footer-links a { + color: var(--text-muted); +} + +.footer-links a:hover { + color: var(--primary-color); +} + +.footer-separator { + color: var(--text-muted); + margin: 0 0.5rem; +} + +/* Legal pages */ +.legal-page { + max-width: 820px; +} + +.legal-updated { + text-align: center; + color: var(--text-muted); + margin-bottom: 2rem; +} + +.legal-content h2 { + color: var(--primary-color); + font-size: 1.25rem; + margin: 2rem 0 0.75rem; +} + +.legal-content h3 { + color: var(--text-color); + font-size: 1.05rem; + margin: 1.5rem 0 0.5rem; +} + +.legal-content p, +.legal-content li { + color: var(--text-muted); + margin-bottom: 1rem; +} + +.legal-content ul { + margin: 0 0 1rem 1.5rem; +} + +/* Cookie consent banner */ +.cookie-consent-banner { + position: fixed; + bottom: 0; + left: 0; + right: 0; + z-index: 1100; + padding: 1rem; + background: rgba(26, 26, 26, 0.98); + border-top: 1px solid rgba(0, 243, 255, 0.25); + backdrop-filter: blur(10px); +} + +.cookie-consent-content { + max-width: 960px; + margin: 0 auto; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 1rem; +} + +.cookie-consent-text { + flex: 1 1 420px; + color: var(--text-muted); + font-size: 0.95rem; + margin: 0; +} + +.cookie-consent-actions { + display: flex; + gap: 0.75rem; + flex-shrink: 0; +} + +.btn-outline { + background: transparent; + border: 1px solid rgba(255, 255, 255, 0.25); + color: var(--text-color); +} + +.btn-outline:hover { + border-color: var(--primary-color); + color: var(--primary-color); +} + +@media (max-width: 640px) { + .cookie-consent-content { + flex-direction: column; + align-items: stretch; + } + + .cookie-consent-actions { + width: 100%; + } + + .cookie-consent-actions .btn { + flex: 1; + } } \ No newline at end of file diff --git a/company_site/public/static/public/js/tianji-consent.js b/company_site/public/static/public/js/tianji-consent.js new file mode 100644 index 0000000..067e4f5 --- /dev/null +++ b/company_site/public/static/public/js/tianji-consent.js @@ -0,0 +1,159 @@ +(function () { + 'use strict'; + + var CONSENT_KEY = 'aiml_analytics_consent'; + var configEl = document.getElementById('tianji-config'); + if (!configEl) { + return; + } + + var trackerUrl = configEl.dataset.trackerUrl; + var websiteId = configEl.dataset.websiteId; + var userId = configEl.dataset.userId || ''; + var pendingConsentEvent = false; + + function getConsent() { + try { + return localStorage.getItem(CONSENT_KEY); + } catch (e) { + return null; + } + } + + function setConsent(value) { + try { + localStorage.setItem(CONSENT_KEY, value); + } catch (e) { + /* ignore storage errors */ + } + } + + function hideBanner() { + var banner = document.getElementById('cookie-consent-banner'); + if (banner) { + banner.hidden = true; + } + } + + function showBanner() { + var banner = document.getElementById('cookie-consent-banner'); + if (banner) { + banner.hidden = false; + } + } + + function trackEvent(name, data) { + if (window.tianji && typeof window.tianji.track === 'function') { + window.tianji.track(name, data || {}); + } + } + + function identifyUser() { + if (!userId || !window.tianji || typeof window.tianji.identify !== 'function') { + return; + } + window.tianji.identify({ userId: userId }); + } + + function loadTracker() { + if (document.querySelector('script[data-tianji-loaded="true"]')) { + identifyUser(); + return; + } + + var script = document.createElement('script'); + script.async = true; + script.defer = true; + script.src = trackerUrl; + script.setAttribute('data-website-id', websiteId); + script.setAttribute('data-do-not-track', 'true'); + script.setAttribute('data-tianji-loaded', 'true'); + + script.onload = function () { + identifyUser(); + if (pendingConsentEvent) { + trackEvent('consent_accepted'); + pendingConsentEvent = false; + } + document.dispatchEvent(new CustomEvent('tianji:ready')); + }; + + document.head.appendChild(script); + } + + function acceptTracking() { + setConsent('accepted'); + hideBanner(); + try { + localStorage.removeItem('tianji.disabled'); + } catch (e) { + /* ignore storage errors */ + } + pendingConsentEvent = true; + loadTracker(); + } + + function declineTracking() { + setConsent('declined'); + hideBanner(); + try { + localStorage.setItem('tianji.disabled', '1'); + } catch (e) { + /* ignore storage errors */ + } + if (window.aimlTrack) { + window.aimlTrack('consent_declined'); + } + } + + function bindBannerControls() { + var acceptBtn = document.getElementById('cookie-consent-accept'); + var declineBtn = document.getElementById('cookie-consent-decline'); + var manageLinks = document.querySelectorAll('[data-open-cookie-preferences]'); + + if (acceptBtn) { + acceptBtn.addEventListener('click', acceptTracking); + } + if (declineBtn) { + declineBtn.addEventListener('click', declineTracking); + } + manageLinks.forEach(function (link) { + link.addEventListener('click', function (event) { + event.preventDefault(); + showBanner(); + }); + }); + } + + window.aimlTrack = function (name, data) { + trackEvent(name, data); + }; + + window.aimlTrackWhenReady = function (name, data) { + if (window.tianji && typeof window.tianji.track === 'function') { + trackEvent(name, data); + return; + } + document.addEventListener('tianji:ready', function handler() { + document.removeEventListener('tianji:ready', handler); + trackEvent(name, data); + }); + }; + + document.addEventListener('DOMContentLoaded', function () { + bindBannerControls(); + + var consent = getConsent(); + if (consent === 'accepted') { + hideBanner(); + loadTracker(); + return; + } + if (consent === 'declined') { + hideBanner(); + return; + } + + showBanner(); + }); +})(); diff --git a/company_site/public/templates/base.html b/company_site/public/templates/base.html index 89c2f03..40b6e83 100644 --- a/company_site/public/templates/base.html +++ b/company_site/public/templates/base.html @@ -36,9 +36,13 @@ - {% if not debug %} - + {% if tianji_enabled %} + {% endif %} @@ -69,12 +73,15 @@
  • Contact
  • + class="{% if request.resolver_match.url_name == 'contact' %}active{% endif %}" + data-tianji-event="nav_contact">Contact {% if user.is_authenticated %}
  • Planning
  • + class="{% if 'planning' in request.path %}active{% endif %}" + data-tianji-event="nav_planning">Planning
  • Financials
  • + class="{% if 'financial' in request.path %}active{% endif %}" + data-tianji-event="nav_financials">Financials
  • Sign + style="border: 1px solid var(--primary-color); padding: 0.4rem 1rem; border-radius: 4px; margin-left: 1rem; color: #000;" + data-tianji-event="nav_sign_in">Sign In
  • {% endif %} @@ -111,12 +119,36 @@ + {% if tianji_enabled %} + + + {% endif %} + + {% block tracking_events %}{% endblock %} \ No newline at end of file diff --git a/company_site/public/templates/public/ai_education.html b/company_site/public/templates/public/ai_education.html index f3927e0..db37851 100644 --- a/company_site/public/templates/public/ai_education.html +++ b/company_site/public/templates/public/ai_education.html @@ -83,7 +83,8 @@ workshops, and training for teams.{% endblock %}

    Ready to Transform Your Business?

    Contact us today to schedule your AI Education sessions.

    Get + style="display: inline-block; padding: 1rem 2rem; background: var(--primary-color); color: black; font-weight: bold; border-radius: 30px; text-transform: uppercase;" + data-tianji-event="service_cta" data-tianji-event-page="ai_education" data-tianji-event-action="get_started">Get Started diff --git a/company_site/public/templates/public/ai_sensor.html b/company_site/public/templates/public/ai_sensor.html index 062a9db..72c20e7 100644 --- a/company_site/public/templates/public/ai_sensor.html +++ b/company_site/public/templates/public/ai_sensor.html @@ -86,7 +86,8 @@ Machine Vision, Pattern Recognition, and NLP for sensors.{% endblock %}

    Ready to Enhance Your Sensors?

    Contact us today to discuss your AI sensor needs.

    - Get Started + Get Started
    {% endblock %} \ No newline at end of file diff --git a/company_site/public/templates/public/bot.html b/company_site/public/templates/public/bot.html index 55d0620..faf4044 100644 --- a/company_site/public/templates/public/bot.html +++ b/company_site/public/templates/public/bot.html @@ -14,7 +14,8 @@ Proprietary agents built for your workflows and conversations—hosted, scalable, and observable.

    - Build Your Agent + Build Your Agent Forward-Deployed AI
    @@ -121,7 +122,8 @@

    Ready to Automate?

    Tell us the workflow you want an agent to own—we will design, deploy, and monitor it.

    - Get Started + Get Started
    {% endblock %} diff --git a/company_site/public/templates/public/change_password.html b/company_site/public/templates/public/change_password.html index d3407cc..71ee7b3 100644 --- a/company_site/public/templates/public/change_password.html +++ b/company_site/public/templates/public/change_password.html @@ -41,7 +41,8 @@
    diff --git a/company_site/public/templates/public/chat.html b/company_site/public/templates/public/chat.html index 6736c27..63ecde6 100644 --- a/company_site/public/templates/public/chat.html +++ b/company_site/public/templates/public/chat.html @@ -15,7 +15,8 @@ designed to keep your data under your control.

    - Launch Chat + Launch Chat Learn More
    @@ -64,7 +65,8 @@

    Get full access to all features, including unlimited chats and file analysis.

    - Start Your Free Trial + Start Your Free Trial diff --git a/company_site/public/templates/public/computers.html b/company_site/public/templates/public/computers.html index a8f2fbf..f440c05 100644 --- a/company_site/public/templates/public/computers.html +++ b/company_site/public/templates/public/computers.html @@ -87,7 +87,8 @@ PCs to AI servers and workstations.{% endblock %}

    Ready to Upgrade Your Systems?

    Contact us today to discuss your computer needs.

    - Get Started + Get Started
    {% endblock %} \ No newline at end of file diff --git a/company_site/public/templates/public/contact.html b/company_site/public/templates/public/contact.html index 8a3458b..3f050ea 100644 --- a/company_site/public/templates/public/contact.html +++ b/company_site/public/templates/public/contact.html @@ -58,7 +58,8 @@ {% endif %} - @@ -85,4 +86,14 @@ +{% endblock %} + +{% block tracking_events %} +{% if success %} + +{% endif %} {% endblock %} \ No newline at end of file diff --git a/company_site/public/templates/public/file_hosting.html b/company_site/public/templates/public/file_hosting.html index 2398876..401fd3a 100644 --- a/company_site/public/templates/public/file_hosting.html +++ b/company_site/public/templates/public/file_hosting.html @@ -82,7 +82,8 @@ Protect your data with our advanced storage solutions.{% endblock %}

    Ready to Secure Your Files?

    Contact us today to get started with our file hosting service.

    - Get Started + Get Started diff --git a/company_site/public/templates/public/forward_deployed.html b/company_site/public/templates/public/forward_deployed.html index 2cfc3ea..e1bc4e4 100644 --- a/company_site/public/templates/public/forward_deployed.html +++ b/company_site/public/templates/public/forward_deployed.html @@ -145,7 +145,8 @@

    Ready to Deploy?

    Tell us the workflow that is costing you the most time. We will help you automate it.

    - Start a Conversation + Start a Conversation
    diff --git a/company_site/public/templates/public/ml_model.html b/company_site/public/templates/public/ml_model.html index 7fa4d37..a2beded 100644 --- a/company_site/public/templates/public/ml_model.html +++ b/company_site/public/templates/public/ml_model.html @@ -84,7 +84,8 @@ supervised, unsupervised, and reinforcement learning.{% endblock %}

    Ready to Solve Your Problem?

    Contact us today to create your custom ML model.

    - Get Started + Get Started
    {% endblock %} \ No newline at end of file diff --git a/company_site/public/templates/public/new_index.html b/company_site/public/templates/public/new_index.html index e24fa2e..c36d2ba 100644 --- a/company_site/public/templates/public/new_index.html +++ b/company_site/public/templates/public/new_index.html @@ -18,7 +18,8 @@ Forward-deployed AI engineering. We embed with your team to architect, build, and deploy custom AI workflows that solve complex operational bottlenecks.

    - See How We Deploy + See How We Deploy
    @@ -167,50 +168,59 @@

    - + Primary Forward-Deployed AI

    Embed with your team to map bottlenecks, build integrations, and deploy custom AI workflows in your environment.

    - + Primary AI Agents & Automation

    Proprietary web-hosted agents for your workflows and conversations—scalable hosting plus performance and real-time analytics.

    - + Primary Web Design and Hosting

    Modern websites with reliable hosting for your online presence.

    - + ML Model Creation

    Custom models designed for deployment inside your pipelines—not experiments that never ship.

    - + Secure AI Chat

    Hosted LLM workspace with privacy-first architecture—an example of how we deliver scalable, observable AI products.

    - + AI Sensor Algorithms

    Intelligent algorithms for sensor data processing, real-time insights, and IoT applications.

    - + AI Education

    Tailored AI training for your team—in-person or virtual.

    - + Computer Builds

    Servers and workstations for compute, storage, and local inference workloads.

    - + File Hosting

    Secure, scalable file hosting to store and share your data.

    diff --git a/company_site/public/templates/public/terms_of_service.html b/company_site/public/templates/public/terms_of_service.html new file mode 100644 index 0000000..79e76c7 --- /dev/null +++ b/company_site/public/templates/public/terms_of_service.html @@ -0,0 +1,202 @@ +{% extends "base.html" %} + +{% block title %}Terms of Service & Privacy Policy - AI ML Operations, LLC{% endblock %} +{% block meta_description %}Terms of Service and Privacy Policy for AI ML Operations, LLC, including how we collect, use, and protect your information and analytics practices.{% endblock %} + +{% block content %} +
    + +
    +{% endblock %} diff --git a/company_site/public/templates/public/web_design.html b/company_site/public/templates/public/web_design.html index 45fc97a..319aa59 100644 --- a/company_site/public/templates/public/web_design.html +++ b/company_site/public/templates/public/web_design.html @@ -186,7 +186,8 @@ visually stunning, functional websites tailored to your business.{% endblock %}

    Ready to Build Your Online Presence?

    Contact us today to get started on your website project.

    - Get Started + Get Started
    {% endblock %} \ No newline at end of file diff --git a/company_site/public/templates/registration/login.html b/company_site/public/templates/registration/login.html index f8346db..9c27e11 100644 --- a/company_site/public/templates/registration/login.html +++ b/company_site/public/templates/registration/login.html @@ -27,7 +27,8 @@ - + diff --git a/company_site/public/urls.py b/company_site/public/urls.py index 195ad5d..a0fd81c 100755 --- a/company_site/public/urls.py +++ b/company_site/public/urls.py @@ -14,6 +14,7 @@ urlpatterns = [ path("forward-deployed-ai", views.forward_deployed, name="forward_deployed"), path("ml_model", views.ml_model, name="ml_model"), path("contact", views.contact, name="contact"), + path("terms", views.terms_of_service, name="terms_of_service"), path("change_password", views.change_password, name="change_password"), path("preview_email//", views.preview_email, name="preview_email") ] diff --git a/company_site/public/views.py b/company_site/public/views.py index 685c454..3775866 100755 --- a/company_site/public/views.py +++ b/company_site/public/views.py @@ -55,6 +55,9 @@ def forward_deployed(request): def ml_model(request): return render(request, "public/ml_model.html", {}) +def terms_of_service(request): + return render(request, "public/terms_of_service.html", {}) + @login_required def preview_email(request, pk): email_instance = get_object_or_404(EmailMessage, pk=pk)