-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from chrisburr/diracx-branding
Add DiracX branding
- Loading branch information
Showing
42 changed files
with
8,003 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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 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.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+58.6 KB
branding/diracx/png/diracx-logo-full-high-res-transparent-background.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.
Binary file added
BIN
+24.3 KB
branding/diracx/png/diracx-logo-square-high-res-transparent-background.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.
Binary file added
BIN
+18.3 KB
branding/diracx/png/diracx-logo-square-minimal-high-res-transparent-background.png
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
BIN
+18.6 KB
branding/diracx/png/diracx-logo-square-minimal-high-res-white-background.png
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
BIN
+5.29 KB
branding/diracx/png/diracx-logo-square-minimal-transparent-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.