Skip to content

Commit

Permalink
Code & Features Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nathaneltitane committed Apr 28, 2024
1 parent de7f89d commit 8291d57
Show file tree
Hide file tree
Showing 13 changed files with 215 additions and 4 deletions.
1 change: 1 addition & 0 deletions css/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

.colors {
aspect-ratio: 1/1;
border-radius: 10px 10px 10px 10px;
margin: 10px 10px 10px 10px;
padding: 0px 0px 0px 0px;
}
Expand Down
1 change: 1 addition & 0 deletions css/container.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.container {
background-color: #ccccccff;
border-radius: 20px 20px 20px 20px;
margin: 10px 10px 10px 10px;
padding: 10px 10px 10px 10px;
}
Expand Down
1 change: 1 addition & 0 deletions css/copyright.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.copyright{
background: #ccccccff;
border-radius: 20px 20px 0px 0px;
height: auto;
}

1 change: 1 addition & 0 deletions css/footer.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#footer {
background: #aaaaaa;
border-radius: 20px 20px 0px 0px;
height: 80px;
width: auto;
position: fixed;
Expand Down
4 changes: 2 additions & 2 deletions css/mode.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
.mode:hover {
background: #bbbbbbff;
border: 0px solid #00000000;
border-radius: 10px 0px 10px 10px;
border-radius: 20px 0px 20px 20px;
}

.mode:hover::before {
Expand All @@ -65,7 +65,7 @@

.mode:hover > .mode-image {
background: #ccccccff;
border-radius: 5px;
border-radius: 10px;
margin: 0px 0px 0px 0px;
padding: 10px 10px 10px 10px;
}
Expand Down
12 changes: 11 additions & 1 deletion javascript/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,22 @@ $( document ).ready ( function ( ) {
}
};

$( '#color' ).hover ( function ( event ) {
$( '.color' ).click ( function ( event ) {

show ( );

} );

$( '#colors' ).click ( function ( event ) {

if ( colors.hasClass ( 'colors-show' ) ) {

hide ( );

}

} );

$( '.colors' ).click ( function ( event ) {

var color = $ ( this ).data ( 'value' );
Expand Down
67 changes: 66 additions & 1 deletion legolinux-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ script=$(basename -- "${BASH_SOURCE[0]}")

# version //////////////////////////////////////////////////////////////////////

version="03-09-2024"
version="04-28-2024"

# usage ////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -109,6 +109,8 @@ do

flat_directory="${render_directory}"/flat

overlay_directory="${render_directory}"/overlay

thumbnail_directory="${render_directory}"/thumbnail

# define model specific directories
Expand Down Expand Up @@ -2005,6 +2007,69 @@ cat << 3D-MODEL-PAGE-SAMPLES ->> "${model_directory}/index.html"
3D-MODEL-PAGE-SAMPLES

if [[ -f "${model_directory}"/modes ]]
then
# set IFS

IFS=$'\n'

model_modes_list=($(cat "${model_directory}"/modes))

cat << 3D-MODEL-MODES ->> "${model_directory}/index.html"
<!-- modes -->
<div id="modes">
<div class="flex flex-column flex-middle flex-around">
3D-MODEL-MODES

for model_mode in ${model_modes_list[@]}
do
model_mode_suffix=${model_directory##*-}

model_mode_suffix_length=${#model_mode_suffix}

model_mode_base_label=${model_directory::-${model_mode_suffix_length}}

model_mode_path_label="${model_mode_base_label}${model_mode}"

model_mode_label=${model_mode^^}

cat << 3D-MODEL-MODES ->> "${model_directory}/index.html"
<div class="flex-cell mode">
<a class="mode-image" href="/${model_mode_path_label}"/>
<img src="/${model_mode_path_label}/renders/overlay/overlay.png"/>
<div class="flex-cell text-center text-bold">
// ${model_mode_label} MODE //
</div>
</a>
</div>
3D-MODEL-MODES

done

cat << 3D-MODEL-MODES ->> "${model_directory}/index.html"
</div>
</div>
3D-MODEL-MODES

# unset IFS

IFS=''

fi

cat << 3D-MODEL-PAGE-HELPER ->> "${model_directory}/index.html"
<!-- helper -->
Expand Down
42 changes: 42 additions & 0 deletions models/veritechs/afc-01z-legioss-battroid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,48 @@

</div>

<!-- modes -->

<div id="modes">

<div class="flex flex-column flex-middle flex-around">

<div class="flex-cell mode">

<a class="mode-image" href="/models/veritechs/afc-01z-legioss-fighter"/>

<img src="/models/veritechs/afc-01z-legioss-fighter/renders/overlay/overlay.png"/>

<div class="flex-cell text-center text-bold">

// FIGHTER MODE //

</div>

</a>

</div>

<div class="flex-cell mode">

<a class="mode-image" href="/models/veritechs/afc-01z-legioss-gerwalk"/>

<img src="/models/veritechs/afc-01z-legioss-gerwalk/renders/overlay/overlay.png"/>

<div class="flex-cell text-center text-bold">

// GERWALK MODE //

</div>

</a>

</div>

</div>

</div>

<!-- helper -->

<div id="helper">
Expand Down
2 changes: 2 additions & 0 deletions models/veritechs/afc-01z-legioss-battroid/modes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fighter
gerwalk
42 changes: 42 additions & 0 deletions models/veritechs/afc-01z-legioss-fighter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,48 @@

</div>

<!-- modes -->

<div id="modes">

<div class="flex flex-column flex-middle flex-around">

<div class="flex-cell mode">

<a class="mode-image" href="/models/veritechs/afc-01z-legioss-battroid"/>

<img src="/models/veritechs/afc-01z-legioss-battroid/renders/overlay/overlay.png"/>

<div class="flex-cell text-center text-bold">

// BATTROID MODE //

</div>

</a>

</div>

<div class="flex-cell mode">

<a class="mode-image" href="/models/veritechs/afc-01z-legioss-gerwalk"/>

<img src="/models/veritechs/afc-01z-legioss-gerwalk/renders/overlay/overlay.png"/>

<div class="flex-cell text-center text-bold">

// GERWALK MODE //

</div>

</a>

</div>

</div>

</div>

<!-- helper -->

<div id="helper">
Expand Down
2 changes: 2 additions & 0 deletions models/veritechs/afc-01z-legioss-fighter/modes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
battroid
gerwalk
42 changes: 42 additions & 0 deletions models/veritechs/afc-01z-legioss-gerwalk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,48 @@

</div>

<!-- modes -->

<div id="modes">

<div class="flex flex-column flex-middle flex-around">

<div class="flex-cell mode">

<a class="mode-image" href="/models/veritechs/afc-01z-legioss-battroid"/>

<img src="/models/veritechs/afc-01z-legioss-battroid/renders/overlay/overlay.png"/>

<div class="flex-cell text-center text-bold">

// BATTROID MODE //

</div>

</a>

</div>

<div class="flex-cell mode">

<a class="mode-image" href="/models/veritechs/afc-01z-legioss-fighter"/>

<img src="/models/veritechs/afc-01z-legioss-fighter/renders/overlay/overlay.png"/>

<div class="flex-cell text-center text-bold">

// FIGHTER MODE //

</div>

</a>

</div>

</div>

</div>

<!-- helper -->

<div id="helper">
Expand Down
2 changes: 2 additions & 0 deletions models/veritechs/afc-01z-legioss-gerwalk/modes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
battroid
fighter

0 comments on commit 8291d57

Please sign in to comment.