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"
sitemap :: Sitemap
sitemap = baseSitemap "https://jtmar.me/"
sitemap = baseSitemap (baseUrl ++ "/")
`withLastMod` lastModified
`withPriority` "1.0"
`withChangeFreq` "weekly"

View File

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

View File

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

View File

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