Renamed api to clippable-svc to be more clear

This commit is contained in:
2022-10-28 12:09:29 -07:00
parent 54af3628e4
commit 348410853a
25 changed files with 19 additions and 7 deletions

View File

@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<title>Clippable Admin Dashboard</title>
<link rel="shortcut icon" type="image/png" href="/static/favicon.png"/>
<script src="/static/dist/bundle.js"></script>
</head>
<body>
<div class="content">
<nav class="navbar navbar-expand-lg navbar-dark">
<a style="bread-crumb-item text-transform: capitalize" class="navbar-brand" href="/">
<img src="/static/favicon.png" class="rounded" width="50" height="50">
</a>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/">Home</a>
</li>
</ol>
</nav>
<div class="content" id="login-display">
<h2>Login to Instance</h2>
<form class="form-inline login-form">
<div class="input-group mb-2">
<input type="password" id="uid" class="form-control mx-sm-3" placeholder="UID code">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" onclick="toggle_visible('uid')">
<label class="form-check-label" for="showuid">Show uid</label>
</div> </div>
<div class="input-group mb-2">
<input type="password" id="apikey" class="form-control mx-sm-3" placeholder="API Key">
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox" onclick="toggle_visible('apikey')">
<label class="form-check-label" for="showuid">Show key</label>
</div>
</div>
<strong id='error' hidden></strong>
<button type="button" class="btn btn-info" id="verify-login-btn">Submit</button>
</form>
</div>
<div class="content" id="dashboard" hidden>
<div class="container">
<form>
<div class="form-group">
<label for="video-file">Pick out video file to upload</label>
<input type="file" class="form-control" id="video-file">
<label for="category">What category should this go in?</label>
<input type="text" class="form-control" id="category">
</div>
</form>
<div id="video-meta" hidden>
<p>Video file name: <code id="vmn"></code></p>
<p>Video file size: <code id="vms"></code></p>
<p>Video file type: <code id="vmt"></code></p>
<button type="button" class="btn btn-primary" id="confirm-upload-btn">Upload</button>
</div>
<div id="upload-response"></div>
<div class="vids-meta-list">
<h1>Videos</h1>
<ul class="list-group" id="videos-list"></ul>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function toggle_visible(id) {
var x = document.getElementById(id);
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<title>{{title}}</title>
<link rel="shortcut icon" type="image/png" href="/static/favicon.png"/>
{% if page == "category" %}
<meta property="og:title" content="{{title}}">
<meta property="og:site_name" content="Clippable">
<meta property="og:url" content="{{url}}">
<meta property="og:description" content="{{desc}}">
<meta property="og:type" content="website">
{% if ogimg %}
<meta property="og:image" content="{{ogimg}}">
{% else %}
<meta property="og:image" content="/static/favicon.png">
{% endif %}
{# Otherwise we defautl to the home tags #}
{% else %}
<meta property="og:title" content="{{sitetitle}}">
<meta property="og:site_name" content="Clippable">
<meta property="og:url" content="{{siteurl}}">
<meta property="og:description" content="{{sitedesc}}">
<meta property="og:type" content="website">
<meta property="og:image" content="/static/favicon.png">
{% endif %}
<script src="/static/dist/bundle.js"></script>
</head>
<body>
<div id="layout">
<div class="content">
{% include "navbar" %}
<h1>{{title}}</h1>
<div class="video-gallery" id="main-container">
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<nav class="navbar navbar-expand-lg navbar-dark">
<a style="bread-crumb-item text-transform: capitalize" class="navbar-brand" href="/">
<img src="/static/favicon.png" class="rounded" width="50" height="50">
</a>
<ol class="breadcrumb">
{% if page == "category" %}
<li class="breadcrumb-item">
<a href="/">Home</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="{{url}}">{{title}}</a>
</li>
{% elif page == "video" %}
<li class="breadcrumb-item">
<a href="/">Home</a>
</li>
<li class="breadcrumb-item">
<a href="/category/{{category}}">{{category}}</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="{{url}}">{{filename}}</a>
</li>
{% else %}
<li class="breadcrumb-item active" aria-current="page">
<a href="/">Home</a>
</li>
{% endif %}
</ol>
</nav>

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta name="generator" content="Hugo 0.88.1" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<title>{{title}}</title>
<link rel="shortcut icon" type="image/png" href="/static/favicon.png"/>
{# Required for a better video player #}
<link href="//vjs.zencdn.net/7.10.2/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/7.10.2/video.min.js"></script>
{# Opengraph tags #}
<meta property="og:title" content="{{title}}">
<meta property="og:site_name" content="Clippable">
<meta property="og:url" content="{{url}}">
<meta property="og:description" content="{{desc}}">
<meta property="og:type" content="video.other">
<meta property="og:image" content="{{clip_thumbnail}}">
{# Image tag requires a default in case of disk memery #}
<meta property="og:video" content="{{clip_url}}">
{% if script %}
<script src="/static/dist/bundle.js"></script>
{% endif %}
</head>
<body>
<div id="layout">
<div class="content">
{% include "navbar" %}
<h1>{{title}}</h1>
<video width="1280" height="720" class="video-js" controls autoplay>
<source src="{{clip_url}}">
wtf get a better browser 1d10t
</video>
</div>
</div>
</body>
</html>