Skip to content

Commit 2fa5e58

Browse files
committed
Add fontawesome svg icons
1 parent 2b74a4f commit 2fa5e58

File tree

5 files changed

+69
-9
lines changed

5 files changed

+69
-9
lines changed

spock-website/index.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,21 @@ <h2 class="text-3xl md:text-4xl font-bold mb-8 text-gray-100" data-aos="fade-up"
5656

5757
<div class="flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4" data-aos="fade-up" data-aos-delay="200">
5858
<a href="https://groovyconsole.dev/?g=groovy_4_0&gist=437e9026ff86d2d709c2c56eb7e2eef1#g8qcDpYAQE" target="_blank" class="cta-button cta-primary">
59-
Try it online
59+
<i class="fa-solid fa-laptop-code"></i> Try it online
6060
</a>
6161
<a href="https://docs.spockframework.org" target="_blank" class="cta-button cta-tertiary">
62-
Read the Docs
62+
<i class="fa-solid fa-book"></i> Read the Docs
6363
</a>
6464
<a href="https://github.com/spockframework/spock-example" target="_blank" class="cta-button cta-tertiary">
65-
Clone the Example Project
65+
<i class="fa-solid fa-code"></i> Clone the Example Project
6666
</a>
6767
</div>
6868
</div>
6969
<div class="container mx-auto px-6 text-center spock-blue-text text-md additional-links flex flex-wrap justify-center items-center gap-y-2 pt-8" data-aos="fade-up" data-aos-delay="300">
70-
<a href="https://spockframework.org/spock/javadoc/current" class="mx-3 hover-underline-animation">JavaDoc</a> <span class="link-separator">|</span>
71-
<a href="https://github.com/spockframework/spock" class="mx-3 hover-underline-animation">Source Code</a> <span class="link-separator">|</span>
72-
<a href="https://github.com/spockframework/spock/issues" class="mx-3 hover-underline-animation">Issue Tracker</a> <span class="link-separator">|</span>
73-
<a href="https://github.com/spockframework/spock/discussions" class="mx-3 hover-underline-animation">Discussions</a> <span class="link-separator">|</span>
74-
<a href="https://gitter.im/spockframework/spock" class="mx-3 hover-underline-animation">Chat</a>
70+
<a href="https://spockframework.org/spock/javadoc/current" class="mx-3 hover-underline-animation"><i class="fa-brands fa-java"></i> JavaDoc</a> <span class="link-separator">|</span>
71+
<a href="https://github.com/spockframework/spock" class="mx-3 hover-underline-animation"><i class="fa-brands fa-github fa-lg"></i> Code &amp; Issues</a> <span class="link-separator">|</span>
72+
<a href="https://github.com/spockframework/spock/discussions" class="mx-3 hover-underline-animation"><i class="fas fa-comment-dots"></i> Discussions</a> <span class="link-separator">|</span>
73+
<a href="https://gitter.im/spockframework/spock" class="mx-3 hover-underline-animation"><i class="fas fa-comments"></i> Chat</a>
7574
</div>
7675
</section>
7776

@@ -266,7 +265,7 @@ <h3 class="text-xl font-semibold text-center mb-4 text-gray-100">Example Test Ou
266265
</div>
267266
<div class="flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4 mt-8" data-aos="fade-up" data-aos-delay="800">
268267
<a href="https://groovyconsole.dev/?g=groovy_4_0&gist=437e9026ff86d2d709c2c56eb7e2eef1#g8qcDpYAQE" target="_blank" class="cta-button cta-primary">
269-
Try it online
268+
<i class="fa-solid fa-laptop-code"></i> Try it online
270269
</a>
271270
</div>
272271
</section>

spock-website/package-lock.json

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spock-website/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"vite": "^6.3.1"
1414
},
1515
"dependencies": {
16+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
17+
"@fortawesome/free-brands-svg-icons": "^6.7.2",
18+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
1619
"@tailwindcss/vite": "^4.1.4",
1720
"tailwindcss": "^4.1.4"
1821
}

spock-website/src/icons.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { library, dom } from '@fortawesome/fontawesome-svg-core';
2+
import { faBook, faCode, faLaptopCode, faComments, faCommentDots} from '@fortawesome/free-solid-svg-icons';
3+
import { faGithub, faStackOverflow, faJava } from '@fortawesome/free-brands-svg-icons';
4+
5+
// Add icons to the library
6+
library.add(faGithub, faStackOverflow, faJava, faBook, faCode, faLaptopCode, faComments, faCommentDots);
7+
8+
// Watch for <i> tags and replace with SVG
9+
dom.watch();

spock-website/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
import './style.css'
2+
import './icons'

0 commit comments

Comments
 (0)