Commit 9113f2cf authored by wangqinghua's avatar wangqinghua

增加字体

修改登录页面的背景
parent 45b6956c
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.2.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.partyCloud.starter.test" version="0.2.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......@@ -18,7 +18,7 @@
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashScreenDelay" value="20000" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
......
......@@ -2,22 +2,8 @@
@import "../theme/style";
@import "../assets/iconfont/iconfont";
html{
font-family: "Noto Sans CJK SC", "Source Han Sans CN";
font-size: 10px !important;
}
//html,ion-app.ios{
// font-family: "webfont",serif !important;
// font-style: normal;
// -webkit-font-smoothing: antialiased;
// -moz-osx-font-smoothing: grayscale;
//}
//.web-font {
// font-family: "webfont",serif !important;
// font-size: 16px;
// font-style: normal;
// -webkit-font-smoothing: antialiased;
// -moz-osx-font-smoothing: grayscale;
//}
p {
margin: 0;
}
......@@ -96,6 +82,9 @@ p {
border-radius: 4px;
height: 35px;
}
.tabs-ios .tab-button-text{
margin-top: -5px !important;
}
.no-info {
text-align: center;
......@@ -362,9 +351,9 @@ a[disabled], button[disabled], [ion-button][disabled],
}
.login-box {
padding-top: 4rem;
padding-top: 2.5rem;
height: 100%;
background-image: url('../assets/imgs/login-bg.png');
background-image: url('../assets/imgs/login_bg.png');
background-size: 100% 100%;
}
......
<html>
<head>
<meta charset="utf-8"/>
<title>webfont</title>
<style type="text/css">
*{margin: 0;padding: 0;list-style: none;}
/*
KISSY CSS Reset
理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。
2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。
3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。
特色:1. 适应中文;2. 基于最新主流浏览器。
维护:玉伯<lifesinger@gmail.com>, 正淳<ragecarrier@gmail.com>
*/
/** 清除内外边距 **/
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
pre, /* text formatting elements 文本格式元素 */
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
th, td /* table elements 表格元素 */ {
margin: 0;
padding: 0;
}
/** 设置默认字体 **/
body,
button, input, select, textarea /* for ie */ {
font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
}
h1, h2, h3, h4, h5, h6 { font-size: 100%; }
address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
/** 重置列表元素 **/
ul, ol { list-style: none; }
/** 重置文本格式元素 **/
a { text-decoration: none; }
a:hover { text-decoration: underline; }
/** 重置表单元素 **/
legend { color: #000; } /* for ie6 */
fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
/* 注:optgroup 无法扶正 */
/** 重置表格元素 **/
table { border-collapse: collapse; border-spacing: 0; }
/* 清除浮动 */
.ks-clear:after, .clear:after {
content: '\20';
display: block;
height: 0;
clear: both;
}
.ks-clear, .clear {
*zoom: 1;
}
.main {padding: 30px 100px;}
.main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}
.helps{margin-top:40px;}
.helps pre{
padding:20px;
margin:10px 0;
border:solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists li{
float:left;
width: 100px;
height:150px;
text-align: center;
}
.icon_lists .icon{
font-size: 42px;
line-height: 100px;
margin: 10px 0;
color:#333;
-webkit-transition: font-size 0.25s ease-out 0s;
-moz-transition: font-size 0.25s ease-out 0s;
transition: font-size 0.25s ease-out 0s;
}
.icon_lists .icon:hover{
font-size: 100px;
}
@font-face {
font-family: "webfont";
src: url('webfont.eot'); /* IE9 */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* chrome、firefox */
url('webfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('webfont.svg#webfont') format('svg'); /* iOS 4.1- */
}
.web-font {
font-family: "webfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>
</head>
<body>
<div class="main">
<h1>webfont 字体预览</h1>
<p class="web-font">说金钱是罪恶,都在捞;说美女是祸水,都想要;说高处不胜寒,都在爬;说烟酒伤身体,都不戒;说天堂最美好,都不去!</p>
<div class="helps">
第一步:使用font-face声明字体
<pre>
@font-face {
font-family: 'webfont';
src: url('webfont.eot'); /* IE9 */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* chrome、firefox */
url('webfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
url('webfont.svg#webfont') format('svg'); /* iOS 4.1- */
}
</pre>
第二步:定义使用webfont的样式
<pre>
.web-font {
font-family: "webfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</pre>
第三步:为文字加上对应的样式
<pre>
&lt;i class="web-font"&gt;说金钱是罪恶,都在捞;说美女是祸水,都想要;说高处不胜寒,都在爬;说烟酒伤身体,都不戒;说天堂最美好,都不去!&lt;/i&gt;
</pre>
</div>
</div>
</body>
</html>
This diff is collapsed.
<div class="slides-content">
<ion-slides (ionSlideDidChange)="slideChange($event)" #slides *ngIf="slidersItems.length>0" pager
<ion-slides (ionSlideDidChange)="slideChange($event)" #slides *ngIf="slidersItems.length>0"
loop="true"
autoplay="2000" speed="1500">
<ion-slide *ngFor="let item of slidersItems;">
......@@ -8,5 +8,7 @@
</ion-slides>
</div>
<p class="slides-title">
{{slideTitle}} <span class="main-color" float-end>{{slideIndex}}<span
style="font-size: 1.5rem;font-weight: 400;">/{{slidersItems.length}}</span></span></p>
\ No newline at end of file
{{slideTitle}}<span class="slide-index" float-end>
<span>{{slideIndex}}</span><span>/{{slidersItems.length}}</span>
</span>
</p>
\ No newline at end of file
......@@ -27,7 +27,7 @@ slide {
}
.slides-title {
color: #333;
color: #4c4c4c;
width: 100%;
text-align: left;
height: 2rem;
......@@ -35,6 +35,17 @@ slide {
padding: 0 1rem;
font-size: 1.5rem;
font-weight: 500;
font-family: 'SourceHanSans-Bold';
.slide-index{
color: #e42417;
font-weight: 400;
span:first-child{
font-size: 1.8rem;
}
span:last-child{
font-size: 1.5rem;
}
}
}
//新闻区
.main-news {
......
......@@ -34,10 +34,11 @@ export class SlideComponent implements AfterViewInit{
resourceType: 2,
isRecommend: 1,
}
}
};
this.tabsSer.stuffPage(data).subscribe(
(res) => {
this.slidersItems = res.data;
this.slidersItems = res.data.list;
if(this.slidersItems.length > 0){
this.slidersItems.forEach(e => {
if (e.title.length > 16) {
e.title = e.title.substr(0, 14) + '...';
......@@ -47,6 +48,7 @@ export class SlideComponent implements AfterViewInit{
}
})
}
}
)
}
......
......@@ -14,6 +14,8 @@ page-stuff-detail {
font-size: 2.5rem;
margin-bottom: .5rem;
line-height: 3rem;
color: #4c4c4c;
font-family: 'SourceHanSans-Bold';
}
.stuff-info {
......@@ -31,6 +33,8 @@ page-stuff-detail {
}
.stuff-content{
line-height: 2.8rem;
color: #444444;
font-family: 'SourceHanSans-Light';
}
}
}
......
......@@ -28,12 +28,9 @@
<input [(ngModel)]="user.remember" name="checkbox" class="jizhu-password" value="1" type="checkbox"
checked="true" style="margin-left:10px;width:17px;height:17px;vertical-align:middle">
<label style="padding-left:5px;font-family:'微软雅黑';" class="jizhu-password-label">记住密码</label>
<label float-end style="padding-left:5px;font-family:'微软雅黑';font-weight: 500" (click)="forgetPassword()" class="main-color jizhu-password-label">忘记密码</label>
</div>
<button type="button" (click)="forgetPassword()" class="login-btn"
style="width: 48%;float: left; color:#e12724;background-color: #ffffff;border-color: #e12724;">
忘记密码
</button>
<button type="button" (click)="login()" class="login-btn" style="width: 48%;float: right;">&nbsp;&nbsp;</button>
<button type="button" (click)="login()" class="login-btn">&nbsp;&nbsp;</button>
</form>
<div class="introduce">
登陆手机号为组织部统一配发的手机号,初始密码为000000,使用过程中如有任何问题请联系人事处。
......
......@@ -45,7 +45,7 @@ page-login {
color: #333333;
}
input::-webkit-input-placeholder{
color: #e9acad;
color: #666666;
}
.login-input-img {
......
......@@ -189,7 +189,7 @@ export class DiscoverPage {
};
this.tabsSer.stuffPage(data).subscribe(
(res) => {
this.newList = res.data;
this.newList = res.data.list;
this.newList.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
......@@ -214,7 +214,7 @@ export class DiscoverPage {
};
this.tabsSer.stuffPage(data).subscribe(
(res) => {
this.newList = res.data;
this.newList = res.data.list;
this.newList.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
......@@ -258,15 +258,17 @@ export class DiscoverPage {
};
this.tabsSer.stuffPage(data).subscribe(
(res) => {
this.newList = res.data;
this.newList = res.data.list;
this.newList.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
}
})
this.slideList[this.toIndex] = this.newList;
setTimeout(()=>{
this.commonSer.toastTime('刷新成功!', 800)
e.complete();
},1000);
}
)
}
......
......@@ -100,8 +100,10 @@
</div>
</ion-slide>
</ion-slides>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
<ion-infinite-scroll #infiniteScrollContent (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles" threshold="10%"
loadingText="加载更多..."></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<!--政治生日-->
......
......@@ -190,5 +190,10 @@ page-home {
.slide-zoom{
text-align: left;
}
//下拉刷新
ion-infinite-scroll{
overflow: hidden;
}
}
import {Component, ElementRef, ViewChild, NgZone, Renderer2} from '@angular/core';
import {NavController, IonicPage, Slides, Content} from 'ionic-angular';
import {NavController, IonicPage, Slides, Content, InfiniteScrollContent} from 'ionic-angular';
import {Http, Response} from '@angular/http';
import {AppService, AppGlobal} from '../../../service/http.service';
import {Storage} from '@ionic/storage';
......@@ -31,6 +31,7 @@ export class HomePage {
@ViewChild('topHeight') topHeight: ElementRef;
@ViewChild('headerTag') headerTag: ElementRef;
@ViewChild('homeMiddleTips') homeMiddleTips: ElementRef;
@ViewChild('infiniteScrollContent') infiniteScrollContent: ElementRef;
picture: string = AppGlobal.domain + '/wisdomgroup';
//所属板块类型:
......@@ -64,9 +65,18 @@ export class HomePage {
spanWidth; //文字宽度
//分页
total = { //总页数
one:Number,
two:Number,
three:Number,
four:Number,
};
constructor(public navCtrl: NavController, public tts: TextToSpeech, public datePipe: DatePipe,
public commonSer: CommonService, public emitSer: EmitService,
public zone: NgZone, public slideListCom: SlideListComponent,
public renderer:Renderer2,
public appService: AppService, public http: Http, public storage: Storage,
public badge: Badge, public tabsSer: TabsService) {
// 接收发射过来的数据
......@@ -91,7 +101,7 @@ export class HomePage {
this.spanWidth = this.tabSpan.nativeElement.offsetWidth; //文字宽度
this.tips.nativeElement.style.width = this.tabSpan.nativeElement.offsetWidth + 'px';
this.tips1.nativeElement.style.width = this.tabSpan.nativeElement.offsetWidth + 'px';
this.change(this.tabsList[1]);
this.change(this.tabsList[0]);
this.getInfo();
this.scrollHeight();
}
......@@ -127,7 +137,8 @@ export class HomePage {
}
this.tabsSer.stuffPage(data).subscribe(
(res) => {
let arr = res.data;
let arr = res.data.list;
if(arr.length > 0){
arr.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
......@@ -136,6 +147,7 @@ export class HomePage {
this.slideList[index] = arr;
this.slides1.slideTo(index, 500);
}
}
)
}
......@@ -238,11 +250,16 @@ export class HomePage {
this.navCtrl.push(NoticePage);
}
//上拉加载
doInfinite(e) {
console.log('infinite');
this.renderer.setStyle(this.infiniteScrollContent.nativeElement,'height','84px');
setTimeout(()=>{
e.complete();
this.renderer.setStyle(this.infiniteScrollContent.nativeElement,'height','0px');
},2000)
}
//下拉刷新
doRefresh(e) {
const data = {
pageSize: 1,
......@@ -254,15 +271,19 @@ export class HomePage {
}
this.tabsSer.stuffPage(data).subscribe(
(res) => {
let arr = res.data;
let arr = res.data.list;
if(arr.length > 0){
arr.forEach(e => {
if (e.attachments.length > 0) {
e.imgUrl = e.attachments[0].path;
}
});
this.commonSer.toastTime('刷新成功!', 800)
this.slideList[this.index] = arr;
}
setTimeout(()=>{
this.commonSer.toastTime('刷新成功!', 800)
e.complete();
},1000)
}
)
}
......
......@@ -31,7 +31,7 @@
</ion-col>
<ion-col col-9 class="card3" id="party-bir" *ngIf="noticeList.length > 0" horizonta-lamp>
<div class="card3-item" *ngFor="let item of noticeList;">
<span *ngIf="noticeTips > 0" class="tips"></span>
<span *ngIf="noticeTips > 0" class="tip"></span>
<span class="color-996">{{item.title}}</span>
{{item.content}}
</div>
......
......@@ -161,7 +161,7 @@ page-serve {
color: #fb9662;
}
.tips {
.tip {
display: inline-block;
padding: 2px;
background-color: #fb9662;
......@@ -327,7 +327,7 @@ page-serve {
.calen-tab {
margin: 10px 10px 0px 10px;
font-size: 1.3rem;
border: 1px solid #ddd;
border: 1px solid #ebebeb;
line-height: 2rem;
border-radius: 5px;
padding: .5rem;
......
......@@ -18,7 +18,6 @@ export class AppGlobal {
// static domain = "http://47.103.35.216:8080"; //阿里云地址
static domain = ""; //本地环境
//图片地址
// static picture = AppGlobal.domain + "/wisdomgroup/manager/getIcon/"; //正式地址
static picture = AppGlobal.domain + "/wisdomgroup/manager/getIcon/"; //测试
......
......@@ -83,6 +83,18 @@ $main-color:#e42417;
// Fonts
// --------------------------------------------------
@font-face {
font-family: "SourceHanSans-Normal";
src: url("../assets/font/SourceHanSansCN-Normal.ttf");
}
@font-face {
font-family: "SourceHanSans-Bold";
src: url("../assets/font/SourceHanSerifCN-Bold.ttf");
}
@font-face {
font-family: "SourceHanSans-Light";
src: url("../assets/font/SourceHanSerifCN-Light.ttf");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment