Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DiracX branding #64

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions branding/diracx/convert_svg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/bash

# Enable Bash strict mode
set -euo pipefail
IFS=$'\n\t'

# Determine the script's directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

# Directory containing the SVG files relative to the script's location
SVG_DIR="$SCRIPT_DIR/svg"
# Output directories for PNG and PDF files
PNG_DIR="$SCRIPT_DIR/png"
PDF_DIR="$SCRIPT_DIR/pdf"

# Create output directories if they do not exist
mkdir -p "$PNG_DIR"
mkdir -p "$PDF_DIR"

# Check if there are any SVG files to process
shopt -s nullglob
svg_files=("$SVG_DIR"/*.svg)
shopt -u nullglob

if [ ${#svg_files[@]} -eq 0 ]; then
echo "No SVG files found in $SVG_DIR"
exit 1
fi

# Loop through each SVG file in the directory
for svg_file in "${svg_files[@]}"; do
# Get the base name of the file (without extension)
base_name=$(basename "$svg_file" .svg)

# Define output file paths for default transparent background version
png_file="$PNG_DIR/${base_name}-transparent-background.png"
pdf_file="$PDF_DIR/${base_name}.pdf"

# Convert SVG to PNG without background
if inkscape "$svg_file" --export-type=png --export-filename="$png_file" --export-background-opacity=0; then
echo "Converted $svg_file to $png_file with transparent background"
else
echo "Failed to convert $svg_file to PNG with transparent background" >&2
exit 1
fi

# Convert SVG to PDF without background
if inkscape "$svg_file" --export-type=pdf --export-filename="$pdf_file"; then
echo "Converted $svg_file to $pdf_file"
else
echo "Failed to convert $svg_file to PDF" >&2
exit 1
fi

# Define output file paths for version with white background
png_file_white="$PNG_DIR/${base_name}-white-background.png"
pdf_file_white="$PDF_DIR/${base_name}-white-background.pdf"

# Convert SVG to PNG with white background
if inkscape "$svg_file" --export-type=png --export-filename="$png_file_white" --export-background="#FFFFFF" --export-background-opacity=1; then
echo "Converted $svg_file to $png_file_white with white background"
else
echo "Failed to convert $svg_file to PNG with white background" >&2
exit 1
fi

# Convert SVG to PDF with white background
if inkscape "$svg_file" --export-type=pdf --export-filename="$pdf_file_white" --export-background="#FFFFFF" --export-background-opacity=1; then
echo "Converted $svg_file to $pdf_file_white with white background"
else
echo "Failed to convert $svg_file to PDF with white background" >&2
exit 1
fi

# Define output file paths for high-resolution version with transparent background (300 DPI)
png_file_high_res="$PNG_DIR/${base_name}-high-res-transparent-background.png"

# Convert SVG to high-resolution PNG without background
if inkscape "$svg_file" --export-type=png --export-filename="$png_file_high_res" --export-dpi=300 --export-background-opacity=0; then
echo "Converted $svg_file to $png_file_high_res with transparent background"
else
echo "Failed to convert $svg_file to high-resolution PNG with transparent background" >&2
exit 1
fi

# Define output file paths for high-resolution version with white background (300 DPI)
png_file_high_res_white="$PNG_DIR/${base_name}-high-res-white-background.png"

# Convert SVG to high-resolution PNG with white background
if inkscape "$svg_file" --export-type=png --export-filename="$png_file_high_res_white" --export-dpi=300 --export-background="#FFFFFF" --export-background-opacity=1; then
echo "Converted $svg_file to $png_file_high_res_white with white background"
else
echo "Failed to convert $svg_file to high-resolution PNG with white background" >&2
exit 1
fi

done

echo "Conversion process completed."

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added branding/diracx/favicons/minimal/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added branding/diracx/favicons/minimal/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added branding/diracx/favicons/standard/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added branding/diracx/favicons/standard/favicon.ico
Binary file not shown.
57 changes: 57 additions & 0 deletions branding/diracx/generate_favicons.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

# Enable Bash strict mode
set -euo pipefail
IFS=$'\n\t'

# Determine the script's directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

# SVG files
SVG_MINIMAL="$SCRIPT_DIR/svg/diracx-logo-square-minimal.svg"
SVG_STANDARD="$SCRIPT_DIR/svg/diracx-logo-square.svg"

# Output directories for favicons
FAVICON_DIR_STANDARD="$SCRIPT_DIR/favicons/standard"
FAVICON_DIR_MINIMAL="$SCRIPT_DIR/favicons/minimal"

# Create output directories if they do not exist
mkdir -p "$FAVICON_DIR_STANDARD"
mkdir -p "$FAVICON_DIR_MINIMAL"

# Array of common favicon sizes
sizes=(16 32 48 64 96 128 256 512)

# Function to generate favicons
generate_favicons() {
local svg_file="$1"
local output_dir="$2"

for size in "${sizes[@]}"; do
output_file="$output_dir/favicon-${size}x${size}.png"
if inkscape "$svg_file" --export-type=png --export-filename="$output_file" --export-width="$size" --export-height="$size"; then
echo "Generated $output_file"
else
echo "Failed to generate $output_file" >&2
exit 1
fi
done

# Generate a single multi-resolution ICO file
output_ico="$output_dir/favicon.ico"
if convert "${output_dir}/favicon-16x16.png" "${output_dir}/favicon-32x32.png" "${output_dir}/favicon-48x48.png" "${output_dir}/favicon-64x64.png" "${output_dir}/favicon-128x128.png" "${output_dir}/favicon-256x256.png" "${output_ico}"; then
echo "Generated $output_ico"
else
echo "Failed to generate $output_ico" >&2
exit 1
fi
}

# Generate favicons for standard logo
generate_favicons "$SVG_STANDARD" "$FAVICON_DIR_STANDARD"

# Generate favicons for minimal logo
generate_favicons "$SVG_MINIMAL" "$FAVICON_DIR_MINIMAL"

echo "Favicon generation process completed."

6,909 changes: 6,909 additions & 0 deletions branding/diracx/original.ai

Large diffs are not rendered by default.

Binary file not shown.
Binary file added branding/diracx/pdf/diracx-logo-full.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added branding/diracx/pdf/diracx-logo-square.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading