|
| 1 | +<div class="max-w-3xl mx-auto px-6 py-12"> |
| 2 | + <div class="mb-8"> |
| 3 | + <%= link_to "← Back to Work", works_path, class: "text-[#41CFFF] hover:text-[#E58C2E] transition-colors" %> |
| 4 | + </div> |
| 5 | + |
| 6 | + <article class="prose prose-lg max-w-none"> |
| 7 | + <header class="mb-8 pb-8 border-b-2 border-[#3B2C22]/10"> |
| 8 | + <h1 class="text-4xl font-bold mb-4 text-[#3B2C22]"><%= @work.title %></h1> |
| 9 | + |
| 10 | + <div class="flex flex-wrap items-center gap-4 text-sm text-[#3B2C22]/60 mb-4"> |
| 11 | + <span class="px-3 py-1 bg-[#A8E063] text-[#3B2C22] font-medium rounded"><%= @work.status %></span> |
| 12 | + <span><%= @work.category %></span> |
| 13 | + <% if @work.started_at %> |
| 14 | + <span>•</span> |
| 15 | + <span>Started <%= @work.started_at.strftime("%B %Y") %></span> |
| 16 | + <% end %> |
| 17 | + <% if @work.launched_at %> |
| 18 | + <span>•</span> |
| 19 | + <span>Launched <%= @work.launched_at.strftime("%B %Y") %></span> |
| 20 | + <% end %> |
| 21 | + </div> |
| 22 | + |
| 23 | + <% if @work.technologies.present? %> |
| 24 | + <div class="flex flex-wrap gap-2 mb-4"> |
| 25 | + <% @work.technologies.each do |tech| %> |
| 26 | + <span class="px-2 py-1 bg-[#3B2C22]/5 text-[#3B2C22] text-xs font-medium rounded"> |
| 27 | + <%= tech %> |
| 28 | + </span> |
| 29 | + <% end %> |
| 30 | + </div> |
| 31 | + <% end %> |
| 32 | + |
| 33 | + <div class="flex gap-4"> |
| 34 | + <% if @work.github_url.present? %> |
| 35 | + <%= link_to @work.github_url, target: "_blank", rel: "noopener", class: "text-[#41CFFF] hover:text-[#E58C2E] transition-colors" do %> |
| 36 | + GitHub → |
| 37 | + <% end %> |
| 38 | + <% end %> |
| 39 | + <% if @work.live_url.present? %> |
| 40 | + <%= link_to @work.live_url, target: "_blank", rel: "noopener", class: "text-[#41CFFF] hover:text-[#E58C2E] transition-colors" do %> |
| 41 | + Live Site → |
| 42 | + <% end %> |
| 43 | + <% end %> |
| 44 | + </div> |
| 45 | + </header> |
| 46 | + |
| 47 | + <div class="story-content text-[#3B2C22] leading-relaxed"> |
| 48 | + <%= raw markdown(@work.story) %> |
| 49 | + </div> |
| 50 | + </article> |
| 51 | +</div> |
| 52 | + |
| 53 | +<style> |
| 54 | + .story-content h1, .story-content h2, .story-content h3 { |
| 55 | + font-weight: 700; |
| 56 | + color: #3B2C22; |
| 57 | + margin-top: 2rem; |
| 58 | + margin-bottom: 1rem; |
| 59 | + } |
| 60 | + |
| 61 | + .story-content h1 { font-size: 2rem; } |
| 62 | + .story-content h2 { font-size: 1.5rem; } |
| 63 | + .story-content h3 { font-size: 1.25rem; } |
| 64 | + |
| 65 | + .story-content p { |
| 66 | + margin-bottom: 1.5rem; |
| 67 | + line-height: 1.875; |
| 68 | + } |
| 69 | + |
| 70 | + .story-content a { |
| 71 | + color: #41CFFF; |
| 72 | + text-decoration: underline; |
| 73 | + } |
| 74 | + |
| 75 | + .story-content a:hover { |
| 76 | + color: #E58C2E; |
| 77 | + } |
| 78 | + |
| 79 | + .story-content ul, .story-content ol { |
| 80 | + margin-bottom: 1.5rem; |
| 81 | + padding-left: 2rem; |
| 82 | + } |
| 83 | + |
| 84 | + .story-content li { |
| 85 | + margin-bottom: 0.5rem; |
| 86 | + } |
| 87 | + |
| 88 | + .story-content code { |
| 89 | + background-color: #3B2C22; |
| 90 | + color: #FFF7E1; |
| 91 | + padding: 0.125rem 0.375rem; |
| 92 | + border-radius: 0.25rem; |
| 93 | + font-size: 0.875em; |
| 94 | + } |
| 95 | + |
| 96 | + .story-content pre { |
| 97 | + background-color: #3B2C22; |
| 98 | + color: #FFF7E1; |
| 99 | + padding: 1rem; |
| 100 | + border-radius: 0.5rem; |
| 101 | + overflow-x: auto; |
| 102 | + margin-bottom: 1.5rem; |
| 103 | + } |
| 104 | + |
| 105 | + .story-content pre code { |
| 106 | + background-color: transparent; |
| 107 | + padding: 0; |
| 108 | + } |
| 109 | + |
| 110 | + .story-content blockquote { |
| 111 | + border-left: 4px solid #41CFFF; |
| 112 | + padding-left: 1rem; |
| 113 | + font-style: italic; |
| 114 | + color: #3B2C22; |
| 115 | + opacity: 0.8; |
| 116 | + margin-bottom: 1.5rem; |
| 117 | + } |
| 118 | +</style> |
0 commit comments