Minor changes to the templates, added about and projects.

master
LijeroM 2018-05-05 18:07:53 -07:00
parent 67212ebd17
commit 97c6683981
6 changed files with 95 additions and 15 deletions

23
about/index.hs Normal file
View File

@ -0,0 +1,23 @@
module Page where
import HtmlGen
import Templates
lastModified :: String
lastModified = "2018-05-05"
sitemap :: Sitemap
sitemap = baseSitemap aboutUrl
`withLastMod` lastModified
`withPriority` "0.8"
`withChangeFreq` "weekly"
page :: Html
page = simplePage "About Lijero" "Lijero" lastModified $
article
%> (h1 %>> "About")
%> (p
%>> "I am a programmer, musician, and hiker. I seek beauty, elegance, and cleanliness in everything I do."
%>> "I write Agda, Haskell, and Java. I enjoy making programming languages and constructed human languages."
%>> "This page is, like the rest of the site, obviously incomplete."
)

View File

@ -2,15 +2,19 @@ module Page where
import Templates import Templates
import HtmlGen.Html import HtmlGen
import HtmlGen.Tags
import HtmlGen.Sitemap lastModified :: String
lastModified = "2018-05-05"
sitemap :: Sitemap sitemap :: Sitemap
sitemap = baseSitemap "https://lijero.co/index.xhtml" `withLastMod` "2018-05-05" sitemap = baseSitemap "https://lijero.co/index.xhtml"
`withLastMod` lastModified
`withPriority` "1.0"
`withChangeFreq` "weekly"
page :: Html page :: Html
page = simplePage "Lijero" "Lijero" "2018-05-05" $ page = simplePage "Lijero" "Lijero" lastModified $
article article
%> (h1 %>> "Home Page") %> (h1 %>> "Home Page")
%> (p %>> "Sorry! This site is currently under construction.") %> (p %>> "Sorry! This site is currently under construction.")

35
projects/index.hs Normal file
View File

@ -0,0 +1,35 @@
module Page where
import HtmlGen
import Templates
lastModified :: String
lastModified = "2018-05-05"
sitemap :: Sitemap
sitemap = baseSitemap projectsUrl
`withLastMod` lastModified
`withPriority` "0.8"
`withChangeFreq` "weekly"
page :: Html
page = simplePage "Lijero's Projects" "Lijero" lastModified $
article
%> (h1 %>> "Projects")
%> (h2 %>> "Programming")
%> (p
%>> "All of my active programming projects may be found on "
%> (href githubUserUrl $ text "my Github page")
%>> ". My most notable projects include my work-in-progress programming language "
%> (href (githubQiplProjectUrl "qipl-agda") $ text "Qipl")
%>> " and my contributions to "
%> (href (githubUrl ++ "HazenRobotics/ftc_app") $ text "Hazen Robotics")
%>> "."
)
%> (h2 %>> "Audiobooks")
%> (p
%>> "I am currently working on recording The Grapes of Wrath for my English teacher"
%>> "due to a lack of quality recordings of it. You may find that series in "
%> (href (baseUrl ++ "gow/") $ text "its YouTube playlist")
%>> "."
)

@ -1 +1 @@
Subproject commit aef2e729730166c2928307f65d4f5f80bf789b24 Subproject commit ee8ceaca33d16a07a8b1128398150daf11867c06

View File

@ -1,10 +1,13 @@
module Templates where module Templates
( module Templates
, module Templates.Urls
, module Templates.Icons
) where
import Templates.Urls import Templates.Urls
import Templates.Icons import Templates.Icons
import HtmlGen.Html import HtmlGen
import HtmlGen.Tags
basePage :: String -> String -> Html -> Html basePage :: String -> String -> Html -> Html
basePage pageTitle authorName content = basePage pageTitle authorName content =
@ -26,7 +29,7 @@ navSection =
%> (spanTag `withId` "navbrand" %>> "Lijero") %> (spanTag `withId` "navbrand" %>> "Lijero")
%> unorderedList %> unorderedList
[ href baseUrl $ text "Home" [ href baseUrl $ text "Home"
, href qiplUrl $ text "Qipl" , href projectsUrl $ text "Projects"
, href aboutUrl $ text "About" , href aboutUrl $ text "About"
] ]
@ -36,11 +39,11 @@ footerSection authorName dateModified =
%> (divTag `withClass` "metadata" %> (divTag `withClass` "metadata"
%> (spanTag %> (spanTag
%> authorIcon %> authorIcon
%>> ' ' : authorName %>> ' ' : authorName ++ " "
) )
%> (spanTag %> (spanTag
%> updatedIcon %> updatedIcon
%>> ' ' : dateModified %>> ' ' : dateModified ++ " "
) )
%> license %> license
) )

View File

@ -1,7 +1,7 @@
module Templates.Urls where module Templates.Urls where
baseUrl :: String baseUrl :: String
baseUrl = "//lijero.co/" baseUrl = "https://lijero.co/"
resUrl :: String resUrl :: String
resUrl = baseUrl ++ "res/" resUrl = baseUrl ++ "res/"
@ -15,8 +15,23 @@ ccbysaUrl = "http://creativecommons.org/licenses/by-sa/4.0/"
stylesheetCommonUrl :: String stylesheetCommonUrl :: String
stylesheetCommonUrl = resUrl ++ "common.css" stylesheetCommonUrl = resUrl ++ "common.css"
qiplUrl :: String projectsUrl :: String
qiplUrl = baseUrl ++ "qipl/" projectsUrl = baseUrl ++ "projects/"
aboutUrl :: String aboutUrl :: String
aboutUrl = baseUrl ++ "about/" aboutUrl = baseUrl ++ "about/"
githubUrl :: String
githubUrl = "https://github.com/"
githubUserUrl :: String
githubUserUrl = githubUrl ++ "LijeroM/"
githubProjectUrl :: String -> String
githubProjectUrl name = githubUserUrl ++ name ++ "/"
githubQiplUrl :: String
githubQiplUrl = githubUrl ++ "qipl/"
githubQiplProjectUrl :: String -> String
githubQiplProjectUrl name = githubQiplUrl ++ name ++ "/"