similar-questions.blade.php 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @if(!empty($similarQuestions))
  2. <div class="bg-gradient-to-r from-indigo-50 to-blue-50 border border-indigo-200 rounded-lg p-5">
  3. <h3 class="text-lg font-semibold text-gray-900 mb-4 flex items-center justify-between">
  4. <span class="flex items-center">
  5. <svg class="w-5 h-5 mr-2 text-indigo-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  6. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
  7. </svg>
  8. 相似题目推荐
  9. </span>
  10. @if(!empty($knowledgePoint))
  11. <span class="text-sm text-indigo-600 font-medium">
  12. 知识点: {{ $knowledgePoint['name'] }}
  13. </span>
  14. @endif
  15. </h3>
  16. <div class="space-y-3">
  17. @foreach($similarQuestions as $index => $question)
  18. <div class="bg-white rounded-lg p-4 border border-gray-200 hover:shadow-md transition-all duration-200 hover:scale-[1.02]">
  19. <div class="flex items-start justify-between mb-3">
  20. <div class="flex items-center space-x-2">
  21. <span class="text-gray-400 text-lg">#{{ $index + 1 }}</span>
  22. <span class="inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-{{ $question['difficulty_color'] ?? 'blue' }}-100 text-{{ $question['difficulty_color'] ?? 'blue' }}-800">
  23. 难度: {{ $question['difficulty'] }}
  24. </span>
  25. <span class="inline-flex items-center px-2 py-1 rounded text-xs font-medium bg-gray-100 text-gray-700">
  26. {{ $question['question_type'] }}
  27. </span>
  28. </div>
  29. <div class="text-right space-y-1">
  30. <span class="text-xs text-gray-500 block">{{ $question['estimated_time'] }}</span>
  31. <span class="text-xs font-semibold text-indigo-600">{{ $question['score'] }}分</span>
  32. </div>
  33. </div>
  34. <h4 class="text-sm font-medium text-gray-900 mb-2 line-clamp-2">
  35. {{ $question['title'] }}
  36. </h4>
  37. <div class="flex items-center justify-between mt-3">
  38. <div class="flex items-center space-x-3">
  39. @if(!empty($question['knowledge_point']))
  40. <span class="text-xs text-gray-500">
  41. <svg class="w-4 h-4 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  42. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path>
  43. </svg>
  44. {{ $question['knowledge_point'] }}
  45. </span>
  46. @endif
  47. </div>
  48. <button
  49. onclick="window.location.href='{{ route('filament.admin.pages.recommendation-list', ['kp' => $knowledgePoint['code'] ?? '']) }}'"
  50. class="inline-flex items-center px-3 py-1.5 text-xs font-medium text-indigo-600 bg-indigo-50 rounded-md hover:bg-indigo-100 transition-colors duration-200">
  51. 开始练习
  52. <svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  53. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path>
  54. </svg>
  55. </button>
  56. </div>
  57. </div>
  58. @endforeach
  59. </div>
  60. @if(!empty($knowledgePoint))
  61. <div class="mt-4 pt-4 border-t border-indigo-200">
  62. <div class="flex items-center justify-between">
  63. <p class="text-xs text-gray-600">
  64. <svg class="w-4 h-4 inline mr-1 text-indigo-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  65. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
  66. </svg>
  67. 基于知识点"{{ $knowledgePoint['name'] }}"智能推荐,帮助你针对性提升
  68. </p>
  69. <a href="{{ route('filament.admin.pages.recommendation-list', ['kp' => $knowledgePoint['code'] ?? '']) }}"
  70. class="text-sm text-indigo-600 hover:text-indigo-800 font-medium inline-flex items-center">
  71. 查看更多推荐
  72. <svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  73. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"></path>
  74. </svg>
  75. </a>
  76. </div>
  77. </div>
  78. @endif
  79. </div>
  80. @endif