-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclebrity-news.js
211 lines (154 loc) · 6.67 KB
/
clebrity-news.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// Create Obj Of Array For News category paragraph
//append footer and navbar
import {
innernav,
funcDispBlock,
funcDispNone,
} from "./HeaderNFooter/InnersiteNav/components/navbarComp.js";
import foo from "./HeaderNFooter/HomepageNav/Components/footer.js";
let nav = document.getElementById("header");
nav.innerHTML = innernav();
let footer = document.getElementById("footer");
footer.innerHTML = foo();
let hamburger = document.getElementById("hamburger");
let timesClicked = 0;
hamburger.addEventListener("click", function () {
timesClicked++;
if (timesClicked % 2 == 0) {
funcDispBlock();
} else {
funcDispNone();
}
});
let new_category_para = [
["Brand News "],
["Inspiration "],
["Celebrity News"],
["Trends"],
["Rangoli"],
["Flowers"],
["Tattoos"],
["Top 10'S"],
["Fashion"],
];
let new_category = document.getElementById("new-category");
new_category_para.forEach(function (ele) {
let div = document.createElement("div");
let category = document.createElement("p");
category.innerHTML = ele;
div.append(category)
new_category.append(div)
});
// Create a feture box which has display is flex
let feture_box = document.getElementById("feature-box-para")
// Create two div and append inside feture _ box
feture_boxfun();
function feture_boxfun() {
let feture_box_title = document.createElement("h1");
feture_box_title.innerHTML = "6 Brilliant DIY Ideas For Nail Polish Removers";
let feture_box_para = document.createElement("p");
feture_box_para.innerHTML = "DIY ideas for nail polish removers can save you on an unfortunate day! How? Imagine you are all set to go for a party, trying to find your shoes, when suddenly your eyes notice your fingernails with chipped nail polish! […]";
let feture_box_para1 = document.createElement("p");
feture_box_para1.innerHTML ="BY RAMYA KARAMSETTI";
feture_box.append(feture_box_title, feture_box_para, feture_box_para1)
};
// In the middle section of Celebrity News page
// Create three div
// and append inside middle section
let middle_container = document.getElementById("middle-section")
// Create Object
let Middle_section_data = [
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2020/02/40-Beautiful-Semicolon-Tattoo-Designs-And-Their-Meanings.jpg.webp",
Title:"40 Beautiful Semicolon Tattoo Designs And Their Meanings",
Para:"BY NISHA BAGHADIA ",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2017/12/How-To-Measure-Shoe-Size-%E2%80%93-A-Guide-With-Sizing-Chart.jpg",
Title:"How To Measure Shoe Size – A Perfect Guide With Sizing Chart",
Para:"BY PRATIMA ATI ",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2015/08/2922-6-Best-Vipassana-Centers-In-Hyderabad-ss.jpg.webp",
Title:"6 Best Vipassana Centers In Hyderabad",
Para:"BY JYOTSANA RAO",
},
]
//Import append function from div.js file
import appendfun from "./div.js";
// append data in middle section
appendfun(Middle_section_data,middle_container);
// Create a Middle Section feture box which has display is flex
let feture_box2 = document.getElementById("feature-box2-para")
// Create two div and append inside feture _ box in News Page
feture_box2fun();
function feture_box2fun() {
let feture_box2_title = document.createElement("h1");
feture_box2_title.innerHTML = "Acupressure Points On Ears: What Are They And Do They Work?";
let feture_box2_para = document.createElement("p");
feture_box2_para.innerHTML ="Our body is a temple. It is a mind-boggling entity capable of unbelievable things. For instance, a little knowledge about acupressure points and willpower can help you heal yourself. This article talks particularly about the pressure points on the ears […]";
let feture_box2_para1 = document.createElement("p");
feture_box2_para1.innerHTML = "BY JYOTSANA RAO ";
feture_box2.append(feture_box2_title, feture_box2_para, feture_box2_para1)
}
// Using Imported appendfun and Created Six div In Button Section
// Created Object of array data for buttom section
let Buttom_section_data=[
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2015/06/815_8-Best-Ways-To-Increase-Oxygen-Level-In-Blood_shutterstock_133834292.jpg",
Title:"8 Best Ways To Increase Oxygen Levels In Blood",
Para:"BY JYOTSANA RAO",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2014/12/857_20-Most-Beautiful-Flowers-That-Are-Commonly-Available-In-India_155732036.jpg.webp",
Title:"20 Most Beautiful Flowers That Are Commonly Available In India",
Para:"BY RAMYA KARAMSETTI ",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2017/12/20-Best-Ways-To-Wear-Joggers.jpg.webp",
Title:"20 Best Ways To Wear Joggers To Look Stylish",
Para:"BY PRATIMA ATI",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2018/04/Best-Places-To-Donate-Clothes.jpg.webp",
Title:"9 Best Places To Donate Clothes And Do A Good Deed",
Para:"BY PRATIMA ATI ",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2014/02/16-Best-Pongal-Kolam-Designs-That-You-Should-Try.jpg.webp",
Title:"16 Best Pongal Kolam Designs That You Should Try In 2022",
Para:"BY JYOTSANA RAO",
},
{
imgUrl:"https://cdn2.stylecraze.com/wp-content/uploads/2013/09/2910-Best-Sanskar-Bharti-Rangoli-Designs-Our-Top-10-ss.jpg.webp",
Title:"10 Best Sanskar Bharti Rangoli Designs To Try In 2022",
Para:"BY JYOTSANA RAO",
},
]
let buttom_container=document.getElementById("buttom-section")
appendfun(Buttom_section_data,buttom_container);
document.getElementById("onclick-img").addEventListener("click",nextpage)
function nextpage(){
window.location.href="Celebrity-news-Artical.html"
}
// import footer from "../Footer/footer.js";
// Footer section append in footer part
// document.getElementById("footer-Section").innerHTML=footer()
//redirect function
let redirectfun = (c, loc) => {
document.getElementById(c).addEventListener("click", function () {
showMakeup();
});
function showMakeup() {
window.location.href = loc;
}
};
redirectfun("cate1", "makeup.html");
redirectfun("cate2", "haircare.html");
redirectfun("cate3", "skinCare.html");
redirectfun("cate4", "https://www.stylecraze.com/articles/hairstyles/");
redirectfun("cate5", "health-and-wellness.html");
redirectfun("cate6", "Celebrity-news.html");
redirectfun("cate7", "aboutus.html");
redirectfun("cate8", "products.html");
redirectfun("cate9", "tools.html");