Skip to content

Commit 19e3fa1

Browse files
committed
issue/stick-icon-validation: Improvements to the paperclip icon stick logic
1 parent c523217 commit 19e3fa1

5 files changed

Lines changed: 84 additions & 45 deletions

File tree

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Requires at least: WordPress 5.3
33
Tested up to: WordPress 6.7
44
Requires PHP: 7.0
5-
Version: 1.3.1
6-
Stable tag: 1.3.1
5+
Version: 1.3.2
6+
Stable tag: 1.3.2
77
License: GPLv3 or later
88
License URI: https://www.gnu.org/licenses/gpl-3.0.html
99

@@ -66,6 +66,10 @@ Source:
6666

6767
== Changelog ==
6868

69+
= 1.3.2 - March 20 2025 =
70+
71+
- Improvements to the paperclip icon stick logic
72+
6973
= 1.3.1 - November 23 2024 =
7074
- Fixed: Stick icon paperclip
7175
- Updated: readme.txt

sass/_2_components/_1_components.scss

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@
270270
padding: 5px 10px;
271271
position: absolute;
272272
right: 0px;
273-
text-transform: capitalize;
274273
}
275274

276275
.post-card .card-body a:hover,
@@ -282,25 +281,42 @@
282281
color: $blue-dark;
283282
}
284283

285-
/* paperclip svg */
286-
.paperclip {
284+
/* post and sticky post */
285+
article.status-publish > .card-body div.paperclip:last-child,
286+
article.status-publish > .card-body div.paperclip:last-child svg {
287+
background: transparent;
287288
display: none;
289+
width: 0;
290+
height: 0;
288291
}
289292

290-
/* sticky post */
291-
.sticky {
292-
background: $gray-5;
293-
position: relative;
293+
article.post-card,
294+
article.post-card.sticky {
295+
position: relative !important;
294296
}
295297

296-
.sticky .paperclip {
297-
/* paperclip svg */
298-
color: $black;
299-
display: block;
300-
width: 20px;
301-
position: absolute;
302-
right: 8px;
303-
top: 7px;
298+
article.post-card.sticky {
299+
background: $gray-5 !important;
300+
}
301+
302+
/* sticky post ( svg paperclip ) */
303+
article.post-card.sticky > .card-body div.paperclip:last-child,
304+
article.post-card.sticky > .card-body div.paperclip:last-child svg {
305+
display: block !important;
306+
width: 20px !important;
307+
height: 20px !important;
308+
}
309+
310+
article.post-card.sticky > .card-body div.paperclip:last-child svg {
311+
color: $black !important;
312+
}
313+
314+
article.post-card.sticky > .card-body div.paperclip:last-child {
315+
background: transparent !important;
316+
position: absolute !important;
317+
right: 8px !important;
318+
top: 7px !important;
319+
z-index: 10 !important;
304320
}
305321

306322
.updated:not(.published) {

sass/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Theme URI: https://github.com/flaubert-dev/really-simple-theme#really-simple-the
44
Author: Flaubert Henriques
55
Author URI: https://profiles.wordpress.org/flauberthenriques/
66
Description: Really Simple is a theme for bloggers and writers who need a ultra light and fast theme. The theme focuses on simplicity and loading speed. Yes, Really Simple Theme is also fully AMP compatible. Check the >> readme.txt << file and leave the sidebar perfect after WordPress 5.8 update.
7-
Version: 1.3.1
7+
Version: 1.3.2
88
Requires at least: WordPress 5.3
99
Tested up to: WordPress 6.7
1010
Requires PHP: 7.0

style.css

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Theme URI: https://github.com/flaubert-dev/really-simple-theme#really-simple-the
55
Author: Flaubert Henriques
66
Author URI: https://profiles.wordpress.org/flauberthenriques/
77
Description: Really Simple is a theme for bloggers and writers who need a ultra light and fast theme. The theme focuses on simplicity and loading speed. Yes, Really Simple Theme is also fully AMP compatible. Check the >> readme.txt << file and leave the sidebar perfect after WordPress 5.8 update.
8-
Version: 1.3.1
8+
Version: 1.3.2
99
Requires at least: WordPress 5.3
1010
Tested up to: WordPress 6.7
1111
Requires PHP: 7.0
@@ -965,7 +965,6 @@ textarea {
965965
padding: 5px 10px;
966966
position: absolute;
967967
right: 0px;
968-
text-transform: capitalize;
969968
}
970969

971970
.post-card .card-body a:hover,
@@ -977,25 +976,42 @@ textarea {
977976
color: #191970;
978977
}
979978

980-
/* paperclip svg */
981-
.paperclip {
979+
/* post and sticky post */
980+
article.status-publish > .card-body div.paperclip:last-child,
981+
article.status-publish > .card-body div.paperclip:last-child svg {
982+
background: transparent;
982983
display: none;
984+
width: 0;
985+
height: 0;
983986
}
984987

985-
/* sticky post */
986-
.sticky {
987-
background: #e2e6e9;
988-
position: relative;
988+
article.post-card,
989+
article.post-card.sticky {
990+
position: relative !important;
989991
}
990992

991-
.sticky .paperclip {
992-
/* paperclip svg */
993-
color: #0f161a;
994-
display: block;
995-
width: 20px;
996-
position: absolute;
997-
right: 8px;
998-
top: 7px;
993+
article.post-card.sticky {
994+
background: #e2e6e9 !important;
995+
}
996+
997+
/* sticky post ( svg paperclip ) */
998+
article.post-card.sticky > .card-body div.paperclip:last-child,
999+
article.post-card.sticky > .card-body div.paperclip:last-child svg {
1000+
display: block !important;
1001+
width: 20px !important;
1002+
height: 20px !important;
1003+
}
1004+
1005+
article.post-card.sticky > .card-body div.paperclip:last-child svg {
1006+
color: #0f161a !important;
1007+
}
1008+
1009+
article.post-card.sticky > .card-body div.paperclip:last-child {
1010+
background: transparent !important;
1011+
position: absolute !important;
1012+
right: 8px !important;
1013+
top: 7px !important;
1014+
z-index: 10 !important;
9991015
}
10001016

10011017
.updated:not(.published) {

template-parts/content.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<?php endif; ?><!-- .card-media -->
2020

2121
<div class="card-body">
22-
2322
<?php echo '<time>' . esc_html( get_the_date() ) . '</time>'; ?><!-- date/time -->
2423

2524
<header class="entry-header">
@@ -46,16 +45,20 @@
4645
?>
4746
</div><!-- .entry-content -->
4847

49-
<?php the_author_posts_link(); ?><!-- author -->
48+
<?php the_author_posts_link(); // author ?>
5049

51-
<svg xmlns="http://www.w3.org/2000/svg"
52-
fill="none"
53-
viewBox="0 0 24 24"
54-
stroke-width="1.5"
55-
stroke="currentColor"
56-
class="paperclip">
57-
<path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" />
58-
</svg><!-- paperclip (sticky post) -->
50+
<?php if ( is_sticky() ) : // sticky post ?>
51+
<div class="paperclip" style="display: none;">
52+
<svg xmlns="http://www.w3.org/2000/svg"
53+
fill="none"
54+
viewBox="0 0 24 24"
55+
stroke-width="1.5"
56+
stroke="currentColor"
57+
style="display: none;">
58+
<path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" />
59+
</svg>
60+
</div><!-- paperclip (sticky post) -->
61+
<?php endif; ?>
5962
</div><!-- .card-body -->
6063

61-
</article><!-- #post-<?php the_ID(); ?> -->
64+
</article>

0 commit comments

Comments
 (0)