add favicon and html page handling
Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
@@ -1,7 +1,19 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/site.webmanifest">
|
||||||
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||||
|
<meta name="msapplication-TileColor" content="#2d89ef">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
|
|
||||||
<title>Single Page Apps for GitHub Pages</title>
|
<title>Single Page Apps for GitHub Pages</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// Single Page Apps for GitHub Pages
|
// Single Page Apps for GitHub Pages
|
||||||
@@ -47,5 +59,7 @@
|
|||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body></body>
|
<body></body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 494 B |
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/mstile-150x150.png"/>
|
||||||
|
<TileColor>#2d89ef</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
||||||
|
After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 433 B |
|
After Width: | Height: | Size: 6.1 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M144 80c0 26.5-21.5 48-48 48s-48-21.5-48-48s21.5-48 48-48s48 21.5 48 48zM0 224c0-17.7 14.3-32 32-32H96c17.7 0 32 14.3 32 32V448h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H64V256H32c-17.7 0-32-14.3-32-32z"/></svg>
|
||||||
|
After Width: | Height: | Size: 486 B |
@@ -4,6 +4,17 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/site.webmanifest">
|
||||||
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||||
|
<meta name="msapplication-TileColor" content="#2d89ef">
|
||||||
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="/mdn-style.min.css">
|
<link rel="stylesheet" href="/mdn-style.min.css">
|
||||||
<link rel="stylesheet" href="/foo-style.min.css">
|
<link rel="stylesheet" href="/foo-style.min.css">
|
||||||
@@ -26,7 +37,7 @@
|
|||||||
app.ports.sendString.subscribe(function (markdowndata) {
|
app.ports.sendString.subscribe(function (markdowndata) {
|
||||||
|
|
||||||
var numberOfHeadings = 0;
|
var numberOfHeadings = 0;
|
||||||
let toc = '';
|
// let toc = '';
|
||||||
const renderer = new marked.Renderer();
|
const renderer = new marked.Renderer();
|
||||||
const sections = [];
|
const sections = [];
|
||||||
renderer.heading = (text, level) => {
|
renderer.heading = (text, level) => {
|
||||||
@@ -43,7 +54,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</h${level}>
|
</h${level}>
|
||||||
<div class="section-content">`;
|
<div class="section-content">`;
|
||||||
toc += `<li class="document-toc-item"><a class="document-toc-link" href="#${escapedText}">${text}</a></li>`;
|
// toc += `<li class="document-toc-item"><a class="document-toc-link" href="#${escapedText}">${text}</a></li>`;
|
||||||
if (numberOfHeadings === 0) {
|
if (numberOfHeadings === 0) {
|
||||||
numberOfHeadings++;
|
numberOfHeadings++;
|
||||||
return sectionContent;
|
return sectionContent;
|
||||||
|
|||||||
|
After Width: | Height: | Size: 536 B |
@@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="1040.000000pt" height="1040.000000pt" viewBox="0 0 1040.000000 1040.000000"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0.000000,1040.000000) scale(0.100000,-0.100000)"
|
||||||
|
fill="#000000" stroke="none">
|
||||||
|
<path d="M0 5200 l0 -4800 4799 0 c4790 0 4799 0 4804 20 3 11 1 20 -4 20 -5
|
||||||
|
0 -4 11 1 25 6 16 6 25 0 25 -6 0 -6 9 0 25 6 16 6 25 0 25 -6 0 -6 9 0 25 6
|
||||||
|
15 6 25 0 25 -5 0 -5 12 0 30 5 18 5 30 0 30 -6 0 -6 10 0 25 6 17 6 25 -1 25
|
||||||
|
-6 0 -7 5 -4 11 9 14 10 113 1 128 -4 6 -3 11 3 11 7 0 7 8 1 25 -6 15 -6 27
|
||||||
|
0 30 6 3 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 26 0 30 7 4 6 13
|
||||||
|
0 25 -6 12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0 25 -5 14 -6
|
||||||
|
25 -2 25 8 0 6 74 -2 97 -3 7 -1 13 4 13 6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6
|
||||||
|
9 1 23 -5 13 -5 30 -1 37 5 8 4 22 -1 32 -7 12 -6 18 1 18 7 0 8 6 0 19 -7 13
|
||||||
|
-7 22 0 26 6 4 7 13 1 24 -6 10 -6 23 -1 31 5 8 5 19 0 25 -5 6 -5 17 0 25 4
|
||||||
|
7 4 24 0 36 -6 14 -5 26 0 29 7 4 6 13 0 25 -6 12 -7 21 0 25 6 4 6 15 0 30
|
||||||
|
-6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 25 0
|
||||||
|
25 5 0 5 12 0 30 -5 18 -5 30 0 30 6 0 6 10 0 25 -6 15 -6 25 0 25 5 0 5 12 0
|
||||||
|
30 -5 18 -5 30 0 30 6 0 6 10 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25
|
||||||
|
0 25 6 0 6 9 0 25 -6 15 -6 27 0 30 6 3 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0
|
||||||
|
25 -6 15 -6 26 0 30 7 4 6 13 0 25 -6 12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6
|
||||||
|
25 0 25 6 0 6 9 0 25 -5 14 -6 25 -2 25 8 0 6 74 -2 97 -3 7 -1 13 4 13 6 0 6
|
||||||
|
9 0 25 -6 16 -6 25 0 25 6 0 6 9 1 23 -5 13 -5 30 -1 37 5 8 4 22 -1 32 -7 12
|
||||||
|
-6 18 1 18 7 0 8 6 0 19 -7 13 -7 22 0 26 6 4 7 13 1 24 -6 10 -6 23 -1 31 5
|
||||||
|
8 5 19 0 25 -5 6 -5 17 0 25 4 7 4 24 0 36 -6 14 -5 26 0 29 7 4 6 13 0 25 -6
|
||||||
|
12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25 0 25
|
||||||
|
6 0 6 9 0 25 -6 15 -6 25 0 25 5 0 5 12 0 30 -5 18 -5 30 0 30 6 0 6 10 0 25
|
||||||
|
-6 15 -6 25 0 25 5 0 5 12 0 30 -5 18 -5 32 1 35 5 4 5 14 -1 25 -7 13 -7 21
|
||||||
|
0 25 7 4 7 13 1 24 -13 23 15 67 32 53 7 -5 23 -6 37 -2 14 4 35 3 47 -1 13
|
||||||
|
-5 25 -4 28 1 4 7 13 6 25 0 13 -7 21 -7 25 0 4 7 12 7 25 0 13 -7 21 -7 25 0
|
||||||
|
5 8 11 8 19 1 7 -6 16 -8 19 -5 8 9 85 9 93 1 4 -3 14 -2 23 3 10 5 22 5 28 2
|
||||||
|
14 -9 82 -7 90 2 4 3 12 1 19 -5 8 -7 14 -7 19 1 4 7 12 7 25 0 11 -6 21 -6
|
||||||
|
25 -1 3 6 17 6 35 1 18 -5 32 -5 35 1 4 5 14 5 25 -1 13 -7 21 -7 25 0 5 7 11
|
||||||
|
8 19 1 7 -6 17 -6 26 -1 8 5 18 6 22 4 4 -3 8 355 8 795 0 756 -1 801 -17 802
|
||||||
|
-10 1 -21 1 -24 1 -7 -1 -110 -2 -141 -1 -10 0 -67 0 -128 0 -60 0 -116 0
|
||||||
|
-122 0 -7 0 -44 0 -83 0 -38 0 -77 0 -85 0 -8 1 -51 1 -95 0 -114 -1 -115 -1
|
||||||
|
-105 19 6 11 5 21 -2 28 -9 9 -9 12 -1 12 8 0 9 9 3 30 -5 17 -5 30 0 30 5 0
|
||||||
|
5 13 0 30 -5 18 -5 30 0 30 6 0 6 10 0 25 -6 15 -6 26 0 30 7 4 6 13 0 25 -7
|
||||||
|
13 -7 21 0 25 6 4 7 13 1 24 -6 10 -6 23 -1 31 5 8 5 19 0 25 -5 6 -5 17 0 25
|
||||||
|
4 7 4 24 0 36 -6 14 -5 26 0 29 7 4 6 13 0 25 -6 12 -7 21 0 25 6 4 6 15 0 30
|
||||||
|
-6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 25 0
|
||||||
|
25 5 0 5 12 0 30 -5 18 -5 30 0 30 6 0 6 10 0 25 -6 15 -6 25 0 25 5 0 5 12 0
|
||||||
|
30 -5 18 -5 30 0 30 6 0 6 10 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25
|
||||||
|
0 25 6 0 6 9 0 25 -6 15 -6 27 0 30 6 3 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0
|
||||||
|
25 -6 15 -6 26 0 30 7 4 6 13 0 25 -6 12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6
|
||||||
|
25 0 25 6 0 6 9 0 25 -5 14 -6 25 -2 25 8 0 6 74 -2 97 -3 7 -1 13 4 13 6 0 6
|
||||||
|
9 0 25 -6 16 -6 25 0 25 6 0 6 9 1 23 -5 13 -5 30 -1 37 5 8 4 22 -1 32 -7 12
|
||||||
|
-6 18 1 18 7 0 8 6 0 19 -7 13 -7 22 0 26 6 4 7 13 1 24 -6 10 -6 23 -1 31 5
|
||||||
|
8 5 19 0 25 -5 6 -5 17 0 25 4 7 4 24 0 36 -6 14 -5 26 0 29 7 4 6 13 0 25 -6
|
||||||
|
12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25 0 25
|
||||||
|
6 0 6 9 0 25 -6 15 -6 25 0 25 5 0 5 12 0 30 -5 18 -5 30 0 30 6 0 6 10 0 25
|
||||||
|
-6 15 -6 25 0 25 5 0 5 12 0 30 -5 18 -5 30 0 30 6 0 6 10 0 25 -6 16 -6 25 0
|
||||||
|
25 6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 27 0 30 6 3 6 15 0
|
||||||
|
30 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 26 0 30 7 4 6 13 0 25 -6 12 -7 21
|
||||||
|
0 25 6 4 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0 25 -5 14 -6 25 -2 25 8 0 6 74
|
||||||
|
-2 97 -3 7 -1 13 4 13 6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6 9 1 23 -5 13 -5
|
||||||
|
30 -1 37 5 8 4 22 -1 32 -7 12 -6 18 1 18 7 0 8 6 0 19 -7 13 -7 22 0 26 6 4
|
||||||
|
7 13 1 24 -6 10 -6 23 -1 31 5 8 5 19 0 25 -5 6 -5 17 0 25 4 7 4 24 0 36 -6
|
||||||
|
14 -5 26 0 29 7 4 6 13 0 25 -6 12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6 25 0 25
|
||||||
|
6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 25 0 25 5 0 5 12 0 30
|
||||||
|
-5 18 -5 30 0 30 6 0 6 10 0 25 -6 15 -6 25 0 25 5 0 5 12 0 30 -5 18 -5 30 0
|
||||||
|
30 6 0 6 10 0 25 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 16 -6 25 0 25 6 0 6 9 0
|
||||||
|
25 -6 15 -6 27 0 30 6 3 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9 0 25 -6 15 -6 26
|
||||||
|
0 30 7 4 6 13 0 25 -6 12 -7 21 0 25 6 4 6 15 0 30 -6 16 -6 25 0 25 6 0 6 9
|
||||||
|
0 25 -5 14 -6 25 -2 25 8 0 6 74 -2 97 -3 7 -1 13 4 13 6 0 6 9 0 25 -6 16 -6
|
||||||
|
25 0 25 6 0 6 9 1 23 -5 13 -5 30 -1 37 5 8 4 22 -1 32 -7 12 -6 18 1 18 7 0
|
||||||
|
8 6 0 19 -7 13 -7 22 0 26 6 4 7 13 1 24 -6 10 -6 23 -1 31 5 8 5 19 0 25 -5
|
||||||
|
6 -5 17 0 25 4 7 4 24 0 36 -6 14 -5 26 0 29 7 4 6 13 0 25 -6 12 -7 21 0 25
|
||||||
|
5 3 6 15 1 28 -5 12 -5 32 0 45 5 13 5 22 -1 22 -6 0 -6 9 0 25 6 15 6 25 0
|
||||||
|
25 -5 0 -5 12 0 30 5 18 5 30 0 30 -6 0 -6 10 0 25 6 15 6 25 0 25 -5 0 -5 12
|
||||||
|
0 30 5 18 5 30 0 30 -6 0 -6 10 0 25 6 16 6 25 0 25 -6 0 -6 9 0 25 6 16 6 25
|
||||||
|
0 25 -5 0 -7 6 -4 13 8 23 10 97 2 97 -4 0 -3 11 2 25 5 14 6 25 1 25 -5 0 -7
|
||||||
|
9 -4 20 5 20 0 20 -4796 20 l-4801 0 0 -4800z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 5.4 KiB |
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "Be My SpaceTime",
|
||||||
|
"short_name": "SpaceTime",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
||||||
@@ -56,6 +56,7 @@ view : Model -> Html Msg
|
|||||||
view model =
|
view model =
|
||||||
div [ class "foo-interface" ]
|
div [ class "foo-interface" ]
|
||||||
[ div [ class "foo-console foo-terminal foo-active" ]
|
[ div [ class "foo-console foo-terminal foo-active" ]
|
||||||
|
[ div [ class "page-wrapper category-html document-page" ]
|
||||||
[ div [ class "main-wrapper" ]
|
[ div [ class "main-wrapper" ]
|
||||||
[ main_ [ class "main-content", id "content" ]
|
[ main_ [ class "main-content", id "content" ]
|
||||||
[ case model.blog of
|
[ case model.blog of
|
||||||
@@ -69,7 +70,8 @@ view model =
|
|||||||
|
|
||||||
Nothing ->
|
Nothing ->
|
||||||
text ""
|
text ""
|
||||||
, viewArticle model.success
|
, viewArticle model
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@@ -102,21 +104,21 @@ viewToc show =
|
|||||||
div [] []
|
div [] []
|
||||||
|
|
||||||
|
|
||||||
viewArticle : Bool -> Html Msg
|
viewArticle : Model -> Html Msg
|
||||||
viewArticle show =
|
viewArticle model =
|
||||||
article
|
article
|
||||||
[ class "main-page-content" ]
|
[ class "main-page-content" ]
|
||||||
[ div [ id "insert-here" ] []
|
[ div [ id "insert-here" ] []
|
||||||
, viewMetadata show
|
, viewMetadata model
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
viewMetadata : Bool -> Html Msg
|
viewMetadata : Model -> Html Msg
|
||||||
viewMetadata show =
|
viewMetadata model =
|
||||||
aside
|
aside
|
||||||
[ class "metadata"
|
[ class "metadata"
|
||||||
, style "display"
|
, style "display"
|
||||||
(if show then
|
(if model.success then
|
||||||
"block"
|
"block"
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -128,12 +130,23 @@ viewMetadata show =
|
|||||||
[ h3 [] [ text "Found a problem" ]
|
[ h3 [] [ text "Found a problem" ]
|
||||||
, ul []
|
, ul []
|
||||||
[ li []
|
[ li []
|
||||||
[ a [ href "https://github.com/avinal" ]
|
[ a
|
||||||
[ text "open an issue" ]
|
[ href
|
||||||
|
("https://github.com/avinal/avinal.github.io/issues/new?title=blog:"
|
||||||
|
++ (case model.blog of
|
||||||
|
Just blog ->
|
||||||
|
blog.meta.title
|
||||||
|
|
||||||
|
Nothing ->
|
||||||
|
model.markdownUrl
|
||||||
|
)
|
||||||
|
)
|
||||||
|
]
|
||||||
|
[ text "Open an issue on ", i [ class "fa-brands fa-github" ] [] ]
|
||||||
]
|
]
|
||||||
, li []
|
, li []
|
||||||
[ a [ href "https://avinal.space" ]
|
[ a [ href "mailto:ripple+blog@avinal.space" ]
|
||||||
[ text "Website" ]
|
[ text "Contact me via email" ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@@ -147,24 +160,70 @@ type Msg
|
|||||||
| NoSuchPage
|
| NoSuchPage
|
||||||
|
|
||||||
|
|
||||||
|
{-| To maintain compatibility with old links
|
||||||
|
|
||||||
|
Old links: <https://avinal.space/posts/category/slug.html>
|
||||||
|
New links: <https://avinal.space/posts/category/slug>
|
||||||
|
|
||||||
|
-}
|
||||||
|
removeHtmlSuffix : String -> String
|
||||||
|
removeHtmlSuffix slug =
|
||||||
|
if String.right 5 slug == ".html" then
|
||||||
|
String.dropRight 5 slug
|
||||||
|
|
||||||
|
else
|
||||||
|
slug
|
||||||
|
|
||||||
|
|
||||||
init : List String -> ( Model, Cmd Msg )
|
init : List String -> ( Model, Cmd Msg )
|
||||||
init pathList =
|
init pathList =
|
||||||
case pathList of
|
case pathList of
|
||||||
[ category, slug, fragment ] ->
|
[ category, slug, fragment ] ->
|
||||||
|
let
|
||||||
|
requestUrl =
|
||||||
|
Base.contentUrlPrefix
|
||||||
|
++ "posts/"
|
||||||
|
++ category
|
||||||
|
++ "/"
|
||||||
|
++ removeHtmlSuffix slug
|
||||||
|
++ ".md"
|
||||||
|
in
|
||||||
( { initialModel
|
( { initialModel
|
||||||
| markdownUrl = Base.contentUrlPrefix ++ "posts/" ++ category ++ "/" ++ slug ++ ".md"
|
| markdownUrl = requestUrl
|
||||||
, fragment = fragment
|
, fragment = fragment
|
||||||
}
|
}
|
||||||
, getMarkdown (Base.contentUrlPrefix ++ "posts/" ++ category ++ "/" ++ slug ++ ".md")
|
, getMarkdown requestUrl
|
||||||
)
|
)
|
||||||
|
|
||||||
[ category, slug ] ->
|
[ category, slug ] ->
|
||||||
|
let
|
||||||
|
requestUrl =
|
||||||
|
Base.contentUrlPrefix
|
||||||
|
++ "posts/"
|
||||||
|
++ category
|
||||||
|
++ "/"
|
||||||
|
++ removeHtmlSuffix slug
|
||||||
|
++ ".md"
|
||||||
|
in
|
||||||
( { initialModel
|
( { initialModel
|
||||||
| markdownUrl = Base.contentUrlPrefix ++ "posts/" ++ category ++ "/" ++ slug ++ ".md"
|
| markdownUrl = requestUrl
|
||||||
}
|
}
|
||||||
, getMarkdown (Base.contentUrlPrefix ++ "posts/" ++ category ++ "/" ++ slug ++ ".md")
|
, getMarkdown requestUrl
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- [ category ] ->
|
||||||
|
-- let
|
||||||
|
-- requestUrl =
|
||||||
|
-- Base.contentUrlPrefix
|
||||||
|
-- ++ "posts/"
|
||||||
|
-- ++ category
|
||||||
|
-- ++ ".md"
|
||||||
|
-- in
|
||||||
|
-- ( { initialModel
|
||||||
|
-- | markdownUrl = requestUrl
|
||||||
|
-- }
|
||||||
|
-- , getMarkdown requestUrl
|
||||||
|
-- )
|
||||||
-- [ "categories" ] ->
|
-- [ "categories" ] ->
|
||||||
-- ( { blog = Nothing
|
-- ( { blog = Nothing
|
||||||
-- , markdownUrl = urlPrefix ++ "/categories" ++ ".md"
|
-- , markdownUrl = urlPrefix ++ "/categories" ++ ".md"
|
||||||
@@ -182,6 +241,11 @@ init pathList =
|
|||||||
_ ->
|
_ ->
|
||||||
( initialModel, Cmd.none )
|
( initialModel, Cmd.none )
|
||||||
|
|
||||||
|
-- badPageError: String -> Cmd Msg
|
||||||
|
-- badPageError url =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getMarkdown : String -> Cmd Msg
|
getMarkdown : String -> Cmd Msg
|
||||||
getMarkdown url =
|
getMarkdown url =
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module Splash exposing (..)
|
module Splash exposing (..)
|
||||||
|
|
||||||
import Html exposing (Html, a, div, i, img, span, text)
|
import Html exposing (Html, a, b, div, i, img, span, text)
|
||||||
import Html.Attributes exposing (alt, class, height, href, src, width)
|
import Html.Attributes exposing (alt, class, height, href, src, width)
|
||||||
|
|
||||||
|
|
||||||
@@ -25,10 +25,10 @@ view model =
|
|||||||
, div [ class "foo-support__message" ] [ model.support_message ]
|
, div [ class "foo-support__message" ] [ model.support_message ]
|
||||||
, div [ class "foo-error__message" ] [ model.error_message ]
|
, div [ class "foo-error__message" ] [ model.error_message ]
|
||||||
, withSpacing (div [ class "foo-support__message" ])
|
, withSpacing (div [ class "foo-support__message" ])
|
||||||
[ a [ href "https://avinal.space/pages/about-me" ] [ text "About me" ]
|
[ a [ href "https://avinal.space/pages/about-me" ] [ b [ class "foo-term-blue" ] [ text "A" ], text "bout" ]
|
||||||
, a [ href "https://avinal.space/posts" ] [ text "Blog" ]
|
, a [ href "https://avinal.space/posts" ] [ b [ class "foo-term-blue" ] [ text "B" ], text "log" ]
|
||||||
, a [ href "https://avinal.space/pages/projects" ] [ text "Projects" ]
|
, a [ href "https://avinal.space/pages/projects" ] [ b [ class "foo-term-blue" ] [ text "P" ], text "rojects" ]
|
||||||
, a [ href "https://gsoc.avinal.space" ] [ text "GSoC" ]
|
, a [ href "https://gsoc.avinal.space" ] [ b [ class "foo-term-blue" ] [ text "G" ], text "SoC" ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@@ -76,7 +76,9 @@ default =
|
|||||||
]
|
]
|
||||||
, error_message =
|
, error_message =
|
||||||
withSpacing (span [])
|
withSpacing (span [])
|
||||||
[ text "I'm Avinal, and I work at Red Hat"
|
[ text "I'm"
|
||||||
|
, b [ class "foo-term-pink" ] [ text "Avinal" ]
|
||||||
|
, text "and I work at Red Hat"
|
||||||
, i [ class "fa-brands fa-redhat foo-term-red" ] []
|
, i [ class "fa-brands fa-redhat foo-term-red" ] []
|
||||||
, text "as an Associate Software Engineer for Hybrid Cloud Engineering."
|
, text "as an Associate Software Engineer for Hybrid Cloud Engineering."
|
||||||
]
|
]
|
||||||
|
|||||||