This repository has been archived by the owner on May 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (113 loc) · 4.52 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Programación Web Repo</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/brands.css" integrity="sha384-1KLgFVb/gHrlDGLFPgMbeedi6tQBLcWvyNUN+YKXbD7ZFbjX6BLpMDf0PJ32XJfX" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/fontawesome.css" integrity="sha384-jLuaxTTBR42U2qJ/pm4JRouHkEDHkVqH0T1nyQXn1mZ7Snycpf6Rl25VBNthU4z0" crossorigin="anonymous">
</head>
<body>
<div id="app">
<header>
<div class="navbar navbar-dark bg-dark shadow-sm">
<div class="container d-flex justify-content-between">
<a href="#" class="navbar-brand d-flex align-items-center">
<strong>Programación Web</strong>
</a>
<a href="https://github.com/iksaku/ProgramacionWeb" type="button" class="btn btn-secondary">
Ver en Github
<span class="fab fa-github"></span>
</a>
</div>
</div>
</header>
<main role="main">
<section class="jumbotron text-center">
<div class="container">
<h1 class="jumbotron-heading">Programación Web</h1>
<p class="lead text-muted">Repo creado para la clase cursada con el profesor Hazael Mojica (Agosto-Diciembre 2018)</p>
</div>
</section>
<div class="album py-5 bg-light">
<div class="container">
<div class="row justify-content-center">
<homework v-for="(hw, index) in homeworks" :key="index" v-bind="hw" :url="subURL(hw.url)"></homework>
</div>
</div>
</div>
</main>
<footer class="text-muted">
<div class="container">
<p class="float-right">
<a href="#">Back to top</a>
</p>
<p>Album example is © Bootstrap, but please download and customize it for yourself!</p>
<p>New to Bootstrap? <a href="https://getbootstrap.com">Visit the homepage</a> or read our <a href="/docs/4.2/getting-started/introduction/">getting started guide</a>.</p>
</div>
</footer>
</div>
<script src="https://unpkg.com/[email protected]/dist/jquery.slim.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
<script>
Vue.component('homework', {
props: ['name', 'description', 'url'],
template: `
<div class="col-md-4">
<div class="card mb-4 shadow-sm">
<div class="card-body">
<h5 class="card-title">{{ name }}</h5>
<p class="card-text">{{ description }}</p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<a :href="url" target="_blank" type="button" class="btn btn-sm btn-outline-secondary">View</a>
</div>
</div>
</div>
</div>
</div>
`
});
let vm = new Vue({
el: '#app',
data: {
homeworks: [
{
name: 'Homework 2',
description: '',
url: '/Homework2'
},
{
name: 'Homework 4',
description: '',
url: '/Homework4'
},
{
name: 'Homework 6',
description: '',
url: '/Homework6'
},
{
name: 'Middle Term Project',
description: '',
url: '/MiddleTermProject'
}
]
},
methods: {
subURL(subPath) {
let actualPath = window.location.pathname;
if (actualPath[-1] !== '/') {
let parts = actualPath.split("/");
parts.shift();
parts.pop();
actualPath = window.location.protocol + '//' + window.location.host + '/' + parts.join("/");
}
return actualPath + subPath
}
}
});
</script>
</body>
</html>