Code Monkey home page Code Monkey logo

theme-files's People

Contributors

androlover98 avatar anupt16 avatar carrotfarmer avatar gouravkhunger avatar kailashchoudhary11 avatar karans08 avatar kushagra-jain99 avatar posandu avatar shockz09 avatar theblapse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

theme-files's Issues

Better logic for including dynamic colors

Whenever one hovers on a post there's a visible border color that is specific to the category of the post. For example, the category for this post is android, so wherever there's a link to this post, there's a green hover color.

image

image

This color is achieved by templating the classes for the link with these classes: hover:border-{{ category }} and an !important field for dark:hover:!border-{{ category }} (notice !) where {{ category }} denotes the category of the current post that Jekyll is rendering:

<a class="postbox mt-4 mb-6 px-6 pt-2 pb-6 bg-white dark:bg-background rounded-2xl shadow-xl shadow-slate-200 dark:shadow-none border-4 hover:border-{{ category }} dark:hover:border-slate-200 dark:hover:!border-{{ category }} dark:border-slate-600 transition underline-none"

The possible combinations for the categories are defined in the tailwind.config.js file's safelist section:

safelist: [
'!bg-android',
'!bg-jekyll',
'!bg-web',
'!bg-web3',
'!bg-node-js',
'!bg-backend',
'!bg-api',
'hover:border-android', 'dark:hover:!border-android',
'hover:border-web', 'dark:hover:!border-web',
'hover:border-web3', 'dark:hover:!border-web3',
'hover:border-jekyll', 'dark:hover:!border-jekyll',
'hover:border-node-js', 'dark:hover:!border-node-js',
'hover:border-backend', 'dark:hover:!border-backend',
'hover:border-api', 'dark:hover:!border-api',
'mt-16'
],

And the colors are there in the section:

theme: {
extend: {
colors: {
'background': '#16161f',
'primary': '#2564eb',
'web': '#F06529',
'web3': '#6cdcc4',
'android': '#3ddc84',
'jekyll': '#c83c3c',
'node-js': '#68a063',
'backend': '#1494fc',
'api': '#fceccc'
}
},
},

There are two classes in a single element: dark:hover:border-slate-200 dark:hover:!border-{{ category }}, and the second one is marked important with ! to force apply category color and fallback to default color if it isn't present.

This is done because if there is no specific color assigned in the tailwind.config.js file, It falls back to the default black color in light mode and white border in dark mode.

There needs to be such hard-coding because tailwind can't automatically include dynamic CSS classes, at least up to the point I have tested it with Jekyll.

There is a need to find a better solution than manually having to hardcode the safelist every time...

Better filteration of spam comments

Is your feature request related to a problem? Please describe.
There are spam comments every now and then. Some kind of captcha would help reduce that.

Describe the solution you'd like
Using automation like Akismet to identify spam comments. https://staticman.net which we use supports it.

Describe alternatives you've considered
Re-captcha by Google could be used but destroys UX.

Refactor series pages

Is your feature request related to a problem? Please describe.
The current series page lists posts in a grid. Since a series has posts in sequential order, it would be better to make them a list of horizontal boxes.

Also, they are shown in a latest posts first order. Again, series are sequential so oldest posts first would be better.

Describe the solution you'd like
Create a new layout for horizontal postboxes and replace this line in series.html layout.

Link preview embeds in posts

Is your feature request related to a problem? Please describe.
Currently, the links inside posts are general text-based links, preview embeds would look great!

Describe the solution you'd like
Create a link include for the Jekyll theme which can be used to show a preview of the link by extracting social image/title from the meta tags using custom javascript.

If the social preview was found, show that to the user else fallback to general links.

Fix dark buttons

Dark link buttons on archive.html look weird:

image

Needs to be similar style as the CTA (size should be same, needs fix just for the shadow and colour):

image

Add tests for scripts

As the project grows bigger, automated testes for scripts in the _scripts folder are kind of necessary now.

Some specifics about this task:

  • Create sample mock data and test functions present in the files.
  • Need not to use some testing library. Testing under workflows via GitHub Actions should do.
  • The GH Actions could present fake data to the scripts and validate expected outputs.

Max width on elements

The elements currently spread the whole area and the posts do not look nice in larger displays. Possible solution is to add max width to the containers for optimal view even when zoomed out.

Migrate to GA4

The site has Universal analytics which would soon become unsupported. Need to migrate to GA4.

Paginate Author pages

All the article listings pages are paginated. For example, go to https://genicsblog.com/category/android, it has posts in paginated way(9 per page).

But the author pages(example) aren't paginated. They list all the posts in one go which can make the loading speed slow.

Figure out a way to paginate author pages. Might require a custom Jekyll plugin.

Adding visual info on search bar

For #11, we need to show some visual information that pressing Ctrl + K will open the search bar. Something like this:

image

needed changes:

  • making a class that has styles to make text appear like keys. Updates in theme.css
  • Add the keys in search.html (should only appear on large screens only)

Copy button for codeblocks

Is your feature request related to a problem? Please describe.
Users can't copy code from code blocks, a copy button would be a nice edition!

Describe the solution you'd like
Add a copy button besides the language button.
image

Add Webmentions

Is your feature request related to a problem? Please describe.
NO

Describe the solution you'd like
Webmentions are an open standard for a protocol to notify about links, likes or comments to a webpage.

Additional context
So when you add a link to a website, you can send a Webmention as a notification to the linked page. Like a reference for the author about your reaction. So authors can get notified when they receive a linkback, comment or a reply.

Webmentions can be implemented from this tutorial

Table of content for posts

Add an option for users to generate a table of content at the top of the article for better experience.

Authors should be able to add TOC by enabling it in the front matter:

---
# Other config
toc: enabled
# Other config
---

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.