190 lines
11 KiB
HTML
190 lines
11 KiB
HTML
|
|
<div class="dog-calculator-container" id="dogCalculator">
|
||
|
|
<div class="dog-calculator-section">
|
||
|
|
<div class="dog-calculator-section-header">
|
||
|
|
<h2>Dog's Characteristics</h2>
|
||
|
|
<div class="dog-calculator-unit-switch">
|
||
|
|
<span class="dog-calculator-unit-label active" id="metricLabel">Metric</span>
|
||
|
|
<label class="dog-calculator-switch">
|
||
|
|
<input type="checkbox" id="unitToggle">
|
||
|
|
<span class="dog-calculator-slider"></span>
|
||
|
|
</label>
|
||
|
|
<span class="dog-calculator-unit-label" id="imperialLabel">Imperial</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-form-group">
|
||
|
|
<label for="dogType">Dog Type / Activity Level:</label>
|
||
|
|
<select id="dogType" aria-describedby="dogTypeHelp">
|
||
|
|
<option value="">Select dog type...</option>
|
||
|
|
<option value="3.0">Puppy (0-4 months)</option>
|
||
|
|
<option value="2.0">Puppy (4 months - adult)</option>
|
||
|
|
<option value="1.2">Adult - inactive/obese</option>
|
||
|
|
<option value="1.6">Adult (neutered/spayed) - average activity</option>
|
||
|
|
<option value="1.8">Adult (intact) - average activity</option>
|
||
|
|
<option value="1.0">Adult - weight loss</option>
|
||
|
|
<option value="1.7">Adult - weight gain</option>
|
||
|
|
<option value="2.0">Working dog - light work</option>
|
||
|
|
<option value="3.0">Working dog - moderate work</option>
|
||
|
|
<option value="5.0">Working dog - heavy work</option>
|
||
|
|
<option value="1.1">Senior dog</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-form-group">
|
||
|
|
<label for="weight" id="weightLabel">Dog's Weight (kg):</label>
|
||
|
|
<input type="number" id="weight" min="0.1" step="0.1" placeholder="Enter weight in kg" aria-describedby="weightHelp">
|
||
|
|
<div id="weightError" class="dog-calculator-error dog-calculator-hidden">Please enter a valid weight (minimum 0.1 kg)</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-results" id="calorieResults" style="display: none;">
|
||
|
|
<div class="dog-calculator-result-item">
|
||
|
|
<span class="dog-calculator-result-label">Resting Energy Requirement (RER):</span>
|
||
|
|
<span class="dog-calculator-result-value" id="rerValue">- cal/day</span>
|
||
|
|
</div>
|
||
|
|
<div class="dog-calculator-result-item">
|
||
|
|
<span class="dog-calculator-result-label">Maintenance Energy Requirement (MER):</span>
|
||
|
|
<span class="dog-calculator-result-value" id="merValue">- cal/day</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-collapsible active" id="foodCalculator">
|
||
|
|
<div class="dog-calculator-collapsible-header">
|
||
|
|
<h3>How much should I feed?</h3>
|
||
|
|
</div>
|
||
|
|
<div class="dog-calculator-collapsible-content">
|
||
|
|
<div class="dog-calculator-collapsible-inner">
|
||
|
|
<!-- Food Sources Container -->
|
||
|
|
<div class="dog-calculator-food-sources" id="foodSources">
|
||
|
|
<!-- Initial food source will be added by JavaScript -->
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Add Food Source Button -->
|
||
|
|
<button class="dog-calculator-add-food-btn" id="addFoodBtn" type="button">
|
||
|
|
<span>+</span>
|
||
|
|
<span>Add another food source</span>
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<!-- Per-Food Results -->
|
||
|
|
<div class="dog-calculator-food-results" id="foodBreakdownResults" style="display: none;">
|
||
|
|
<div id="foodBreakdownList">
|
||
|
|
<!-- Individual food breakdowns will be populated by JavaScript -->
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Unit Selection Buttons -->
|
||
|
|
<div class="dog-calculator-unit-buttons" id="unitButtons" style="display: none;">
|
||
|
|
<button type="button" class="dog-calculator-unit-btn active" data-unit="g">g</button>
|
||
|
|
<button type="button" class="dog-calculator-unit-btn" data-unit="kg">kg</button>
|
||
|
|
<button type="button" class="dog-calculator-unit-btn" data-unit="oz">oz</button>
|
||
|
|
<button type="button" class="dog-calculator-unit-btn" data-unit="lb">lb</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Daily Total Results -->
|
||
|
|
<div class="dog-calculator-results" id="dailyFoodResults" style="display: none;">
|
||
|
|
<div class="dog-calculator-result-item">
|
||
|
|
<span class="dog-calculator-result-label">Total Daily Amount:</span>
|
||
|
|
<span class="dog-calculator-result-value" id="dailyFoodValue">- g/day</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Hidden select for compatibility -->
|
||
|
|
<select id="unit" class="dog-calculator-unit-select-hidden" aria-describedby="unitHelp">
|
||
|
|
<option value="g">grams (g)</option>
|
||
|
|
<option value="kg">kilograms (kg)</option>
|
||
|
|
<option value="oz">ounces (oz)</option>
|
||
|
|
<option value="lb">pounds (lb)</option>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<div class="dog-calculator-food-amounts-section" id="foodAmountsSection" style="display: none;">
|
||
|
|
<h4 class="dog-calculator-section-title">
|
||
|
|
Calculate amounts for
|
||
|
|
<input type="number" id="days" min="1" step="1" value="1" placeholder="1" aria-describedby="daysHelp" class="dog-calculator-inline-days">
|
||
|
|
<span id="dayLabel">day</span>:
|
||
|
|
</h4>
|
||
|
|
<div id="daysError" class="dog-calculator-error dog-calculator-hidden">Please enter a valid number of days (minimum 1)</div>
|
||
|
|
<div id="foodAmountsList" class="dog-calculator-food-amounts-list">
|
||
|
|
<!-- Individual food amounts will be populated here -->
|
||
|
|
</div>
|
||
|
|
<div class="dog-calculator-total-row" id="totalAmountRow">
|
||
|
|
<span class="dog-calculator-total-label">Total Amount:</span>
|
||
|
|
<span class="dog-calculator-total-value" id="totalAmountDisplay"></span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-action-buttons">
|
||
|
|
<button class="dog-calculator-btn dog-calculator-btn-share" id="shareBtn">
|
||
|
|
Share
|
||
|
|
</button>
|
||
|
|
<button class="dog-calculator-btn dog-calculator-btn-embed" id="embedBtn">
|
||
|
|
Embed
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-footer">
|
||
|
|
<a href="https://caninenutritionandwellness.com" target="_blank" rel="noopener noreferrer">
|
||
|
|
by caninenutritionandwellness.com
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
<!-- Share Modal -->
|
||
|
|
<div id="shareModal" class="dog-calculator-modal" style="display: none;">
|
||
|
|
<div class="dog-calculator-modal-content">
|
||
|
|
<span class="dog-calculator-modal-close" id="shareModalClose">×</span>
|
||
|
|
<h3>Share Calculator</h3>
|
||
|
|
<div class="dog-calculator-share-buttons">
|
||
|
|
<button class="dog-calculator-share-btn dog-calculator-share-facebook plausible-event-name=Calculator+Usage plausible-event-action=calculator-share-facebook" id="shareFacebook">
|
||
|
|
Facebook
|
||
|
|
</button>
|
||
|
|
<button class="dog-calculator-share-btn dog-calculator-share-twitter plausible-event-name=Calculator+Usage plausible-event-action=calculator-share-twitter" id="shareTwitter">
|
||
|
|
Twitter
|
||
|
|
</button>
|
||
|
|
<button class="dog-calculator-share-btn dog-calculator-share-linkedin plausible-event-name=Calculator+Usage plausible-event-action=calculator-share-linkedin" id="shareLinkedIn">
|
||
|
|
LinkedIn
|
||
|
|
</button>
|
||
|
|
<button class="dog-calculator-share-btn dog-calculator-share-email plausible-event-name=Calculator+Usage plausible-event-action=calculator-share-email" id="shareEmail">
|
||
|
|
Email
|
||
|
|
</button>
|
||
|
|
<button class="dog-calculator-share-btn dog-calculator-share-copy plausible-event-name=Calculator+Usage plausible-event-action=calculator-share-copy-link" id="shareCopy">
|
||
|
|
Copy Link
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
<div class="dog-calculator-share-url">
|
||
|
|
<input type="text" id="shareUrl" readonly>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Embed Modal -->
|
||
|
|
<div id="embedModal" class="dog-calculator-modal" style="display: none;">
|
||
|
|
<div class="dog-calculator-modal-content dog-calculator-modal-embed">
|
||
|
|
<span class="dog-calculator-modal-close" id="embedModalClose">×</span>
|
||
|
|
<h3>⚡ Embed the Calculator</h3>
|
||
|
|
|
||
|
|
<div class="dog-calculator-embed-options">
|
||
|
|
<div class="dog-calculator-embed-option">
|
||
|
|
<h4>⚡ JavaScript Widget</h4>
|
||
|
|
<div class="dog-calculator-code-container">
|
||
|
|
<pre><code id="widgetCode"></code></pre>
|
||
|
|
<button class="dog-calculator-copy-btn plausible-event-name=Calculator+Usage plausible-event-action=calculator-embed-js" id="copyWidget">
|
||
|
|
Copy
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="dog-calculator-embed-option">
|
||
|
|
<h4>🛡️ iframe Embed</h4>
|
||
|
|
<div class="dog-calculator-code-container">
|
||
|
|
<pre><code id="iframeCode"></code></pre>
|
||
|
|
<button class="dog-calculator-copy-btn plausible-event-name=Calculator+Usage plausible-event-action=calculator-embed-iframe" id="copyIframe">
|
||
|
|
Copy
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|