aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@christine.website>2022-11-24 20:34:17 -0500
committerXe Iaso <me@christine.website>2022-11-24 20:34:17 -0500
commit85fc298d11239dbc69b70ac95888f03cf22a3008 (patch)
tree75bb135018afc6a10a1a22ce537ec5fdc6c7b9f5
parentaf33bffd84ab4c30ce6eda6dec8319aabbcb768d (diff)
downloadxesite-85fc298d11239dbc69b70ac95888f03cf22a3008.tar.xz
xesite-85fc298d11239dbc69b70ac95888f03cf22a3008.zip
refactor blogposts to its own file
Signed-off-by: Xe Iaso <me@christine.website>
-rw-r--r--dhall/Prelude/LICENSE27
-rw-r--r--dhall/Prelude/package.dhall16743
-rw-r--r--src/handlers/blog.rs2
-rw-r--r--src/handlers/gallery.rs2
-rw-r--r--src/handlers/talks.rs2
-rw-r--r--src/tmpl/blog.rs210
-rw-r--r--src/tmpl/mod.rs210
7 files changed, 215 insertions, 16981 deletions
diff --git a/dhall/Prelude/LICENSE b/dhall/Prelude/LICENSE
deleted file mode 100644
index d240dd1..0000000
--- a/dhall/Prelude/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2018 Gabriel Gonzalez
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-3. Neither the name of the author nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/dhall/Prelude/package.dhall b/dhall/Prelude/package.dhall
deleted file mode 100644
index a7ee369..0000000
--- a/dhall/Prelude/package.dhall
+++ /dev/null
@@ -1,16743 +0,0 @@
-{ Bool =
- { and =
- \(_ : List Bool) ->
- List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 && _) True
- , build = \(_ : Type -> _ -> _@1 -> _@2) -> _ Bool True False
- , even =
- \(_ : List Bool) ->
- List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 == _) True
- , fold =
- \(_ : Bool) ->
- \(_ : Type) ->
- \(_ : _) ->
- \(_ : _@1) ->
- if _@3 then _@1 else _
- , not = \(_ : Bool) -> _ == False
- , odd =
- \(_ : List Bool) ->
- List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 != _) False
- , or =
- \(_ : List Bool) ->
- List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 || _) False
- , show = \(_ : Bool) -> if _ then "True" else "False"
- }
-, Double.show = Double/show
-, Function =
- { compose =
- \(_ : Type) ->
- \(_ : Type) ->
- \(_ : Type) ->
- \(_ : _@2 -> _@2) ->
- \(_ : _@2 -> _@2) ->
- \(_ : _@4) ->
- _@1 (_@2 _)
- , identity = \(_ : Type) -> \(_ : _) -> _
- }
-, Integer =
- { abs =
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp _)
- then Integer/clamp (Integer/negate _)
- else Integer/clamp _
- , add =
- \(_ : Integer) ->
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp (Integer/negate _@1))
- then if Natural/isZero (Integer/clamp _)
- then if Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- ( Integer/clamp
- (Integer/negate (Integer/negate _@1))
- )
- )
- then Integer/negate
- ( Natural/toInteger
- ( Natural/subtract
- ( Integer/clamp
- (Integer/negate (Integer/negate _@1))
- )
- (Integer/clamp (Integer/negate _))
- )
- )
- else Natural/toInteger
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- ( Integer/clamp
- (Integer/negate (Integer/negate _@1))
- )
- )
- else Natural/toInteger
- ( Integer/clamp (Integer/negate (Integer/negate _@1))
- + Integer/clamp _
- )
- else if Natural/isZero (Integer/clamp _)
- then Integer/negate
- ( Natural/toInteger
- ( Integer/clamp (Integer/negate _@1)
- + Integer/clamp (Integer/negate _)
- )
- )
- else if Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _@1))
- (Integer/clamp _)
- )
- then Integer/negate
- ( Natural/toInteger
- ( Natural/subtract
- (Integer/clamp _)
- (Integer/clamp (Integer/negate _@1))
- )
- )
- else Natural/toInteger
- ( Natural/subtract
- (Integer/clamp (Integer/negate _@1))
- (Integer/clamp _)
- )
- , clamp = Integer/clamp
- , equal =
- \(_ : Integer) ->
- \(_ : Integer) ->
- Natural/isZero
- (Natural/subtract (Integer/clamp _) (Integer/clamp _@1))
- && Natural/isZero
- (Natural/subtract (Integer/clamp _@1) (Integer/clamp _))
- && ( Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- (Integer/clamp (Integer/negate _@1))
- )
- && Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _@1))
- (Integer/clamp (Integer/negate _))
- )
- )
- , greaterThan =
- \(_ : Integer) ->
- \(_ : Integer) ->
- ( if Natural/isZero (Integer/clamp _@1)
- then Natural/isZero (Integer/clamp (Integer/negate _))
- || Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _@1))
- (Integer/clamp (Integer/negate _))
- )
- else Natural/isZero
- (Natural/subtract (Integer/clamp _) (Integer/clamp _@1))
- )
- == False
- , greaterThanEqual =
- \(_ : Integer) ->
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp _)
- then Natural/isZero (Integer/clamp (Integer/negate _@1))
- || Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- (Integer/clamp (Integer/negate _@1))
- )
- else Natural/isZero
- (Natural/subtract (Integer/clamp _@1) (Integer/clamp _))
- , lessThan =
- \(_ : Integer) ->
- \(_ : Integer) ->
- ( if Natural/isZero (Integer/clamp _)
- then Natural/isZero (Integer/clamp (Integer/negate _@1))
- || Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- (Integer/clamp (Integer/negate _@1))
- )
- else Natural/isZero
- (Natural/subtract (Integer/clamp _@1) (Integer/clamp _))
- )
- == False
- , lessThanEqual =
- \(_ : Integer) ->
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp _@1)
- then Natural/isZero (Integer/clamp (Integer/negate _))
- || Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _@1))
- (Integer/clamp (Integer/negate _))
- )
- else Natural/isZero
- (Natural/subtract (Integer/clamp _) (Integer/clamp _@1))
- , multiply =
- \(_ : Integer) ->
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp _@1)
- then if Natural/isZero (Integer/clamp _)
- then Natural/toInteger
- ( Integer/clamp (Integer/negate _@1)
- * Integer/clamp (Integer/negate _)
- )
- else Integer/negate
- ( Natural/toInteger
- (Integer/clamp (Integer/negate _@1) * Integer/clamp _)
- )
- else if Natural/isZero (Integer/clamp _)
- then Integer/negate
- ( Natural/toInteger
- (Integer/clamp _@1 * Integer/clamp (Integer/negate _))
- )
- else Natural/toInteger (Integer/clamp _@1 * Integer/clamp _)
- , negate = Integer/negate
- , negative =
- \(_ : Integer) ->
- Natural/isZero (Integer/clamp (Integer/negate _)) == False
- , nonNegative =
- \(_ : Integer) -> Natural/isZero (Integer/clamp (Integer/negate _))
- , nonPositive = \(_ : Integer) -> Natural/isZero (Integer/clamp _)
- , positive = \(_ : Integer) -> Natural/isZero (Integer/clamp _) == False
- , show = Integer/show
- , subtract =
- \(_ : Integer) ->
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp _@1)
- then if Natural/isZero (Integer/clamp _)
- then if Natural/isZero
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- (Integer/clamp (Integer/negate _@1))
- )
- then Integer/negate
- ( Natural/toInteger
- ( Natural/subtract
- (Integer/clamp (Integer/negate _@1))
- (Integer/clamp (Integer/negate _))
- )
- )
- else Natural/toInteger
- ( Natural/subtract
- (Integer/clamp (Integer/negate _))
- (Integer/clamp (Integer/negate _@1))
- )
- else Natural/toInteger
- (Integer/clamp (Integer/negate _@1) + Integer/clamp _)
- else if Natural/isZero (Integer/clamp _)
- then Integer/negate
- ( Natural/toInteger
- (Integer/clamp _@1 + Integer/clamp (Integer/negate _))
- )
- else if Natural/isZero
- (Natural/subtract (Integer/clamp _@1) (Integer/clamp _))
- then Integer/negate
- ( Natural/toInteger
- (Natural/subtract (Integer/clamp _) (Integer/clamp _@1))
- )
- else Natural/toInteger
- (Natural/subtract (Integer/clamp _@1) (Integer/clamp _))
- , toDouble = Integer/toDouble
- , toNatural =
- \(_ : Integer) ->
- if Natural/isZero (Integer/clamp (Integer/negate _))
- then Some (Integer/clamp _)
- else None Natural
- }
-, JSON =
- { Nesting = < Inline | Nested : Text >
- , Tagged =
- \(_ : Type) ->
- { contents : _, field : Text, nesting : < Inline | Nested : Text > }
- , Type =
- Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- , array =
- \ ( _
- : List
- ( Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- )
- ) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.array
- ( List/fold
- ( Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- )
- _@2
- (List _@1)
- ( \ ( _
- : Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- ) ->
- \(_ : List _@2) ->
- [ _@1 _@3 _@2 ] # _
- )
- ([] : List _@1)
- )
- , bool =
- \(_ : Bool) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.bool _@2
- , double =
- \(_ : Double) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.double _@2
- , integer =
- \(_ : Integer) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.integer _@2
- , keyText = \(_ : Text) -> \(_ : Text) -> { mapKey = _@1, mapValue = _ }
- , keyValue =
- \(_ : Type) -> \(_ : Text) -> \(_ : _@1) -> { mapKey = _@1, mapValue = _ }
- , natural =
- \(_ : Natural) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.integer (Natural/toInteger _@2)
- , null =
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.null
- , number =
- \(_ : Double) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.double _@2
- , object =
- \ ( _
- : List
- { mapKey : Text
- , mapValue :
- Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- }
- ) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- _.object
- ( List/fold
- { mapKey : Text
- , mapValue :
- Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- }
- _@2
- (List { mapKey : Text, mapValue : _@1 })
- ( \ ( _
- : { mapKey : Text
- , mapValue :
- Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- }
- ) ->
- \(_ : List { mapKey : Text, mapValue : _@2 }) ->
- [ { mapKey = _@1.mapKey, mapValue = _@1.mapValue _@3 _@2 } ]
- # _
- )
- ([] : List { mapKey : Text, mapValue : _@1 })
- )
- , omitNullFields =
- \ ( _
- : Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- ) ->
- \(_ : Type) ->
- \ ( _
- : { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- }
- ) ->
- ( _@2
- { isNull : Bool, value : _@1 }
- { array =
- \(_ : List { isNull : Bool, value : _@1 }) ->
- { isNull = False
- , value =
- _@1.array
- ( List/fold
- { isNull : Bool, value : _@2 }
- _
- (List _@2)
- ( \(_ : { isNull : Bool, value : _@2 }) ->
- \(_ : List _@3) ->
- [ _@1.value ] # _
- )
- ([] : List _@2)
- )
- }
- , bool = \(_ : Bool) -> { isNull = False, value = _@1.bool _ }
- , double = \(_ : Double) -> { isNull = False, value = _@1.double _ }
- , integer =
- \(_ : Integer) -> { isNull = False, value = _@1.integer _ }
- , null = { isNull = True, value = _.null }
- , object =
- \ ( _
- : List
- { mapKey : Text
- , mapValue : { isNull : Bool, value : _@1 }
- }
- ) ->
- { isNull = False
- , value =
- _@1.object
- ( List/fold
- { mapKey : Text
- , mapValue : { isNull : Bool, value : _@2 }
- }
- _
- (List { mapKey : Text, mapValue : _@2 })
- ( \ ( _
- : { mapKey : Text
- , mapValue : { isNull : Bool, value : _@2 }
- }
- ) ->
- List/fold
- { mapKey : Text, mapValue : _@3 }
- ( if _.mapValue.isNull
- then [] : List
- { mapKey : Text
- , mapValue : _@3
- }
- else [ _.{ mapKey }
- /\ { mapValue = _.mapValue.value }
- ]
- )
- (List { mapKey : Text, mapValue : _@3 })
- ( \(_ : { mapKey : Text, mapValue : _@3 }) ->
- \ ( _
- : List { mapKey : Text, mapValue : _@4 }
- ) ->
- [ _@1 ] # _
- )
- )
- ([] : List { mapKey : Text, mapValue : _@2 })
- )
- }
- , string = \(_ : Text) -> { isNull = False, value = _@1.string _ }
- }
- ).value
- , render =
- \ ( _
- : Type ->
- { array : List _ -> _@1
- , bool : Bool -> _@1
- , double : Double -> _@1
- , integer : Integer -> _@1
- , null : _
- , object : List { mapKey : Text, mapValue : _ } -> _@1
- , string : Text -> _@1
- } ->
- _@1
- ) ->
- List/fold
- Text
- ( [ ( merge
- { Complex = \(_ : { head : Text, tail : List Text }) -> _
- , Simple =
- \(_ : Text) -> { head = _, tail = [] : List Text }
- }
- ( _
- < Complex : { head : Text, tail : List Text }
- | Simple : Text
- >
- { array =
- \ ( _
- : List
- < Complex : { head : Text, tail : List Text }
- | Simple : Text
- >
- ) ->
- merge
- { None =
- < Complex :
- { head : Text, tail : List Text }
- | Simple : Text
- >.Simple
- "[]"
- , Some =
- \ ( _
- : { head :
- < Complex :
- { head : Text
- , tail : List Text
- }
- | Simple : Text
- >
- , tail :
- List
- < Complex :
- { head : Text
- , tail : List Text
- }
- | Simple : Text
- >
- }
- ) ->
- < Complex :
- { head : Text, tail : List Text }
- | Simple : Text
- >.Complex
- ( merge
- { None =
- { head =
- "[ ${( merge
- { None =
- { head =
- merge
- { Complex =
- \ ( _
- : { head :
- Text
- , tail :
- List
- Text
- }
- ) ->
- _
- , Simple =
- \ ( _
- : Text
- ) ->
- { head =
- _
- , tail =
- [] : List
- Text
- }
- }
- _.head
- , tail =
- List/fold
- < Complex :
- { head :
- Text
- , tail :
- List
- Text
- }
- | Simple :
- Text
- >
- _.tail
- ( List
- { head :
- Text
- , tail :
- List
- Text
- }
- )
- ( \ ( _
- : < Complex :
- { head :
- Text
- , tail :
- List
- Text
- }
- | Simple :
- Text
- >
- ) ->
- \ ( _
- : List
- { head :
- Text
- , tail :
- List
- Text
- }
- ) ->
- [ merge
- { Complex =
- \ ( _
- : { head :
- Text
- , tail :
- List
- Text
- }
- ) ->
- _
- , Simple =
- \ ( _
- : Text
- ) ->
- { head =
- _
- , tail =
- [] : List
- Text
- }
- }
- _@1
- ]
- # _
- )
- ( [] : List
- { head :
- Text
- , tail :
- List
- Text
- }
- )
- }
- , Some =
- \ ( _
- : { init :
- List
- { head :
- Text
- , tail :
- List
- Text
- }
- , last :
- { head :
- Text
- , tail :
- List
- Text
- }
- }
- ) ->
- { head =
- merge
- { None =
- { head =
- "${( merge
- { Complex =
- \ ( _
- : { head :
- Text
- , tail :
- List
- Text
- }
- ) ->
- _
- , Simple =
- \ ( _
-