@@ -76,14 +76,19 @@ <h2>Welcome to PROV-A</h2>
7676 </ section >
7777
7878 < 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 >
7984 < div class ="row text-center my-5 mx-5 align-items-stretch ">
8085 <!-- Step 1: Initialise Project -->
8186 < div class ="col-sm pb-2 ">
8287 < div class ="card shadow h-100 d-flex flex-column ">
8388 < div class ="card-body d-flex flex-column align-items-center flex-grow-1 justify-content-between ">
8489 < a href ="initialise-project.html " class ="home-card " aria-label ="Initialise Project ">
8590 < 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 >
8792 </ a >
8893 < p class ="mt-2 text-muted ">
8994 Start your project by importing a table or creating one from scratch.
@@ -103,7 +108,7 @@ <h2>Welcome to PROV-A</h2>
103108 < div class ="card-body d-flex flex-column align-items-center flex-grow-1 justify-content-between ">
104109 < a href ="structure-data.html " class ="home-card " aria-label ="Structure Data ">
105110 < 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 >
107112 </ a >
108113 < p class ="mt-2 text-muted ">
109114 Organise and structure your data interactively.
@@ -123,7 +128,7 @@ <h2>Welcome to PROV-A</h2>
123128 < div class ="card-body d-flex flex-column align-items-center flex-grow-1 justify-content-between ">
124129 < a href ="generate-lod.html " class ="home-card " aria-label ="Query Data ">
125130 < 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 >
127132 </ a >
128133 < p class ="mt-2 text-muted ">
129134 Generate Linked Open Data and query it using SPARQL.
@@ -149,4 +154,26 @@ <h2>Welcome to PROV-A</h2>
149154 </ div >
150155 </ footer >
151156</ 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 >
152179</ html >
0 commit comments