This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bin/magento module:enable Werules_GameShop | |
| bin/magento setup:upgrade | |
| bin/magento cache:flush |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $mediaUrl = $block->getViewFileUrl('Werules_GameShop::images/shopkeeper.png'); | |
| $baseUrl = $block->getBaseUrl(); | |
| $pageTitle = __('GameShop - Buy & Sell Games'); | |
| $pageDescription = __('Find the best gaming deals, buy and sell games easily!'); | |
| ?> | |
| <!-- Open Graph Meta Tags --> | |
| <meta property="og:image" content="<?= $mediaUrl ?>"/> | |
| <meta property="og:image:alt" content="GameShop Shopkeeper Avatar"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <referenceBlock name="head.additional"> | |
| <block class="Magento\Framework\View\Element\Template" | |
| name="werules.gameshop.head" | |
| template="Werules_GameShop::seo/head.phtml"/> | |
| </referenceBlock> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| methods: { | |
| onMenuItemClick(selection) { | |
| if (selection === 'Talk') { | |
| const randomIndex = Math.floor(Math.random() * this.talkLines.length); | |
| this.currentTalkLine = this.talkLines[randomIndex]; | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div v-else-if="menuSelection === 'Talk'" class="flex items-center justify-center h-64 border-2 border-orange-500 p-6"> | |
| <p class="text-3xl text-orange-400 text-center"> | |
| {{ currentTalkLine }} | |
| </p> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div v-if="activeView === 'detail' && currentProduct" class="space-y-4"> | |
| <p class="italic text-lg mb-2"> | |
| <?= sprintf(__('Ah, the %s! This item might do something special...'), '<strong>{{ currentProduct.name }}</strong>'); ?> | |
| </p> | |
| <div class="flex flex-col md:flex-row space-y-4 items-start border border-orange-500 p-4"> | |
| <img :src="currentProduct.image_url" | |
| class="w-72 h-72 object-cover border border-orange-500 bg-black"> | |
| <div class="flex-1"> | |
| <h3 class="text-2xl font-bold">{{ currentProduct.name }}</h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // utils/usdaMapper.ts | |
| export function mapUSDAFoodToUnified(food: USDAFood): UnifiedFoodResult { | |
| const nutrients = food.foodNutrients; | |
| // USDA usa códigos numéricos de nutrientes — 1008/208 é energia, 1003/203 é proteína, etc. | |
| const calories = mapUSDANutritient(nutrients, '1008') ?? mapUSDANutritient(nutrients, '208'); | |
| const protein = mapUSDANutritient(nutrients, '1003') ?? mapUSDANutritient(nutrients, '203'); | |
| const carbs = mapUSDANutritient(nutrients, '1005') ?? mapUSDANutritient(nutrients, '205'); | |
| const fat = mapUSDANutritient(nutrients, '1004') ?? mapUSDANutritient(nutrients, '204'); | |
| const fiber = mapUSDANutritient(nutrients, '1079') ?? mapUSDANutritient(nutrients, '291'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // utils/workoutCalculator.ts | |
| export function calculateAverage1RM(weight: number, reps: number, rir: number = 0): number { | |
| const formulas: FormulaType[] = [ | |
| 'Epley', 'Brzycki', 'Lander', 'Lombardi', 'Mayhew', 'OConner', 'Wathan', | |
| ]; | |
| let total1RM = 0; | |
| let validFormulas = 0; | |
| formulas.forEach((formula) => { | |
| const oneRM = calculate1RM(weight, reps, formula, rir); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // components/charts/LineChart.tsx — native (Skia) | |
| import { Area, CartesianChart, Line, Scatter } from 'victory-native'; | |
| import Animated, { useAnimatedStyle, useSharedValue } from 'react-native-reanimated'; | |
| // components/charts/LineChart.web.tsx — web (SVG) | |
| import { VictoryArea, VictoryAxis, VictoryChart, VictoryLine, VictoryScatter } from 'victory'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // database/encryptionHelpers.ts | |
| export async function encryptNutritionLogSnapshot(plain: { | |
| loggedFoodName?: string; | |
| loggedCalories: number; | |
| loggedProtein: number; | |
| loggedCarbs: number; | |
| loggedFat: number; | |
| loggedFiber: number; | |
| loggedMicros?: Record<string, number | undefined>; | |
| }) { |
NewerOlder