diff options
| author | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-14 22:14:50 +0100 |
|---|---|---|
| committer | Stanisław Zagórowski <hasohasacz@gmail.com> | 2024-01-14 22:14:50 +0100 |
| commit | d5c0555775ac835f75246a17b5e6f3ddc353d82b (patch) | |
| tree | f53f7147e8d5b662f98d7a6815b460134eb3b632 /luax/components | |
| parent | ddf436a9e4deb65dfb0375b52d590a7a253b2084 (diff) | |
all: add dev mode for local testing, fix metadata
Diffstat (limited to 'luax/components')
| -rw-r--r-- | luax/components/project.luax | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/luax/components/project.luax b/luax/components/project.luax index f8d6711..cad844f 100644 --- a/luax/components/project.luax +++ b/luax/components/project.luax @@ -1,15 +1,17 @@ local Carousel = require('components.carousel') +local asset_prefix = reluax.dev_mode and '/assets/' or 'https://cdn.duckonaut.dev/assets/' + function getProjectImageLink(project, image) - return 'https://cdn.duckonaut.dev/assets/' .. project.type .. 's/' .. project.name_normalized .. '/' .. image + return asset_prefix .. project.type .. 's/' .. project.name_normalized .. '/' .. image end function getProjectTechIconLink(tech) - return 'https://cdn.duckonaut.dev/assets/images/' .. tech .. '.png' + return asset_prefix .. 'images/' .. tech .. '.png' end function getProjectTargetIconLink(target) - return 'https://cdn.duckonaut.dev/assets/images/' .. target .. '.png' + return asset_prefix .. 'images/' .. target .. '.png' end return function (props) |
