* breadcrumb navbar should make navigation easier now
This commit is contained in:
parent
baedfc72ea
commit
1e2ff50214
@ -1,33 +1,34 @@
|
|||||||
stages:
|
stages:
|
||||||
- pages
|
- pages
|
||||||
- build
|
|
||||||
|
|
||||||
|
# Literally both of these fail 99% of the time so I'm forgoing them completely
|
||||||
|
# for now until I find something doesn't suck
|
||||||
# Builds out the intended zip package
|
# Builds out the intended zip package
|
||||||
package:
|
#package:
|
||||||
image: rustlang/rust:nightly
|
# image: rustlang/rust:nightly
|
||||||
stage: build
|
# stage: build
|
||||||
script:
|
# script:
|
||||||
- rustup default nightly-2021-09-18
|
# - rustup default nightly-2021-09-18
|
||||||
- mkdir -p build
|
# - mkdir -p build
|
||||||
- cp api/templates/ api/static/ build -r
|
# - cp api/templates/ api/static/ build -r
|
||||||
- cargo --version
|
# - cargo --version
|
||||||
- cargo build --release
|
# - cargo build --release
|
||||||
- cp target/release/api build/server
|
# - cp target/release/api build/server
|
||||||
- cp ./scripts/generate-thumbnail.sh build/
|
# - cp ./scripts/generate-thumbnail.sh build/
|
||||||
- cp readme.md build/
|
# - cp readme.md build/
|
||||||
- sh ./scripts/default-rocket-toml.sh
|
# - sh ./scripts/default-rocket-toml.sh
|
||||||
artifacts:
|
# artifacts:
|
||||||
paths:
|
# paths:
|
||||||
- build/
|
# - build/
|
||||||
|
#
|
||||||
# Build the updated docker
|
## Build the updated docker
|
||||||
build-docker-image:
|
#build-docker-image:
|
||||||
stage: build
|
# stage: build
|
||||||
image: docker:stable
|
# image: docker:stable
|
||||||
script:
|
# script:
|
||||||
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin
|
# - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin
|
||||||
- docker build -t registry.gitlab.com/shockrah/clippable .
|
# - docker build -t registry.gitlab.com/shockrah/clippable .
|
||||||
- docker push registry.gitlab.com/shockrah/clippable
|
# - docker push registry.gitlab.com/shockrah/clippable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,11 +83,10 @@ pub fn video(cat: PathBuf, file_base: PathBuf) -> Template {
|
|||||||
let file = map_base_vfile(&cat, &file_base);
|
let file = map_base_vfile(&cat, &file_base);
|
||||||
|
|
||||||
let cat = cat.to_string_lossy();
|
let cat = cat.to_string_lossy();
|
||||||
// First we have to try and find the file
|
|
||||||
|
|
||||||
let mut file_pretty = file.to_string();
|
let mut file_pretty = file.to_string();
|
||||||
for c in ["-", "_", ".mp4", ".mkv", ".webm"] {
|
for c in [".mp4", ".mkv", ".webm"] {
|
||||||
file_pretty = file_pretty.replace(c, " ");
|
file_pretty = file_pretty.replace(c, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
h.insert("title", &file_pretty);
|
h.insert("title", &file_pretty);
|
||||||
@ -95,6 +94,8 @@ pub fn video(cat: PathBuf, file_base: PathBuf) -> Template {
|
|||||||
let url = format!("/clip/{}/{}", &cat, &file);
|
let url = format!("/clip/{}/{}", &cat, &file);
|
||||||
h.insert("url", &url);
|
h.insert("url", &url);
|
||||||
h.insert("desc", &SITEDESC);
|
h.insert("desc", &SITEDESC);
|
||||||
|
h.insert("category", &cat);
|
||||||
|
h.insert("filename", &file_pretty);
|
||||||
|
|
||||||
let thumbnail = format!("/thumbnail/{}/{}", cat, file);
|
let thumbnail = format!("/thumbnail/{}/{}", cat, file);
|
||||||
h.insert("ogimg", &thumbnail);
|
h.insert("ogimg", &thumbnail);
|
||||||
|
@ -33,14 +33,24 @@
|
|||||||
<div id="layout">
|
<div id="layout">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||||
<a style="text-transform: capitalize" class="navbar-brand" href="/">
|
<a style="bread-crumb-item text-transform: capitalize" class="navbar-brand" href="/">
|
||||||
<img src="/static/favicon.png" class="rounded" width="50" height="50">
|
<img src="/static/favicon.png" class="rounded" width="50" height="50">
|
||||||
Home
|
|
||||||
</a>
|
</a>
|
||||||
<a class="navbar-brand" href="/"></a>
|
<ol class="breadcrumb">
|
||||||
{% if page == "category" %}
|
{% if page == "category" %}
|
||||||
<a href="{{url}}" style="text-transform: capitalize;">{{title}}</a>
|
<li class="breadcrumb-item">
|
||||||
{% endif %}
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active" aria-current="page">
|
||||||
|
<a href="{{url}}">{{title}}</a>
|
||||||
|
</li>
|
||||||
|
{# Home page defaults #}
|
||||||
|
{% else %}
|
||||||
|
<li class="breadcrumb-item active" aria-current="page">
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
<h1>{{title}}</h1>
|
<h1>{{title}}</h1>
|
||||||
<div class="video-gallery" id="main-container">
|
<div class="video-gallery" id="main-container">
|
||||||
|
@ -24,10 +24,18 @@
|
|||||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||||
<a style="text-transform: capitalize" class="navbar-brand" href="/">
|
<a style="text-transform: capitalize" class="navbar-brand" href="/">
|
||||||
<img src="/static/favicon.png" class="rounded" width="50" height="50">
|
<img src="/static/favicon.png" class="rounded" width="50" height="50">
|
||||||
Home
|
|
||||||
</a>
|
</a>
|
||||||
<a class="navbar-brand" href="/"></a>
|
<ol class="breadcrumb">
|
||||||
<a href="{{url}}" style="text-transform: capitalize;">{{title}}</a>
|
<li class="breadcrumb-item active">
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">
|
||||||
|
<a href="/category/{{category}}">{{category}}</a>
|
||||||
|
</li>
|
||||||
|
<li class="breadcrumb-item active">
|
||||||
|
<a href="/clip/{{category}}/{{filename}}">{{title}}</a>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
<h1>{{title}}</h1>
|
<h1>{{title}}</h1>
|
||||||
<video width="1280" height="720" controls autoplay>
|
<video width="1280" height="720" controls autoplay>
|
||||||
|
Loading…
Reference in New Issue
Block a user