Making stuff work better, adding a floppy
This commit is contained in:
parent
1d9bc87f1b
commit
7917326214
11 changed files with 261 additions and 32 deletions
23
layouts/partials/elements/floppy.html
Normal file
23
layouts/partials/elements/floppy.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{{ $title := .title | default "" }} {{ $lines := .lines | default (slice "" ""
|
||||
"" "" "") }} {{ $bgColor := .bgColor | default "#1a1a1a" }} {{ $bgColorDark :=
|
||||
.bgColorDark | default "#000000" }}
|
||||
|
||||
<div
|
||||
class="floppy-disk"
|
||||
style="background: linear-gradient(135deg, {{ $bgColor }} 0%, {{ $bgColorDark }} 100%);"
|
||||
>
|
||||
<div class="metal-shutter">
|
||||
<div
|
||||
class="shutter-opening"
|
||||
style="background: linear-gradient(135deg, {{ $bgColor }} 0%, {{ $bgColorDark }} 100%);"
|
||||
></div>
|
||||
</div>
|
||||
<div class="label">
|
||||
<div class="label-header">{{ $title }}</div>
|
||||
<div class="label-lines">
|
||||
{{ range $lines }}
|
||||
<div class="label-line">{{ . }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,18 +1,20 @@
|
|||
{{ $script := .Site.Data.webpack_assets.app }}
|
||||
{{ with $script.js }}
|
||||
<script src="{{ relURL (printf "%s%s" "dist/" .) }}"></script>
|
||||
{{ end }}
|
||||
|
||||
{{/* Terminal Scripts Partial */}}
|
||||
{{/* This compiles all terminal JS files into a single minified bundle */}}
|
||||
{{ $terminal := resources.Get "js/terminal.js" }}
|
||||
{{ $lavalamp := resources.Get "js/lavalamp.js" }}
|
||||
<!-- prettier-ignore -->
|
||||
{{ $terminalShell := resources.Get "js/terminal.js" }}
|
||||
{{ $init := resources.Get "js/init.js" }}
|
||||
{{ $coreCommands := resources.Get "js/commands/core.js" }}
|
||||
{{ $utilityCommands := resources.Get "js/commands/utility.js" }}
|
||||
{{ $navigationCommands := resources.Get "js/commands/navigation.js" }}
|
||||
{{ $customCommands := resources.Get "js/commands/custom.js" }}
|
||||
|
||||
{{ $terminalBundle := slice $terminal $lavalamp $init $coreCommands $utilityCommands $navigationCommands $customCommands | resources.Concat "js/terminal-bundle.js" | resources.Minify | resources.Fingerprint }}
|
||||
|
||||
<script src="{{ $terminalBundle.RelPermalink }}" integrity="{{ $terminalBundle.Data.Integrity }}"></script>
|
||||
{{ $commandFiles := resources.Match "js/commands/*.js" }}
|
||||
{{ $subfolderFiles := resources.Match "js/*/*.js" }}
|
||||
{{ $remaining := resources.Match "js/*.js" }}
|
||||
{{ $filtered := slice }}
|
||||
{{ range $remaining }}
|
||||
{{ $path := .RelPermalink }}
|
||||
{{ if and (not (strings.Contains $path "/terminal.js")) (not (strings.Contains $path "/init.js")) }}
|
||||
{{ $filtered = $filtered | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $allFiles := slice $terminalShell | append $filtered | append $init | append $commandFiles | append $subfolderFiles }}
|
||||
{{ $terminalBundle := $allFiles | resources.Concat "js/terminal-bundle.js" | resources.Minify | resources.Fingerprint }}
|
||||
<!-- prettier-ignore-end -->
|
||||
<script
|
||||
src="{{ $terminalBundle.RelPermalink }}"
|
||||
integrity="{{ $terminalBundle.Data.Integrity }}"
|
||||
></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue