软件安装向导jquery.steps.js

test.html

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Document</title>
	<link rel="stylesheet" type="text/css" href="unaboot-install.css">
	<link rel="stylesheet" type="text/css" href="adminlte.min.css">
	<script type="text/javascript" src="jquery.min.js"></script>
	<script type="text/javascript" src="jquery.steps.js"></script>
</head>

<body>
<div class="main">
    <div class="container">
        <form method="post" id="install-form" class="signup-form" action="#">
            <div>
                <h3>许可协议</h3>
                <fieldset>
                    <h2>UnaBoot许可协议</h2>
                    <p class="desc">
                        请您在安装使用UnaBoot软件前认真阅读并理解以下协议:
                    </p>
                    <div class="install-txt">
                        <p  class="text-center">版权所有 &copy; 2015-2020,ramostear.com保留所有权利。</p>
                        <p>
                            &nbsp;&nbsp;非常感谢您安装并使用UnaBoot系统,UnaBoot是一款基于Java 8并使用SpringBoot-2.2.2.RELEASE进行构建的博客管理系统,
                            系统默认使用MySQL数据库,内置Markdown文本编辑器,是一款小巧,易用的国产博客平台,现已开放全部源代码,官方网址:
                            <a href="https://www.ramostear.com" target="_blank">https://www.ramostear.com</a>
                        </p>
                        <h5 class="text-blue text-bold">一、许可</h5>
                        <p>&nbsp;&nbsp;1.1 如果您是个人用户,可将本软件用于非商业用途,而不必支付软件授权许可费,商业网站则需获得UnaBoot商业授权,
                            例如:政府单位、教育机构、协会团体、企业、以赢利为目的的站点等。<br>
                            &nbsp;&nbsp;1.2 您可以在本协议的许可范围内,修改UnaBoot源代码和界面风格以适应您的网站要求。<br>
                            &nbsp;&nbsp;1.3 您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。<br>
                            &nbsp;&nbsp;1.4 在获得商业授权之后,您可以将本软件用于商业用途。<br>
                        </p>
                        <h5 class="text-blue text-bold">二、约束和限制</h5>
                        <p>
                            &nbsp;&nbsp; 2.1 任何在使用了UnaBoot的非盈利网站主页上必须加上UnaBoot官方网址(https://www.ramostear.com/)的链接。<br>
                            &nbsp;&nbsp; 2.2 在未获取商业授权之前。任何单位和个人均不得将本“软件”用于商业用途(包括但不限于企业网站、政府单位网站、经营性网站、以盈利为目的的网站)
                            和任何非个人所有的项目中。<br>
                            &nbsp;&nbsp; 2.3 任何非盈利的个人、单位或组织可自行在本软件的基础上进行二次开发,而无需获取任何授权许可。<br>
                        </p>
                        <h5 class="text-blue text-bold">三、测试版(Beta)</h5>
                        <p>&nbsp;&nbsp; 3.1 测试版“软件”其性能和兼容性均未能达到最终稳定版本级别,将来也存在对“软件”进行重大改进的可能,其仅供测试“软件”使用,请勿用于正式生产环境。</p>
                        <h5 class="text-blue text-bold">四、免责声明</h5>
                        <p>
                            &nbsp;&nbsp; 4.1 用户完全自愿使用本软件,您必须了解使用本软件的风险,且愿意承担使用本软件的风险。<br>
                            &nbsp;&nbsp; 4.2  任何情况下,我们不就因使用或不能使用本软件所发生的特殊的、意外的、
                            非直接或间接的损失承担赔偿责任(包括但不限于,资料损失,资料执行不精确,或因由您或第三人承担的损失,
                            或本程序无法与其他程序运作等)。即使已经被事先告知该损害发生的可能性。
                        </p>
                        <p class="text-danger text-bold">
                        <div class="custom-control custom-checkbox custom-control-inline">
                            <input type="checkbox" class="custom-control-input" id="agree" name="agree" value="1">
                            <label class="custom-control-label font-weight-normal text-primary" for="agree">勾选并同意以上协议</label>
                        </div>
                        </p>
                    </div>
                </fieldset>
                <h3>数据库</h3>
                <fieldset>
                    <h2>MySQL数据库</h2>
                    <p class="desc">
                        请根据实际情况填写您的MySQL数据库连接信息,如有疑问,请联系您的网站管理员。
                    </p>
                    <div class="fieldset-content">
                        <div class="form-group row mb-5">
                            <label for="host" class="col-form-label col-2 text-right">Host:</label>
                            <div class="col-8">
                                <input class="form-control" type="text" name="host" id="host" placeholder="数据库主机地址,例如127.0.0.1">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="port" class="col-form-label col-2 text-right">Port:</label>
                            <div class="col-2">
                                <input class="form-control" type="number" name="port" id="port" value="3306">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="db" class="col-form-label col-2 text-right">Name:</label>
                            <div class="col-8">
                                <input class="form-control" type="text" name="db" id="db" placeholder="请输入数据库名称">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="username" class="col-form-label col-2 text-right">Username:</label>
                            <div class="col-8">
                                <input class="form-control" type="text" name="username" id="username" placeholder="请输入数据库管理员名称">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="password" class="col-form-label col-2 text-right">Password:</label>
                            <div class="col-8">
                                <input class="form-control" type="password" name="password" id="password" placeholder="请输入数据库管理员密码">
                            </div>
                        </div>
                    </div>
                </fieldset>
                <h3>站点信息</h3>
                <fieldset>
                    <h2>网站&Admin账户信息</h2>
                    <p class="desc">
                        请填写您的站点信息以及用于管理UnaBoot后台系统的管理员账户信息
                    </p>
                    <div class="fieldset-content">
                        <div class="form-group row mb-5">
                            <label for="siteName" class="col-form-label col-2 text-right">站点名字:</label>
                            <div class="col-8">
                                <input class="form-control" type="text" name="siteName" id="siteName" placeholder="请给您的站点取一个名字">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="siteDomain" class="col-form-label col-2 text-right">站点域名:</label>
                            <div class="col-8">
                                <input class="form-control" type="text" name="siteDomain" id="siteDomain" placeholder="请输入您的站点域名,例:https://www.ramostear.com">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="adminAccount" class="col-form-label col-2 text-right">Admin:</label>
                            <div class="col-8">
                                <input class="form-control" type="email" name="adminAccount" id="adminAccount" placeholder="请输入Admin账户名,例:admin@unaboot.com">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="adminPassword" class="col-form-label col-2 text-right">密码:</label>
                            <div class="col-8">
                                <input class="form-control" type="password" name="adminPassword" id="adminPassword" placeholder="请输入Admin账户密码">
                            </div>
                        </div>
                        <div class="form-group row mb-5">
                            <label for="pwd" class="col-form-label col-2 text-right">确认密码:</label>
                            <div class="col-8">
                                <input class="form-control" type="password" name="pwd" id="pwd" placeholder="请再次输入Admin账户密码">
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
        </form>
    </div>
</div>

<script type="text/javascript">
$(function(){
	 var form = $("#install-form");
	 form.children("div").steps({
            headerTag: "h3",
            bodyTag: "fieldset",
            transitionEffect: "fade",
            stepsOrientation: "vertical",
            titleTemplate: '<div class="title"><span class="step-number">#index#</span><span class="step-text">#title#</span></div>',
            labels: {
                previous: '上一步',
                next: '下一步',
                finish: '确认',
                current: ''
            },
            onStepChanging: function(event, currentIndex, newIndex) {
                if (currentIndex === 0) {

                    form.parent().parent().parent().append('<div class="footer footer-' + currentIndex + '"></div>');
                }
                if (currentIndex === 1) {
                    form.parent().parent().parent().find('.footer').removeClass('footer-0').addClass('footer-' + currentIndex + '');
                }
                if (currentIndex === 2) {
                    form.parent().parent().parent().find('.footer').removeClass('footer-1').addClass('footer-' + currentIndex + '');
                }
                if (currentIndex === 3) {
                    form.parent().parent().parent().find('.footer').removeClass('footer-2').addClass('footer-' + currentIndex + '');
                }
                // if(currentIndex === 4) {
                //     form.parent().parent().parent().append('<div class="footer" style="height:752px;"></div>');
                // }
                
                //form.validate().settings.ignore = ":disabled,:hidden";
                //return form.valid();
                return true;
            },
            onFinishing: function(event, currentIndex) {
               // form.validate().settings.ignore = ":disabled";
               // return form.valid();
               return true;
            },
            onFinished: function(event, currentIndex) {
                var data = $("#install-form").serialize();
                // 发起请求
                /*var load = layer.load(2,{shade:[0.4,'#f0f0f0f0']});
                $.ajax({
                    type:'POST',
                    url:"${una}/unaboot/install.html",
                    data:data,
                    success:function(){
                        layer.close(load);
                        layer.alert("系统已经安装成功",{title:'系统提示信息',icon:1},function(index){
                           layer.close(index);
                           window.location.href = "${una}/admin/login";
                        });
                    },
                    error:function(){
                        layer.close(load);
                        layer.alert("系统初始化异常",{title:'系统提示信息',icon:0});
                    }
                })*/
            },
            onStepChanged: function(event, currentIndex, priorIndex) {
                return true;
            }
        });

});
</script>
</body>
</html>

依赖jquery.steps.js和jquery.js,样式文件adminlte.min.css以及自定义样式unaboot-install.css等
在这里插入图片描述

unaboot-install.css

body{
    overflow-x: hidden;
    background: url("black_dot.png") 0% 0% /14px 14px repeat;
}
.container {
    width: 1400px;
    margin: 0 auto;
    background: #fff; }
display-flex, .form-flex, .form-date-group, .steps ul, .title, .title .step-number, .actions ul li a, .form-radio-flex, .form-find {
    display: flex;
    display: -webkit-flex; }

/* @extend list-type-ulli; */
list-type-ulli, .steps ul, .actions ul {
    list-style-type: none;
    margin: 0;
    padding: 0; }
input,
select,
textarea {
    outline: none;
    appearance: unset !important;
    -moz-appearance: unset !important;
    -webkit-appearance: unset !important;
    -o-appearance: unset !important;
    -ms-appearance: unset !important; }

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    appearance: none !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    -o-appearance: none !important;
    -ms-appearance: none !important;
    margin: 0; }

input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: none !important;
    -moz-box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -o-box-shadow: none !important;
    -ms-box-shadow: none !important; }

