News Editability, and Calendar Movement

This commit is contained in:
AnubisSQLi 2018-08-18 19:18:39 -04:00
parent 144b60e797
commit 93bea3dc7f
7 changed files with 45 additions and 8 deletions

View File

@ -829,6 +829,9 @@ hr {
font-size: 22px;
line-height: 33px;
}
.involved .calTitle {
font-size: 28px;
}
.colored {
color: #38A3BD;

View File

@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../scss/index.sass"],"names":[],"mappings":"AAAQ;AACA;AACA;AAoCR;EACC;EACA;EACA;;;AAED;EACC,aAxCY;EAyCZ;EACA;EACA;EACA,OA1CO;;;AA4CR;EACC;EACA;EACA,kBAhDkB;EAiDlB;;AApCA;EAgCD;IAME;;;AACD;EACC;EACA;EACA;EACA;;AA3CD;EAuCA;IAME;;;AA7CF;EAuCA;IAQE;;;AACF;EACC;EACA;EACA;EACA;;AApDD;EAgDA;IAME;;;;AAEH;EACC;EACA;;AACA;EACC;EACA;EACA,OAtEI;;AAuEL;EACC,OA5EM;;;AA6ER;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAEC;EACC;EACA;EACA,OA/FI;EAgGJ,aAlGS;EAmGT;EACA;EACA;EACA;;AAxFH;EAgFE;IAUE;IACA;;;AACH;EACC,OAnGe;;AAoGhB;EACC;;AA/FF;EAiED;IAiCE;;;;AAEF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAxHO;EA2BP;EACA;EACA;;AA6FA;EACC;EACA;EACA;EACA;EACA;EACA;EAjHD,aAkHmB;EAjHnB,gBAiHmB;;AAtHnB;EA+GA;IA3GA,aAoHoB;IAnHpB,gBAmHoB;;;AACnB;EArHD,aAsHoB;EArHpB,gBAqHoB;;AAClB;EACC;EACA;EACA,OA1II;EA2IJ,aA7IS;EA8IT;EACA;EACA;EACA;;AAnIH;EA2HE;IAUE;IACA;;;AACH;EACC,OA9Ie;;AAMjB;EAoGD;IAsCE;;;;AAEF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAnJA;EA4ID;IASE;;;AACD;EACC;EACA;EACA;EACA;;;AAEF;EACC;EACA;EACA;EA3JA,aA4JkB;EA3JlB,gBA2JkB;;;AAEnB;EACC;EAvJA,aAwJmB;EAvJnB,cAuJmB;;AApKnB;EAkKD;IAIE;IACA;IACA;;;;AAEF;EACC;EA/JA,aAgKmB;EA/JnB,cA+JmB;;AA5KnB;EA0KD;IAIE;IAlKD,aAmKoB;IAlKpB,cAkKoB;;;;AAErB;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA3LA;EAiLD;IAYE;;;AACD;EACC;EACA;EACA,OA5MM;EA6MN;EAGA;EACA;;AAtMD;EA8LA;IAME;;;;AAIH;EACC;EACA;;AA1MA;EAwMD;IAIE;;;;AACF;EACC;EACA;EACA;EACA;EACA;;AAlNA;EA6MD;IAOE;;;;AAEF;EACC;EACA;;;AAED;EACC,OAjOiB;EAkOjB;EACA;EACA;;;AAED;EACC,OA7OO;EA8OP;EACA;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAxPiB;EAyPjB,OAzPiB;EA0PjB;EACA;EACA;EACA;;;AAED;EACC,OArQO;EAsQP,kBAjQiB;EAkQjB;;;AAED;EACC;;;AAED;EACC;EACA;;;AAED;EACC;EACA;EACA;EACA;;AAzQA;EAqQD;IAME;IACA;;;;AAEF;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AACD;EACC;EACA;;AACA;EACC;EACA;EACA,OAtSG;EAuSH;;AACD;EACC,OA7SK;;AA8SN;EACC;;AACF;EACC;EACA,OAlTM;EAmTN;EACA;;AACD;EACC,OAhTgB;;AAiTjB;EACC;;AACD;EACC;EACA;;AA/SD;EA8QD;IAmCE;;;;AAEF;EACC;;AApTA;EAmTD;IAGE;;;;AAGD;EACC,OAtUM;EAuUN;;;AAEF;EACC;EACA;EACA;EApTA,aAqTmB;EApTnB,cAoTmB;;AACnB;EACC;EACA;;;AAEF;EACC;;AAvUA;EAsUD;IAGE;;;;AAEF;EACC;;;AAED;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA,kBAvWS;EAcX,aA0VoB;EAzVpB,gBAyVoB;;AAClB;EACC;EACA,OA7WI;EA8WJ;EACA;EACA;EACA;EAjWH,aAkWqB;EAjWrB,gBAiWqB;;AAEpB;EACC,OA/We;;;AAiXlB;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA,kBAlYU;EAaZ,aAsXoB;EArXpB,gBAqXoB;;AAClB;EACC;EACA,OAzYI;EA0YJ;EACA;EACA;EACA;;;AAEJ;EACC;EACA;EACA;EACA;EACA;;AAxYA;EAmYD;IAOE;IACA;IACA;;;;AAEF;EACC;EACA;EACA;;;AAED;EACC;EACA;;;AAED;EACC,OApaO;EAqaP;EACA;EACA;EACA;EACA;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAlbiB;EAmbjB,OAnbiB;EAobjB;EACA;EACA;EACA;;;AAED;EACC,OA/bO;EAgcP,kBA3biB;EA4bjB;;;AAED;EACC,OA/biB;EAgcjB;EACA;EACA;;AA5bA;EAwbD;IAME;;;;AAEF;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;AACF;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA,OA7dG;;AA8dJ;EACC,OA7de;;AA8dhB;EACC;EACA,OAteK;;AAueN;EACC;EACA,OAreG;;AAseJ;EACC,OAree;;AAsehB;EACC;EACA,OA1eG;;AAQL;EAgcD;IAoCE;;;;AAEF;EACC;EACA;;;AAED;EACC;EACA;EACA;;AACA;EACC;;AA/eD;EA8eA;IAGE;;;;AAEH;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EAlfD,YAmfkB;EAlflB,eAkfkB;;AAClB;EACC;EACA;EACA;;AA/fD;EA4fA;IAKE;;;;AAEH;EACC;EACA;EACA;;AACA;EACC,OA9gBgB;EA+gBhB;EACA;;AACD;EACC;;;AAEF;EACC;EACA;;;AAED;EACC;;;AAED;EACC;EACA,OAniBO;;;AAqiBR;EACC;EACA;;;AAED;EACC;EACA,OAriBiB;;;AAuiBlB;EACC;EACA,OA3iBK;;;AA6iBN;EACC;EACA;EACA,OApjBO;EAqjBP;;;AAED;EACC;EACA,OArjBK;;;AAujBN;EACC;;AAhjBA;EA+iBD;IAGE;IACA;;EACA;IACC;;EACD;IACC;;;;AAEH;EACC;EACA;;;AAED;EACC;EACA;EACA;;AAhkBA;EA6jBD;IAKE;IACA;;;AACD;EACC;EACA;EACA;EACA;;;AAEF;EACC;EACA;EACA;;AACA;EACC;EAGA;;AAllBD;EA8kBA;IAGE;;;;AAGH;EACC;EACA;EACA;EAGA;EACA;;AAHA;EACC;;;AAIF;EACC;EACA;EACA;;AACA;EACC;EACA;;;AAEF;EAjmBC,aAkmBkB;EAjmBlB,gBAimBkB;;;AAEnB;EACC;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBA3nBiB;EA4nBjB,OAjoBO;EAkoBP;EACA;;;AAED;EACC;;;AAED;EACC;EACA;;;AAED;EACC,OAxoBiB;;;AA0oBlB;EACC;;;AAED;EACC;EACA","file":"index.css"}
{"version":3,"sourceRoot":"","sources":["../scss/index.sass"],"names":[],"mappings":"AAAQ;AACA;AACA;AAoCR;EACC;EACA;EACA;;;AAED;EACC,aAxCY;EAyCZ;EACA;EACA;EACA,OA1CO;;;AA4CR;EACC;EACA;EACA,kBAhDkB;EAiDlB;;AApCA;EAgCD;IAME;;;AACD;EACC;EACA;EACA;EACA;;AA3CD;EAuCA;IAME;;;AA7CF;EAuCA;IAQE;;;AACF;EACC;EACA;EACA;EACA;;AApDD;EAgDA;IAME;;;;AAEH;EACC;EACA;;AACA;EACC;EACA;EACA,OAtEI;;AAuEL;EACC,OA5EM;;;AA6ER;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAEC;EACC;EACA;EACA,OA/FI;EAgGJ,aAlGS;EAmGT;EACA;EACA;EACA;;AAxFH;EAgFE;IAUE;IACA;;;AACH;EACC,OAnGe;;AAoGhB;EACC;;AA/FF;EAiED;IAiCE;;;;AAEF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAxHO;EA2BP;EACA;EACA;;AA6FA;EACC;EACA;EACA;EACA;EACA;EACA;EAjHD,aAkHmB;EAjHnB,gBAiHmB;;AAtHnB;EA+GA;IA3GA,aAoHoB;IAnHpB,gBAmHoB;;;AACnB;EArHD,aAsHoB;EArHpB,gBAqHoB;;AAClB;EACC;EACA;EACA,OA1II;EA2IJ,aA7IS;EA8IT;EACA;EACA;EACA;;AAnIH;EA2HE;IAUE;IACA;;;AACH;EACC,OA9Ie;;AAMjB;EAoGD;IAsCE;;;;AAEF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAnJA;EA4ID;IASE;;;AACD;EACC;EACA;EACA;EACA;;;AAEF;EACC;EACA;EACA;EA3JA,aA4JkB;EA3JlB,gBA2JkB;;;AAEnB;EACC;EAvJA,aAwJmB;EAvJnB,cAuJmB;;AApKnB;EAkKD;IAIE;IACA;IACA;;;;AAEF;EACC;EA/JA,aAgKmB;EA/JnB,cA+JmB;;AA5KnB;EA0KD;IAIE;IAlKD,aAmKoB;IAlKpB,cAkKoB;;;;AAErB;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA3LA;EAiLD;IAYE;;;AACD;EACC;EACA;EACA,OA5MM;EA6MN;EAGA;EACA;;AAtMD;EA8LA;IAME;;;;AAIH;EACC;EACA;;AA1MA;EAwMD;IAIE;;;;AACF;EACC;EACA;EACA;EACA;EACA;;AAlNA;EA6MD;IAOE;;;;AAEF;EACC;EACA;;;AAED;EACC,OAjOiB;EAkOjB;EACA;EACA;;;AAED;EACC,OA7OO;EA8OP;EACA;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAxPiB;EAyPjB,OAzPiB;EA0PjB;EACA;EACA;EACA;;;AAED;EACC,OArQO;EAsQP,kBAjQiB;EAkQjB;;;AAED;EACC;;;AAED;EACC;EACA;;;AAED;EACC;EACA;EACA;EACA;;AAzQA;EAqQD;IAME;IACA;;;;AAEF;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AACD;EACC;EACA;;AACA;EACC;EACA;EACA,OAtSG;EAuSH;;AACD;EACC,OA7SK;;AA8SN;EACC;;AACF;EACC;EACA,OAlTM;EAmTN;EACA;;AACD;EACC,OAhTgB;;AAiTjB;EACC;;AACD;EACC;EACA;;AA/SD;EA8QD;IAmCE;;;;AAEF;EACC;;AApTA;EAmTD;IAGE;;;;AAGD;EACC,OAtUM;EAuUN;;;AAEF;EACC;EACA;EACA;EApTA,aAqTmB;EApTnB,cAoTmB;;AACnB;EACC;EACA;;;AAEF;EACC;;AAvUA;EAsUD;IAGE;;;;AAEF;EACC;;;AAED;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA,kBAvWS;EAcX,aA0VoB;EAzVpB,gBAyVoB;;AAClB;EACC;EACA,OA7WI;EA8WJ;EACA;EACA;EACA;EAjWH,aAkWqB;EAjWrB,gBAiWqB;;AAEpB;EACC,OA/We;;;AAiXlB;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA,kBAlYU;EAaZ,aAsXoB;EArXpB,gBAqXoB;;AAClB;EACC;EACA,OAzYI;EA0YJ;EACA;EACA;EACA;;;AAEJ;EACC;EACA;EACA;EACA;EACA;;AAxYA;EAmYD;IAOE;IACA;IACA;;;;AAEF;EACC;EACA;EACA;;;AAED;EACC;EACA;;;AAED;EACC,OApaO;EAqaP;EACA;EACA;EACA;EACA;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAlbiB;EAmbjB,OAnbiB;EAobjB;EACA;EACA;EACA;;;AAED;EACC,OA/bO;EAgcP,kBA3biB;EA4bjB;;;AAED;EACC,OA/biB;EAgcjB;EACA;EACA;;AA5bA;EAwbD;IAME;;;;AAEF;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;AACF;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;EACA,OA7dG;;AA8dJ;EACC,OA7de;;AA8dhB;EACC;EACA,OAteK;;AAueN;EACC;EACA,OAreG;;AAseJ;EACC,OAree;;AAsehB;EACC;EACA,OA1eG;;AAQL;EAgcD;IAoCE;;;;AAEF;EACC;EACA;;;AAED;EACC;EACA;EACA;;AACA;EACC;;AA/eD;EA8eA;IAGE;;;;AAEH;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;EAlfD,YAmfkB;EAlflB,eAkfkB;;AAClB;EACC;EACA;EACA;;AA/fD;EA4fA;IAKE;;;;AAEH;EACC;EACA;EACA;;AACA;EACC,OA9gBgB;EA+gBhB;EACA;;AACD;EACC;;;AAEF;EACC;EACA;;;AAED;EACC;;;AAED;EACC;EACA,OAniBO;;;AAqiBR;EACC;EACA;;;AAED;EACC;EACA,OAriBiB;;;AAuiBlB;EACC;EACA,OA3iBK;;;AA6iBN;EACC;EACA;EACA,OApjBO;EAqjBP;;;AAED;EACC;EACA,OArjBK;;;AAujBN;EACC;;AAhjBA;EA+iBD;IAGE;IACA;;EACA;IACC;;EACD;IACC;;;;AAEH;EACC;EACA;;;AAED;EACC;EACA;EACA;;AAhkBA;EA6jBD;IAKE;IACA;;;AACD;EACC;EACA;EACA;EACA;;;AAEF;EACC;EACA;EACA;;AACA;EACC;EAGA;;AAllBD;EA8kBA;IAGE;;;;AAGH;EACC;EACA;EACA;EAGA;EACA;;AAHA;EACC;;;AAIF;EACC;EACA;EACA;;AACA;EACC;EACA;;;AAEF;EAjmBC,aAkmBkB;EAjmBlB,gBAimBkB;;;AAEnB;EACC;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBA3nBiB;EA4nBjB,OAjoBO;EAkoBP;EACA;;;AAED;EACC;;;AAED;EACC;EACA;;AACA;EACC;;;AAEF;EACC,OA1oBiB;;;AA4oBlB;EACC;;;AAED;EACC;EACA","file":"index.css"}

View File

@ -656,6 +656,8 @@ hr
.involved
font-size: 22px
line-height: 33px
.calTitle
font-size: 28px
.colored
color: $secondary-color

View File

@ -44,7 +44,7 @@ app.use('/resources', express.static(path.join(__dirname, 'resources')))
// PAGES
app.get('/edit', function (req, res) {
var content = JSON.parse(fs.readFileSync('site.json'))
res.render('edit', { officers: JSON.stringify(content.officers), committee: JSON.stringify(content.committee), council: JSON.stringify(content.council) })
res.render('edit', { officers: JSON.stringify(content.officers), committee: JSON.stringify(content.committee), council: JSON.stringify(content.council), news: JSON.stringify(content.news) })
})
app.post('/edit', function (req, res) {
@ -54,6 +54,7 @@ app.post('/edit', function (req, res) {
content.officers = data.officers
content.committee = data.committee
content.council = data.council
content.news = data.news
fs.writeFileSync('site.json', JSON.stringify(content))
res.send({ status: 'editsSaved' })
} else {

View File

@ -198,6 +198,17 @@
margin: 0px;
position: absolute;
}
.longer {
width: 500px;
}
.shorter {
width: 50px;
min-width: 50px;
}
.smaller {
width: 700px;
height: 200px;
}
</style>
<title>SGA Website Editor</title>
<link rel='icon' href='https://i.imgur.com/IRJiPeO.png'>
@ -242,12 +253,29 @@
</div>
<a class='btn title' @click='council.push({"people": []})'>Add Council</a>
<hr/>
<b>News</b>
<div v-for='(nart, k) in news'>
<input v-model='nart.date' placeholder='Date'/>
<input v-model='nart.title' placeholder='Title' class='longer'/>
<input v-model='nart.img' placeholder='Image URL'/>
<input v-model='nart.id' placeholder='ID' class='shorter'/>
<input v-model='nart.url' placeholder='URL: Format is news/"id"'/>
<div v-for='(para, l) in nart.content'>
<textarea v-model='para.para' placeholder='Paragraph' class='smaller'></textarea>
<a class='btn red' @click='nart.content.splice(l, 1)'><i class='fas fa-times'></i></a>
</div>
<a class='btn' @click='nart.content.push({"para": ""})'>Add Paragraph</a>
<a class='btn title red' @click='news.splice(k, 1)'>Remove News Article w/ ID: \{{nart.id}}</a>
</div>
<a class='btn title' @click='news.unshift({"content": [{"para":""}]})'>Add News Article (at top of news section)</a>
<hr/>
<input v-model='password' placeholder='Password' id='password' @keyup.enter='sendEdits' type='password'/>
<a class='btn' @click='sendEdits'>SAVE EDITS</a>
</div>
<p class='hidden' id='officers'>{{officers}}</p>
<p class='hidden' id='committee'>{{committee}}</p>
<p class='hidden' id='council'>{{council}}</p>
<p class='hidden' id='news'>{{news}}</p>
</body>
<script src='https://code.jquery.com/jquery-3.3.1.min.js' integrity='sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=' crossorigin='anonymous'></script>
<script src='https://cdn.jsdelivr.net/npm/vue'></script>
@ -256,6 +284,7 @@
officers: JSON.parse($('#officers').text()),
committee: JSON.parse($('#committee').text()),
council: JSON.parse($('#council').text()),
news: JSON.parse($('#news').text()),
password: ''
}
var app = new Vue({

View File

@ -141,12 +141,6 @@
</div>
</section>
{{/if}}
<section class='content'>
<div class='container'>
<div data-tockify-component="full" data-tockify-calendar="tj.sga"></div>
<script data-cfasync="false" data-tockify-script="embed" src="https://public.tockify.com/browser/embed.js"></script>
</div>
</section>
{{#if site.footer}}
<hr/>
<section class='content banner'>

View File

@ -98,6 +98,14 @@
</div>
</section>
<section class='content involved'>
<div class='container'>
<p class='colored thicc calTitle'>Calendar</p>
<div data-tockify-component="full" data-tockify-calendar="tj.sga"></div>
<script data-cfasync="false" data-tockify-script="embed" src="https://public.tockify.com/browser/embed.js"></script>
</div>
</section>
<section class='content involved'>
<div class='container'>
<p>Interested in getting involved with SGA? You can run for office, work on a project, or apply to a committee. If you just want to share an idea or concern or get to know your representatives, reach out to us at sga.tjhsst@gmail.com!</p>