Skip to content

Commit

Permalink
update style.css
Browse files Browse the repository at this point in the history
  • Loading branch information
Yc Chen committed Jan 10, 2024
1 parent ab60fb6 commit 2c57b98
Show file tree
Hide file tree
Showing 18 changed files with 370 additions and 0 deletions.
31 changes: 31 additions & 0 deletions common/static/dist/css/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.user-bottom-div {
display: block;
text-align: center;
background-color: #ddd;
position: fixed;
bottom: 0;
width: 100%;
height: 50px;
line-height: 50px;
}

.lsb-login {
display: flex;
justify-content: center;
align-items: center;
height: 90vh;
margin: 0;
}

.login-form-wrapper {
background-color: #FFF;
border-radius: 4px;
box-shadow: rgba(0,0,0,0.1) 0 3px 5px;
padding: 30px 40px;
border-top: 5px solid #337ab7;
}

/*.login-form {*/
/* margin: 20px;*/
/*}*/

2 changes: 2 additions & 0 deletions common/static/i18n/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.log("index.js-------------------")
console.log(i18n.get("footer.about"))
Binary file added common/static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions common/static/less/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions common/static/less/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions common/static/less/style.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

a {
color: #000;
font-family: 'Inter Var', -apple-system, BlinkMacSystemFont, San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
}

a:hover {
color: #555555;
}

.navbar-brand {
padding: 0;
}

.navbar-brand > img {
height: 50px;
}

.user-bottom-div {
display: block;
text-align: center;
background-color: #ddd;
position: fixed;
bottom: 0;
width: 100%;
height: 50px;
line-height: 50px;
}

.lsb-login {
display: flex;
justify-content: center;
align-items: center;
height: 90vh;
margin: 0;
}

