Updated URL scheme (removed slashes)

master
James T. Martin 2018-09-22 15:33:11 -07:00
parent 0bb957b069
commit 0bc3bed3fd
6 changed files with 26 additions and 26 deletions

View File

@ -8,7 +8,7 @@ lastModified :: String
lastModified = "2018-09-22" lastModified = "2018-09-22"
sitemap :: Sitemap sitemap :: Sitemap
sitemap = baseSitemap "https://jtmar.me/" sitemap = baseSitemap (baseUrl ++ "/")
`withLastMod` lastModified `withLastMod` lastModified
`withPriority` "1.0" `withPriority` "1.0"
`withChangeFreq` "weekly" `withChangeFreq` "weekly"

View File

@ -20,7 +20,7 @@ basePage pageTitle authorName content =
%> faviconLink %> faviconLink
%> (title %>> pageTitle) %> (title %>> pageTitle)
%> viewport %> viewport
%> (newTag "script" %% ("async", "async") %% ("src", resUrl ++ "common.js")) %> (newTag "script" %% ("async", "async") %% ("src", resUrl ++ "/common.js"))
%> blockAllMixedContent %> blockAllMixedContent
%> cspMeta "default-src 'none'; style-src 'self'; img-src 'self' https://stackexchange.com; script-src 'self';" %> cspMeta "default-src 'none'; style-src 'self'; img-src 'self' https://stackexchange.com; script-src 'self';"
) )
@ -31,7 +31,7 @@ navSection =
nav nav
%> (spanTag `withId` "navbrand" %> ((href baseUrl $ text "James Martin") %% ("class", "navbrand"))) %> (spanTag `withId` "navbrand" %> ((href baseUrl $ text "James Martin") %% ("class", "navbrand")))
%> unorderedList %> unorderedList
[ href baseUrl $ text "Home" [ href (baseUrl ++ "/") $ text "Home"
, href projectsUrl $ text "Projects" , href projectsUrl $ text "Projects"
, href aboutUrl $ text "About" , href aboutUrl $ text "About"
] ]

View File

@ -6,7 +6,7 @@ import HtmlGen.Html
import HtmlGen.Tags import HtmlGen.Tags
personIconUrl :: String personIconUrl :: String
personIconUrl = iconUrl ++ "person.svg" personIconUrl = iconUrl ++ "/" ++ "person.svg"
personIcon :: String -> Html personIcon :: String -> Html
personIcon alt = img alt personIconUrl personIcon alt = img alt personIconUrl
@ -15,7 +15,7 @@ authorIcon :: Html
authorIcon = personIcon "Author" authorIcon = personIcon "Author"
clockIconUrl :: String clockIconUrl :: String
clockIconUrl = iconUrl ++ "clock.svg" clockIconUrl = iconUrl ++ "/" ++ "clock.svg"
clockIcon :: String -> Html clockIcon :: String -> Html
clockIcon alt = img alt clockIconUrl clockIcon alt = img alt clockIconUrl
@ -24,7 +24,7 @@ updatedIcon :: Html
updatedIcon = clockIcon "Updated" updatedIcon = clockIcon "Updated"
ccbysaIconUrl :: String ccbysaIconUrl :: String
ccbysaIconUrl = resUrl ++ "cc-by-sa-small.png" ccbysaIconUrl = resUrl ++ "/cc-by-sa-small.png"
ccbysaIcon :: Html ccbysaIcon :: Html
ccbysaIcon = img "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License" ccbysaIconUrl ccbysaIcon = img "This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License" ccbysaIconUrl
@ -36,7 +36,7 @@ license =
%% ("rel", "license")) %% ("rel", "license"))
faviconUrl :: String faviconUrl :: String
faviconUrl = baseUrl ++ "favicon.png" faviconUrl = baseUrl ++ "/favicon.png"
faviconMime :: String faviconMime :: String
faviconMime = "image/png" faviconMime = "image/png"
@ -48,37 +48,37 @@ accountIconClass :: (String, String)
accountIconClass = ("class", "accounticon") accountIconClass = ("class", "accounticon")
githubMarkUrl :: String githubMarkUrl :: String
githubMarkUrl = iconUrl ++ "github-mark-100px.png" githubMarkUrl = iconUrl ++ "/github-mark-100px.png"
githubMark :: Html githubMark :: Html
githubMark = img "GitHub" githubMarkUrl %% accountIconClass githubMark = img "GitHub" githubMarkUrl %% accountIconClass
linkedinLogoUrl :: String linkedinLogoUrl :: String
linkedinLogoUrl = iconUrl ++ "linkedin-logo-100px.png" linkedinLogoUrl = iconUrl ++ "/linkedin-logo-100px.png"
linkedinLogo :: Html linkedinLogo :: Html
linkedinLogo = img "LinkedIn" linkedinLogoUrl %% accountIconClass linkedinLogo = img "LinkedIn" linkedinLogoUrl %% accountIconClass
redditLogoUrl :: String redditLogoUrl :: String
redditLogoUrl = iconUrl ++ "reddit-logo-100px.png" redditLogoUrl = iconUrl ++ "/reddit-logo-100px.png"
redditLogo :: Html redditLogo :: Html
redditLogo = img "Reddit" redditLogoUrl %% accountIconClass redditLogo = img "Reddit" redditLogoUrl %% accountIconClass
wikipediaLogoUrl :: String wikipediaLogoUrl :: String
wikipediaLogoUrl = iconUrl ++ "wikipedia-logo-100px.png" wikipediaLogoUrl = iconUrl ++ "/wikipedia-logo-100px.png"
wikipediaLogo :: Html wikipediaLogo :: Html
wikipediaLogo = img "Wikipedia" wikipediaLogoUrl %% accountIconClass wikipediaLogo = img "Wikipedia" wikipediaLogoUrl %% accountIconClass
youtubeLogoUrl :: String youtubeLogoUrl :: String
youtubeLogoUrl = iconUrl ++ "youtube-logo-100px.jpeg" youtubeLogoUrl = iconUrl ++ "/youtube-logo-100px.jpeg"
youtubeLogo :: Html youtubeLogo :: Html
youtubeLogo = img "Youtube" youtubeLogoUrl %% accountIconClass youtubeLogo = img "Youtube" youtubeLogoUrl %% accountIconClass
freenodeLogoUrl :: String freenodeLogoUrl :: String
freenodeLogoUrl = iconUrl ++ "freenode-logo.svg" freenodeLogoUrl = iconUrl ++ "/freenode-logo.svg"
freenodeLogo :: Html freenodeLogo :: Html
freenodeLogo = img "Freenode" freenodeLogoUrl %% accountIconClass freenodeLogo = img "Freenode" freenodeLogoUrl %% accountIconClass

