From 31cf44be3118abfdeafe0d4a20fcdfad19d5ccc7 Mon Sep 17 00:00:00 2001 From: Shaun Kerr Date: Wed, 27 Jun 2018 13:37:23 +1200 Subject: [PATCH 1/3] Testing out Style sheets --- style.css | 87 +++++++++++++++++++++++++++++++++++++++++ test.html | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 style.css create mode 100644 test.html diff --git a/style.css b/style.css new file mode 100644 index 0000000..e4056c3 --- /dev/null +++ b/style.css @@ -0,0 +1,87 @@ +html { + color: #FFFFFF; + background-color: #222222; + font-family: 'Inconsolata', monospace; + margin: 0px; + padding: 0px; +} + +body { + width: 740px; + margin: auto; + padding: 20px; + text-align: left; + border-left: 4px solid white; + border-right: 4px solid white; +} + +section { + border-top: 4px solid white; + padding: 5px; +} + +header { + margin: 0px; + padding: 5px; + border-top: 4px solid white; +} + +.subheading { + text-align: center; + padding: 5px; +} + +h1 { + text-align: center; + margin: 0px; + padding: 5px; +} + +p,h2,h3 { + margin: 0px; + padding: 5px; +} + +ul { + text-align: initial; +} + +.current { + width: 600px; +} + +.currentFormat { + margin: auto; + padding: 1px; +} + +.currentLeft { + width: 300px; + float: left; +} + +.currentRight { + margin-left: 300px; +} + +.upcoming { + width: 600px; +} + +.changes { + margin: auto; + padding: 1px; +} + +.upcomingIn { + color: #00DD00; + background-color: inherit; + width: 300px; + float: left; +} + +.upcomingOut { + color: #DD0000; + background-color: inherit; + margin-left: 300px; +} diff --git a/test.html b/test.html new file mode 100644 index 0000000..bdaf086 --- /dev/null +++ b/test.html @@ -0,0 +1,130 @@ + + + + + + Protocol Seven + + + + +
+

Protocol Seven

+

(Formerly the Chris Hay Honourary Format)

+
+
+
+

Format for June 2018:

+
+
+

Evergreen:

+
    +
  • Revised Core Set x3
  • +
+

Big Boxes:

+
    +
  • Creation and Control
  • +
  • Honor and Profit
  • +
  • Data and Destiny
  • +
  • Terminal Directive
  • +
  • Reign and Reverie
  • +
+
+
+

Data-packs:

+
    +
  • Breaker Bay
  • +
  • Chrome City
  • +
  • Council of the Crest
  • +
  • Democracy and Dogma
  • +
  • Down the White Nile
  • +
  • Earth's Scion
  • +
  • Fear the Masses
  • +
  • Kala Ghoda
  • +
  • Kampala Ascendent
  • +
  • Martial Law
  • +
  • Old Hollywood
  • +
  • Quorum
  • +
  • Sovereign Sight
  • +
  • The Liberated Mind
  • +
  • The Source
  • +
  • The Spaces Between
  • +
  • The Underway
  • +
  • Upstalk
  • +
+
+
+
+
+

Upcoming Changes for July 2018:

+
+
+

In:

+
    +
  • + Order and Chaos
  • +
  • + The Universe of Tomorrow
  • +
  • + The Devil and the Dragon
  • +
+
+
+

Out:

+
    +
  • - Data and Destiny
  • +
  • - The Liberated Mind
  • +
  • - Kampala Ascendent
  • +
+
+
+
+
+
+

What is Protocol Seven?

+
+ "No matter where you go, everybody's connected." - Lain Iwakura +
+

+ For many of us, Fantasy Flight Games' Living Card Game Android: Netrunner was more than simply a card game. The term Lifestyle Game has been thrown around a lot, but is truer for no other community than that of ANR. Without the influx of things to discuss each month, it may seem likely that the community will die, however this is only true if we let it happen. +

+

+ With the cancellation of many players favourite game, and no real replacement anywhere on the horizon, all that's left is to create our own points of discussion. Many players are working on custom cycles to expand the card pool, however one Chris Hay of the small and oft ridiculed meta from Dunedin, New Zealand has come up with a solution; an everchanging format using the current completed card pool. +

+

How does it work?

+
+ "One theory says that man is a neoteny and is no longer able to evolve. If this is true, then what an absurd creature mankind has evolved into." - Eiri Masami +
+

+ Protocol Seven is an attempt at a constantly evolving metagame. Rather than relying on an influx of new cards every month, Protocol Seven relies on a monthly rotation schedule. This allows discussion of a new metagame every month for the forseeable future. +

+

+ A month's format in Protocol Seven will at any time consist of the following: +

+ This website will automatically update with the latest format, as well as a preview of the next months changes. This allows discussion, an ever-changing metagame, whilst also keeping the card pool similar enough between months that decks can be altered rather than completely remade. +

+

The Protocol Seven Protocol

+
+ "But a protocol is nothing more than a simple agreement." - Eiri Masami +
+

+ A comprehensive description of the Protocol Seven format +

+ +
+ + From 50007726e2803be1951ed225d280a195385cb16a Mon Sep 17 00:00:00 2001 From: Shaun Kerr Date: Wed, 27 Jun 2018 14:43:47 +1200 Subject: [PATCH 2/3] Working site release + css --- Main.hs | 223 ++++++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 182 insertions(+), 41 deletions(-) diff --git a/Main.hs b/Main.hs index d8597be..7f5d34e 100644 --- a/Main.hs +++ b/Main.hs @@ -31,56 +31,197 @@ instance Yesod Chhf inBoth :: (Eq a) => [a] -> [a] -> [a] inBoth x y = filter (\n -> n `elem` y) x +showMonth :: Int -> String +showMonth 1 = "January" +showMonth 2 = "February" +showMonth 3 = "March" +showMonth 4 = "April" +showMonth 5 = "May" +showMonth 6 = "June" +showMonth 7 = "July" +showMonth 8 = "August" +showMonth 9 = "September" +showMonth 10 = "October" +showMonth 11 = "November" +showMonth 12 = "December" + getHomeR :: Handler Html -getHomeR = do - t <- io $ getCurrentTime >>= return . toGregorian . utctDay - let ts = toTS t +getHomeR = defaultLayout $ do + (year, month, day) <- io $ getCurrentTime >>= return . toGregorian . utctDay + let nextMonth = (month + 1) `mod` 12 + let ts = toTS (year, month, day) let ((i,o),b,r) = currentFormat ts let bx = (\(Bq x) -> x) let (_,ib,_) = initialRotation let bbout = map show $ catMaybes $ inBoth (bx ib) (tail $ bx b) let dpout = sort $ map show $ map (\(Ir n) -> n) i let pr = getPreview ts - defaultLayout [whamlet| -

CHHF - A Dunedin Netrunner Format -

About -

The Chris Hay Honourary Format, a post-cancellation Netrunner format. # - The format consists of 18 packs at any time, and between 5 and 6 big boxes. # - The following rotation rules are in place: -

    -
  • Each month, the two packs that have been in rotation longest are rotated out, and two random packs are rotated in -
  • After a pack rotates out, it cannot rotate in for 3 months -
  • Each month, in release order, one big box (Including Terminal Directive) is banned for the month -
  • On the seventh month, all big boxes are legal -

    The rotation updates on the first of each month, based on whatever time my server is set to (Probably NZ time but who knows really), and from the 20th of each month onwards, a preview of the upcoming changes will be shown. -

    Current Rotation: -

    Evergreen: -
      -
    • Revised Core Set x3 -

      Big Boxes: -
        - $forall bb <- bbout -
      • #{bb} -

        Data-packs: -
          - $forall dp <- dpout -
        • #{dp} -

          Upcoming Changes: - $maybe (pin, pout, pbin, pbout) <- pr -

          In: + setTitle "Protocol Seven" + toWidget [lucius| + html { + color: #FFFFFF; + background-color: #222222; + font-family: 'Inconsolata', monospace; + margin: 0px; + padding: 0px; + } + + body { + width: 740px; + margin: auto; + padding: 20px; + text-align: left; + border-left: 4px solid white; + border-right: 4px solid white; + } + + section { + border-top: 4px solid white; + padding: 5px; + } + + header { + margin: 0px; + padding: 5px; + border-top: 4px solid white; + } + + .subheading { + text-align: center; + padding: 5px; + } + + h1 { + text-align: center; + margin: 0px; + padding: 5px; + } + + p,h2,h3 { + margin: 0px; + padding: 5px; + } + + ul { + text-align: initial; + } + + .current { + width: 600px; + } + + .currentFormat { + margin: auto; + padding: 1px; + } + + .currentLeft { + width: 300px; + float: left; + } + + .currentRight { + margin-left: 300px; + } + + .upcoming { + width: 600px; + } + + .changes { + margin: auto; + padding: 1px; + } + + .upcomingIn { + color: #00DD00; + background-color: inherit; + width: 300px; + float: left; + } + + .upcomingOut { + color: #DD0000; + background-color: inherit; + margin-left: 300px; + } + |] + addScriptRemote "https://fonts.googleapis.com/css?family=Inconsolata" + toWidgetBody [hamlet| +
          +

          Protocol Seven +

          (Formerly the Chris Hay Honourary Format)

          + |] + toWidgetBody [hamlet| +
          +
          +

          Format for #{showMonth month} #{year}: +
          +
          +

          Evergreen: +
            +
          • Revised Core Set x3 +

            Big Boxes: +
              + $forall bb <- bbout +
            • #{bb} +
              +

              Data-packs: +
                + $forall dp <- dpout +
              • #{dp} +
                +

                Upcoming Changes for #{showMonth nextMonth} #{year}: + $maybe (pin, pout, pbin, pbout) <- pr +
                +
                +

                In: +
                  + $maybe pbbin <- pbin +
                • + #{show pbbin} + $forall indp <- pin +
                • + #{show indp} +
                  +

                  Out: +
                    + $maybe pbbout <- pbout +
                  • - #{show pbbout} + $forall outdp <- pout +
                  • - #{show outdp} + $nothing +

                    Coming soon! + |] + toWidgetBody [hamlet| +
                    +

                    What is Protocol Seven? +
                    "No matter where you go, everybody's connected." - Lain Iwakura +

                    For many of us, Fantasy Flight Games' Living Card Game Android: Netrunner was more than simply a card game. The term Lifestyle Game has been thrown around a lot, but is truer for no other community than that of ANR. Without the influx of things to discuss each month, it may seem likely that the community will die, however this is only true if we let it happen. +

                    With the cancellation of many players favourite game, and no real replacement anywhere on the horizon, all that's left is to create our own points of discussion. Many players are working on custom cycles to expand the card pool, however one Chris Hay of the small and oft ridiculed meta from Dunedin, New Zealand has come up with a solution; an everchanging format using the current completed card pool. +

                    How does it work? +
                    "One theory says that man is a neoteny and is no longer able to evolve. If this is true, then what an absurd creature mankind has evolved into." - Eiri Masami +

                    Protocol Seven is an attempt at a constantly evolving metagame. Rather than relying on an influx of new cards every month, Protocol Seven relies on a monthly rotation schedule. This allows discussion of a new metagame every month for the forseeable future. +

                    A month's format in Protocol Seven will at any time consist of the following:

                      - $maybe pbbin <- pbin -
                    • #{show pbbin} - $forall indp <- pin -
                    • #{show indp} -

                      Out: +
                    • 3x Revised Core Set +
                    • 18x Data Packs from the Lunar - Kitara cycles +
                    • 5-6x Deluxe Boxes (Including Terminal Directive) +

                      This website will automatically update with the latest format, as well as a preview of the next months changes. This allows discussion, an ever-changing metagame, whilst also keeping the card pool similar enough between months that decks can be altered rather than completely remade. +

                      The Protocol Seven Protocol +
                      "But a protocol is nothing more than a simple agreement." - Eiri Masami +

                      A comprehensive description of the Protocol Seven format

                        - $maybe pbbout <- pbout -
                      • #{show pbbout} - $forall outdp <- pout -
                      • #{show outdp} - $nothing -

                        Coming soon! +
                      • 3x Revised Core Sets will be legal at all times +
                      • The most recent FFG Most Wanted List will be active at all times +
                      • The Genesis and Spin cycles are not legal +
                      • Cards from the Original Core Set that are not in the Revised Core Set are not legal +
                      • 18x of the 36 Data Packs from Lunar cycle onwards will be legal at all times +
                      • Each rotation will remove the two Data Packs that have been in play the longest, and replace them with two, randomly chosen packs +
                      • Once rotated out, a Data Pack will not rotate in for at least three months +
                      • Each rotation, one Deluxe Box (Including Terminal Directive), in release order, will be chosen as illegal +
                      • Every 7th rotation, all Deluxes will be legal instead +
                      • The rotation will happen on the 1st of every month, New Zealand time +
                      • On the 20th of every month, a preview of the next months format will be shown +
                      • No matter what the currently legal packs are, Door to Door (Escalation #59) will always be legal |] main :: IO () From 509e295d0be35444f95e856555bfa3cf35b50c0b Mon Sep 17 00:00:00 2001 From: Shaun Kerr Date: Wed, 27 Jun 2018 14:53:14 +1200 Subject: [PATCH 3/3] Nuked CHHF --- Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.hs b/Main.hs index 7f5d34e..a8f5cc4 100644 --- a/Main.hs +++ b/Main.hs @@ -150,7 +150,7 @@ getHomeR = defaultLayout $ do toWidgetBody [hamlet|

                        Protocol Seven -

                        (Formerly the Chris Hay Honourary Format)

                        +

                        Always Be Running

                        |] toWidgetBody [hamlet|