View Half Demo | View Full Demo | View Card Demo
This theme will look great and work in most newer browsers. If you see an issue please feel free to contact me.
bundle install
npm install
bundle exec gulp
Please note that any changes made to the config.yml
will require that you stop gulp and start it again.
The main settings can be found inside the _config.yml
file:
assets/img/
folderThe background image and other style customizations can be changed in assets/scss/layouts/_card.scss
By default, Uni is set to use the half
layout. To change the layout
change the front matter in index.html
For example, the layout below is using the full
layout. The other options available are half
and card
.
---
layout: full
title: Uni – A one-page Jekyll theme
---
While running bundle exec gulp
modify any of the files in the assets/scss/
folder and your browser will update automatically. No reload required!
The layouts all have their own stylesheets found in assets/scss/layouts/
. This is where images for each of the three layouts can be found. In addition, this is where you can change text color, layout, etc.
The primary color is used for headings, accents, and buttons. It can be changed by modifying the assets/scss/base/_config.scss
file.
Add content in config.yml
or alter index.html
and change {{ content }}
to be whatever you want.
As stated above, the images are set in the respective stylesheets found in assets/scss/layouts/
.
We are using responsive images that require three different image sizes. This allows the browser to serve the appropriate image based on the screen size. Recommended image widths are:
To replace the images, modify the names in the responsivebackground
mixin as shown below.Make sure to include the file extension!
@include responsivebackground("half-sm.jpg", "half-md.jpg", "half-lg.jpg");
When uploading images please keep file size in mind. For optimizing, we recommend using TinyPNG and TinyJPG.
To add your own favicon, replace the image found at assets/img/favicon.png
.
uni生命周期分为:页面生命周期和应用生命周期 应用生命周期: onLaunch:当uni-app初始化完成时触发(全局只触发一次) onShow:当uni-app启动,或从后台进入前台显示 onHide:当uni-app从前台进入后台 onUniNViewMessage:对nvue页面发送的数据进行监听 页面生命周期: onLoad:监听页面加载,其参数为上个页面传递的数据,参数类型为Objec
uni-app中调取接口的三种方式与封装uni.request() 一、uni-app中调取接口的三种方式 1、uni.request({}) uni.request({ url:'/api/getIndexCarousel.jsp', method:'get', success:res=>{ console.log(res.data); this.carouselData = re