Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
start with creating new generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed May 9, 2022
1 parent 9f40674 commit f7ab1d6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"fornax": {
"version": "0.14.1",
"version": "0.14.3",
"commands": [
"fornax"
]
Expand Down
Binary file modified src/_lib/Fornax.Core.dll
Binary file not shown.
43 changes: 29 additions & 14 deletions src/generators/layout.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,13 @@ let layout (ctx : SiteContents) active bodyCnt =
link [Rel "stylesheet"; Href "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"]
link [Rel "stylesheet"; Href "https://fonts.googleapis.com/css?family=Open+Sans"]
link [Rel "stylesheet"; Type "text/css"; Href "/style/style.css"]
link [Rel "stylesheet"; Type "text/css"; Href "https://cdn.jsdelivr.net/npm/@creativebulma/bulma-collapsible@1.0.4/dist/css/bulma-collapsible.min.css"]
// link [Rel "stylesheet"; Type "text/css"; Href "https://cdn.jsdelivr.net/npm/@creativebulma/bulma-collapsible@1.0.4/dist/css/bulma-collapsible.min.css"]
link [Rel "stylesheet"; Href "https://unpkg.com/bulma@0.8.0/css/bulma.min.css"]
script [ Type "module"; Src "/js/bundle.js"] []
style [] [
!! """
body {
margin: 0px;
color: red !important;
}
nfdi-navbar, nfdi-footer, nfdi-toc, nfdi-body {
--element-background-color: black;
--element-text-color: white;
--link-color: #4FB3D9;
--link-hover-color: #84cae4;
--header-color: white;
--outside-background-color: #191919;
--accent-text-color: #1FC2A7
}
thead tr th, strong {
Expand All @@ -84,16 +74,41 @@ let layout (ctx : SiteContents) active bodyCnt =
a:hover {
color: var(--link-hover-color, #3A3A3A) !important;
}
thead {
font-size: 1.2rem;
}
"""
// nfdi-navbar, nfdi-footer, nfdi-toc, nfdi-body {
// --element-background-color: black;
// --element-text-color: white;
// --link-color: #4FB3D9;
// --link-hover-color: #84cae4;
// --header-color: white;
// --outside-background-color: #191919;
// --accent-text-color: #1FC2A7
// }


]

]
custom "nfdi-navbar" [] []
body [] [
custom "nfdi-navbar" [] []
nav [Class "navbar"] [
div [Class "container"] [
div [Class "navbar-brand"] [
a [Class "navbar-item"; Href "/"] [
img [Src "/images/bulma.png"; Alt "Logo"]
]
span [Class "navbar-burger burger"; HtmlProperties.Custom ("data-target", "navbarMenu")] [
span [] []
span [] []
span [] []
]
]
div [Id "navbarMenu"; Class "navbar-menu"] menuEntries
]
]
yield! bodyCnt
custom "nfdi-footer" [] []
]
Expand Down
3 changes: 3 additions & 0 deletions src/loaders/postloader.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ let isSeparator (input : string) =
let isSummarySeparator (input: string) =
input.Contains "<!--more-->"

// Parse over line to find area between "---". Parse input, very simple by separating by ":"

///`fileContent` - content of page to parse. Usually whole content of `.md` file
///returns content of config that should be used for the page
Expand Down Expand Up @@ -61,6 +62,8 @@ let getContent (fileContent : string) =
let indexOfSeperator = fileContent |> Array.findIndex isSeparator
let _, content = fileContent |> Array.splitAt indexOfSeperator

// check for <!--more--> separator in content, and add everything after to "extend area in page". (when you click on the header)

let summary, content =
match content |> Array.tryFindIndex isSummarySeparator with
| Some indexOfSummary ->
Expand Down
2 changes: 2 additions & 0 deletions src/posts/post6.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: post
title: Paging
author: @k_cieslak
published: 2020-05-01
tags: testing, documentation
---
# Paging

Expand All @@ -13,3 +14,4 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nisi diam, vehicu
In est nulla, ornare vitae elit sed, consequat sollicitudin dui. Duis posuere nulla malesuada elit volutpat ultricies. Mauris et tellus tortor. In ligula elit, pellentesque eget est et, mattis rhoncus nisl. Sed orci ex, mollis quis justo eu, dapibus tincidunt turpis. Sed rhoncus odio non lacus ullamcorper volutpat. Suspendisse blandit ullamcorper condimentum. Quisque et viverra nisi. Vivamus in mollis nulla. Nulla faucibus sed ligula et blandit.

Vivamus nec libero faucibus, cursus ex et, consequat mauris. Pellentesque commodo ullamcorper vestibulum. Donec efficitur, ipsum et dapibus varius, purus mauris gravida augue, eu mattis lorem turpis eget dui. Curabitur nibh erat, posuere sed eros a, blandit venenatis risus. Vestibulum cursus imperdiet ultrices. In eu efficitur dui, eget tempus enim. Nunc imperdiet, enim et sagittis lacinia, lacus metus eleifend purus, blandit pellentesque leo ante ac velit. Nam ac sagittis est. Cras accumsan, odio vel lacinia mollis, metus tortor malesuada nisi, et consectetur neque quam in erat. Sed ultricies aliquam hendrerit. Etiam non aliquam ipsum, id rutrum magna. Morbi id tincidunt mauris. Vestibulum nec iaculis massa. Etiam fringilla, orci quis faucibus vulputate, risus nibh finibus nisl, et vehicula ipsum leo a tortor. Curabitur mauris elit, bibendum vitae velit at, dignissim ornare arcu.

0 comments on commit f7ab1d6

Please sign in to comment.