Skip to content

MarelisAdlatus/marelis.cz

Repository files navigation

The home page for creative people with Laravel

The intention is to offer a gradual building of my own website.

This project runs with Laravel version 11

Content

What is done and works
Maybe in the future
Structure of content and views
Script for exporting 3D files to GLB format
Releases
Used libraries
Used services
License

What is done and works

  • New Laravel project
  • Support for VS Code editor
  • Environment setup and scaffolding
  • Google font replacement
  • Bootstrap icons
  • Language switching and basic welcome
  • Website layout with jQuery and SweetAlert2
  • Modal contact form with sending to email
  • QR code with a link to an external page
  • Content management and view translations
  • Diagrams, graphs, tables, 3D views
  • Translation of contact emails
  • Reporting software (error, help, other)
  • Syntax highlighting with copy button

Maybe in the future

  • User login and registration
  • User verification and password change by email
  • User's time zone at registration
  • User's language during registration and login
  • Advanced user profile with avatar image
  • User roles and permissions
  • Upgrade laravel/framework to the latest version

Structure of content and views

A settings file determines which versions of views are displayed

cat config/settings.php
<?php

return [

    'admin_email' => '[email protected]',

    'available_locales' => array('en', 'cs'),

    'software' => [

        'software-1' => [
            'show_version' => 'v1',
        ],
    ],

    'hardware' => [

        'hardware-1' => [
            'show_version' => 'v1',
        ],
    ],

    'model' => [

        'model-1' => [
            'show_version' => 'v1',
        ],
    ],

    'project' => [

        'project-1' => [
            'show_version' => 'v1',
        ],
    ],
];

The structure of views

resources/views
├── cs
│   ├── hardware
│   │   └── hardware-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── circuit-board.blade.php
│   │           │   ├── construction.blade.php
│   │           │   ├── diagram.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── parts.blade.php
│   │           │   ├── progress.blade.php
│   │           │   └── related.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   ├── model
│   │   └── model-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── accessories.blade.php
│   │           │   ├── construction.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── print.blade.php
│   │           │   ├── progress.blade.php
│   │           │   └── related.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   ├── project
│   │   └── project-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── cooperation.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── progress.blade.php
│   │           │   ├── related.blade.php
│   │           │   └── resources.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   ├── software
│   │   └── software-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── feature.blade.php
│   │           │   ├── install.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── privacy.blade.php
│   │           │   ├── progress.blade.php
│   │           │   ├── related.blade.php
│   │           │   └── usage.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   └── welcome.blade.php
├── en
│   ├── hardware
│   │   └── hardware-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── circuit-board.blade.php
│   │           │   ├── construction.blade.php
│   │           │   ├── diagram.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── parts.blade.php
│   │           │   ├── progress.blade.php
│   │           │   └── related.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   ├── model
│   │   └── model-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── accessories.blade.php
│   │           │   ├── construction.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── print.blade.php
│   │           │   ├── progress.blade.php
│   │           │   └── related.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   ├── project
│   │   └── project-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── cooperation.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── progress.blade.php
│   │           │   ├── related.blade.php
│   │           │   └── resources.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   ├── software
│   │   └── software-1
│   │       └── v1
│   │           ├── content
│   │           │   ├── about.blade.php
│   │           │   ├── download.blade.php
│   │           │   ├── feature.blade.php
│   │           │   ├── install.blade.php
│   │           │   ├── license.blade.php
│   │           │   ├── privacy.blade.php
│   │           │   ├── progress.blade.php
│   │           │   ├── related.blade.php
│   │           │   └── usage.blade.php
│   │           ├── index.blade.php
│   │           └── preview.blade.php
│   └── welcome.blade.php
├── layouts
│   └── app.blade.php
└── mail
    └── contact-mail.blade.php

Directory structure with files for content

storage/app/public
└── content
    ├── hardware
    │   └── hardware-1
    │       └── v1
    ├── model
    │   └── model-1
    │       └── v1
    ├── project
    │   └── project-1
    │       └── v1
    └── software
        └── software-1
            └── v1

