fx.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>发现 - 食养智鉴</title>
  7. <link href="https://at.alicdn.com/t/c/font_4525513_9u8m8q8q5x.css" rel="stylesheet">
  8. <style>
  9. :root {
  10. --primary: #2E5B4D;
  11. --secondary: #8BAE8F;
  12. --accent: #C44536;
  13. --bg: #F8F9FA;
  14. --text: #333333;
  15. --card-bg: #FFFFFF;
  16. }
  17. * {
  18. margin: 0;
  19. padding: 0;
  20. box-sizing: border-box;
  21. font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  22. }
  23. body {
  24. background: var(--bg);
  25. color: var(--text);
  26. padding-bottom: 70px;
  27. }
  28. /* 顶部标题栏 */
  29. .header {
  30. background: var(--card-bg);
  31. padding: 12px 16px;
  32. display: flex;
  33. justify-content: center;
  34. align-items: center;
  35. position: sticky;
  36. top: 0;
  37. z-index: 10;
  38. box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  39. }
  40. .title {
  41. font-size: 1.2rem;
  42. font-weight: 600;
  43. color: var(--primary);
  44. }
  45. /* 内容区域 */
  46. .content {
  47. padding: 16px;
  48. }
  49. /* 节气模块 */
  50. .solar-term {
  51. background: linear-gradient(135deg, var(--primary), #4A7C59);
  52. border-radius: 12px;
  53. padding: 16px;
  54. color: white;
  55. margin-bottom: 20px;
  56. position: relative;
  57. overflow: hidden;
  58. }
  59. .term-header {
  60. display: flex;
  61. justify-content: space-between;
  62. align-items: center;
  63. margin-bottom: 12px;
  64. }
  65. .term-title {
  66. font-size: 1.1rem;
  67. font-weight: 600;
  68. }
  69. .term-date {
  70. font-size: 0.9rem;
  71. opacity: 0.9;
  72. }
  73. .term-desc {
  74. font-size: 0.9rem;
  75. line-height: 1.5;
  76. margin-bottom: 16px;
  77. }
  78. .term-tag {
  79. display: inline-block;
  80. background: rgba(255,255,255,0.2);
  81. padding: 4px 12px;
  82. border-radius: 15px;
  83. font-size: 0.8rem;
  84. margin-right: 8px;
  85. margin-bottom: 8px;
  86. }
  87. /* AI营养师 */
  88. .ai-nutritionist {
  89. background: var(--card-bg);
  90. border-radius: 12px;
  91. padding: 16px;
  92. margin-bottom: 20px;
  93. box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  94. }
  95. .ai-header {
  96. display: flex;
  97. align-items: center;
  98. margin-bottom: 12px;
  99. }
  100. .ai-avatar {
  101. width: 40px;
  102. height: 40px;
  103. background: var(--secondary);
  104. border-radius: 50%;
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. margin-right: 12px;
  109. color: white;
  110. font-size: 1.2rem;
  111. }
  112. .ai-title {
  113. font-weight: 600;
  114. }
  115. .ai-prompt {
  116. font-size: 0.9rem;
  117. color: #666;
  118. }
  119. .ai-questions {
  120. display: grid;
  121. grid-template-columns: 1fr 1fr;
  122. gap: 10px;
  123. margin-top: 12px;
  124. }
  125. .ai-question {
  126. background: var(--bg);
  127. border-radius: 8px;
  128. padding: 10px;
  129. font-size: 0.85rem;
  130. text-align: center;
  131. }
  132. /* 社区精选 */
  133. .community {
  134. margin-bottom: 20px;
  135. }
  136. .section-header {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. margin-bottom: 12px;
  141. }
  142. .section-title {
  143. font-size: 1.1rem;
  144. font-weight: 600;
  145. color: var(--primary);
  146. }
  147. .section-more {
  148. font-size: 0.9rem;
  149. color: #666;
  150. }
  151. .post-card {
  152. background: var(--card-bg);
  153. border-radius: 12px;
  154. padding: 16px;
  155. margin-bottom: 12px;
  156. box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  157. }
  158. .post-header {
  159. display: flex;
  160. align-items: center;
  161. margin-bottom: 12px;
  162. }
  163. .post-avatar {
  164. width: 36px;
  165. height: 36px;
  166. border-radius: 50%;
  167. background: #eee;
  168. margin-right: 10px;
  169. overflow: hidden;
  170. }
  171. .post-user {
  172. flex: 1;
  173. }
  174. .post-name {
  175. font-weight: 500;
  176. font-size: 0.95rem;
  177. }
  178. .post-time {
  179. font-size: 0.8rem;
  180. color: #999;
  181. }
  182. .post-content {
  183. margin-bottom: 12px;
  184. font-size: 0.95rem;
  185. line-height: 1.5;
  186. }
  187. .post-image {
  188. width: 100%;
  189. border-radius: 8px;
  190. margin-bottom: 12px;
  191. height: 180px;
  192. object-fit: cover;
  193. }
  194. .post-footer {
  195. display: flex;
  196. color: #666;
  197. font-size: 0.9rem;
  198. }
  199. .post-action {
  200. display: flex;
  201. align-items: center;
  202. margin-right: 16px;
  203. }
  204. .post-action i {
  205. margin-right: 4px;
  206. }
  207. /* 底部导航 */
  208. .tab-bar {
  209. position: fixed;
  210. bottom: 0;
  211. left: 0;
  212. right: 0;
  213. background: white;
  214. display: flex;
  215. justify-content: space-around;
  216. padding: 8px 0;
  217. box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  218. z-index: 10;
  219. }
  220. .tab-item {
  221. display: flex;
  222. flex-direction: column;
  223. align-items: center;
  224. color: #999;
  225. }
  226. .tab-item.active {
  227. color: var(--primary);
  228. }
  229. .tab-icon {
  230. font-size: 1.5rem;
  231. }
  232. .tab-text {
  233. font-size: 0.7rem;
  234. margin-top: 4px;
  235. }
  236. /* 装饰元素 */
  237. .decoration {
  238. position: absolute;
  239. right: 0;
  240. top: 0;
  241. opacity: 0.1;
  242. font-size: 6rem;
  243. line-height: 1;
  244. }
  245. </style>
  246. </head>
  247. <body>
  248. <!-- 顶部标题栏 -->
  249. <div class="header">
  250. <div class="title">发现</div>
  251. </div>
  252. <!-- 内容区域 -->
  253. <div class="content">
  254. <!-- 节气食疗模块 -->
  255. <div class="solar-term">
  256. <div class="term-header">
  257. <div class="term-title">立秋 · 润燥养生</div>
  258. <div class="term-date">8月7日-8月22日</div>
  259. </div>
  260. <div class="term-desc">
  261. 立秋时节阳气渐收,阴气渐长,宜食百合、银耳等润燥之物,少食辛辣...
  262. </div>
  263. <div>
  264. <span class="term-tag">百合莲子羹</span>
  265. <span class="term-tag">雪梨炖川贝</span>
  266. <span class="term-tag">芝麻核桃粥</span>
  267. </div>
  268. <i class="iconfont icon-leaf decoration"></i>
  269. </div>
  270. <!-- AI营养师 -->
  271. <div class="ai-nutritionist">
  272. <div class="ai-header">
  273. <div class="ai-avatar">
  274. <i class="iconfont icon-robot"></i>
  275. </div>
  276. <div>
  277. <div class="ai-title">AI营养师</div>
  278. <div class="ai-prompt">有任何饮食问题随时咨询</div>
  279. </div>
  280. </div>
  281. <div class="ai-questions">
  282. <div class="ai-question">糖尿病适合吃什么水果?</div>
  283. <div class="ai-question">如何补充蛋白质?</div>
  284. <div class="ai-question">减肥期早餐推荐</div>
  285. <div class="ai-question">中医体质饮食调理</div>
  286. </div>
  287. </div>
  288. <!-- 社区精选 -->
  289. <div class="community">
  290. <div class="section-header">
  291. <div class="section-title">社区精选</div>
  292. <div class="section-more">查看更多</div>
  293. </div>
  294. <div class="post-card">
  295. <div class="post-header">
  296. <div class="post-avatar">
  297. <img src="https://randomuser.me/api/portraits/women/43.jpg" width="100%">
  298. </div>
  299. <div class="post-user">
  300. <div class="post-name">养生达人</div>
  301. <div class="post-time">2小时前</div>
  302. </div>
  303. </div>
  304. <div class="post-content">
  305. 分享我的立秋润燥食谱:百合30g+莲子20g+枸杞10g,慢炖1小时,适合阴虚体质...
  306. </div>
  307. <img class="post-image" src="https://img.58cdn.com.cn/dist/jxt/images/zhineng/placeholder.png">
  308. <div class="post-footer">
  309. <div class="post-action">
  310. <i class="iconfont icon-like"></i> 128
  311. </div>
  312. <div class="post-action">
  313. <i class="iconfont icon-comment"></i> 24
  314. </div>
  315. </div>
  316. </div>
  317. <div class="post-card">
  318. <div class="post-header">
  319. <div class="post-avatar">
  320. <img src="https://randomuser.me/api/portraits/men/32.jpg" width="100%">
  321. </div>
  322. <div class="post-user">
  323. <div class="post-name">健身教练Mike</div>
  324. <div class="post-time">昨天</div>
  325. </div>
  326. </div>
  327. <div class="post-content">
  328. 蛋白质摄入的常见误区:不是越多越好!根据体重每公斤1.2-1.6g足够,过量会增加肾脏负担...
  329. </div>
  330. <div class="post-footer">
  331. <div class="post-action">
  332. <i class="iconfont icon-like"></i> 89
  333. </div>
  334. <div class="post-action">
  335. <i class="iconfont icon-comment"></i> 15
  336. </div>
  337. </div>
  338. </div>
  339. </div>
  340. </div>
  341. <!-- 底部导航 -->
  342. <div class="tab-bar">
  343. <div class="tab-item">
  344. <i class="iconfont icon-notebook tab-icon"></i>
  345. <span class="tab-text">记录</span>
  346. </div>
  347. <div class="tab-item active">
  348. <i class="iconfont icon-compass tab-icon"></i>
  349. <span class="tab-text">发现</span>
  350. </div>
  351. <div class="tab-item">
  352. <i class="iconfont icon-user tab-icon"></i>
  353. <span class="tab-text">我的</span>
  354. </div>
  355. </div>
  356. </body>
  357. </html>