View File

@ -1,43 +1,43 @@
module Templates.Urls where module Templates.Urls where
baseUrl :: String baseUrl :: String
baseUrl = "https://jtmar.me/" baseUrl = "https://jtmar.me"
resUrl :: String resUrl :: String
resUrl = baseUrl ++ "res/" resUrl = baseUrl ++ "/res"
iconUrl :: String iconUrl :: String
iconUrl = resUrl ++ "icon/" iconUrl = resUrl ++ "/icon"
ccbysaUrl :: String ccbysaUrl :: String
ccbysaUrl = "http://creativecommons.org/licenses/by-sa/4.0/" ccbysaUrl = "http://creativecommons.org/licenses/by-sa/4.0/"
stylesheetCommonUrl :: String stylesheetCommonUrl :: String
stylesheetCommonUrl = resUrl ++ "common.css" stylesheetCommonUrl = resUrl ++ "/common.css"
projectsUrl :: String projectsUrl :: String
projectsUrl = baseUrl ++ "projects/" projectsUrl = baseUrl ++ "/projects"
aboutUrl :: String aboutUrl :: String
aboutUrl = baseUrl ++ "about/" aboutUrl = baseUrl ++ "/about"
githubUrl :: String githubUrl :: String
githubUrl = "https://github.com/" githubUrl = "https://github.com"
githubUserUrl :: String githubUserUrl :: String
githubUserUrl = githubUrl ++ "jammar/" githubUserUrl = githubUrl ++ "/jammar"
githubProjectUrl :: String -> String githubProjectUrl :: String -> String
githubProjectUrl name = githubUserUrl ++ name ++ "/" githubProjectUrl name = githubUserUrl ++ "/" ++ name
githubQiplUrl :: String githubQiplUrl :: String
githubQiplUrl = githubUrl ++ "qipl/" githubQiplUrl = githubUrl ++ "/" ++ "qipl"
githubQiplProjectUrl :: String -> String githubQiplProjectUrl :: String -> String
githubQiplProjectUrl name = githubQiplUrl ++ name ++ "/" githubQiplProjectUrl name = githubQiplUrl ++ "/" ++ name
resumeUrl :: String resumeUrl :: String
resumeUrl = baseUrl ++ "resume.pdf" resumeUrl = baseUrl ++ "/resume.pdf"
qiplUrl :: String qiplUrl :: String
qiplUrl = "https://qipl.org" qiplUrl = "https://qipl.org"
@ -46,7 +46,7 @@ redditUserUrl :: String
redditUserUrl = "https://reddit.com/user/lijero" redditUserUrl = "https://reddit.com/user/lijero"
youtubeUserUrl :: String youtubeUserUrl :: String
youtubeUserUrl = "https://www.youtube.com/channel/UC_nCB91N-0zNbFiMoMu6-3w/" youtubeUserUrl = "https://www.youtube.com/channel/UC_nCB91N-0zNbFiMoMu6-3w"
wikipediaUserUrl :: String wikipediaUserUrl :: String
wikipediaUserUrl = "https://en.wikipedia.org/wiki/User:Lijero" wikipediaUserUrl = "https://en.wikipedia.org/wiki/User:Lijero"