Script for exporting 3D files to GLB format

  • The script runs on a Linux system, the condition is that the Blender application is installed (at least version 4.1.0).

  • The script consists of two parts, the first is in bash, the second is in python. The part with the bash script starts.

  • Supported 3D file formats for export: ABC, BLEND, DAE, FBX, OBJ, PLY, STL, USD, USDA, USDC, WRL, X3D.

The first action is cleanup, which is the removal of older GLB files from the selected folder.

./export-glb.sh
Action ? (* ... local)
1) Clean
2) Export
3) Quit
#? 1
Selected action 'Clean'
Content Type ?
1) model
2) project
3) hardware
4) software
#? 1
Selected content type 'model'
Content Name ?
1) model-1
#? 1
Selected content name 'model-1'
Content Version ?
1) v1
#? 1
Selected content version 'v1'
Clean ...
removed 'public/content/model/model-1/v1/smilling-baby-groot.glb'
removed 'public/content/model/model-1/v1/glasses-3d.glb'
removed 'public/content/model/model-1/v1/yoda-bust.glb'

The second action is export, which is the conversion of 3D files in the selected folder to GLB format.

./export-glb.sh
Action ? (* ... local)
1) Clean
2) Export
3) Quit
#? 2
Selected action 'Export'
Content Type ?
1) model
2) project
3) hardware
4) software
#? 1
Selected content type 'model'
Content Name ?
1) model-1
#? 1
Selected content name 'model-1'
Content Version ?
1) v1
#? 1
Selected content version 'v1'
Export ...
Blender 4.1.0 (hash 40a5e739e270 built 2024-03-26 00:31:19)
Converting: 'yoda-bust.stl'
Import finished in 2.4188 sec.
Export: 'public/content/model/model-1/v1/yoda-bust.glb'
02:09:34 | INFO: Draco mesh compression is available, use library at /snap/blender/4697/4.1/python/lib/python3.11/site-packages/libextern_draco.so
02:09:35 | INFO: Starting glTF 2.0 export
02:09:35 | INFO: Extracting primitive: yoda-bust
02:09:36 | INFO: Primitives created: 1
02:09:36 | INFO: Draco encoder: Encoding mesh yoda-bust.
DracoEncoder | Preserve triangle order: no
DracoEncoder | Encoded 1756121 vertices, 1842681 indices, raw size: 49487844, encoded size: 7761259, compression ratio: 6.38
02:09:37 | INFO: Finished glTF 2.0 export in 2.4606785774230957 s

Converting: 'smilling-baby-groot.stl'
Import finished in 6.9972 sec.
Export: 'public/content/model/model-1/v1/smilling-baby-groot.glb'
02:09:46 | INFO: Draco mesh compression is available, use library at /snap/blender/4697/4.1/python/lib/python3.11/site-packages/libextern_draco.so
02:09:46 | INFO: Starting glTF 2.0 export
02:09:46 | INFO: Extracting primitive: smilling-baby-groot
02:09:47 | INFO: Primitives created: 1
02:09:47 | INFO: Draco encoder: Encoding mesh smilling-baby-groot.
DracoEncoder | Preserve triangle order: no
DracoEncoder | Encoded 2453952 vertices, 2464008 indices, raw size: 68745960, encoded size: 9032993, compression ratio: 7.61
02:09:48 | INFO: Finished glTF 2.0 export in 2.236790418624878 s


Blender quit

Releases

✅ Release v0.3

  • Content management and view translations
  • Diagrams, graphs, tables, 3D views

https://github.com/MarelisAdlatus/web-marelis/releases/tag/v0.3

✅ Release v0.2

  • Modal contact form with sending to email
  • QR code with a link to an external page

https://github.com/MarelisAdlatus/web-marelis/releases/tag/v0.2

✅ Release v0.1

  • Basic website layout with dialogs for external links

https://github.com/MarelisAdlatus/web-marelis/releases/tag/v0.1

Used libraries

Used services

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the LICENSE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

⬆️ Back to top