This commit is contained in:
Ryan Burnette 2020-09-19 13:59:59 -04:00
parent 3221481501
commit 8abfc55a7b
23 changed files with 130 additions and 12239 deletions

0
.gitignore vendored Normal file
View File

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "html/themes/arc"]
path = html/themes/arc
url = https://git.ryanburnette.com/ryanburnette/arc

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
html/themes/arc/layouts/**/*.html

View File

@ -1,6 +0,0 @@
{
"trailingComma": "none",
"tabWidth": 2,
"singleQuote": true,
"proseWrap": "always"
}

View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

3
html/axios.min.js vendored

File diff suppressed because one or more lines are too long

8
html/config.toml Normal file
View File

@ -0,0 +1,8 @@
baseURL = "/"
languageCode = "en-us"
title = "cdadmin"
theme = "Arc"
disableKinds = ["RSS"]
[permalinks]
pages = "/:filename"

View File

@ -1,77 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>configure cdadmin</title>
<link
rel="stylesheet"
href="https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="app">
<div class="container">
<div class="header">
<h1>cdadmin</h1>
<p>
<a href="status.html">Status</a>
<a href="merge.html">Merge</a>
<a href="configure.html">Configure</a>
</p>
<h2>Configure</h2>
</div>
<pre>{{configuration}}</pre>
<vue-form-generator
:schema="schema"
:model="configuration"
></vue-form-generator>
<button class="btn btn-primary">Save</button>
</div>
</div>
<script src="https://unpkg.com/vue@2.6.12/dist/vue.js"></script>
<script src="https://unpkg.com/vue-form-generator@2.3.4/dist/vfg.js"></script>
<script src="https://unpkg.com/axios@0.20.0/dist/axios.min.js"></script>
<script>
new Vue({
el: '.app',
components: {
'vue-form-generator': VueFormGenerator.component
},
data: {
configuration: {
repository: '',
production: '',
staging: ''
},
schema: {
fields: [
{
type: 'input',
inputType: 'text',
label: 'Repository',
model: 'repository',
required: true
},
{
type: 'input',
inputType: 'text',
label: 'Production Branch',
model: 'production',
required: true
},
{
type: 'input',
inputType: 'text',
label: 'Staging Branch',
model: 'staging',
required: true
}
]
},
formOptions: {}
}
});
</script>
</body>
</html>

33
html/content/_index.html Normal file
View File

@ -0,0 +1,33 @@
---
title: Dashboard
---
<div class="columns">
<div class="column">
<div class="box">
<h2 class="is-size-5">Staging</h2>
<p>
{ "buildStatus": "idle", "commitHash": "000123", "origin":
"git@bitbucket.org:calacloud/calahealth-website.git", "branch":
"forestry" }
</p>
<p>
<button class="button">Rebuild</button>
<button class="button">Promote</button>
</p>
</div>
</div>
<div class="column">
<div class="box">
<h2 class="is-size-5">Production</h2>
<p>
{ "buildStatus": "idle", "commitHash": "000123", "origin":
"git@bitbucket.org:calacloud/calahealth-website.git", "branch":
"forestry" }
</p>
<p>
<button class="button">Rebuild</button>
</p>
</div>
</div>
</div>

View File

@ -0,0 +1,9 @@
---
title: About
---
<div class="content">
<p class="has-text-centered is-size-5">
<b>cdadmin</b> is a continous deployment tool for static websites.
</p>
</div>

View File

@ -0,0 +1 @@
signin

View File

@ -0,0 +1,25 @@
<footer class="footer">
<div class="container">
<div class="columns">
<div class="column has-text-left">
<p>
<button class="button is-small">Sign Out</button>
</p>
</div>
<div class="column has-text-right">
<p>
<a
href="https://git.ryanburnette.com/ryanburnette/cdadmin"
target="_blank"
>
About cdadmin
</a>
<span>/</span>
<span>Version: 0.1.0</span>
</p>
</div>
</div>
</div>
</footer>
<script src="/main.js"></script>

View File

@ -0,0 +1,3 @@
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/custom.css" />

View File

@ -0,0 +1,8 @@
<header class="header">
<div class="brand content">
<h1>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</h1>
</div>
{{ partial "navbar.html" }}
</header>

View File

@ -0,0 +1,8 @@
<nav class="navbar">
<ul>
<li><a href="/">Dashboard</a></li>
<li><a href="/about">About</a></li>
<li><a href="/sigin">Sign In</a></li>
<li><a href="/signout">Sign Out</a></li>
</ul>
</nav>

