From 688b7bfc609f2ad3a00a23125d7d173bfd637fe1 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Thu, 7 Nov 2019 14:31:10 +0100 Subject: [PATCH] Add instructions how to use Gonito when writing a paper --- Handler/Presentation.hs | 11 +++++ config/routes | 1 + messages/en.msg | 1 + stack.yaml | 6 --- templates/default-layout.hamlet | 7 +++- templates/writing-papers.hamlet | 71 +++++++++++++++++++++++++++++++++ 6 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 templates/writing-papers.hamlet diff --git a/Handler/Presentation.hs b/Handler/Presentation.hs index c4c7825..40dfc9c 100644 --- a/Handler/Presentation.hs +++ b/Handler/Presentation.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE ScopedTypeVariables #-} + module Handler.Presentation where import Import @@ -95,3 +97,12 @@ getSampleLeaderboard name = do presentationLayout widget = do pc <- widgetToPageContent widget withUrlRenderer $(hamletFile "templates/presentation-layout.hamlet") + +getWritingPapersWithGonitoR :: Handler Html +getWritingPapersWithGonitoR = do + app <- getYesod + let tab :: String = "\t" + let rootAddress = appRoot $ appSettings app + defaultLayout $ do + setTitle "Writing papers with Gonito" + $(widgetFile "writing-papers") diff --git a/config/routes b/config/routes index 7f9643d..b50736a 100644 --- a/config/routes +++ b/config/routes @@ -74,3 +74,4 @@ /presentation/datech-2017 PresentationDATeCH2017R GET /presentation/psnc-2019 PresentationPSNC2019R GET /gonito-in-class GonitoInClassR GET +/writing-papers WritingPapersWithGonitoR GET diff --git a/messages/en.msg b/messages/en.msg index 14ae7a3..39bab40 100644 --- a/messages/en.msg +++ b/messages/en.msg @@ -86,3 +86,4 @@ Update: Update ChallengeDeadlineDay: challenge deadline day ChallengeDeadlineTime: challenge deadline time ChallengeDeadlineTooltip: no submissions will be accepted after the deadline; this can be used for organizing competitions set in time +WritingPapers: writing papers with Gonito diff --git a/stack.yaml b/stack.yaml index 37bd682..efd4e46 100644 --- a/stack.yaml +++ b/stack.yaml @@ -6,9 +6,3 @@ packages: - '.' extra-deps: [../geval,wai-handler-fastcgi-3.0.0.2,murmur3-1.0.3,random-strings-0.1.1.0,naturalcomp-0.0.3,Munkres-0.1,Chart-1.9.1,Chart-cairo-1.9.1,multiset-0.3.4.1,pwstore-fast-2.4.4,yesod-table-2.0.3,esqueleto-3.0.0] resolver: lts-12.26 -image: - container: - name: filipg/gonito - base: fpco/stack-run - add: - executables: /usr/local/bin/gonito-bin diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet index 1b4f8cf..6befe13 100644 --- a/templates/default-layout.hamlet +++ b/templates/default-layout.hamlet @@ -21,6 +21,7 @@ _{MsgAbout}