.login-form-wrapper {
background-color: #FFF;
border-radius: 4px;
box-shadow: rgba(0, 0, 0, 0.1) 0 3px 5px;
padding: 30px 40px;
border-top: 5px solid #337ab7;
}
Empty file.
212 changes: 212 additions & 0 deletions common/static/watermark/shuiyin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory())
} else if (typeof module === 'object' && module.exports) {
module.exports = factory()
} else {
root['watermark'] = factory()
}
}(this, function() {
var watermark = {};
var defaultSettings = {
watermark_id: 'wm_div_id',
watermark_prefix: 'mask_div_id',
watermark_txt: "测试水印",
watermark_x: 50,
watermark_y: 20,
watermark_rows: 0,
watermark_cols: 0,
watermark_x_space: 100,
watermark_y_space: 50,
watermark_font: '微软雅黑',
watermark_color: 'black',
watermark_fontsize: '15px',
watermark_alpha: 0.15,
watermark_width: 210,
watermark_height: 80,
watermark_angle: 20,
watermark_parent_width: 0,
watermark_parent_height: 0,
watermark_parent_node: null,
monitor: true,
};
var loadMark = function(settings) {
if (arguments.length === 1 && typeof arguments[0] === "object") {
var src = arguments[0] || {};
for (key in src) {
if (src[key] && defaultSettings[key] && src[key] === defaultSettings[key]) continue;
else if (src[key] || src[key] === 0) defaultSettings[key] = src[key]
}
}
var watermark_element = document.getElementById(defaultSettings.watermark_id);
watermark_element && watermark_element.parentNode && watermark_element.parentNode.removeChild(watermark_element);
var watermark_parent_element = document.getElementById(defaultSettings.watermark_parent_node);
var watermark_hook_element = watermark_parent_element ? watermark_parent_element : document.body;
var page_width = Math.max(watermark_hook_element.scrollWidth, watermark_hook_element.clientWidth);
var page_height = Math.max(watermark_hook_element.scrollHeight, watermark_hook_element.clientHeight);
var setting = arguments[0] || {};
var parentEle = watermark_hook_element;
var page_offsetTop = 0;
var page_offsetLeft = 0;
if (setting.watermark_parent_width || setting.watermark_parent_height) {
if (parentEle) {
page_offsetTop = parentEle.offsetTop || 0;
page_offsetLeft = parentEle.offsetLeft || 0;
defaultSettings.watermark_x = defaultSettings.watermark_x + page_offsetLeft;
defaultSettings.watermark_y = defaultSettings.watermark_y + page_offsetTop
}
} else {
if (parentEle) {
page_offsetTop = parentEle.offsetTop || 0;
page_offsetLeft = parentEle.offsetLeft || 0
}
}
var otdiv = document.getElementById(defaultSettings.watermark_id);
var shadowRoot = null;
if (!otdiv) {
otdiv = document.createElement('div');
otdiv.id = defaultSettings.watermark_id;
otdiv.setAttribute('style', 'pointer-events: none !important; display: block !important');
if (typeof otdiv.attachShadow === 'function') {
shadowRoot = otdiv.attachShadow({
mode: 'open'
})
} else {
shadowRoot = otdiv
}
var nodeList = watermark_hook_element.children;
var index = Math.floor(Math.random() * (nodeList.length - 1));
if (nodeList[index]) {
watermark_hook_element.insertBefore(otdiv, nodeList[index])
} else {
watermark_hook_element.appendChild(otdiv)
}
} else if (otdiv.shadowRoot) {
shadowRoot = otdiv.shadowRoot
}
defaultSettings.watermark_cols = parseInt((page_width - defaultSettings.watermark_x) / (defaultSettings.watermark_width + defaultSettings.watermark_x_space));
var temp_watermark_x_space = parseInt((page_width - defaultSettings.watermark_x - defaultSettings.watermark_width * defaultSettings.watermark_cols) / (defaultSettings.watermark_cols));
defaultSettings.watermark_x_space = temp_watermark_x_space ? defaultSettings.watermark_x_space : temp_watermark_x_space;
var allWatermarkWidth;
defaultSettings.watermark_rows = parseInt((page_height - defaultSettings.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space));
var temp_watermark_y_space = parseInt((page_height - defaultSettings.watermark_y - defaultSettings.watermark_height * defaultSettings.watermark_rows) / (defaultSettings.watermark_rows));
defaultSettings.watermark_y_space = temp_watermark_y_space ? defaultSettings.watermark_y_space : temp_watermark_y_space;
var allWatermarkHeight;
if (watermark_parent_element) {
allWatermarkWidth = defaultSettings.watermark_x + defaultSettings.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (defaultSettings.watermark_cols - 1);
allWatermarkHeight = defaultSettings.watermark_y + defaultSettings.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (defaultSettings.watermark_rows - 1)
} else {
allWatermarkWidth = page_offsetLeft + defaultSettings.watermark_x + defaultSettings.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (defaultSettings.watermark_cols - 1);
allWatermarkHeight = page_offsetTop + defaultSettings.watermark_y + defaultSettings.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (defaultSettings.watermark_rows - 1)
}
var x;
var y;
for (var i = 0; i < defaultSettings.watermark_rows; i++) {
if (watermark_parent_element) {
y = page_offsetTop + defaultSettings.watermark_y + (page_height - allWatermarkHeight) / 2 + (defaultSettings.watermark_y_space + defaultSettings.watermark_height) * i
} else {
y = defaultSettings.watermark_y + (page_height - allWatermarkHeight) / 2 + (defaultSettings.watermark_y_space + defaultSettings.watermark_height) * i
}
for (var j = 0; j < defaultSettings.watermark_cols; j++) {
if (watermark_parent_element) {
x = page_offsetLeft + defaultSettings.watermark_x + (page_width - allWatermarkWidth) / 2 + (defaultSettings.watermark_width + defaultSettings.watermark_x_space) * j
} else {
x = defaultSettings.watermark_x + (page_width - allWatermarkWidth) / 2 + (defaultSettings.watermark_width + defaultSettings.watermark_x_space) * j
}
var mask_div = document.createElement('div');
var oText = document.createTextNode(defaultSettings.watermark_txt);
mask_div.appendChild(oText);
mask_div.id = defaultSettings.watermark_prefix + i + j;
mask_div.style.webkitTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.MozTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.msTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.OTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.transform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.visibility = "";
mask_div.style.position = "absolute";
mask_div.style.left = x + 'px';
mask_div.style.top = y + 'px';
mask_div.style.overflow = "hidden";
mask_div.style.zIndex = "9999999";
mask_div.style.opacity = defaultSettings.watermark_alpha;
mask_div.style.fontSize = defaultSettings.watermark_fontsize;
mask_div.style.fontFamily = defaultSettings.watermark_font;
mask_div.style.color = defaultSettings.watermark_color;
mask_div.style.textAlign = "center";
mask_div.style.width = defaultSettings.watermark_width + 'px';
mask_div.style.height = defaultSettings.watermark_height + 'px';
mask_div.style.display = "block";
mask_div.style['-ms-user-select'] = "none";
shadowRoot.appendChild(mask_div)
}
}
const minotor = settings.monitor === undefined ? defaultSettings.monitor : settings.monitor;
if (minotor) {
watermarkDom.observe(watermark_hook_element, option);
watermarkDom.observe(document.getElementById('wm_div_id').shadowRoot, option)
}
};
var removeMark = function() {
if (arguments.length === 1 && typeof arguments[0] === "object") {
var src = arguments[0] || {};
for (key in src) {
if (src[key] && defaultSettings[key] && src[key] === defaultSettings[key]) continue;
else if (src[key] || src[key] === 0) defaultSettings[key] = src[key]
}
}
var watermark_element = document.getElementById(defaultSettings.watermark_id);
var _parentElement = watermark_element.parentNode;
_parentElement.removeChild(watermark_element)
};
var globalSetting;
watermark.init = function(settings) {
globalSetting = settings;
loadMark(settings);
window.addEventListener('onload', function() {
loadMark(settings)
});
window.addEventListener('resize', function() {
loadMark(settings)
})
};
watermark.load = function(settings) {
globalSetting = settings;
loadMark(settings)
};
watermark.remove = function() {
removeMark()
};
var callback = function(records) {
if ((globalSetting && records.length === 1) || records.length === 1 && records[0].removedNodes.length >= 1) {
loadMark(globalSetting)
}
};
const MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var watermarkDom = new MutationObserver(callback);
var option = {
'childList': true,
'attributes': true,
'subtree': true,
};
return watermark
}));

