Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Logos, social templates and colour tokens for the Lean Mean Clean Apps .NET temp
| Website favicons and manifest icons | `assets/logos/<mark>/web/` |
| Icons for MCP tools, prompts and resources | `assets/icons/mcp/png/<icon>-<size>.png`, in movie, author, review and server |
| Link preview for a website | [og-image.png](assets/social/png/og-image.png) |
| LinkedIn company page cover | [linkedin-cover-2x.png](assets/social/png/linkedin-cover-2x.png), or [linkedin-cover.png](assets/social/png/linkedin-cover.png) at LinkedIn's own 1128 x 191. The text sits right of where LinkedIn puts the page logo, so don't nudge it left. |

## The marks

Expand Down
Binary file added assets/social/png/linkedin-cover-2x.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 assets/social/png/linkedin-cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/social/source/linkedin-cover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/social/svg/linkedin-cover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { neutrals, scales, org, templates } from './brand.mjs';
import { tonal, spectrum, mono, DARK_STEPS, LIGHT_STEPS, SLATE_DARK_STEPS, SLATE_LIGHT_STEPS } from './colours.mjs';
import { iconBody, iconNames, iconSvg } from './icons.mjs';
import { logoSvg, markBody } from './logo.mjs';
import { linkedinCover, linkedinCoverSvg } from './linkedin.mjs';
import { socialSvg } from './social.mjs';
import { outline } from './text.mjs';
import { writeTokens } from './tokens.mjs';
Expand Down Expand Up @@ -176,6 +177,16 @@ for (const s of socials) {
write(out('assets', 'social', 'png', `${s.file}.png`), png(svg, s.width));
}

// The LinkedIn company page cover, at LinkedIn's size and twice that for sharp screens.
{
const spec = { kicker: 'Open source templates for .NET', title: org.name, tagline: org.tagline, logo: { fill: byKey['org-spectrum'].dark, core: neutrals.paper } };
const svg = linkedinCoverSvg(spec);
write(out('assets', 'social', 'svg', 'linkedin-cover.svg'), svg);
write(out('assets', 'social', 'source', 'linkedin-cover.svg'), linkedinCoverSvg(spec, { editable: true }));
write(out('assets', 'social', 'png', 'linkedin-cover.png'), png(svg, linkedinCover.width));
write(out('assets', 'social', 'png', 'linkedin-cover-2x.png'), png(svg, linkedinCover.width * 2));
}

// ---------- README banners ----------
// A short strip for the top of each template's README and NuGet page. Dark, so it reads on light and dark pages alike.

Expand Down
29 changes: 29 additions & 0 deletions scripts/linkedin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// The LinkedIn company page cover. LinkedIn shows it at 1128 x 191 and puts the page logo over
// the bottom-left corner, so the text starts to the right of the logo and the mark stays clear
// of the edges the mobile app trims.
import { neutrals, scales, org } from './brand.mjs';
import { markBody } from './logo.mjs';
import { outline, live } from './text.mjs';

const W = 1128;
const H = 191;
const r = (v) => Number(v.toFixed(2));
const layer = (label, inner) => `<g id="${label.toLowerCase().replace(/\s+/g, '-')}" inkscape:groupmode="layer" inkscape:label="${label}">${inner}</g>`;

// spec: { kicker, title, tagline, logo: { fill, core } }
export function linkedinCoverSvg(spec, { editable = false } = {}) {
const text = editable ? live : outline;
const left = 300; // the page logo covers roughly x 34 to 262 from y 70 down
const D = 150;
const logo = `<g transform="translate(${W - 120 - D} ${r((H - D) / 2)}) scale(${r((D / 1024) * 1e4) / 1e4})">${markBody(spec.logo)}</g>`;
const body = [
layer('Background', `<rect width="${W}" height="${H}" fill="${neutrals.ink}"/>`),
layer('Logo', logo),
layer('Kicker', text({ text: spec.kicker.toUpperCase(), role: 'mono', weight: 600, size: 13, tracking: 0.14, x: left, y: 50, fill: scales.slate[300] })),
layer('Title', text({ text: spec.title, role: 'display', weight: 800, size: 46, tracking: -0.03, x: left - 2, y: 100, fill: neutrals.paper })),
layer('Tagline', text({ text: spec.tagline, role: 'body', weight: 400, size: 19, x: left, y: 134, fill: scales.slate[300] })),
].join('');
return `<svg xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 ${W} ${H}" width="${W}" height="${H}" role="img" aria-label="${spec.title}. ${spec.tagline}">${body}</svg>\n`;
}

export const linkedinCover = { width: W, height: H };
Loading