mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-25 04:49:25 +00:00
Исправил стили, привел в порядок сайдбар и навбар
This commit is contained in:
parent
5f92454eb3
commit
82e8aeb16a
@ -5,5 +5,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
body {
|
||||||
|
font-size: .875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feather {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
vertical-align: text-bottom;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -17,5 +17,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
main {
|
||||||
|
padding-top: 48px; /* Space for fixed navbar */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<li class="nav-item" :class="{ 'active': subIsActive('/' + port) }">
|
<li class="nav-item" :class="{ 'active': subIsActive('/' + port) }">
|
||||||
<router-link class="nav-link" :to="'/' + port">{{ name }} ({{ port }})</router-link>
|
<router-link class="nav-link" :to="{name: 'home', params: {servicePort: port}}">{{ name }} ({{ port }})
|
||||||
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -9,10 +10,14 @@
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* Returns true if current component active
|
||||||
|
* @param input parent prefix
|
||||||
|
*/
|
||||||
subIsActive(input) {
|
subIsActive(input) {
|
||||||
const paths = Array.isArray(input) ? input : [input];
|
const paths = Array.isArray(input) ? input : [input];
|
||||||
return paths.some(path => {
|
return paths.some(path => {
|
||||||
return this.$route.path.indexOf(path) === 0; // current path starts with this path string
|
return this.$route.path.indexOf(path) === 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,22 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow navbar-expand-lg navbar-expand">
|
||||||
|
<router-link to="/" class="navbar-brand col-sm-3 col-md-2 mr-0">Packmate</router-link>
|
||||||
|
|
||||||
<!-- <div id="nav">-->
|
<!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"-->
|
||||||
<!-- <router-link to="/">Home</router-link> |-->
|
<!-- aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">-->
|
||||||
<!-- <router-link to="/about">About</router-link>-->
|
<!-- <span class="navbar-toggler-icon"></span>-->
|
||||||
<!-- </div>-->
|
<!-- </button>-->
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
||||||
<router-link to="/" class="navbar-brand">Packmate</router-link>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
|
||||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
<!-- <li class="nav-item active">-->
|
|
||||||
<!-- <a class="nav-link" href="#">1337 (L33T)</a>-->
|
|
||||||
<!-- </li>-->
|
|
||||||
<!-- -->
|
|
||||||
<CtfService
|
<CtfService
|
||||||
v-for="service in ctfServices"
|
v-for="service in ctfServices"
|
||||||
:key="service.port"
|
:key="service.port"
|
||||||
@ -33,7 +25,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="my-2 my-lg-0">
|
<div class="my-2 my-lg-0" style="margin-right: 10px;">
|
||||||
<button type="button" class="btn btn-link">
|
<button type="button" class="btn btn-link">
|
||||||
<svg id="i-settings" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16"
|
<svg id="i-settings" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16"
|
||||||
fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||||
@ -69,5 +61,34 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.navbar-brand {
|
||||||
|
padding-top: .75rem;
|
||||||
|
padding-bottom: .75rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
background-color: rgba(0, 0, 0, .25);
|
||||||
|
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar .form-control {
|
||||||
|
padding: .75rem 1rem;
|
||||||
|
border-width: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control-dark {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(255, 255, 255, .1);
|
||||||
|
border-color: rgba(255, 255, 255, .1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control-dark:focus {
|
||||||
|
border-color: transparent;
|
||||||
|
box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
|
||||||
|
}
|
||||||
|
svg {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
bottom: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -2,18 +2,6 @@
|
|||||||
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
|
||||||
<div class="sidebar-sticky">
|
<div class="sidebar-sticky">
|
||||||
<ul class="nav flex-column">
|
<ul class="nav flex-column">
|
||||||
<!-- <li class="nav-item">-->
|
|
||||||
<!-- <a class="nav-link active" href="#">-->
|
|
||||||
<!-- #1<br/>-->
|
|
||||||
<!-- 13:37:01-->
|
|
||||||
<!-- </a>-->
|
|
||||||
<!-- </li>-->
|
|
||||||
<!-- <li class="nav-item">-->
|
|
||||||
<!-- <a class="nav-link" href="#">-->
|
|
||||||
<!-- #2<br/>-->
|
|
||||||
<!-- 12:28:02-->
|
|
||||||
<!-- </a>-->
|
|
||||||
<!-- </li>-->
|
|
||||||
<Stream
|
<Stream
|
||||||
v-for="stream in streams"
|
v-for="stream in streams"
|
||||||
:key="stream.id"
|
:key="stream.id"
|
||||||
@ -48,5 +36,53 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.sidebar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 100; /* Behind the navbar */
|
||||||
|
padding: 48px 0 0; /* Height of navbar */
|
||||||
|
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-sticky {
|
||||||
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
height: calc(100vh - 48px);
|
||||||
|
padding-top: .5rem;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports ((position: -webkit-sticky) or (position: sticky)) {
|
||||||
|
.sidebar-sticky {
|
||||||
|
position: -webkit-sticky;
|
||||||
|
position: sticky;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link .feather {
|
||||||
|
margin-right: 4px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link.active {
|
||||||
|
color: #007bff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link:hover .feather,
|
||||||
|
.sidebar .nav-link.active .feather {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-heading {
|
||||||
|
font-size: .75rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<!-- <a class="nav-link active" href="#">-->
|
<router-link class="nav-link" active-class="active"
|
||||||
<!-- #1<br/>-->
|
:to="{ name: 'home', params: { servicePort: $route.params.servicePort, streamId: id} }">
|
||||||
<!-- 13:37:01-->
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
|
||||||
<!-- </a>-->
|
|
||||||
<router-link class="nav-link" active-class="active" :to="'/' + $route.params.servicePort + '/' + id">
|
|
||||||
#{{id}}<br/>
|
#{{id}}<br/>
|
||||||
{{time}}
|
{{time}}
|
||||||
</router-link>
|
</router-link>
|
||||||
@ -23,4 +21,23 @@
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
|
||||||
|
.sidebar .nav-link {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link .feather {
|
||||||
|
margin-right: 4px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link.active {
|
||||||
|
color: #007bff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .nav-link:hover .feather,
|
||||||
|
.sidebar .nav-link.active .feather {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user