Файловый менеджер - Редактировать - /www/wwwroot/gamenworld.store/themes/tooltemptwo/layout/recipe/content.phtml
�азад
<link rel="stylesheet" type="text/css" href="<?php echo $site_url ?>themes/<?php echo $zon['config']['theme'] ?>/css/bootstrap.min.css" rel="stylesheet"> <style> .keyword-box { border: 1px solid #ddd; border-radius: 8px; padding: 15px; margin: 10px; cursor: pointer; transition: all 0.3s ease; background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .keyword-box:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); } .keyword-title { font-weight: bold; color: #2c3e50; margin-bottom: 8px; } .keyword-desc { font-size: 0.9em; color: #7f8c8d; } .recipe-content { /* background: white; */ border-radius: 12px; padding: 25px; margin-top: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .recipe-section { margin-bottom: 20px; } .recipe-section h3 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 8px; margin-bottom: 15px; } .health-score { display: inline-block; padding: 8px 15px; border-radius: 20px; color: white; font-weight: bold; } .ingredients-list { list-style-type: none; padding-left: 0; } .steps-list { padding-left: 0; } .steps-list li,.description-section p,.ingredients-list li { color:#4f4c4c; font-weight: bold; margin: 10px 0; padding: 10px; border-radius: 10px; background:linear-gradient(to right, <?php echo $zon['config']['site_color'] ?>, #FFFFFF, <?php echo $zon['config']['site_color'] ?>); background-repeat: no-repeat; border: 1px solid <?php echo $zon['config']['site_color'] ?>; } </style> <div class="mx-2"> <?php if (getAdById("6", 'status') == 0) { ?> <div style="display: grid; place-items: center; margin-top:35px"> <?= getAdById("6", 'code') ?> </div> <?php } ?> </div> <div class="recipe-main-html"></div> </div> <div class="mx-2"> <?php if (getAdById("8", 'status') == 0) { ?> <div style="display: grid; place-items: center; margin-top:35px"> <?= getAdById("8", 'code') ?> </div> <?php } ?> </div> <?php if (getAdById("9", 'status') == 0) { ?> <div class="mx-2"> <!-- 顶部锚定广告 --> <div class="top-anchor-ad" id="topAnchorAd" style="display: flex; align-items: center; justify-content: center;"> <div class="top-drawer-handle" onclick="this.parentElement.classList.toggle('ad-hidden'); document.body.style.paddingTop = this.parentElement.classList.contains('ad-hidden') ? '0px' : '120px';">▼</div> <?= getAdById("9", 'code') ?> </div> </div> <?php } ?> <?php if (getAdById("10", 'status') == 0) { ?> <div class="mx-2"> <!-- 底部锚定广告 --> <div class="anchor-ad" id="anchorAd" style="display: flex; align-items: center; justify-content: center;"> <div class="drawer-handle" onclick="this.parentElement.classList.toggle('ad-hidden'); document.body.style.paddingBottom = this.parentElement.classList.contains('ad-hidden') ? '0px' : '120px';">▲</div> <?= getAdById("10", 'code') ?> </div> </div> <?php } ?> <script type="text/jsx"> var Select = antd.Select; var Option = Select.Option; var Tabs = antd.Tabs; var TabPane = Tabs.TabPane; var Tag = antd.Tag; var message = antd.message; var container = document.querySelector('.fanyi-main-html1'); var Test = React.createClass({ getInitialState() { return { yuanSelect: "auto", mubiaoSelect: "en", searchInptu: "", isSearch: false, sevenHtml: <?= json_encode(getAdById("7", 'code')) ?>, recipes: [ { title: "Spaghetti Carbonara", description: "Classic Italian pasta dish with eggs, cheese, and pancetta", ingredients: ["Spaghetti", "Eggs", "Pecorino Romano", "Pancetta", "Black Pepper"], steps: [ "Boil pasta in salted water", "Cook pancetta until crispy", "Mix eggs and cheese", "Combine all ingredients" ], healthScore: 75 }, { title: "Caesar Salad", description: "Fresh romaine lettuce with classic Caesar dressing", ingredients: ["Romaine Lettuce", "Croutons", "Parmesan", "Caesar Dressing"], steps: [ "Wash and chop lettuce", "Make dressing", "Combine ingredients", "Add croutons" ], healthScore: 85 }, { title: "Beef Wellington", description: "Tender beef wrapped in puff pastry with mushroom duxelles", ingredients: ["Beef Tenderloin", "Puff Pastry", "Mushrooms", "Prosciutto"], steps: [ "Sear the beef", "Prepare mushroom duxelles", "Wrap in prosciutto", "Bake in pastry" ], healthScore: 65 }, { title: "Sushi Roll", description: "Japanese rice roll with fresh fish and vegetables", ingredients: ["Sushi Rice", "Nori", "Fresh Fish", "Vegetables"], steps: [ "Prepare sushi rice", "Layer ingredients", "Roll tightly", "Slice into pieces" ], healthScore: 90 }, { title: "Chicken Tikka Masala", description: "Creamy Indian curry with marinated chicken", ingredients: ["Chicken", "Yogurt", "Tomatoes", "Spices"], steps: [ "Marinate chicken", "Cook chicken", "Make sauce", "Combine" ], healthScore: 80 }, { title: "French Onion Soup", description: "Classic French soup with caramelized onions", ingredients: ["Onions", "Beef Broth", "Bread", "Gruyere Cheese"], steps: [ "Caramelize onions", "Add broth", "Simmer", "Add cheese and bread" ], healthScore: 70 }, { title: "Pad Thai", description: "Thai stir-fried rice noodles with tamarind sauce", ingredients: ["Rice Noodles", "Shrimp", "Tofu", "Peanuts"], steps: [ "Soak noodles", "Stir-fry ingredients", "Add sauce", "Garnish" ], healthScore: 75 }, { title: "Greek Salad", description: "Fresh Mediterranean salad with feta cheese", ingredients: ["Tomatoes", "Cucumber", "Olives", "Feta"], steps: [ "Chop vegetables", "Add olives and feta", "Dress with olive oil", "Season" ], healthScore: 95 }, { title: "Beef Burger", description: "Classic American hamburger with fresh toppings", ingredients: ["Ground Beef", "Buns", "Lettuce", "Tomato"], steps: [ "Form patties", "Grill burgers", "Toast buns", "Assemble" ], healthScore: 60 } ], description: "", ingredients: [], steps: [], healthscore: "" }; }, handleChange(value) { this.setState({ yuanSelect: value }); }, mubiaoFun(value) { this.setState({ mubiaoSelect: value }); }, validateURL(url) { const regex = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i; return regex.test(url); }, fillSearch(value) { this.setState({ searchInptu: value }); }, searchInptuFun(value) { this.setState({ searchInptu: value.target.value }); }, pushGpt() { if(!this.state.searchInptu) { message.error('Please enter the name of the dish'); return; } // const aa = "{\n\"description\": \"Caesar Salad is a crisp, refreshing dish that showcases romaine lettuce, Parmesan cheese, and croutons, all topped with a zesty Caesar dressing. It's popular as a starter or a light main course.\",\n\"ingredients\": [\n \"1 head of romaine lettuce\",\n \"1/2 cup of Parmesan cheese\",\n \"1 cup of croutons\",\n \"1/2 cup of Caesar dressing\",\n \"2 cloves of garlic\",\n \"1 lemon\",\n \"1 egg\",\n \"Salt\",\n \"Freshly ground black pepper\"\n],\n\"steps\": [\n \"Wash and dry romaine lettuce. Tear into bite-sized pieces and place in a large salad bowl.\",\n \"Dress with Caesar dressing: Taste and adjust if necessary, then dress the lettuce with about half the dressing.\",\n \"Grate garlic into the dressing: Use a fine grater or a garlic press to grate a small clove of garlic into the remaining dressing. Stir or whisk it in.\",\n \"Dress the salad again: Add most of the cheese and the croutons to the salad bowl.\",\n \"Toss everything together: Use salad tongs to toss the lettuce, cheese, and croutons together with the dressing. Taste and add more of the remaining dressing, if needed.\",\n \"Serve the salad: Scatter remaining cheese over the top and serve it up!\"\n],\n\"healthscore\": \"76/100\"\n}" // const obj = JSON.parse(aa); //console.log(obj,333); //this.setState({ // isSearch: true, // description: obj.description, // ingredients: obj.ingredients, // steps: obj.steps, // healthscore: obj.healthscore //}); // return ; // https://mottool.online axios.post('<?php echo $site_url;?>gpttranslate.php', { "mubiaoText": this.state.searchInptu, "gptmodel":"recipe" }, { headers: { 'Content-Type': 'multipart/form-data', } }) .then(response => { if(response.data.code) { const obj = JSON.parse(response.data.data); console.log(obj,333); this.setState({ isSearch: true, description: obj.description, ingredients: obj.ingredients, steps: obj.steps, healthscore: obj.healthscore }); } }) .catch(error => { console.error('请求失败:', error); }); }, render() { return ( <div className="container py-5" style={{width:'100%'}}> <h1 className="text-center mb-5">Recipe recommendations</h1> <div className="row justify-content-center mb-5"> <div className="col-md-6"> <div className="input-group mb-3"> <input type="text" value={this.state.searchInptu} onChange={this.searchInptuFun} id="searchInput" className="form-control" placeholder="Please enter the dish you want to prepare"/> <button className="btn btn-primary" type="button" onClick={this.pushGpt}>Search</button> </div> </div> </div> <div class="mx-2"> <?php if (getAdById("7", 'status') == 0) { ?> <div style={{display: 'grid', placeItems: 'center', marginTop:'35px'}}> <code dangerouslySetInnerHTML= {{__html:this.state.sevenHtml}}></code> </div> <?php } ?> </div> {!this.state.isSearch ? ( <div className="row" id="keywordsGrid"> {this.state.recipes.map((recipe, index) => ( <div onClick={() => this.fillSearch(recipe.title)} className="col-md-4 mb-4"> <div className="keyword-box" onclick="fillSearch('${recipe.title}')"> <div className="keyword-title">{recipe.title}</div> <div className="keyword-desc">{recipe.description}</div> </div> </div> ))} </div> ) : ( <div id="recipeContent" className="recipe-content" style={{display: 'block'}}> <div className="recipe-section"> <h3>Health Score</h3> <span className="health-score bg-success">{this.state.healthscore}</span> </div> <div className="recipe-section description-section"> <h3>Description</h3> <p>{this.state.description}</p> </div> <div className="recipe-section"> <h3>Ingredients</h3> <ul className="ingredients-list"> {this.state.ingredients.map((ingredient, index) => ( <li key={index}>{ingredient}</li> ))} </ul> </div> <div className="recipe-section"> <h3>Steps</h3> <ol className="steps-list"> {this.state.steps.map((step, index) => ( <li key={index}>{step}</li> ))} </ol> </div> </div> )} </div> ); } }); React.render(<Test/>,document.querySelector('.recipe-main-html')); </script>
| ver. 1.4 |
Github
|
.
| PHP 8.0.26 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка