Merge pull request #40 from arifszn/issue-39
feat: make the project and blog items openable on right click action
This commit is contained in:
commit
d719e38531
@ -102,10 +102,13 @@ const Blog = ({ loading }) => {
|
||||
return (
|
||||
articles &&
|
||||
articles.slice(0, config.blog.limit).map((article, index) => (
|
||||
<div
|
||||
<a
|
||||
className="card shadow-lg compact bg-base-100 cursor-pointer"
|
||||
key={index}
|
||||
onClick={() => {
|
||||
href={article.link}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
try {
|
||||
if (config.googleAnalytics?.id) {
|
||||
ga.event({
|
||||
@ -164,7 +167,7 @@ const Blog = ({ loading }) => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
))
|
||||
);
|
||||
};
|
||||
|
||||
@ -53,10 +53,13 @@ const Project = ({ repo, loading }) => {
|
||||
|
||||
const renderProjects = () => {
|
||||
return repo.map((item, index) => (
|
||||
<div
|
||||
<a
|
||||
className="card shadow-lg compact bg-base-100 cursor-pointer"
|
||||
href={item.html_url}
|
||||
key={index}
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
try {
|
||||
if (config.googleAnalytics?.id) {
|
||||
ga.event({
|
||||
@ -119,7 +122,7 @@ const Project = ({ repo, loading }) => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
));
|
||||
};
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ const config = {
|
||||
github: {
|
||||
username: 'arifszn', // Your GitHub org/user name. (Required)
|
||||
sortBy: 'stars', // stars | updated
|
||||
limit: 8, // How many projects to display.
|
||||
limit: 10, // How many projects to display.
|
||||
exclude: {
|
||||
forks: false, // Forked projects will not be displayed if set to true.
|
||||
projects: ['laravel-ecommerce'], // These projects will not be displayed. example: ['my-project1', 'my-project2']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user