View File

@ -1,97 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>cdadmin</title>
<link
rel="stylesheet"
href="https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="app">
<div class="container">
<div class="header">
<h1>cdadmin</h1>
<p>
<a href="status.html">Status</a>
<a href="merge.html">Merge</a>
<a href="configure.html">Configure</a>
</p>
</div>
<div class="section">
<h2>Production</h2>
<p>
URL: <a href="#">URL</a><br />
Status: <br />
Branch: <br />
Commit:
</p>
<p>
<button class="btn btn-primary">Rebuild</button>
</p>
</div>
<section>
<h2>Staging</h2>
<p>
URL: <a href="#">URL</a><br />
Status: <br />
Branch: <br />
Commit:
</p>
<p>
<button class="btn btn-primary">Rebuild</button>
<button class="btn btn-primary">
Merge Staging Into Production
</button>
</p>
</section>
</div>
</div>
<script src="https://unpkg.com/vue@2.6.12/dist/vue.js"></script>
<script src="https://unpkg.com/vue-form-generator@2.3.4/dist/vfg.js"></script>
<script src="https://unpkg.com/axios@0.20.0/dist/axios.min.js"></script>
<script>
new Vue({
el: '.app',
components: {
'vue-form-generator': VueFormGenerator.component
},
data: {
configuration: {
repository: '',
production: '',
staging: ''
},
schema: {
fields: [
{
type: 'input',
inputType: 'text',
label: 'Repository',
model: 'repository',
required: true
},
{
type: 'input',
inputType: 'text',
label: 'Production Branch',
model: 'production',
required: true
},
{
type: 'input',
inputType: 'text',
label: 'Staging Branch',
model: 'staging',
required: true
}
]
},
formOptions: {}
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,3 @@
{
"status": "idle"
}

21
html/static/custom.css Normal file
View File

@ -0,0 +1,21 @@
html,
body,
.footer {
background-color: #ecf0f3;
}
.footer p {
display: inline-block;
font-size: 0.75rem;
line-height: 2rem;
}
.header {
background-color: #ffffff;
padding-top: 0.75rem;
padding-bottom: 0.5rem;
margin-bottom: 2rem;
}
.horizontal-overflow-scroll {
overflow-y: scroll;
}
/* .horizontal-overflow-scroll pre {
} */

View File

@ -1,68 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>cdadmin</title>
<link
rel="stylesheet"
href="https://unpkg.com/bootstrap@4.1.0/dist/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a href="#" class="js-signin">Login</a>
<div class="app">
<div class="container">
<div class="header">
<h1>cdadmin</h1>
</div>
<div class="section">
<h2>Production</h2>
<p>
URL: <a href="#">URL</a><br />
Status: <br />
Branch: <br />
Commit:
</p>
<p>
<button class="btn btn-primary">Rebuild</button>
</p>
</div>
<section>
<h2>Staging</h2>
<p>
URL: <a href="#">URL</a><br />
Status: <br />
Branch: <br />
Commit:
</p>
<p>
<button class="btn btn-primary">Rebuild</button>
<button class="btn btn-primary">Promote</button>
</p>
</section>
</div>
</div>
<div class="pocket"></div>
<script src="https://mock.pocketid.app/pocket/consumer.js"></script>
<script>
document.body
.querySelector('.js-signin')
.addEventListener('click', Pocket.openSignin);
</script>
<script src="https://unpkg.com/vue@2.6.12/dist/vue.js"></script>
<script src="https://unpkg.com/axios@0.20.0/dist/axios.min.js"></script>
<script>
new Vue({
el: '.app',
data: {},
methods: {
login: function (ev) {
ev.preventDefault();
ev.stopPropagation();
}
}
});
</script>
</body>
</html>

View File

@ -1,17 +0,0 @@
.header {
padding: 3rem 0;
text-align: center;
}
.header h1 {
font-weight: bold;
}
.header h2 {
font-weight: bold;
}
.header p {
margin: 2rem 0;
padding: 0;
}
.header p a {
padding: 0 0.5rem;
}

1
html/themes/arc Submodule

@ -0,0 +1 @@
Subproject commit b36be67a27efc4d6051198c395ede90ded2e3f68

11965
html/vue.js

File diff suppressed because it is too large Load Diff

6
html/vue.min.js vendored

File diff suppressed because one or more lines are too long