input[type=checkbox] {
    appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -o-appearance: checkbox !important;
    -ms-appearance: checkbox !important; }

input[type=radio] {
    appearance: radio !important;
    -moz-appearance: radio !important;
    -webkit-appearance: radio !important;
    -o-appearance: radio !important;
    -ms-appearance: radio !important; }

.clear {
    clear: both; }

h2 {
    font-size: 30px;
    margin: 0px; }
.main {
    padding: 50px 0;
    position: relative;
    z-index: 99; }
fieldset {
    margin: 0px;
    border: none;
    padding: 45px 20px 0px 20px;
}

p.desc {
    margin: 0px;
    margin-bottom: 40px;
    color: #555; }

.form-label {
    display: block;
    width: 100%;
    font-size: 16px;
    margin-bottom: 10px; }

.text-input {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 5px; }
.text-input span {
    color: #222;
    font-weight: bold; }

input {
    width: 100%;
    display: block;
    border: 1px solid #ebebeb;
    height: 50px;
    box-sizing: border-box;
    padding: 0 20px;
    color: #222;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Roboto Slab'; }

#steps-uid-0-p-0 .form-row, #steps-uid-0-p-0 .form-group, #steps-uid-0-p-0 .form-date {
    width: 680px; }

.form-flex {
    margin: 0 -10px; }
.form-flex .form-group {
    width: 50%;
    padding: 0 10px; }

.form-group,
.form-date {
    margin-bottom: 18px;
    position: relative; }

.form-date-group {
    border: 1px solid transparent;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -o-border-radius: 5px;
    -ms-border-radius: 5px; }
.form-date-group select {
    border: 1px solid #ebebeb;
    width: 100%;
    box-sizing: border-box;
    appearance: none !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    -o-appearance: none !important;
    -ms-appearance: none !important;
    position: relative;
    background: 0 0;
    z-index: 10;
    cursor: pointer;
    padding: 0 20px;
    height: 50px;
    font-size: 14px;
    font-family: 'Roboto Slab';
    color: #999;
    box-sizing: border-box;
    background-color: #fff;
    color: #222;
    font-weight: bold; }

.form-date-item {
    position: relative;
    overflow: hidden;
    width: 100px;
    margin-right: 10px; }

.vertical {
    display: block;
    width: 100%;
    overflow: hidden; }
.vertical .steps {
    float: left;
    width: 200px; }
.vertical .content,
.vertical .actions {
    float: right;
    width: 900px;
}

.content {
    height: 720px; }
.install-txt{
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 3px;
    overflow-y: auto;
    max-height: 600px;
    width: 100%;
    margin-bottom: 10px;
}
.install-txt::-webkit-scrollbar{
    display: none;
}
.install-txt p{
    font-family: Microsoft Microsoft YaHei;
    font-weight: 200;
    color: #666666;
    font-size: 16px;
    line-height: 36px;
}
.steps ul {
    flex-direction: column;
    -moz-flex-direction: column;
    -webkit-flex-direction: column;
    -o-flex-direction: column;
    -ms-flex-direction: column;
    position: relative;
    padding-left: 40px;
    padding-top: 60px; }
.steps ul li {
    padding-bottom: 40px;
    position: relative;
    z-index: 99; }
.steps ul li a {
    text-decoration: none;
    color: #222; }
.steps ul:after {
    position: absolute;
    content: '';
    width: 2px;
    height: 180px;
    background: #ebebeb;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    z-index: 9; }

.title {
    align-items: center;
    -moz-align-items: center;
    -webkit-align-items: center;
    -o-align-items: center;
    -ms-align-items: center; }
.title .step-number {
    width: 40px;
    height: 40px;
    align-items: center;
    -moz-align-items: center;
    -webkit-align-items: center;
    -o-align-items: center;
    -ms-align-items: center;
    justify-content: center;
    -moz-justify-content: center;
    -webkit-justify-content: center;
    -o-justify-content: center;
    -ms-justify-content: center;
    border-radius: 50%;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    -o-border-radius: 50%;
    -ms-border-radius: 50%;
    background: #ebebeb;
    color: #999;
    margin-right: 15px;
    margin-left: 5px;
    border: 5px solid #fff;
    font-weight: bold; }
.title .step-text {
    font-weight: bold;
    color: #999; }

.current .title .step-number {
    background: #f5494e;
    color: #fff; }
.current .title .step-text {
    color: #f5494e; }

.content h3 {
    display: none; }

.content, .actions {
    background: #f8f8f8; }

.actions {
    padding-bottom: 40px; }
.actions ul {
    padding-left: 45px;
    padding-right: 55px;
    margin-top: 40px;
}
.actions ul .disabled {
    display: none; }
.actions ul li {
    float: right; }
.actions ul li:first-child {
    float: left; }
.actions ul li:first-child a {
    background: #e8e8e8;
    color: #999; }
.actions ul li a {
    width: 140px;
    height: 50px;
    color: #fff;
    background: #007bff;
    border-radius: 3px;
    align-items: center;
    -moz-align-items: center;
    -webkit-align-items: center;
    -o-align-items: center;
    -ms-align-items: center;
    justify-content: center;
    -moz-justify-content: center;
    -webkit-justify-content: center;
    -o-justify-content: center;
    -ms-justify-content: center;
    text-decoration: none; }

.form-radio-flex {
    flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    -o-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    margin: 0 -15px; }
.form-radio-flex .form-radio-item {
    padding: 0 15px;
    margin-bottom: 25px; }
.form-radio-flex input {
    width: 0;
    height: 0;
    position: absolute;
    left: -9999px; }
.form-radio-flex input + label {
    margin: 0px;
    width: 223px;
    height: 133px;
    box-sizing: border-box;
    position: relative;
    display: inline-block;
    text-align: center;
    background-color: transparent;
    border: 1px solid transparent;
    text-align: center;
    text-transform: none;
    transition: border-color .15s ease-out,  color .25s ease-out,  background-color .15s ease-out, box-shadow .15s ease-out; }
.form-radio-flex input + label img {
    width: 100%;
    height: 100%; }
.form-radio-flex input:checked + label {
    border: 1px solid #4966b1;
    z-index: 1; }
.form-radio-flex input:focus + label {
    outline: none; }
.form-radio-flex input:hover {
    border: 1px solid #4966b1; }

label.error {
    font-family: 'Material-Design-Iconic-Font';
    position: absolute;
    right: 20px;
    top: 50px;
    font-size: 13px;
    color: #f63726; }
label.error:after {
    font-family: 'Material-Design-Iconic-Font';
    position: absolute;
    right: 20px;
    top: 50px;
    font-size: 13px;
    color: #f63726; }

input.error {
    border: 1px solid #f63726; }

#find_bank {
    padding: 0 55px;
    width: 680px;
    margin-right: 20px; }
#find_bank::-webkit-input-placeholder {
    font-weight: 400; }
#find_bank::-moz-placeholder {
    font-weight: 400; }
#find_bank:-ms-input-placeholder {
    font-weight: 400; }
#find_bank:-moz-placeholder {
    font-weight: 400; }

.submit {
    width: 150px;
    background: #666;
    color: #fff;
    font-weight: 400;
    cursor: pointer; }
.submit:hover {
    background-color: #4d4d4d; }

.form-find {
    position: relative;
    padding-bottom: 70px;
    border-bottom: 1px solid #ebebeb; }

.form-icon {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 18px;
    color: #999; }

.choose-bank-desc {
    color: #666666;
    font-weight: 200;
    margin: 0px;
    padding-top: 30px;
    padding-bottom: 35px; }

#slider-margin {
    height: 9px;
    border: none;
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    -o-box-shadow: none;
    -ms-box-shadow: none;
    background: #e8e8e8;
    border-radius: 0px;
    -moz-border-radius: 0px;
    -webkit-border-radius: 0px;
    -o-border-radius: 0px;
    -ms-border-radius: 0px;
    position: relative;
    margin-top: 110px; }
#slider-margin .noUi-marker-horizontal.noUi-marker-large, #slider-margin .noUi-marker-horizontal.noUi-marker {
    height: 0px; }
#slider-margin .noUi-connect {
    background: #4966b1; }
#slider-margin .noUi-connects {
    border-radius: 0px;
    -moz-border-radius: 0px;
    -webkit-border-radius: 0px;
    -o-border-radius: 0px;
    -ms-border-radius: 0px; }
#slider-margin .noUi-handle {
    width: 15px;
    height: 30px;
    top: -12px;
    background: #e8e8e8;
    outline: none;
    border: none;
    right: -15px;
    border: 1px solid #4966b1;
    border-radius: 0px; }
#slider-margin .noUi-handle:after, #slider-margin .noUi-handle:before {
    width: 0px; }
#slider-margin .noUi-handle .noUi-tooltip {
    bottom: 33px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #4966b1;
    padding: 0px; }
#slider-margin .noUi-pips {
    width: 96%; }
#slider-margin .noUi-pips .noUi-value {
    top: -50px;
    font-size: 16px;
    color: #666; }
#slider-margin .noUi-pips .noUi-value:before {
    content: '$'; }
#slider-margin .noUi-pips .noUi-value-horizontal {
    transform: none;
    -moz-transform: none;
    -webkit-transform: none;
    -o-transform: none;
    -ms-transform: none; }

.your-money {
    font-size: 16px;
    color: #222;
    margin: 0px;
    padding-top: 62px; }
.your-money .money {
    font-size: 28px;
    font-weight: bold; }

@media screen and (max-width: 1024px) {
    .container {
        width: calc(100% - 40px);
        max-width: 100%; }

    .vertical .steps, .vertical .content, .vertical .actions {
        float: none;
        width: 100%; }

    #find_bank {
        width: 100%; }

    .form-radio-flex input + label {
        width: 190px;
        height: 120px; } }
