-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor social service logic and UX (#425)
* Start of work * Refactor social service logic Update README Fixes #422 * Add URL to contributors instuctions * Add tiktok
- Loading branch information
1 parent
24dcf32
commit c7b9901
Showing
33 changed files
with
355 additions
and
191 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 |
---|---|---|
|
@@ -123,6 +123,66 @@ This theme includes a shortcode for a contact form that you can add to any page | |
{{< form-contact action="https://formspree.io/[email protected]" >}} | ||
``` | ||
### Social Follow + Share | ||
The theme automatically adds "Follow" link icons to the header and footer and "Share" link icons to pages unless `disable_share` site parameter is set to true. Each built-in services sports a label, an icon and a color. | ||
In order to register a service to be used, user must add an `ananke_socials` parameter to its project configuration file and list them through it in the desired order. Each entry must bear a | ||
- name*: It matches the built-in service reference (Ex: twitter, github) | ||
- url*: The url of the handle's profile on the service (Ex: https://twitter.com/theNewDynamic, https://github.com/ | ||
theNewDynamic) | ||
```yaml | ||
params: | ||
ananke_socials: | ||
- name: twitter | ||
url: https://twitter.com/theNewDynamic | ||
- name: github | ||
url: https://github.com/theNewDynamic | ||
``` | ||
|
||
If user needs to overwrite default `color` and `label` of the service, they simply need to append the following to the entry: | ||
- label: The displayed name of the service to be used to popuplate `[title]` attributes and read-only. (Ex: Twitter, GitHub) | ||
- color: Used for styling purposes. (Ex: '#1da1f2', '#6cc644') | ||
|
||
```yaml | ||
params: | ||
ananke_socials: | ||
- name: twitter | ||
url: https://twitter.com/theNewDynamic | ||
label: TND Twitter | ||
- name: github | ||
url: https://github.com/theNewDynamic | ||
label: TND GitHub Account | ||
color: '#ff6800' | ||
``` | ||
#### Social Icons Customization | ||
On top of easily customizing the built-in services' label and color, user can overwrite their icon by adding an svg file at `/assets/ananke/socials` with a filename matching the service's name. | ||
For example, in order to use your own GitHub icon, simply add an svg file at `/assets/ananke/socials/github.svg` | ||
|
||
#### Built-in Services | ||
Here is the list of built-in services. Those marked with an `*` are also part of the "Share" module. | ||
|
||
- twitter* | ||
- youtube | ||
- github | ||
- gitlab | ||
- keybase | ||
- linkedin* | ||
- medium | ||
- mastodon | ||
- slack | ||
- stackoverflow | ||
- facebook* | ||
- rss | ||
|
||
#### Complement | ||
|
||
In order to add an unkown service (absent from the list above), you simply need to add all three settings to `ananke_socials`: name, url, label, color, and optionally add an icon file matching the `name` to the `assets/ananke/socials` directory. In the absence of an icon, the theme will print the service's label. | ||
|
||
### Update font or body classes | ||
|
||
The theme is set, by default, to use a near-white background color and the "Avenir" or serif typeface. You can change these in your config file with the `body_classes` parameter, like this: | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
layouts/partials/svg/github.svg → assets/ananke/socials/github.svg
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.
2 changes: 1 addition & 1 deletion
2
layouts/partials/svg/keybase.svg → assets/ananke/socials/keybase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
layouts/partials/svg/linkedin.svg → assets/ananke/socials/linkedin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
layouts/partials/svg/mastodon.svg → assets/ananke/socials/mastodon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion
2
layouts/partials/svg/medium.svg → assets/ananke/socials/medium.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
2 changes: 1 addition & 1 deletion
2
layouts/partials/svg/slack.svg → assets/ananke/socials/slack.svg
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.
Oops, something went wrong.