Passed
Push — master ( f28044...8bf019 )
by Felipe Catão do
01:08
created

routes.structureBasic   A

Complexity

Conditions 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
1
import EngineApp from '../../Framework/engine.js'
2
import homePage from "../pages/home.js"
3
import docs from '../pages/docs.js'
4
import AboutPage from '../pages/about.js'
5
import articlefrag from '../components/articlefrag.js'
6
7
var isCreate=false
8
var eng=new EngineApp()
9
10
class routes{
11
    routesCreated(){
12
        
13
        //sistemas De rotas
14
        if(isCreate==false){
0 ignored issues
show
Best Practice introduced by
Comparing isCreate to false using the == operator is not safe. Consider using === instead.
Loading history...
15
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#pageInitial",this.teste)
16
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#docs",this.docc) 
17
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#about",this.aboutRoute)  
18
            eng.routesEngine.registerRoute("http://127.0.0.1:5500/LavineWiki/index.html#docs/structurebasic",this.structureBasic)
19
        }
20
        isCreate=true
21
        eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial")
22
        eng.routesEngine.whenUpdate(eng.routesEngine.runRoute("http://127.0.0.1:5500/LavineWiki/","http://127.0.0.1:5500/LavineWiki/index.html#pageInitial"))
23
    
24
    }
25
    teste(){
26
        eng.renderEngine.pageDynamic="dinamic-Article"
27
        eng.renderEngine.clearPage()
28
        homePage()
29
    }
30
    docc(){
31
    eng.renderEngine.pageDynamic="dinamic-Article"
32
    eng.renderEngine.clearPage()
33
    docs()
34
    }
35
    aboutRoute(){
36
        eng.renderEngine.pageDynamic="dinamic-Article"
37
        eng.renderEngine.clearPage()
38
        AboutPage()
39
    }
40
    doc(){
41
        eng.routesEngine.goToLink("http://127.0.0.1:5500/LavineWiki/index.html#docs")
42
    }
43
    about(){
44
        eng.routesEngine.goToLink("http://127.0.0.1:5500/LavineWiki/index.html#about")
45
    }
46
    structureBasic(){
47
        eng.renderEngine.pageDynamic="readArea"
48
        docs()
49
        eng.renderEngine.clearPage()
50
        articlefrag("art0","Architeture of Lavine","Lorem ipsum dolor sit amet consectetur adipisicing elit. Veniam culpa laudantium neque fugit, tenetur quis exercitationem, nostrum, vero quasi voluptatibus harum accusantium aspernatur? Esse, repellendus exercitationem ullam perspiciatis rerum sapiente.","readArea")
51
    }
52
}
53
54
55
export default routes
56