Skip to content

Commit

Permalink
Merge pull request #81 from TanushreeBorase/sharebuttonuiimprovement
Browse files Browse the repository at this point in the history
Fixes #80 improvement of share button ui
  • Loading branch information
DhanushNehru authored Oct 27, 2024
2 parents 3718d36 + 0145314 commit b33cc73
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<link rel="stylesheet" href="styles.css" />
<link rel="icon" type="image/x-icon" href="assets/ico/favicon.ico" />
<script async defer src="https://buttons.github.io/buttons.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

</head>

<body>
Expand Down Expand Up @@ -69,7 +71,9 @@

<div class="shareBtnDiv">
<button id="shareBtn">
<img src="https://thenounproject.com/api/private/icons/2137557/edit/?backgroundShape=SQUARE&backgroundShapeColor=%23000000&backgroundShapeOpacity=0&exportSize=752&flipX=false&flipY=false&foregroundColor=%23000000&foregroundOpacity=1&imageFormat=png&rotation=0" alt="Share" />

<i class="fa-solid fa-share"></i>
<span class="btn-label">Share</span>
</button>
<div id="allOptions">
<a href="whatsapp://send?text=https://board-dhanushnehru.netlify.app/" data-action="share/whatsapp/share">
Expand Down
32 changes: 31 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ canvas {
}

#download img {
width: 20px;
width: 80px;
height: 20px;
margin-right: 8px;
filter: brightness(0) invert(1);
Expand All @@ -267,6 +267,7 @@ canvas {
position: fixed;
bottom: 20px;
right: 20px;
border-radius: 50px;
}

#shareBtn {
Expand All @@ -277,6 +278,7 @@ canvas {
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
color: white;
}

#shareBtn:hover {
Expand All @@ -291,6 +293,34 @@ canvas {
filter: brightness(0) invert(1);
}

#shareBtn:focus {
outline: 3px solid rgba(19, 108, 2, 0.8);
outline-offset: 4px;
}

@media (max-width: 600px) {
#shareBtn {
padding: 10px;
}

#shareBtn img {
width: 20px;
height: 20px;
}
}

.btn-label {
color: white;
font-size: 16px;
margin-left: 8px;
display: none; /* Hidden by default */
}

#shareBtn:hover .btn-label {
display: inline; /* Show on hover */
}


#allOptions {
display: none;
position: absolute;
Expand Down

0 comments on commit b33cc73

Please sign in to comment.