-
Notifications
You must be signed in to change notification settings - Fork 605
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
Update python.org socialize menu to include a link to the PSF Mastodon account #2323
Update python.org socialize menu to include a link to the PSF Mastodon account #2323
Conversation
…n account Updated socialize menu to include a link to the official PSF Mastodon account. Details: - Added Mastodon icon to Pythonicon font family. Used IcoMoon to generate icons - Updated all related CSS and Sass files - Updated the socialize menu in the base.html template To see all rendered Pythonicon fonts, open `static/fonts/demo.html`
Thanks!
For future reference, please could you give a brief overview of how to do this? |
Sure thing! Here's what I did to get the Mastodon icon added to the collection of Pythonicon fonts... First, I started by opening the IcoMoon web app (it's free to use). In the app, I created a new empty set. Next, I imported the Once imported, I selected the Twitter icon and downloaded the individual SVG file to use as a template to create the Mastodon icon. To create the icon, I used Inkscape. Using the Twitter SVG icon, I deleted the bird and kept the background. I then downloaded the official Mastodon icon (SVG file). I copied the Mastodon SVG path, scaled it up, and centered it within the background box. Finally, I used the path exclusion command to subtract the Mastodon path from the background path. Once done, I saved it as a new SVG file ( Back in the IcoMoon app, I imported the mastodon SVG using the 'Import to Set' command. This will place the Mastodon SVG icon to the start on the icon set. Check that the Mastodon icon's tag and name are both set to "mastodon". To keep the icon order the same, I moved the Mastodon icon to the end of the set. I also moved the last Last step is to generate the fonts. I selected all the icons and then clicked the 'Generate Font' command at the bottom of the app. This will open the generate font workspace. In the workspace, you should see all the icons you want to be part of your font file collection. You shouldn't have to make any modifications. Do verify that the help icon is assigned unicode character The final step I took before creating the fonts was to open the font setting and changing the font name to "Pythonicon". I also kept the support IE8 option on. With that, click the 'Download' button. You'll get a zip file with font files The zip also includes a
You can then copy the file content and update the
Something else to note: When updating the CSS and Sass, be sure to reassign the content value for the search icons. For |
Help icon is now assigned unicode `\3f` (`?`). Close icon is now assigned unicode `\58` (`X`). Required regenerating fonts and updating CSS + Sass files.
Thank you for the work and for the instructions! It almost seems worth replacing it with an icon library, but that's another discussion. |
Excellent work thank you @mlcohen. |
Updated socialize menu to include a link to the official PSF Mastodon account.
Details:
To see all rendered Pythonicon fonts, open
static/fonts/demo.html
Related Github issue: #2322
Before Update
After Update
(Screenshot was taken from localhost)