WIP books
This commit is contained in:
1 parent
1ab9c3af46
commit
2e9a9155f8
14 files changed
+79
-5
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
- Book by rivercon from the Noun Project
|
||||||
|
- [Git logo](https://git-scm.com/downloads/logos) by Jason Long
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<books>
|
||||||
|
<book>
|
||||||
|
<date>2019-05-28</date>
|
||||||
|
<title>Uppo-Nallen talviturkki</title>
|
||||||
|
<status>read</status>
|
||||||
|
</book>
|
||||||
|
</books>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: Uppo-Nalle ja Nukku-Ukko
|
||||||
|
status: reading
|
||||||
|
---
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
title: The Fractal Prince
|
||||||
|
status: reading
|
||||||
|
---
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
title: Uppo-Nalle ja Nukku-Ukko
|
||||||
|
status: reading
|
||||||
|
---
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: Uppo-Nallen talviturkki
|
||||||
|
status: read
|
||||||
|
---
|
||||||
|
|
||||||
@@ -51,6 +51,15 @@ article .header {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 2.4rem;
|
||||||
|
height: 2.4rem;
|
||||||
|
display: inline-flex;
|
||||||
|
align-self: center;
|
||||||
|
top: .40em;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 319px) {
|
@media (max-width: 319px) {
|
||||||
body {
|
body {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<svg id="read" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 56 70" style="enable-background:new 0 0 56 56;" xml:space="preserve"><path d="M48.2026367,4.003418c0-0.5522461-0.4477539-1-1-1H17.7766724C17.7706909,3.0032959,17.7657471,3,17.7597656,3 s-0.0109253,0.0032959-0.0169067,0.003418h-4.8380737c-2.8188477,0-5.1118164,2.4799805-5.1118164,5.5288086v38.4257812 c0,0.0093994,0.005127,0.0172119,0.0053711,0.0265503C7.8088379,50.3031616,10.303833,53,13.3701172,53h33.8369141 c0.3862305,0,0.737793-0.2226562,0.9033203-0.5712891c0.1655273-0.3491211,0.1152344-0.762207-0.1289062-1.0615234 c-2.0512695-2.5102539-2.0512695-6.296875,0-8.8071289c0.2003784-0.2456665,0.262085-0.5665894,0.1891479-0.8672485 c0.0089111-0.053772,0.0320435-0.102356,0.0320435-0.1586304V4.003418z M46.2026367,40.9272461H18.7597656V5.003418h27.4428711 V40.9272461z M12.9047852,5.003418h3.8549805v35.9238281h-3.3896484c-1.3610229,0-2.6083374,0.5328979-3.5771484,1.4140625 V8.5322266C9.7929688,6.5864258,11.1889648,5.003418,12.9047852,5.003418z M45.3833008,51H13.3701172 c-1.9702148,0-3.5727539-1.8105469-3.5727539-4.0361328s1.6025391-4.0366211,3.5727539-4.0366211h32.0131836 C44.1420898,45.4414062,44.1420898,48.4858398,45.3833008,51z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 56 70" style="enable-background:new 0 0 56 56;" xml:space="preserve"><path d="M46.0263672,10.9296875C39.4441528,7.4506836,34.5049438,7.3789062,28,10.6948242 c-6.5049438-3.315918-11.4441528-3.2441406-18.0263672,0.2348633c-0.328125,0.1728516-0.5332031,0.5126953-0.5332031,0.8837891 v1.6257324l-4.8798828,2.3859863C4.2177734,15.9931641,4,16.3417969,4,16.7236328v26.875c0,0.5527344,0.4472656,1,1,1h17.0800781 v2.1601562c0,0.5527344,0.4472656,1,1,1h9.8398438c0.5527344,0,1-0.4472656,1-1v-2.1601562H51c0.5527344,0,1-0.4472656,1-1v-26.875 c0-0.3818359-0.2177734-0.7304688-0.5605469-0.8984375l-4.8798828-2.3859863v-1.6257324 C46.5595703,11.4423828,46.3544922,11.1025391,46.0263672,10.9296875z M44.5595703,12.421875v1.6416016v23.1875 c-0.3563843-0.1656494-0.7080078-0.3197021-1.0560913-0.4641113c-0.1212158-0.0501709-0.2399292-0.0928955-0.3601685-0.140625 c-0.2258911-0.0894775-0.4522705-0.1799316-0.6752319-0.260376c-0.1391602-0.0501709-0.2761841-0.0927734-0.4143066-0.1395264 c-0.2006836-0.067627-0.4017944-0.1367188-0.6004639-0.1970215c-0.1452637-0.0441895-0.2890015-0.0812988-0.4333496-0.1213379 c-0.189209-0.0526123-0.3788452-0.105957-0.5665894-0.1516113c-0.1471558-0.0358887-0.2932739-0.0654297-0.4396362-0.0969238 c-0.1829224-0.0395508-0.3660889-0.0791016-0.5479126-0.1120605c-0.1466064-0.0263672-0.2927856-0.0476074-0.4388428-0.0698242 c-0.180542-0.0273438-0.361145-0.0539551-0.5409546-0.0749512c-0.1461792-0.0168457-0.2922363-0.0294189-0.4380493-0.0419922 c-0.1781616-0.0153809-0.3564453-0.0292969-0.5342407-0.0380859c-0.1460571-0.0073242-0.2923584-0.0112305-0.4382935-0.0141602 c-0.1779785-0.0036621-0.3562622-0.0046387-0.5342407-0.0018311c-0.1450806,0.0023193-0.2904663,0.0072021-0.43573,0.0140381 c-0.1791382,0.0081787-0.3587646,0.0197754-0.538269,0.034668c-0.144043,0.0119629-0.2884521,0.0253906-0.4328613,0.0415039 c-0.1819458,0.0205078-0.364502,0.045166-0.5471191,0.0722656c-0.1434937,0.0212402-0.2873535,0.0432129-0.4314575,0.0686035 c-0.1846313,0.0325928-0.3702393,0.0705566-0.5559082,0.1098633c-0.1433716,0.0303955-0.2869263,0.0605469-0.4310913,0.0949707 c-0.18927,0.0454102-0.3799438,0.0969238-0.5706787,0.1491699c-0.1428833,0.0393066-0.2856445,0.0770264-0.4295044,0.1201172 c-0.1956787,0.0588379-0.3935547,0.1246338-0.5911865,0.1905518c-0.1411133,0.0471191-0.2817383,0.0919189-0.4239502,0.1427002 c-0.203125,0.0726318-0.4089966,0.1533203-0.614563,0.2333984c-0.1412964,0.0550537-0.2816162,0.1069336-0.4240723,0.1655273 c-0.2120361,0.0874023-0.4275513,0.1837158-0.6425781,0.2789307c-0.1389771,0.0615234-0.2763062,0.1187744-0.416626,0.1835938 C29.0368652,37.2351074,29.0187378,37.2421875,29,37.2509766V12.421875 C34.7509766,9.5048828,38.8105469,9.5048828,44.5595703,12.421875z M11.4404297,12.421875 c5.7490234-2.9160156,9.8105469-2.9169922,15.5595703,0v24.8291016c-0.0186768-0.008667-0.0367432-0.0158691-0.0554199-0.0244141 c-0.1434326-0.0662842-0.2839966-0.125-0.4260254-0.1877441c-0.2108154-0.0932617-0.4223022-0.1878662-0.630249-0.2734375 c-0.1515503-0.0625-0.3007202-0.1176758-0.4508667-0.1760254c-0.1947632-0.0756836-0.3900757-0.1523438-0.5827026-0.2213135 c-0.1536865-0.0549316-0.305603-0.1035156-0.4579468-0.1541748c-0.1860352-0.0617676-0.3723755-0.1240234-0.5567017-0.1793213 c-0.1543579-0.0463867-0.3076172-0.0870361-0.4608765-0.1289062c-0.1793823-0.0489502-0.3589478-0.0975342-0.5369873-0.1402588 c-0.1547241-0.0371094-0.3088379-0.0695801-0.4627075-0.1020508c-0.1745605-0.0368652-0.3491211-0.0725098-0.5227661-0.1032715 c-0.1547241-0.0275879-0.309082-0.0510254-0.4631348-0.0737305c-0.1713257-0.0251465-0.3426514-0.0483398-0.5133667-0.067627 c-0.1546021-0.0174561-0.3092041-0.0319824-0.4634399-0.0444336c-0.1691895-0.013916-0.338501-0.0249023-0.5073853-0.0327148 c-0.1547852-0.0073242-0.3096924-0.0126953-0.4643555-0.0150146c-0.0750732-0.0010986-0.1502686-0.0072021-0.2253418-0.0072021 c-0.0930786,0-0.1862793,0.0072021-0.2793579,0.0090332c-0.154541,0.0029297-0.3094482,0.006958-0.4641724,0.0148926 c-0.1696167,0.0085449-0.3395996,0.0218506-0.5095215,0.036377c-0.1533203,0.0130615-0.3069458,0.0263672-0.4606323,0.0441895 c-0.1726685,0.0201416-0.3461304,0.0458984-0.5194702,0.0720215c-0.1520386,0.0229492-0.3040771,0.0449219-0.4567261,0.0725098 c-0.1773682,0.0321045-0.355957,0.0708008-0.5343628,0.1091309c-0.1501465,0.0323486-0.3001709,0.0627441-0.4511719,0.0996094 c-0.1853638,0.0450439-0.3726196,0.0979004-0.5594482,0.1496582c-0.1459351,0.0405273-0.2911987,0.0780029-0.4381104,0.1225586 c-0.197937,0.0600586-0.3983765,0.1289062-0.5983276,0.1965332c-0.1390381,0.046875-0.2769775,0.0897217-0.4171143,0.1403809 c-0.2238159,0.0806885-0.4509888,0.1715088-0.6777344,0.2613525c-0.1189575,0.0472412-0.2362061,0.0892334-0.3560181,0.138916 c-0.3483887,0.1444092-0.7004395,0.2987061-1.0571289,0.4644775v-23.1875V12.421875z M50,17.3476562v25.2509766H32.9199219 c-0.5527344,0-1,0.4472656-1,1v2.1601562h-7.8398438v-2.1601562c0-0Line truncated
|
||||||
|
After Width: | Height: | Size: 6.8 KiB |
+5
-4
@@ -6,10 +6,11 @@ let
|
|||||||
shell = pkgs.buildEnv {
|
shell = pkgs.buildEnv {
|
||||||
name = "site-shell";
|
name = "site-shell";
|
||||||
paths = [];
|
paths = [];
|
||||||
buildInputs = [
|
buildInputs = with haskellPackages; [
|
||||||
haskellPackages.ghcid
|
ghcid
|
||||||
haskellPackages.hasktags
|
hasktags
|
||||||
(haskellPackages.ghcWithHoogle (h: site.buildInputs ++ site.propagatedBuildInputs))
|
cabal-install
|
||||||
|
(ghcWithHoogle (h: site.buildInputs ++ site.propagatedBuildInputs))
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,5 +12,8 @@ executable site
|
|||||||
build-depends: base == 4.*
|
build-depends: base == 4.*
|
||||||
, hakyll >= 4.10
|
, hakyll >= 4.10
|
||||||
, time
|
, time
|
||||||
|
, xml-conduit
|
||||||
|
, xml-lens
|
||||||
|
, lens
|
||||||
ghc-options: -threaded
|
ghc-options: -threaded
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
@@ -5,6 +5,10 @@ import Hakyll
|
|||||||
import Data.List (sortBy, sortOn)
|
import Data.List (sortBy, sortOn)
|
||||||
import Data.Time (formatTime, defaultTimeLocale)
|
import Data.Time (formatTime, defaultTimeLocale)
|
||||||
|
|
||||||
|
data Book =
|
||||||
|
Book { title :: String
|
||||||
|
, date :: Day
|
||||||
|
, status :: String }
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
@@ -31,6 +35,13 @@ main = hakyllWith defaultConfiguration{ deployCommand = "ipfs add -Q -r _site" }
|
|||||||
>>= loadAndApplyTemplate "templates/default.html" defaultContext
|
>>= loadAndApplyTemplate "templates/default.html" defaultContext
|
||||||
>>= relativizeUrls
|
>>= relativizeUrls
|
||||||
|
|
||||||
|
match "books/*" $ do
|
||||||
|
route $ setExtension "html"
|
||||||
|
compile $ pandocCompiler
|
||||||
|
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||||
|
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||||
|
>>= relativizeUrls
|
||||||
|
|
||||||
match "posts/incomplete/*" $ do
|
match "posts/incomplete/*" $ do
|
||||||
route $ setExtension "html"
|
route $ setExtension "html"
|
||||||
compile $ pandocCompiler
|
compile $ pandocCompiler
|
||||||
@@ -52,6 +63,18 @@ main = hakyllWith defaultConfiguration{ deployCommand = "ipfs add -Q -r _site" }
|
|||||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||||
>>= relativizeUrls
|
>>= relativizeUrls
|
||||||
|
|
||||||
|
create ["books.html"] $ do
|
||||||
|
route idRoute
|
||||||
|
compile $ do
|
||||||
|
books <- reverse <$> loadAll "books/*"
|
||||||
|
let ctx = listField "books" postCtx (pure books) <>
|
||||||
|
constField "title" "Books" <>
|
||||||
|
defaultContext
|
||||||
|
makeItem ""
|
||||||
|
>>= loadAndApplyTemplate "templates/books.html" ctx
|
||||||
|
>>= loadAndApplyTemplate "templates/default.html" ctx
|
||||||
|
>>= relativizeUrls
|
||||||
|
|
||||||
create ["guides.html"] $ do
|
create ["guides.html"] $ do
|
||||||
route idRoute
|
route idRoute
|
||||||
compile $ do
|
compile $ do
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
A collection of books I have read lately.
|
||||||
|
|
||||||
|
<ul class="books">
|
||||||
|
$for(books)$
|
||||||
|
<li>
|
||||||
|
<img src="/images/book_$status$.svg" class="icon" /><a href="$url$">$title$</a> - $date$
|
||||||
|
</li>
|
||||||
|
$endfor$
|
||||||
|
</ul>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
Site proudly generated by
|
Site proudly generated by
|
||||||
<a href="http://jaspervdj.be/hakyll">Hakyll</a>
|
<a href="http://jaspervdj.be/hakyll">Hakyll</a><br />
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in new issue
Block a user