Oliver Davies
5e9dc48896
Rename methods
2021-01-13 17:56:57 +00:00
Oliver Davies
7e06943be1
Rename event subscriber classes
2021-01-13 17:55:29 +00:00
Oliver Davies
17179fbfe4
Add a placeholder test, mark as skipped
...
References #344
2021-01-13 08:53:29 +00:00
Oliver Davies
661c26dcec
Add query condition for status
...
References #344
2021-01-13 08:52:51 +00:00
Oliver Davies
dee6051cd9
Add route cache context to related posts block
...
References #3
2021-01-11 02:32:17 +00:00
Oliver Davies
a3e8f03cf1
Cache the block, not the render array
...
References #3
2021-01-11 02:20:17 +00:00
Oliver Davies
cca8ed1970
Re-order array by key [ci skip]
...
References #3
2021-01-11 01:59:31 +00:00
Oliver Davies
f404019a39
Add cache tag for the current post
...
References #3
2021-01-11 01:58:42 +00:00
Oliver Davies
e716069022
Add list styling to related posts
...
References #3
2021-01-11 01:48:23 +00:00
Oliver Davies
52fa58733d
Set cache max age on related posts block
...
Based on https://www.drupal.org/node/2451555 , added a `max-age` value to
the related posts block.
References #3
2021-01-11 01:48:23 +00:00
Oliver Davies
105405e7f9
Display a list of related post titles
...
References #3
2021-01-11 01:48:21 +00:00
Oliver Davies
6436e3edb3
Generate a new block for related posts
...
References #3
2021-01-11 01:39:44 +00:00
Oliver Davies
3546ac427a
Extract a method to contain the query logic
...
Group all of the query logic into one method, as this will make it more
readable and this logic is likely to grow.
References #3
2021-01-10 22:38:37 +00:00
Oliver Davies
ae0024f335
Return an empty Collection if there are no posts
...
Return an empty Collection if there are no related posts for the given
post.
References #3
2021-01-10 22:38:37 +00:00
Oliver Davies
059e237600
Prevent duplicate terms being created
...
Within the `PostFactory` class, ensure that when using the `withTags`
method and creating tag terms that an existing term doesn't already
exist for a given name before trying to create it.
With the previous implementation, there would be multiple terms if the
PostFactory was used multiple times with the same tag name.
Given that `PostFactory` now has a dependency on `EntityTypeManger`,
this has been added as a service within `opdavies_blog_test` and needs
to be resolved from the container before trying to use it within a test.
This commit also updates the usages in `PostTest` so that those tests
continue to work and pass.
References #3
2021-01-10 22:38:36 +00:00
Oliver Davies
b90ca42e87
Refactor to use an entity query
...
Refactor from using `loadByProperties` to using an entity query.
`loadByProperties` doesn't allow for passing multiple values for a
single property such as multiple tags to compare against, and also means
that removing the current node can be done in the query rather than
filtering it out of the Collection.
This might also be a more performant solution if we can do the grouping
and sorting of the results in the query rather than needing to perform
additional steps on the result.
References #3
2021-01-10 22:38:02 +00:00
Oliver Davies
d7f3d8c482
Return related posts for a specified blog post
...
Add the initial code for specifying a blog post and returning related
posts. This includes adding a repository for related posts, and adding
it as a service within the `opdavies_blog` module.
References #3
2021-01-10 22:38:00 +00:00
Oliver Davies
62424d5b04
Add PostTestBase
...
Add a base test for writing kernel tests for posts, so that it will be
easier to start writing the tests for related posts.
References #3
2021-01-10 22:37:28 +00:00
Oliver Davies
59620f8a51
Add .theme file to the PurgeCSS config
...
Ensures that any classes in `opdavies.theme` are not purged in a
production CSS build.
References #341
2021-01-10 22:15:48 +00:00
Oliver Davies
3b6ad20486
Move padding from list items to links
...
So that the padding takes up the full space within the tab, move the
padding to the link element. This requires adding a preprocess function
to the theme file and removing the classes from the local task template.
References #341
2021-01-10 22:05:50 +00:00
Oliver Davies
9bcb8bb847
Add negative margins to re-align tabs
...
References #341
2021-01-10 22:05:46 +00:00
Oliver Davies
b2641662d2
Add tab styling
...
References #341
2021-01-10 22:05:37 +00:00
Oliver Davies
654d0f65f7
Flex lists of local tasks
...
References #341
2021-01-10 22:05:22 +00:00
Oliver Davies
bb2363457c
Add templates for local tasks
...
References #341
2021-01-10 22:05:18 +00:00
Oliver Davies
2e94abab55
Add some additional empty tests to fill in later
2021-01-10 20:00:14 +00:00
Oliver Davies
bbca137a83
Rename the test method
2021-01-10 19:57:08 +00:00
Oliver Davies
383c0d0fdf
Push to IFTTT
...
References #328
2021-01-10 19:14:24 +00:00
Oliver Davies
790b221646
Save post as sent to social media
...
References #328
2021-01-10 19:13:00 +00:00
Oliver Davies
e617e9984d
Return early if the post shouldn't be pushed
...
References #328
2021-01-10 19:06:37 +00:00
Oliver Davies
73271de39a
Move logic for if a post should be pushed
...
References #328
2021-01-10 19:06:36 +00:00
Oliver Davies
baebc4fd25
Add queue worker
...
References #328
2021-01-10 19:04:30 +00:00
Oliver Davies
ec6ac1d798
Start refactoring to use a queue
...
References #328
2021-01-10 18:12:14 +00:00
Oliver Davies
af25afe2cf
Test that a queue entry is added for a post
...
References #328
2021-01-10 18:11:11 +00:00
Oliver Davies
ce7209ac74
Ensure that the translated text is rendered
...
Fixes #334
2021-01-04 22:01:42 +00:00
Oliver Davies
dad542a0ab
Fix content overflowing on mobile
2021-01-04 18:15:11 +00:00
Oliver Davies
cb8afcd852
Update tweet text
...
References #332
2021-01-01 23:16:56 +00:00
Oliver Davies
87ee87f915
Fix blog tag re-ordering test
...
Add a NullPostPusher implementation and use it within the tag
re-ordering tests to stop an Exception being thrown because there's no
webhook URL.
References #332
2021-01-01 23:08:23 +00:00
Oliver Davies
d7459ff30f
Extract a PostPusher service to push the post
...
Extract a `PostPusher` service with an IFTTT implementation. That means
if this needs to change to use a different service in the future, the
IFTTT implementation can remain unchanged and a new implementation can
be added with its own form params etc.
This also makes this functionality easier to test as we can add a
`NullPostPusher` implementation for testing.
References #332
2021-01-01 22:45:23 +00:00
Oliver Davies
f6ff21e04e
Update form params to work with IFTTT
...
References #332
2021-01-01 22:34:59 +00:00
Oliver Davies
a6f378294c
Extract a helper method to group checks [ci skip]
2021-01-01 21:50:35 +00:00
Oliver Davies
e2d7f08893
Rename variable to make it more generic
2021-01-01 21:46:12 +00:00
Oliver Davies
9aaf62fce3
Re-order imports
2020-12-20 01:45:58 +00:00
Oliver Davies
08657c9b14
Safelist branding block, fix logo size
2020-12-20 01:45:50 +00:00
Oliver Davies
a142f073f2
Re-add colour overrides
...
https://tailwindcss.com/docs/upgrading-to-v2#configure-your-color-palette-explicitly
2020-12-18 01:08:31 +00:00
Oliver Davies
3f1f858c37
Import default colours from 1.x
...
https://tailwindcss.com/docs/upgrading-to-v2#configure-your-color-palette-explicitly
2020-12-18 01:08:21 +00:00
Oliver Davies
3a7465572f
Rename focus visible plugin
2020-12-18 01:08:18 +00:00
Oliver Davies
6c6585abf8
Change whitelist to safelist
...
https://tailwindcss.com/docs/upgrading-to-v2#update-purge-options-to-match-purge-css-3-0
2020-12-18 01:08:05 +00:00
Oliver Davies
dc70dd5e87
Move the typography plugin config into extend
...
https://tailwindcss.com/docs/upgrading-to-v2#update-typography-and-forms-plugins
https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.3.0
2020-12-18 01:07:55 +00:00
Oliver Davies
3b0b7d37e3
Remove experimental and future options from config
...
https://tailwindcss.com/docs/upgrading-to-v2#remove-future-and-experimental-configuration-options
2020-12-18 01:07:49 +00:00
Oliver Davies
cbdb79a429
Update npm dependencies
...
https://tailwindcss.com/docs/upgrading-to-v2#install-tailwind-css-v2-0-and-post-css-8
2020-12-18 01:07:46 +00:00
Oliver Davies
aab1114006
Reorder test class and method
2020-12-17 23:42:20 +00:00
Oliver Davies
509d526661
Update the Collection namespace
2020-12-17 23:42:20 +00:00
Oliver Davies
864c2429a5
Ensure that method names are in a consistent format
2020-12-17 23:42:20 +00:00
Oliver Davies
280a381c68
All test method should have a void return type
2020-12-17 23:42:20 +00:00
Oliver Davies
8591a0f846
Remove strict types in tests, ensure classes are final
2020-12-17 23:42:20 +00:00
Oliver Davies
a73adeca41
Fix incorrect namespace
2020-12-17 23:42:20 +00:00
Oliver Davies
0b1003a17d
Ignore PHPCS rules per test file
2020-12-17 23:42:20 +00:00
Oliver Davies
4e427340df
Increase padding in code blocks
2020-12-17 13:06:08 +00:00
Oliver Davies
2fb7b4cf44
Change syntax highlighting theme
2020-12-17 09:42:47 +00:00
Oliver Davies
ebd9903bf6
Remove dark mode from theme
2020-12-17 09:42:41 +00:00
Oliver Davies
9fba0b7292
Wrap all custom components in layers
2020-12-17 01:53:58 +00:00
Oliver Davies
4cfc932f77
Import all libraries automatically
2020-12-17 01:33:15 +00:00
Oliver Davies
a7dce26971
Split custom utilities into partials
2020-12-17 01:32:43 +00:00
Oliver Davies
d7b39a18e9
Split custom base classes into partials
2020-12-17 01:32:43 +00:00
Oliver Davies
f12da38a40
Use postcss-easy-import for easy importing
2020-12-17 01:32:43 +00:00
Oliver Davies
3df64325b8
Sort imports [ci skip]
2020-12-17 00:05:40 +00:00
Oliver Davies
265b6f17ca
Improve syntax highlighting
2020-12-16 23:52:30 +00:00
Oliver Davies
832b2897f3
Improve code snippet styles in light and dark mode
2020-12-16 23:33:20 +00:00
Oliver Davies
e83b5ec517
Only override the blog posts view lists
...
Prevent other views, such as the talks listing page, from being
overridden with the same changes as the blog post listing page.
2020-12-16 21:35:29 +00:00
Oliver Davies
52964e2eca
Improve note styling in dark mode
2020-12-16 20:52:45 +00:00
Oliver Davies
c3b5763adf
Fix colour for 'Posted' text in dark mode
2020-12-16 20:28:37 +00:00
Oliver Davies
290ab7098d
Override view list, change heading to h2
2020-12-16 20:21:21 +00:00
Oliver Davies
f0039080e4
Display list of posts, grouped by year
2020-12-16 20:21:21 +00:00
Oliver Davies
acf91fb1a9
Always have a gap between main content and sidebar
2020-12-16 00:35:54 +00:00
Oliver Davies
6edf584ac5
Remove illuminate/support dependency
...
References #302
2020-12-08 00:18:24 +00:00
Oliver Davies
ce374861ba
Change role text colour in dark mode
...
References #293
2020-12-03 08:16:33 +00:00
Oliver Davies
352637b390
Enable lazy loading for recommendation images
2020-12-03 02:28:04 +00:00
Oliver Davies
f0b3cc30ec
Update caniuse database [ci skip]
2020-12-01 21:52:31 +00:00
Oliver Davies
71294cb75e
Re-add block background colour
2020-11-28 19:57:17 +00:00
Oliver Davies
a656280e7b
Extract helper methods
2020-11-10 20:25:07 +00:00
Oliver Davies
06c3da1880
Add public constants for field names
...
Make it easier and safer when referencing field names by adding public
constants for them to the Talk and Post classes.
2020-11-10 19:34:15 +00:00
Oliver Davies
3025ab0f68
Change table header colour in dark mode
2020-11-08 14:51:02 +00:00
Oliver Davies
097293fc3e
Change input text colour in dark mode
2020-11-08 13:45:25 +00:00
Oliver Davies
a574e7e532
Change blockquote colour in dark mode
2020-11-08 13:36:16 +00:00
Oliver Davies
9ea86e6559
Set h3 heading colour in dark mode
2020-11-02 14:25:43 +00:00
Oliver Davies
e76251c376
Remove require for old Symfony settings file
2020-10-30 01:12:03 +00:00
Oliver Davies
4008f511f8
Move the config sync directory
2020-10-30 00:56:36 +00:00
Oliver Davies
a888430ef3
Integrate the typography plugin with dark mode
...
References #27
2020-10-29 01:43:33 +00:00
Oliver Davies
c0355a4e89
Override blue.500 colour
...
References #27
2020-10-29 01:41:57 +00:00
Oliver Davies
e996140f47
Add dark mode styles
...
References #27
2020-10-29 01:02:26 +00:00
Oliver Davies
530074f176
Override gray colours
...
Override the default Tailwind `gray` colours, and update anywhere that
the originals were used.
References #27
2020-10-29 00:50:09 +00:00
Oliver Davies
dacbfebc26
Enable the dark mode variant
...
References #27
2020-10-29 00:50:00 +00:00
Oliver Davies
623d1924b7
Show if an event is online
...
References #241
2020-10-24 20:32:20 +01:00
Oliver Davies
79445b8641
Refactor existing event paragraph template
...
References #241
2020-10-24 20:06:50 +01:00
Oliver Davies
0411285046
Override theme templates for blog and talks views
...
Override the theme templates for the `talks` and `blog_posts` views,
adding classes to the header wrapper and some spacing between the header
text and the view results.
2020-10-24 11:23:38 +01:00
Oliver Davies
19c5529094
Add Send to social media
checkbox to posts
...
Also add it to the `opdavies_blog_test` module config so that the
existing tests continue to work and pass.
References #249
2020-10-07 23:17:07 +01:00
Oliver Davies
eb23d93fe0
Return early if should not be sent to social media
...
Return early and don't send the post to social media if the `Post to
social media` checkbox is not checked.
References #249
2020-10-07 23:11:22 +01:00
Oliver Davies
2d06f5e8d4
Add a method to check if send to social media
...
Add a method to check if a post should be sent automatically to social
media.
References #249
2020-10-07 22:57:40 +01:00
Oliver Davies
3dd7608a87
Update PurgeCSS config
2020-09-24 12:42:53 +01:00
Oliver Davies
ef89f5f5c1
Add DDEV configuration
2020-09-16 19:41:48 +01:00
Oliver Davies
b70b30bc99
Refactor existing CSS
...
Fixes #190
2020-09-16 01:47:00 +01:00
Oliver Davies
390c3ba44d
Enable the 'apply complex classes' feature
...
Enable the experimental feature to use `@apply` with complex classes
including interactive states. I tried this on the Rebuilding Symfony
demo project and it worked well.
This would mean that I could refactor some of my existing styles on this
project.
References #190
2020-09-16 01:39:06 +01:00
Oliver Davies
b8b1766429
Update tailwindcss to 1.8
...
References #190
2020-09-16 01:34:26 +01:00
Oliver Davies
3809d5a02f
Add token for getting the number of talks given
...
Add a new custom token, `[opdavies_talks:talk_count]`, that replaces the
placeholder text with the talk count value from the `TalkCounter`
service.
References #31
2020-09-16 01:25:09 +01:00
Oliver Davies
0f01551f26
Update Hook Event Dispatcher module
...
- Update the Hook Event Dispatcher module from `8.x-1.29` to `8.x-2.02`.
- Update custom modules after breaking changes from upgrading.
References #112
2020-09-06 12:15:59 +01:00
Oliver Davies
61442ed74c
Make opdavies theme Drupal 9 compatible
...
References #112
2020-09-06 11:57:41 +01:00
Oliver Davies
596ee4979d
Fix PHPCS issues
2020-09-04 22:20:30 +01:00
Oliver Davies
98fba9306f
Fix PHPStan issues
2020-09-04 22:20:30 +01:00
Oliver Davies
cbe60209e6
Rename custom module directories
...
- Rename `opdavies_blog` to `blog`.
- Rename `opdavies_blog_test` to `blog_test`.
- Rename `opdavies_talks` to `talks`.
- Rename `opdavies_talks_test` to `talks_test`.
The files within the directories haven't changed, so there is no
breaking change caused by renaming the directories.
Please enter the commit message for your changes. Lines starting
2020-09-04 21:25:36 +01:00
Oliver Davies
9b26d772a8
Remove dashes in hashtags, and don't lowercase
...
References #24
2020-09-04 19:45:30 +01:00
Oliver Davies
9219d10137
Run on insert and update rather than pre-save
2020-09-04 19:19:18 +01:00
Oliver Davies
061b1177f5
Fix config names
2020-09-04 19:18:25 +01:00
Oliver Davies
2617e29dec
Refactor to use a factory class
2020-09-04 13:46:49 +01:00
Oliver Davies
10e4616e01
Don't include certain terms as hashtags in tweets
...
References #24
2020-09-04 12:31:53 +01:00
Oliver Davies
c5c774290d
Include tags as hashtags for automated tweets
...
References #24
2020-09-04 12:31:29 +01:00
Oliver Davies
150c974040
Add a test for converting a post to a tweet
...
References #24
2020-09-04 12:06:51 +01:00
Oliver Davies
b77c301d8c
Refactor to use a short function
2020-08-28 18:01:47 +01:00
Oliver Davies
59f85f02d5
Add new dependencies to fix PostTest
2020-08-28 13:08:40 +01:00
Oliver Davies
92f1c0f84c
Refactor sending posts to social media
2020-08-28 13:02:20 +01:00
Oliver Davies
59a98b8d78
Automatically re-order tags on save
...
Fixes #167
2020-08-28 12:56:57 +01:00
Oliver Davies
5e107b48d6
Move test class
...
References #203
2020-08-28 10:59:07 +01:00
Oliver Davies
ffe6fe9b68
Add tests for the TalkRepository
...
Fixes #203
2020-08-28 10:54:19 +01:00
Oliver Davies
87a9f28991
Update prose styling for code and pre elements
...
Fixes #210
2020-08-24 23:02:00 +01:00
Oliver Davies
9b1a8fb3be
Rename and re-organise custom modules
...
- Rename `opd_talks` to `opdavies_talks`
- Rename `custom` to `opdavies_blog`
2020-08-24 10:27:49 +01:00
Oliver Davies
e4e898f22c
Update talk next event date on cron
...
Run the `TalkDateUpater` service on each cron run to ensure that the
next event date for each talk is up to date.
Fixes #204
2020-08-24 02:36:04 +01:00
Oliver Davies
6d9ecd8df0
Fix the ordering for future talks
...
Rather than the custom event sorting plugin being based on the `created`
value, this change adds a new `field_event_date` field to the talk node
type and uses this for the sorting instead.
This commit also adds a new `TalkDateUpdater` service that extracts
either the next event date if there is a future date, or the last past
event date if there is no future date, from `field_events` for each talk
and saves it into the event date field.
For consistency, and to ensure that the results are ordered correctly,
the talk date updater converts the date from a date string (e.g.
`2020-08-24`) into a UNIX timestamp, and the timestamp is saved in the
event date field. This can be changed at a later date if needed.
The talks view has been updated to use the updated sort plugin, and the
existing tests have been updated to use the new field.
References #204
2020-08-24 02:32:45 +01:00
Oliver Davies
bdf225b05d
Remove unused imports
2020-08-23 22:38:30 +01:00
Oliver Davies
c44990643e
Set talk type for existing talks
2020-08-21 11:35:04 +01:00
Oliver Davies
70681df30f
Update logo and favicon
2020-08-20 07:40:21 +01:00
Oliver Davies
f7b1e41977
Update lodash
2020-08-17 18:41:44 +01:00
Oliver Davies
e4595afc81
Update elliptic
2020-08-17 18:17:27 +01:00
Oliver Davies
4f18552c5a
Organise tailwind.config.js
2020-08-15 20:46:13 +01:00
Oliver Davies
bed98b4f97
Increase font size in navbar
2020-08-15 14:31:20 +01:00
Oliver Davies
0f07d3d231
Add ability to add links to external posts
...
Add the ability to add links to external blog posts within my blog feed.
This is done based on a new `field_external_link` field that allows for
adding the external link URL and the domain name as the title.
The node links are then overridden to use the external link if there is
one, so the node title and 'read more' links are changed to use the
external link.
Currently, automated tweets are not generated for external posts.
Fixes #182
2020-08-14 16:43:04 +01:00
Oliver Davies
8385d6fef7
Don't send posts to social media multiple times
...
Check if a post has previously been sent to social media, by checking
the value of a `field_sent_to_social_media` field.
This field is hidden on the node add/edit forms, and populated when a
post is sent to social media. Once this happens, it will not be sent to
social media again.
This change also populates the field for all existing posts, so that
they won't be re-sent to social media either.
2020-08-12 22:33:16 +01:00
Oliver Davies
1b2cbc1a9b
Add and use Tailwind CSS typography plugin
...
Replace custom markup styles with Tailwind CSS's typography/prose plugin
(https://github.com/tailwindlabs/tailwindcss-typography ).
2020-08-11 00:59:40 +01:00
Oliver Davies
fe7142e1f1
Improve accessibility of the nav toggle button
...
Improve the accessibility for the nav toggle button by adding a border
around the button when it is focussed on.
I've added a custom Tailwind CSS variant to do this using a custom
`focus-visible` variant in tailwind.config.js, and using the
https://www.npmjs.com/package/focus-visible polyfill.
2020-07-23 13:57:41 +01:00
Oliver Davies
f488b5c023
Automatically create tweets for new posts
2020-07-19 20:15:44 +01:00
Oliver Davies
eafcb103b8
Set NODE_ENV in Encore config
2020-07-18 10:17:40 +01:00
Oliver Davies
533095d87f
Fix photo position
2020-07-16 20:52:37 +01:00
Oliver Davies
ef500b5fd7
Change text colour for role
2020-07-16 20:43:59 +01:00
Oliver Davies
ebe5a7dbba
Recommendation styling
2020-07-16 20:39:43 +01:00
Oliver Davies
dd42f3deac
Fix missing edit links
...
Add the title prefix and suffix for recommendation block titles, which
fixes the missing edit links so the blocks are editable.
References #146
2020-07-16 13:12:30 +01:00
Oliver Davies
16350b02fc
Remove grid gap on mobile
2020-07-16 09:26:17 +01:00
Oliver Davies
ff77296e4c
Style the recommendations block
...
References #146
2020-07-15 21:06:51 +01:00
Oliver Davies
097f60411d
Adjust page widths
2020-07-14 21:57:22 +01:00
Oliver Davies
86c3edbcaf
Adjust page widths
2020-07-14 13:20:24 +01:00
Oliver Davies
58036c7ab9
Fix collapsing page widths
...
Fix inconsistent page widths on some pages such as blog and talks, by
adding a width (i.e. a `w-full` class) as well as a maximum width.
2020-07-02 18:13:05 +01:00
Oliver Davies
6350054e45
Fix PHPCS errors
2020-06-30 17:34:42 +01:00
Oliver Davies
9e3064ca21
Add tests for counting previous talks
...
References #31
2020-06-30 12:50:21 +01:00