<%# Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material Argon Template luci-theme-argon Copyright 2020 Jerrykuku Have a bug? Please create an issue here on GitHub! https://github.com/jerrykuku/luci-theme-argon/issues luci-theme-material: Copyright 2015 Lutty Yang Agron Theme https://demos.creative-tim.com/argon-dashboard/index.html Licensed to the public under the Apache License 2.0 -%> <% local sys = require "luci.sys" local util = require "luci.util" local http = require "luci.http" local disp = require "luci.dispatcher" function file_exists(name) local f=io.open(name,"r") if f~=nil then io.close(f) return true else return false end end local boardinfo = util.ubus("system", "board") if boardinfo.model == nil then boardinfo.model = " " end if file_exists("/etc/custom") then file = io.open("/etc/custom", "r") board = file:read("*line") model = file:read("*line") hostname = file:read("*line") file:close() else board = boardinfo.model model = boardinfo.model end local headername = "      " local file = io.open("/etc/header_msg", "r") if file ~= nil then line = file:read("*line") line = line:gsub("", model) line = line:gsub(" ", " ") headername = headername .. line line = file:read("*line") linex = file:read("*line") if linex ~= nil then img_name = resource .. linex else img_name = resource .. "/img/header.png" end file:close() end local node = disp.context.dispatched local fs = require "nixio.fs" local nutil = require "nixio.util" local uci = require 'luci.model.uci'.cursor() -- send as HTML5 http.prepare_content("text/html") math.randomseed(os.time()) -- Custom settings local mode = 'normal' local dark_css = fs.readfile('/www/luci-static/argon/css/dark.css') local bar_color = '#5e72e4' local primary, dark_primary, blur_radius, blur_radius_dark, blur_opacity if fs.access('/etc/config/argon') then primary = uci:get_first('argon', 'global', 'primary') dark_primary = uci:get_first('argon', 'global', 'dark_primary') blur_radius = uci:get_first('argon', 'global', 'blur') blur_radius_dark = uci:get_first('argon', 'global', 'blur_dark') blur_opacity = uci:get_first('argon', 'global', 'transparency') blur_opacity_dark = uci:get_first('argon', 'global', 'transparency_dark') mode = uci:get_first('argon', 'global', 'mode') bar_color = mode == 'dark' and dark_primary or primary end -%> <%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI - LuCI"> - LuCI"> <% if node and node.css then %> <% end -%> <% if css then %> <% end -%> ">
<%=headername or "?"%>
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>

<%:No password set!%>

<%:There is no password set on this router. Go to System->Administration to create password.%>

<% if disp.lookup("admin/system/admin") then %> <% end %>
<%- end -%>