-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "public/css/spectre"] | ||
path = public/css/spectre | ||
url = https://github.com/picturepan2/spectre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// @import "custom-style" | ||
// Import full Spectre source code | ||
@import "spectre/src/spectre" | ||
|
||
body | ||
margin: 0 | ||
background:#0C0D11 | ||
color: white | ||
|
||
|
||
html, body, #ROOT | ||
height: 100% | ||
/* width: 100%;*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import std/os | ||
import sass | ||
|
||
import config as _ | ||
|
||
proc buildCSS*(cssFilename = "style") = | ||
let publicLoc = "public" | ||
var includePaths: seq[string] = @[] | ||
# Check for a styles override. | ||
var hostname = config.hostname | ||
if not dirExists(hostname): | ||
hostname = "localhost.local" | ||
|
||
let dir = getCurrentDir() / hostname / "public" | ||
includePaths.add(dir / "css") | ||
createDir(publicLoc / "images") | ||
let logo = publicLoc / "images" / "logo.png" | ||
removeFile(logo) | ||
createSymlink( | ||
dir / "images" / "logo.png", | ||
logo | ||
) | ||
|
||
let cssLoc = publicLoc / "css" | ||
sass.compileFile( | ||
cssLoc / (cssFilename & ".sass"), | ||
cssLoc / (cssFilename & ".css"), | ||
includePaths=includePaths | ||
) | ||
|
||
when isMainModule: | ||
buildCSS() | ||
echo("CSS Built successfully") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
title "Grado" | ||
appPath "/" | ||
port 8081 | ||
hostname "hostname.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
const | ||
title* {.define.} = "Grado" | ||
appPath* {.define.} = "/" # Path where the app is: https://www.example.com/ or https://www.example.com/app | ||
port* {.define.} = 8081 | ||
import std/os | ||
import kdl, kdl/[decoder] | ||
|
||
type | ||
Config* = object | ||
title*: string | ||
appPath*: string # Path where the app is: https://www.example.com/ or https://www.example.com/app | ||
port*: int | ||
hostname*: string | ||
|
||
const configPath* {.define.} = currentSourcePath.parentDir() / "config.kdl" | ||
const config* = configPath.parseKdlFile().decodeKdl(Config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters