@@ -76,14 +76,19 @@ <h2>Welcome to PROV-A</h2>
76
76
</ section >
77
77
78
78
< div class ="container " style ="flex: 1 ">
79
+ < div class ="d-flex justify-content-center my-5 ">
80
+ < button type ="button " class ="btn btn-primary ms-2 " id ="demoDataBtn ">
81
+ < i class ="fa-solid fa-forward-fast "> </ i > Quick Start with Demo Project
82
+ </ button >
83
+ </ div >
79
84
< div class ="row text-center my-5 mx-5 align-items-stretch ">
80
85
<!-- Step 1: Initialise Project -->
81
86
< div class ="col-sm pb-2 ">
82
87
< div class ="card shadow h-100 d-flex flex-column ">
83
88
< div class ="card-body d-flex flex-column align-items-center flex-grow-1 justify-content-between ">
84
89
< a href ="initialise-project.html " class ="home-card " aria-label ="Initialise Project ">
85
90
< i class ="fa-solid fa-play fa-6x bg-init text-white icon-circular "> </ i > < br >
86
- < span class ="btn bg-init mt-3 "> Initialise Project</ span >
91
+ < span class ="btn bg-init mt-3 " style =" color: white !important " > Initialise Project</ span >
87
92
</ a >
88
93
< p class ="mt-2 text-muted ">
89
94
Start your project by importing a table or creating one from scratch.
@@ -103,7 +108,7 @@ <h2>Welcome to PROV-A</h2>
103
108
< div class ="card-body d-flex flex-column align-items-center flex-grow-1 justify-content-between ">
104
109
< a href ="structure-data.html " class ="home-card " aria-label ="Structure Data ">
105
110
< i class ="fa-solid fa-list-check fa-6x bg-edit text-white icon-circular "> </ i > < br >
106
- < span class ="btn bg-edit mt-3 "> Structure Data</ span >
111
+ < span class ="btn bg-edit mt-3 " style =" color: white !important " > Structure Data</ span >
107
112
</ a >
108
113
< p class ="mt-2 text-muted ">
109
114
Organise and structure your data interactively.
@@ -123,7 +128,7 @@ <h2>Welcome to PROV-A</h2>
123
128
< div class ="card-body d-flex flex-column align-items-center flex-grow-1 justify-content-between ">
124
129
< a href ="generate-lod.html " class ="home-card " aria-label ="Query Data ">
125
130
< i class ="fa-solid fa-diagram-project fa-6x bg-data text-white icon-circular "> </ i > < br >
126
- < span class ="btn bg-data mt-3 "> Generate LOD</ span >
131
+ < span class ="btn bg-data mt-3 " style =" color: white !important " > Generate LOD</ span >
127
132
</ a >
128
133
< p class ="mt-2 text-muted ">
129
134
Generate Linked Open Data and query it using SPARQL.
@@ -149,4 +154,26 @@ <h2>Welcome to PROV-A</h2>
149
154
</ div >
150
155
</ footer >
151
156
</ body >
157
+ < script >
158
+ document . getElementById ( 'demoDataBtn' ) . addEventListener ( 'click' , function ( event ) {
159
+ event . preventDefault ( ) ;
160
+ const userConfirmed = confirm ( "⚠️ Any previous project will be overwritten! Are you sure you want to use demo project?" ) ;
161
+ if ( ! userConfirmed ) {
162
+ return ;
163
+ }
164
+ const jsonUrl = 'https://raw.githubusercontent.com/prov-a/prov-a.github.io/refs/heads/main/src/demo_project.json' ;
165
+ fetch ( jsonUrl )
166
+ . then ( response => {
167
+ return response . json ( ) ;
168
+ } )
169
+ . then ( jsonData => {
170
+ localStorage . setItem ( 'provaData' , JSON . stringify ( jsonData ) ) ;
171
+ window . location . href = "structure-data.html" ;
172
+ } )
173
+ . catch ( error => {
174
+ console . error ( 'Error loading JSON:' , error ) ;
175
+ alert ( 'Failed to load project data.' ) ;
176
+ } ) ;
177
+ } ) ;
178
+ </ script >
152
179
</ html >
0 commit comments