File tree Expand file tree Collapse file tree 3 files changed +51
-9
lines changed
assets/stylesheets/partials Expand file tree Collapse file tree 3 files changed +51
-9
lines changed Original file line number Diff line number Diff line change 2929 outline-offset : 2px ;
3030 }
3131}
32+
33+ // SKELETON LOADER
34+
35+ @mixin skeleton-loader ($width , $height :2rem ) {
36+ background-color : $color-gray-200 ;
37+ border-radius : 4px ;
38+ display : inline-block ;
39+ height : $height ;
40+ position : relative ;
41+ overflow : hidden ;
42+ font-size : inherit ;
43+ min-width : $width ;
44+
45+ & ::after {
46+ position : absolute ;
47+ top : 0 ;
48+ right : 0 ;
49+ bottom : 0 ;
50+ left : 0 ;
51+ transform : translateX (-100% );
52+ background-image : linear-gradient (
53+ 90deg ,
54+ rgba (#fff , 0 ) 0 ,
55+ rgba (#fff , 0.2 ) 20% ,
56+ rgba (#fff , 0.5 ) 60% ,
57+ rgba (#fff , 0 )
58+ );
59+ animation : shimmer 1s infinite ;
60+ content : ' ' ;
61+ }
62+
63+ @keyframes shimmer {
64+ 100% {
65+ transform : translateX (100% );
66+ }
67+ }
68+ }
Original file line number Diff line number Diff line change 225225 font-family : $base-font ; // Since we're using 16px, override to use body font
226226 }
227227
228+ .result-get {
229+ display : flex ;
230+ align-items : center ;
231+ gap : 24px ;
232+ }
233+
228234 // Make result buttons present as underlined links
229235 a .button {
230236 @include underlinedLinks ;
231237 font-weight : $fw-medium ;
232238 font-size : 1.6rem ;
233- margin-right : 16px ;
234239 }
235240
236241 // Except the first button, which should present as a secondary button
237- a .button :first-child {
242+ .result-get > a .button :first-child {
238243 @include buttonSecondary ;
239244 }
240245
246+ // Loading skeleton when a button isn't available
247+ span .skeleton-loader {
248+ @include skeleton-loader (112px );
249+ }
250+
241251 .truncate-list li :last-child {margin-bottom : 0 ;}
242252
243253 }
Original file line number Diff line number Diff line change 22
33<% data_url = "/lookup?type=#{kind}&identifier=#{identifier}" %>
44
5- <span class ="tacos -container "
5+ <span class ="libkey -container "
66 data-controller ="content-loader "
77 data-content-loader-url-value =<%= data_url %> >
8- < span style ="background-color:lightgray;
9- display: inline-block;
10- font-size: 1.6rem;
11- font-weight: 500;
12- margin-right: 16px;
13- min-width: 120px; "> </ span >
8+ < span class ="skeleton-loader "> </ span >
149</ span >
You can’t perform that action at this time.
0 commit comments