Skip to content

Commit

Permalink
Merge pull request #45 from UM-LPM/main
Browse files Browse the repository at this point in the history
Changed image-resize script and adjusted course design (tag margins, …
  • Loading branch information
cecepasinechka authored Aug 12, 2024
2 parents af6728d + 6045eaf commit 8f59ef4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
8 changes: 7 additions & 1 deletion _sass/_course.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
a {
color: $accentDark;
font-size: rem(16px);
font-family: "Titillium Web", "Helvetica Neue", Helvetica, sans-serif;

&:hover {
color: $themeOrange;
Expand Down Expand Up @@ -169,6 +170,7 @@
letter-spacing: 0;
color: darken($lightGray, 30%);
margin: 0 auto;
margin-top: rem(10px);

@include media(">=sm") {
margin-bottom: rem(40px);
Expand Down Expand Up @@ -323,7 +325,7 @@
.data-container{
display: flex;
flex-direction: column;
width: 100%;
width: 90%;
margin-top: 5%;
margin-left: 5%;

Expand Down Expand Up @@ -723,6 +725,8 @@
margin-top: rem(30px);
letter-spacing: 0.025rem;
line-height: rem(40px);
margin-left: rem(20px);
margin-right: rem(20px);
padding: 0 rem(5px);

@include media(">=sm") {
Expand Down Expand Up @@ -836,6 +840,7 @@
transition: border-color 0.3s ease;
padding: 10px;
margin: 5%;
font-family: "Titillium Web", "Helvetica Neue", Helvetica, sans-serif;

@include media("<=sm") {
padding: 4px;
Expand All @@ -852,6 +857,7 @@

p {
color: $themeColor;

}

a {
Expand Down
29 changes: 19 additions & 10 deletions image-resize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,31 @@ if [ ! -d "$DEST_DIR_256" ]; then
mkdir -p "$DEST_DIR_256"
fi

resize_image() {
local img="$1"
local dest_dir="$2"
local size="$3"
local filename=$(basename "$img")
local dest_path="$dest_dir/$filename"

if [ ! -f "$dest_path" ]; then
echo "Resizing $filename to $size"
magick "$img" -resize "${size}x" "$dest_path"
else
echo "$filename already exists in $dest_dir, skipping resize."
fi
}

for img in "$SRC_DIR"/*; do
filename=$(basename "$img")
echo "Resizing $filename"
magick "$img" -resize 1024x "$DEST_DIR_1024/$filename"
resize_image "$img" "$DEST_DIR_1024" 1024
done

for img in "$SRC_DIR"/*; do
filename=$(basename "$img")
echo "Resizing $filename"
magick "$img" -resize 512x "$DEST_DIR_512/$filename"
resize_image "$img" "$DEST_DIR_512" 512
done

for img in "$SRC_DIR"/*; do
filename=$(basename "$img")
echo "Resizing $filename"
magick "$img" -resize 256x "$DEST_DIR_256/$filename"
resize_image "$img" "$DEST_DIR_256" 256
done

echo "Resizing completed."
echo "Resizing completed."

0 comments on commit 8f59ef4

Please sign in to comment.