function getNow() {
var d = new Date();
var year = d.getFullYear();
var month = change(d.getMonth() + 1);
var day = change(d.getDate());
var hour = change(d.getHours());
var minute = change(d.getMinutes());
var second = change(d.getSeconds());

function change(t) {
if (t < 10) {
return "0" + t;
} else {
return t;
}
}
var time = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second ;
return time;
}
Empty file.
Empty file.
Empty file.
31 changes: 31 additions & 0 deletions src/docker-compose/nginx/https.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
server {
listen 443 ssl;
server_name archery.your-project.com;
ssl_certificate /etc/nginx/ssl/STAR_internal-project_com.crt;
ssl_certificate_key /etc/nginx/ssl/STAR_internal-project_com.key;
ssl_session_timeout 5m;
client_max_body_size 20M;
proxy_read_timeout 600s;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /static {
alias /opt/archery/static;
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}

}
Empty file.
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions src/docker/Dockerfile-8888
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM hhyo/archery:v1.10.0

COPY . /opt/archery/

#port
EXPOSE 443 9123 8888

#start service
ENTRYPOINT bash /opt/archery/src/docker/startup.sh && bash

11 changes: 11 additions & 0 deletions src/docker/Dockerfile-F
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM reg.fpdev.tech/p-common/archery-fv:v1.10.1

WORKDIR /opt/archery

COPY . /opt/archery/

#port
EXPOSE 9123 8888

#start service
ENTRYPOINT bash /opt/archery/src/docker/startup.sh && bash
27 changes: 27 additions & 0 deletions src/docker/http.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server{
listen 9123; #监听的端口
server_name archery;
client_max_body_size 20M;
proxy_read_timeout 600s;

location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /static {
alias /opt/archery/static;
}

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

0 comments on commit 2c57b98

Please sign in to comment.