mirror of
https://github.com/beta-nu-theta-chi/branding.git
synced 2025-12-07 11:04:46 +00:00
Compare commits
8 Commits
release-1.
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8d5d95fa0 | ||
|
|
c8f9d9dabf | ||
|
|
04d6ff687c | ||
|
|
035f6c4718 | ||
|
|
05dfbc1a45 | ||
|
|
a23d38c90f | ||
|
|
b14695a147 | ||
|
|
4a2d191117 |
32
README.md
Executable file
32
README.md
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
# Branding of the Beta Nu chapter of Theta Chi
|
||||||
|
|
||||||
|
This repo contains all the source code required for generating all the branding releated with the Beta Nu chapter of Theta Chi.
|
||||||
|
|
||||||
|
`SVG` `path` `d` attributes are stored in environment variables that will be built into the template SVG file.
|
||||||
|
|
||||||
|
Documentation on `d` attributes may be found [here](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d)
|
||||||
|
|
||||||
|
Extraction of the `d` attribute may also be done by extracting an svg then copying the `d` attribute from the file.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
This repo will be automatically built upon any push with a tag starting with `release-`. Artifacts will be produced as a GitHub release.
|
||||||
|
|
||||||
|
A nix flake is also provided with the `#branding` attribute, this is useful for cross-repo-referencing. This is used in the bylaw build process.
|
||||||
|
|
||||||
|
## Branding elements
|
||||||
|
|
||||||
|
The `src/colors` folder contains color variants for different color schemes for models. All files referenced from the `src/build.py` builder will be built as a variant of the branding.
|
||||||
|
|
||||||
|
## Build process
|
||||||
|
|
||||||
|
The build process is managed by the `src/build.py` script
|
||||||
|
|
||||||
|
1. It iterates over specified color schemes
|
||||||
|
2. It iterates over logo variants, including the logomark, logo, OX logo, and stacked logomark variants
|
||||||
|
3. Builds each variant of the specified logo by sourcing the variables and running `envsubst` on the template file
|
||||||
|
4. Then, uses the `mogrify` command from `imagemagick` to build `.png` versions of all the variants
|
||||||
|
5. Releases:
|
||||||
|
- For the GitHub release, a zip file will be made containing all the variants
|
||||||
|
- For the nix flake, all raw files are provided in the `result` folder
|
||||||
|
- An additional attribute `.#branding-nopng` is provided for quicker builds
|
||||||
9
build.nix
Normal file → Executable file
9
build.nix
Normal file → Executable file
@ -1,14 +1,17 @@
|
|||||||
{ stdenv, imagemagick, envsubst, python3Full, zip, ... }:
|
{ stdenv, imagemagick, envsubst, python3Full, zip, util-linux, nopng ? false, bg ? "none", ... }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "BetaNuBranding";
|
pname = "BetaNuBranding";
|
||||||
version = "1.0.0";
|
version = "1.0.1";
|
||||||
|
|
||||||
src = ./src;
|
src = ./src;
|
||||||
|
|
||||||
nativeBuildInputs = [ imagemagick envsubst python3Full zip ];
|
nativeBuildInputs = [ imagemagick envsubst python3Full zip util-linux ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
python build.py
|
python build.py
|
||||||
|
cd out
|
||||||
|
${if nopng then "" else "mogrify -format png -density 2500 -background ${bg} *.svg" }
|
||||||
|
cd ..
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|||||||
0
deploy.nix
Normal file → Executable file
0
deploy.nix
Normal file → Executable file
0
flake.lock
generated
Normal file → Executable file
0
flake.lock
generated
Normal file → Executable file
3
flake.nix
Normal file → Executable file
3
flake.nix
Normal file → Executable file
@ -45,6 +45,9 @@
|
|||||||
};
|
};
|
||||||
packages = rec {
|
packages = rec {
|
||||||
branding = pkgs.callPackage ./build.nix { };
|
branding = pkgs.callPackage ./build.nix { };
|
||||||
|
branding-nopng = pkgs.callPackage ./build.nix { nopng = true; };
|
||||||
|
branding-white = pkgs.callPackage ./build.nix { bg = "white"; };
|
||||||
|
branding-black = pkgs.callPackage ./build.nix { bg = "black"; };
|
||||||
deploy = pkgs.callPackage ./deploy.nix { src = branding; };
|
deploy = pkgs.callPackage ./deploy.nix { src = branding; };
|
||||||
default = branding;
|
default = branding;
|
||||||
};
|
};
|
||||||
|
|||||||
14
src/_brand.yml
Executable file
14
src/_brand.yml
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
color:
|
||||||
|
palette:
|
||||||
|
military-red: "${RED}"
|
||||||
|
resolute-gold: "${GOLD}"
|
||||||
|
process-black: "${BLACK}"
|
||||||
|
white: "${WHITE}"
|
||||||
|
background: white
|
||||||
|
foreground: process-black
|
||||||
|
primary: military-red
|
||||||
|
secondary: resolute-gold
|
||||||
|
logo:
|
||||||
|
small: branding/logo-${COLOR}.svg
|
||||||
|
medium: branding/logomark-uni-${COLOR}.svg
|
||||||
|
large: branding/stacked-uni-${COLOR}.svg
|
||||||
10
src/build.py
Normal file → Executable file
10
src/build.py
Normal file → Executable file
@ -1,9 +1,6 @@
|
|||||||
from typing import Any
|
|
||||||
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
colors = [ "black", "color", "red", "white" ]
|
colors = [ "black", "color", "color_dark", "red", "white" ]
|
||||||
|
|
||||||
logos: list[tuple[str, list[tuple[str, list[str]]]] | tuple[str, list[tuple[str, list[str]] | tuple[str, list[str]]]]] = [("OX", [
|
logos: list[tuple[str, list[tuple[str, list[str]]]] | tuple[str, list[tuple[str, list[str]] | tuple[str, list[str]]]]] = [("OX", [
|
||||||
("-uni", [ "FRATERNITY" ]),
|
("-uni", [ "FRATERNITY" ]),
|
||||||
@ -40,6 +37,7 @@ for color in colors:
|
|||||||
script += f'''
|
script += f'''
|
||||||
source ./colors/{color}.sh
|
source ./colors/{color}.sh
|
||||||
source ./style.sh
|
source ./style.sh
|
||||||
|
envsubst -i ./_brand.yml -o out/_brand-{color}.yml
|
||||||
'''
|
'''
|
||||||
|
|
||||||
for logo in logos:
|
for logo in logos:
|
||||||
@ -58,8 +56,4 @@ for color in colors:
|
|||||||
{build(f"{des}{image[0]}-{color}.svg")}
|
{build(f"{des}{image[0]}-{color}.svg")}
|
||||||
'''
|
'''
|
||||||
|
|
||||||
script += '''
|
|
||||||
mogrify -format png -density 2500 -background none out/*.svg
|
|
||||||
'''
|
|
||||||
|
|
||||||
_ = subprocess.run(["bash", "-c", script], check=True)
|
_ = subprocess.run(["bash", "-c", script], check=True)
|
||||||
|
|||||||
3
src/colors/black.sh
Normal file → Executable file
3
src/colors/black.sh
Normal file → Executable file
@ -1,2 +1,5 @@
|
|||||||
export RED="#000000"
|
export RED="#000000"
|
||||||
export GOLD="#000000"
|
export GOLD="#000000"
|
||||||
|
export BLACK="#000000"
|
||||||
|
export WHITE="#FFFFFF"
|
||||||
|
export COLOR="black"
|
||||||
|
|||||||
3
src/colors/color.sh
Normal file → Executable file
3
src/colors/color.sh
Normal file → Executable file
@ -1,2 +1,5 @@
|
|||||||
export RED="#C8102E" # PMS 186
|
export RED="#C8102E" # PMS 186
|
||||||
export GOLD="#B9975B" # PMS 465
|
export GOLD="#B9975B" # PMS 465
|
||||||
|
export BLACK="#000000"
|
||||||
|
export WHITE="#FFFFFF"
|
||||||
|
export COLOR="color"
|
||||||
|
|||||||
5
src/colors/color_dark.sh
Executable file
5
src/colors/color_dark.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
export RED="#C8102E" # PMS 186
|
||||||
|
export GOLD="#B9975B" # PMS 465
|
||||||
|
export BLACK="#FFFFFF"
|
||||||
|
export WHITE="#000000"
|
||||||
|
export COLOR="color_dark"
|
||||||
3
src/colors/red.sh
Normal file → Executable file
3
src/colors/red.sh
Normal file → Executable file
@ -1,2 +1,5 @@
|
|||||||
export RED="#C8102E" # PMS 186
|
export RED="#C8102E" # PMS 186
|
||||||
export GOLD="#C8102E" # PMS 186
|
export GOLD="#C8102E" # PMS 186
|
||||||
|
export BLACK="#000000"
|
||||||
|
export WHITE="#FFFFFF"
|
||||||
|
export COLOR="red"
|
||||||
|
|||||||
3
src/colors/white.sh
Normal file → Executable file
3
src/colors/white.sh
Normal file → Executable file
@ -1,2 +1,5 @@
|
|||||||
export RED="#FFFFFF"
|
export RED="#FFFFFF"
|
||||||
export GOLD="#FFFFFF"
|
export GOLD="#FFFFFF"
|
||||||
|
export BLACK="#000000"
|
||||||
|
export WHITE="#000000"
|
||||||
|
export COLOR="white"
|
||||||
|
|||||||
0
src/designs/OX.sh
Normal file → Executable file
0
src/designs/OX.sh
Normal file → Executable file
0
src/designs/logo.sh
Normal file → Executable file
0
src/designs/logo.sh
Normal file → Executable file
0
src/designs/logomark.sh
Normal file → Executable file
0
src/designs/logomark.sh
Normal file → Executable file
0
src/designs/stacked.sh
Normal file → Executable file
0
src/designs/stacked.sh
Normal file → Executable file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
0
src/post.sh
Normal file → Executable file
0
src/post.sh
Normal file → Executable file
0
src/style.sh
Normal file → Executable file
0
src/style.sh
Normal file → Executable file
0
src/template.svg
Normal file → Executable file
0
src/template.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
Loading…
Reference in New Issue
Block a user