@media screen and (max-width: 992px) {
    .content {
        height: 900px; }

    .form-radio-flex input + label {
        width: 100px;
        height: 65px; } }
@media screen and (max-width: 768px) {
    #steps-uid-0-p-0 .form-row, #steps-uid-0-p-0 .form-group, #steps-uid-0-p-0 .form-date {
        width: 100%; }

    .form-flex {
        flex-direction: column;
        -moz-flex-direction: column;
        -webkit-flex-direction: column;
        -o-flex-direction: column;
        -ms-flex-direction: column;
        margin: 0px; }

    .form-flex .form-group {
        padding: 0px; }

    fieldset, .actions ul {
        padding-left: 30px;
        padding-right: 30px; }

    #slider-margin .noUi-pips {
        width: 94%; } }
@media screen and (max-width: 480px) {
    .form-date-group, .form-find {
        flex-direction: column;
        -moz-flex-direction: column;
        -webkit-flex-direction: column;
        -o-flex-direction: column;
        -ms-flex-direction: column; }

    .content {
        height: 1050px; }

    #find_bank {
        margin-bottom: 20px; }

    .actions ul li a {
        width: 100px; }

    .form-radio-flex {
        margin: 0 -5px; }

    .form-radio-flex .form-radio-item {
        padding: 0 5px; }

    .form-radio-flex input + label {
        width: 90px;
        height: 61px; } }

效果如下
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黄宝康

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值