File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,8 +15,11 @@ <h1>Aliados</h1>
1515</ p >
1616
1717{% for ally in allies %}
18- < div class ="ally-block ">
19- < h2 > < img src ="{{ ally.logo.url }} "> {{ ally.name }}</ h2 >
18+ < div class ="ally-block " id ="{{ ally.name|slugify }} ">
19+ < h2 class ="dyn-anchor-heading ">
20+ < img src ="{{ ally.logo.url }} "> {{ ally.name }}
21+ < a class ="dyn-anchor-link " href ="#{{ ally.name|slugify }} "> < i class ="fas fa-link "> </ i > </ a >
22+ </ h2 >
2023 < p class ="description "> < i class ="fas fa-quote-left quote "> </ i > {{ ally.description }} < i class ="fas fa-quote-right quote "> </ i > </ p >
2124 < ul >
2225 {% if ally.url %}
Original file line number Diff line number Diff line change 11@import ' ./variables' ;
22@import ' ~bulma/bulma.sass' ;
33@import ' ./override' ;
4+ @import ' ./dyn-anchors' ;
45
56html {
67 // source: https://stackoverflow.com/q/46463338
@@ -122,4 +123,4 @@ body {
122123 border-radius : 22.5px ;
123124 border-color : $header-bg ;
124125 background-color : whitesmoke ;
125- }
126+ }
Original file line number Diff line number Diff line change 1+ .dyn-anchor-heading {
2+ a .dyn-anchor-link {
3+ font-size : 14pt ;
4+ color : skyblue ;
5+ margin-bottom : 5px ;
6+ vertical-align : middle ;
7+ opacity : 0 ;
8+ & :hover {
9+ color : darken (skyblue , 40% );
10+ }
11+ & .show-it {
12+ opacity : 1 ;
13+ }
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ function init ( ) {
2+ document . querySelectorAll ( '.dyn-anchor-heading' ) . forEach ( ( item ) => {
3+ item . addEventListener ( 'mouseenter' , function ( event ) {
4+ event . preventDefault ( )
5+ let anchor = event . target . querySelector ( '.dyn-anchor-link' )
6+ anchor . classList . add ( 'show-it' )
7+ } )
8+ item . addEventListener ( 'mouseleave' , function ( event ) {
9+ event . preventDefault ( )
10+ let anchor = event . target . querySelector ( '.dyn-anchor-link' )
11+ anchor . classList . remove ( 'show-it' )
12+ } )
13+ } )
14+ }
15+
16+ export default {
17+ init
18+ }
Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ import NavbarBurger from './navbar-burger'
22import Notifications from './notifications'
33import Collapsable from './collapsable'
44import ScrollUpButton from './scrollUpButton'
5+ import DynAnchors from './dyn-anchors'
56
67export default {
78 init : ( ) => {
89 NavbarBurger . init ( )
910 Notifications . init ( )
1011 Collapsable . init ( )
1112 ScrollUpButton . init ( )
13+ DynAnchors . init ( )
1214 } ,
1315}
You can’t perform that action at this time.
0 commit comments