From a96b7900b2de9d4297cbcb89ecae3dbc516044b1 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Wed, 25 Sep 2019 22:11:52 -0500 Subject: [PATCH] Added problem kind to description: --- codebox/views/problem/problem.moon | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/codebox/views/problem/problem.moon b/codebox/views/problem/problem.moon index 2c3879b..58eb465 100644 --- a/codebox/views/problem/problem.moon +++ b/codebox/views/problem/problem.moon @@ -1,7 +1,8 @@ html = require "lapis.html" markdown = require "markdown" +import Problems from require 'models' -class Problems extends html.Widget +class ProblemsView extends html.Widget content: => raw ' ' @@ -19,9 +20,14 @@ class Problems extends html.Widget a style: "text-align: center; margin-bottom: 0", class: 'button w100', href: (@url_for 'problem.submit', { problem_name: @problem.short_name }), -> text "Make a submission" - div class: 'box split-lr pad-12', -> - div "Time limit:" - div "#{@problem.time_limit}ms" + div class: 'box', -> + div class: 'split-lr pad-12', -> + div "Time limit:" + div "#{@problem.time_limit}ms" + div class: 'split-lr pad-12', -> + div "Problem kind:" + kind = Problems.kinds\to_name @problem.kind + div "#{kind}" div style: 'font-size: 1.3rem;', class: 'header-line', -> text "Stats for #{@problem.name}" -- 2.25.1