1- import { Component } from '@angular/core' ;
1+ import { Component , OnInit } from '@angular/core' ;
22import { GridItem } from '../../interfaces/grid-item.interface' ;
33import { MatCardModule } from '@angular/material/card' ;
4+ import { DataService } from '../../services/data.service' ;
45
56@Component ( {
67 selector : 'app-grid' ,
@@ -9,38 +10,14 @@ import { MatCardModule } from '@angular/material/card';
910 templateUrl : './grid.component.html' ,
1011 styleUrl : './grid.component.scss'
1112} )
12- export class GridComponent {
13- gridItems : GridItem [ ] = [ {
14- title : 'VSCode Extension' ,
15- description : 'The sQeeZ extension for Visual Studio Code.' ,
16- image : './grid/vsc-extension.svg' ,
17- url : 'https://github.com/sQeeZ-scripting-language/language-server'
18- } , {
19- title : 'Playground' ,
20- description : 'The sQeeZ playground for testing scripts.' ,
21- image : './grid/playground.svg' ,
22- url : 'https://sqeez-scripting-language.github.io/playground/'
23- } , {
24- title : 'Documentation' ,
25- description : 'The sQeeZ documentation for learning the language.' ,
26- image : './grid/documentation.svg' ,
27- url : 'https://sqeez-scripting-language.github.io/documentation/'
28- } , {
29- title : 'GitHub' ,
30- description : 'The sQeeZ GitHub organization.' ,
31- image : './grid/github.svg' ,
32- url : 'https://github.com/sqeez-scripting-language/'
33- } , {
34- title : 'All Releases' ,
35- description : 'All sQeeZ releases on GitHub.' ,
36- image : './grid/releases.svg' ,
37- url : 'https://github.com/sQeeZ-scripting-language/interpreter/releases'
38- } , {
39- title : 'Contribute' ,
40- description : 'Contribute to the sQeeZ project on GitHub.' ,
41- image : './grid/contribute.svg' ,
42- url : 'https://github.com/sQeeZ-scripting-language#-become-part-of-the-sqeez-journey'
43- } ] ;
13+ export class GridComponent implements OnInit {
14+ gridItems : GridItem [ ] = [ ] ;
15+
16+ constructor ( private data : DataService ) { }
17+
18+ ngOnInit ( ) : void {
19+ this . gridItems = this . data . gridItems ;
20+ }
4421
4522 redirectTo ( url : string ) : void {
4623 // new tab
0 commit comments