Compare commits
7 Commits
644063b987
...
aae05764f5
Author | SHA1 | Date |
---|---|---|
blek | aae05764f5 | |
blek | f4e3aef32e | |
blek | d018c0c2ba | |
blek | 6e500cf07b | |
blek | 2efdeabf77 | |
blek | 64edbd48d5 | |
blek | 3c30f964f0 |
|
@ -0,0 +1,17 @@
|
||||||
|
# Contributing to blek! File
|
||||||
|
blek! File is a project that aims for high quality standarts,
|
||||||
|
which means that contributions will be reviewed accordingly.
|
||||||
|
This doesnt mean that you shouldn't contribute if you have low skills;
|
||||||
|
it means that you should be ready to expect to make changes in your code as it is reviewed.
|
||||||
|
|
||||||
|
## Argument rules
|
||||||
|
The BDFL of the project is: `blek! <me@blek.codes>`. BDFL's role is to make a final call in case if an argument gets stalled or too controversial.
|
||||||
|
|
||||||
|
Based criticism and analysis is the only things that matter within an argument inside this project. Basic your argument on personal emotions against another person will not be tolerated.
|
||||||
|
|
||||||
|
## Expected workflow
|
||||||
|
The expected workflow is:
|
||||||
|
1. Fork
|
||||||
|
2. Commit changes
|
||||||
|
3. Open a PR
|
||||||
|
4. Merge
|
|
@ -24,6 +24,9 @@ To qualify, your instance must be having:
|
||||||
3. Come up with a unique name
|
3. Come up with a unique name
|
||||||
4. Have a public administrator email
|
4. Have a public administrator email
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Contributing guide is available [here](./CONTRIBUTING.md) (the CONTRIBUTING.md file).
|
||||||
|
|
||||||
## Licensing
|
## Licensing
|
||||||
This software is released under GPL3 license, a copyleft license that protects users' freedom by ensuring that all future copies of this software are open source as well.
|
This software is released under GPL3 license, a copyleft license that protects users' freedom by ensuring that all future copies of this software are open source as well.
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,6 @@ RUN cargo install cargo-watch && \
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt install nodejs npm -y --no-install-recommends && \
|
apt install nodejs npm -y --no-install-recommends && \
|
||||||
npm i -g uglify-js
|
npm i -g uglify-js html-minifier
|
||||||
|
|
||||||
CMD [ "/opt/code/dev-entry.sh" ]
|
CMD [ "/opt/code/dev-entry.sh" ]
|
||||||
|
|
|
@ -8,8 +8,24 @@
|
||||||
const root_drag_rop = document.getElementsByClassName('file-drag-n-drop')[0];
|
const root_drag_rop = document.getElementsByClassName('file-drag-n-drop')[0];
|
||||||
|
|
||||||
// make the root drag&drop element an ideal circle
|
// make the root drag&drop element an ideal circle
|
||||||
root_drag_rop.style.width = root_drag_rop.offsetWidth + 'px';
|
|
||||||
root_drag_rop.style.height = root_drag_rop.offsetWidth + 'px';
|
function updateDragNDrop() {
|
||||||
|
|
||||||
|
if (document.body.scrollWidth < 667) {
|
||||||
|
// mobile
|
||||||
|
delete root_drag_rop.style.width;
|
||||||
|
delete root_drag_rop.style.height;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const width = root_drag_rop.offsetWidth;
|
||||||
|
|
||||||
|
root_drag_rop.style.width = width + 'px';
|
||||||
|
root_drag_rop.style.height = width + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
updateDragNDrop();
|
||||||
|
document.onresize = updateDragNDrop();
|
||||||
|
|
||||||
/** @type {HTMLElement} */
|
/** @type {HTMLElement} */
|
||||||
const drag_rop = document.getElementsByClassName('file-drag-n-drop-inside')[0];
|
const drag_rop = document.getElementsByClassName('file-drag-n-drop-inside')[0];
|
||||||
|
|
|
@ -16,6 +16,22 @@
|
||||||
<title>{{ conf.brand.instance_name }}</title>
|
<title>{{ conf.brand.instance_name }}</title>
|
||||||
|
|
||||||
<style> .footer svg { height: 32px; margin: 10px 0 } </style>
|
<style> .footer svg { height: 32px; margin: 10px 0 } </style>
|
||||||
|
<style>
|
||||||
|
.header .header-text, .header .header-home, .header .header-bg { transition: 250ms ease; }
|
||||||
|
@media (max-width:667px) {
|
||||||
|
|
||||||
|
.header .header-text { text-align: center }
|
||||||
|
.header .header-home { width: 100% }
|
||||||
|
.header .header-bg { left: 50% !important; transform: translateX(-50%); -webkit-mask-image: linear-gradient(90deg, #0000, #000, #0000); }
|
||||||
|
|
||||||
|
{%- if conf.brand.instance_motto.len() != 0 -%}
|
||||||
|
.header .header-home-motto {
|
||||||
|
display:none
|
||||||
|
}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
{%- if cfg!(debug_assertions) -%}
|
{%- if cfg!(debug_assertions) -%}
|
||||||
<link rel="stylesheet" href="/alert.css" />
|
<link rel="stylesheet" href="/alert.css" />
|
||||||
|
@ -33,7 +49,7 @@
|
||||||
{{- conf.brand.instance_name -}}
|
{{- conf.brand.instance_name -}}
|
||||||
{%- if conf.brand.instance_motto.len() != 0 -%}
|
{%- if conf.brand.instance_motto.len() != 0 -%}
|
||||||
{#- Whitespace control is stupid -#}
|
{#- Whitespace control is stupid -#}
|
||||||
{{- " - " -}}{{- conf.brand.instance_motto -}}
|
<span class="header-home-motto">{{- " - " -}}{{- conf.brand.instance_motto -}}</span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -87,6 +87,12 @@ func main() {
|
||||||
|
|
||||||
conf.Validate()
|
conf.Validate()
|
||||||
|
|
||||||
|
if len(conf.Resource) == 0 {
|
||||||
|
fmt.Println("\x1b[33m[warn] No resources are specified\x1b[0m");
|
||||||
|
} else {
|
||||||
|
fmt.Println(fmt.Sprintf("[info] Loaded %d resources", len(conf.Resource)))
|
||||||
|
}
|
||||||
|
|
||||||
if ! conf.ResourceD.Enabled {
|
if ! conf.ResourceD.Enabled {
|
||||||
fmt.Println("\x1b[33m[warn] resourceD is disabled. No resources will be served\x1b[0m")
|
fmt.Println("\x1b[33m[warn] resourceD is disabled. No resources will be served\x1b[0m")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue