diff --git a/README.md b/README.md index 373e285..94675cd 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,14 @@ To build and run this site localy: $ hugo mod tidy # install dependencies -$ hugo mod npm pack +$ # hugo mod npm pack $ npm install $ hugo server + +# or + +$ hugo server --disableFastRender ``` diff --git a/assets/jsconfig.json b/assets/jsconfig.json index 56dd41f..2ef48fa 100644 --- a/assets/jsconfig.json +++ b/assets/jsconfig.json @@ -3,7 +3,7 @@ "baseUrl": ".", "paths": { "*": [ - "../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.6.0/assets/*" + "../../../home/node/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.6.0/assets/*" ] } } diff --git a/layouts/partials/sections/home.html b/layouts/partials/sections/home.html index b3e196f..cd06d95 100644 --- a/layouts/partials/sections/home.html +++ b/layouts/partials/sections/home.html @@ -10,13 +10,6 @@ {{ $sections = (index site.Data site.Language.Lang).sections }} {{ end }} -{{/* TODO: Create a transparent background-image, or allow for it to not exist */}} -{{ $backgroundImage:= "/images/site/empty-background.jpg" }} -{{ if $project.backgroundImage }} - {{ $backgroundImage = $project.backgroundImage }} -{{ end }} - - {{ $projectLogo:= "/images/default-avatar.png" }} {{ if $project.logo.main }} {{ $projectLogo = $project.logo.main }} @@ -27,79 +20,11 @@ {{ if and $projectLogo (and (ne $projectLogo.MediaType.SubType "svg") ( ne $projectLogo.MediaType.SubType "gif")) }} {{ $projectLogo = $projectLogo.Fit "148x148" }} {{ end }} -{{/* get file that matches the filename as specified as src="" in shortcode */}} -{{ $src := resources.Get $backgroundImage }} - -{{/* set image sizes, these are hardcoded for now, x dictates that images are resized to this width */}} - -{{ $tinyw := default "500x" }} -{{ $smallw := default "800x" }} -{{ $mediumw := default "1200x" }} -{{ $largew := default "1500x" }} - -{{/* resize the src image to the given sizes */}} - -{{ $tiny := $src.Resize $tinyw }} -{{ $small := $src.Resize $smallw }} -{{ $medium := $src.Resize $mediumw }} -{{ $large := $src.Resize $largew }} - -{{/* only use images smaller than or equal to the src (original) image size, as Hugo will upscale small images */}} -{{/* set the sizes attribute to (min-width: 35em) 1200px, 100vw unless overridden in shortcode */}} - -{{ if lt $src.Width "500" }} - {{ $tiny := $src}} - {{ $small := $src}} - {{ $medium := $src}} - {{ $large := $src}} -{{ end }} - -{{ if lt $src.Width "800" }} - {{ $small := $src}} - {{ $medium := $src}} - {{ $large := $src}} -{{ end }} - -{{ if lt $src.Width "1200" }} - {{ $medium := $src}} - {{ $large := $src}} -{{ end }} - -{{ if lt $src.Width "1500" }} - {{ $large := $src}} -{{ end }}
-
diff --git a/layouts/partials/sections/intro.html b/layouts/partials/sections/intro.html index b686f93..cbe0a26 100644 --- a/layouts/partials/sections/intro.html +++ b/layouts/partials/sections/intro.html @@ -11,105 +11,8 @@ {{ $sections = (index site.Data site.Language.Lang).sections }} {{ end }} -{{/* TODO: Create a transparent background-image, or allow for it to not exist */}} -{{ $backgroundImage:= "/images/site/empty-background.jpg" }} -{{ if $project.backgroundImage }} -{{ $backgroundImage = $project.backgroundImage }} -{{ end }} - - -{{ $projectLogo:= "/images/default-avatar.png" }} -{{ if $project.logo.main }} -{{ $projectLogo = $project.logo.main }} -{{ end }} -{{ $projectLogo := resources.Get $projectLogo }} - -{{/* apply image processing. don't use "Fit" in svg or gif because its not supported */}} -{{ if and $projectLogo (and (ne $projectLogo.MediaType.SubType "svg") ( ne $projectLogo.MediaType.SubType "gif")) }} -{{ $projectLogo = $projectLogo.Fit "148x148" }} -{{ end }} -{{/* get file that matches the filename as specified as src="" in shortcode */}} -{{ $src := resources.Get $backgroundImage }} - -{{/* set image sizes, these are hardcoded for now, x dictates that images are resized to this width */}} - -{{ $tinyw := default "500x" }} -{{ $smallw := default "800x" }} -{{ $mediumw := default "1200x" }} -{{ $largew := default "1500x" }} - -{{/* resize the src image to the given sizes */}} - -{{ $tiny := $src.Resize $tinyw }} -{{ $small := $src.Resize $smallw }} -{{ $medium := $src.Resize $mediumw }} -{{ $large := $src.Resize $largew }} - -{{/* only use images smaller than or equal to the src (original) image size, as Hugo will upscale small images */}} -{{/* set the sizes attribute to (min-width: 35em) 1200px, 100vw unless overridden in shortcode */}} - -{{ if lt $src.Width "500" }} -{{ $tiny := $src}} -{{ $small := $src}} -{{ $medium := $src}} -{{ $large := $src}} -{{ end }} - -{{ if lt $src.Width "800" }} -{{ $small := $src}} -{{ $medium := $src}} -{{ $large := $src}} -{{ end }} - -{{ if lt $src.Width "1200" }} -{{ $medium := $src}} -{{ $large := $src}} -{{ end }} - -{{ if lt $src.Width "1500" }} -{{ $large := $src}} -{{ end }} -