mirror of
https://github.com/Blair-SGA-Dev-Team/blazerapp.git
synced 2024-11-21 20:41:16 -05:00
templates
This commit is contained in:
parent
4f9a69707c
commit
ed59b3f47b
|
@ -40,14 +40,22 @@ const getCurrentDate=()=>{
|
||||||
const Announcement = ({item}) => {
|
const Announcement = ({item}) => {
|
||||||
const todayDate = getCurrentDate()
|
const todayDate = getCurrentDate()
|
||||||
const itemDate = new Date(item.item.date)
|
const itemDate = new Date(item.item.date)
|
||||||
const dateInfo = todayDate.getTime()===itemDate.getTime()&&item.item.time!==undefined?item.item.time:(item.item.date+", " + item.item.time)
|
|
||||||
|
var time_array = item.item.time.split(':')
|
||||||
|
if (time_array[0]>12) {
|
||||||
|
var time = String(parseInt(time_array[0])-12) + ':' + String(time_array[1]) + ' PM'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var time = String(time_array[0])+':'+String(time_array[1]) + ' AM'
|
||||||
|
}
|
||||||
|
const dateInfo = todayDate.getTime()===itemDate.getTime()&&item.item.time!==undefined?item.item.time:(item.item.date+", " + time)
|
||||||
return (
|
return (
|
||||||
<View style={{borderWidth: 1, borderColor: '#323232', padding: '2%', marginHorizontal: '2%', marginBottom: '2%', borderRadius: 12}}>
|
<View style={{borderWidth: 1, borderColor: '#323232', padding: '2%', marginHorizontal: '2%', marginBottom: '2%', borderRadius: 12}}>
|
||||||
<View style = {{display: 'flex', flexDirection: 'column', justifyContent: 'space-between'}}>
|
<View style = {{display: 'flex', flexDirection: 'column', justifyContent: 'space-between'}}>
|
||||||
<View style = {{width: '100%'}}>
|
<View style = {{width: '100%'}}>
|
||||||
<Text style={styles.title}>{item.item.message}</Text>
|
<Text style={styles.title}>{item.item.message}</Text>
|
||||||
</View>
|
</View>
|
||||||
{dateInfo!==undefined?<Text style={{fontSize: 12, fontWeight: '200'}}>{dateInfo}</Text>:<></>}
|
{dateInfo!==undefined?<Text style={{fontSize: 12, fontWeight: '200'}}>Posted {dateInfo}</Text>:<></>}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -84,7 +92,7 @@ export const TeacherList = ({route}) => {
|
||||||
var futureBoolean = true
|
var futureBoolean = true
|
||||||
|
|
||||||
for (var i = 0; i < route.params.data.length; i++) {
|
for (var i = 0; i < route.params.data.length; i++) {
|
||||||
const itemDate = new Date(route.params.data[i].date)
|
const itemDate = new Date(parseInt(String(route.params.data[i].date).split('-')[0]), parseInt(String(route.params.data[i].date).split('-')[1])-1, parseInt(String(route.params.data[i].date).split('-')[2]))
|
||||||
if (itemDate.getTime() == todayDate.getTime()) {
|
if (itemDate.getTime() == todayDate.getTime()) {
|
||||||
today.push(route.params.data[i])
|
today.push(route.params.data[i])
|
||||||
}
|
}
|
||||||
|
@ -173,8 +181,8 @@ class Announcements extends React.Component {
|
||||||
return response.text()
|
return response.text()
|
||||||
})
|
})
|
||||||
.then((txt) => {
|
.then((txt) => {
|
||||||
const data = JSON.parse(txt).data;
|
const data = JSON.parse(txt);
|
||||||
console.log(data)
|
data.sort((a,b)=>a.id-b.id)
|
||||||
const teacherNames = [...new Set(data.filter(x=>x.teacher!=null&&x.teacher.trim()!=='').map(x=>x.teacher))];
|
const teacherNames = [...new Set(data.filter(x=>x.teacher!=null&&x.teacher.trim()!=='').map(x=>x.teacher))];
|
||||||
teacherNames.sort()
|
teacherNames.sort()
|
||||||
this.setState({data: data, teacherNames: teacherNames.map(x=>({name:x})),isLoading:false});
|
this.setState({data: data, teacherNames: teacherNames.map(x=>({name:x})),isLoading:false});
|
||||||
|
@ -185,7 +193,6 @@ class Announcements extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<ScrollView style={styles.moreDefault}>
|
<ScrollView style={styles.moreDefault}>
|
||||||
<TeacherButton data={this.state.data.filter(x=>x.teacher==null||x.teacher.trim()==='')} name="No Teacher" navigation={this.props.navigation} />
|
|
||||||
<FlatList
|
<FlatList
|
||||||
data={this.state.favoriteNames.concat(this.state.teacherNames.filter(x=>this.state.favoriteNames.map(({name})=>name).indexOf(x.name) < 0))}
|
data={this.state.favoriteNames.concat(this.state.teacherNames.filter(x=>this.state.favoriteNames.map(({name})=>name).indexOf(x.name) < 0))}
|
||||||
renderItem={({item})=><TeacherButton color={this.state.favoriteNames.indexOf(item) >= 0?'red':'lightgrey'} item={item} data={this.state.data.filter(x=>x.teacher===item.name)} name={item.name} navigation={this.props.navigation} icon={true} addFavorite={this.addFavorite}/>}
|
renderItem={({item})=><TeacherButton color={this.state.favoriteNames.indexOf(item) >= 0?'red':'lightgrey'} item={item} data={this.state.data.filter(x=>x.teacher===item.name)} name={item.name} navigation={this.props.navigation} icon={true} addFavorite={this.addFavorite}/>}
|
||||||
|
|
|
@ -174,7 +174,7 @@ class Calendar extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getData() {
|
getData() {
|
||||||
fetch(`http://127.0.0.1:8080/api/en/events`,{
|
fetch(`${url}/api/`+String(I18n.locale).split('-')[0]+`/events`,{
|
||||||
headers: {
|
headers: {
|
||||||
'Cache-Control': 'no-cache'
|
'Cache-Control': 'no-cache'
|
||||||
} })
|
} })
|
||||||
|
|
|
@ -28,7 +28,8 @@ class ChallengeWeek extends React.Component {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
flip: true
|
flip: true,
|
||||||
|
data:[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,74 +41,31 @@ class ChallengeWeek extends React.Component {
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
return response.text();
|
return response.text();
|
||||||
}).then((json) => {
|
}).then((json) => {
|
||||||
this.setState({data: JSON.parse(json),isLoading:false});
|
const data = JSON.parse(json)
|
||||||
|
data.sort((a,b)=>a.id-b.id)
|
||||||
|
this.setState({data: data,isLoading:false});
|
||||||
}).catch((error) => console.error(error))
|
}).catch((error) => console.error(error))
|
||||||
|
|
||||||
/*this.animatedValue=new Animated.Value(0);
|
|
||||||
this.value=0;
|
|
||||||
this.animatedValue.addListener(({value}) => {
|
|
||||||
this.value=value;
|
|
||||||
})
|
|
||||||
this.frontInterpolate = this.animatedValue.interpolate({
|
|
||||||
inputRange:[0,180],
|
|
||||||
outputRange:['0deg', '180deg'],
|
|
||||||
})
|
|
||||||
this.backInterpolate = this.animatedValue.interpolate({
|
|
||||||
inputRange:[0,180],
|
|
||||||
outputRange: ['180deg','360deg']
|
|
||||||
})*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*flipCard() {
|
|
||||||
if (this.value >= 90) {
|
|
||||||
Animated.spring(this.animatedValue, {
|
|
||||||
toValue:0,
|
|
||||||
friction:8,
|
|
||||||
tension: 10
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Animated.spring(this.animatedValue, {
|
|
||||||
toValue:180,
|
|
||||||
friction: 8,
|
|
||||||
tension: 10
|
|
||||||
}).start();
|
|
||||||
}
|
|
||||||
this.setState({flip:!this.state.flip})
|
|
||||||
}*/
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
{/*const frontAnimatedStyle = {
|
|
||||||
transform: [
|
|
||||||
{rotateY:this.frontInterpolate}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
const backAnimatedStyle = {
|
|
||||||
transform: [
|
|
||||||
{rotateY:this.backInterpolate}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
var styling={}
|
|
||||||
var styling2={}
|
|
||||||
if (this.state.flip) {
|
|
||||||
styling=({height: '100%', width: '100%', backgroundColor: 'white', borderRadius: 20, textAlign: 'center', display: 'flex', alignContent: 'center', padding: '5%', paddingTop: '15%', borderColor: 'red', borderWidth: 1})
|
|
||||||
styling2=({display:'none'})
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
styling=({display:'none'})
|
|
||||||
styling2=({height: '100%', width: '100%', backgroundColor: 'white', borderRadius: 20, textAlign: 'center', display: 'flex', alignContent: 'center', padding: '5%', paddingTop: '15%', borderColor: 'red', borderWidth: 1})
|
|
||||||
}*/}
|
|
||||||
|
|
||||||
if (this.state.isLoading) {
|
if (this.state.isLoading) {
|
||||||
return <View/>
|
return <View/>
|
||||||
} else {
|
} else {
|
||||||
return (
|
if (this.state.data[this.state.data.length-1]==undefined) {
|
||||||
<View style={{alignItems:'center',paddingiorizontal:'10%', height: '100%', backgroundColor: 'white', justifyContent: 'center', padding: '2%'}}>
|
return (
|
||||||
<Text style={{fontSize: 32, fontWeight: 'bold', marginBottom: '10%', color: 'red', textAlign: 'center'}}>{this.state.data.title}</Text>
|
<View style={{alignItems:'center',paddingiorizontal:'10%', height: '100%', backgroundColor: 'white', justifyContent: 'center', padding: '2%'}}>
|
||||||
<Text style={{textAlign:'center', fontSize: 24, marginBottom: '5%', textAlign: 'center', fontWeight: '200'}}>{this.state.data.text}</Text>
|
<Text style={{fontSize: 32, fontWeight: 'bold', marginBottom: '10%', color: 'red', textAlign: 'center'}}>No challenge</Text>
|
||||||
<Text style={{textAlign:'center', fontSize: 20, textDecorationLine: 'underline', textDecorationStyle: "solid", textDecorationColor: "#000"}} onPress={() => Linking.openURL(this.state.data.link)}>{I18n.t("challenge.link")}</Text>
|
</View>
|
||||||
</View>
|
)
|
||||||
)
|
} else {
|
||||||
|
return (
|
||||||
|
<View style={{alignItems:'center',paddingiorizontal:'10%', height: '100%', backgroundColor: 'white', justifyContent: 'center', padding: '2%'}}>
|
||||||
|
<Text style={{fontSize: 32, fontWeight: 'bold', marginBottom: '10%', color: 'red', textAlign: 'center'}}>{this.state.data[this.state.data.length-1].title}</Text>
|
||||||
|
<Text style={{textAlign:'center', fontSize: 24, marginBottom: '5%', textAlign: 'center', fontWeight: '200'}}>{this.state.data[this.state.data.length-1].text}</Text>
|
||||||
|
<Text style={{textAlign:'center', fontSize: 20, textDecorationLine: 'underline', textDecorationStyle: "solid", textDecorationColor: "#000"}} onPress={() => Linking.openURL(this.state.data[this.state.data.length-1].link)}>{I18n.t("challenge.link")}</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,8 +148,12 @@ class Clubs extends React.Component {
|
||||||
return response.text();
|
return response.text();
|
||||||
})
|
})
|
||||||
.then((json) => {
|
.then((json) => {
|
||||||
this.setState({data: JSON.parse(json).clubs,dataSearch:JSON.parse(json).clubs });
|
const data = JSON.parse(json)
|
||||||
|
data.sort((a,b)=>a.id-b.id)
|
||||||
|
this.setState({data: data,dataSearch:data });
|
||||||
|
console.log(this.state.data)
|
||||||
})
|
})
|
||||||
|
|
||||||
.catch((error) => console.error(error))
|
.catch((error) => console.error(error))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
72
app/Home.js
72
app/Home.js
File diff suppressed because one or more lines are too long
|
@ -54,7 +54,8 @@ export default {
|
||||||
},
|
},
|
||||||
lunch: {
|
lunch: {
|
||||||
information: "Information",
|
information: "Information",
|
||||||
location: "Location"
|
location: "Location",
|
||||||
|
time: "Time of Event"
|
||||||
},
|
},
|
||||||
ssl: {
|
ssl: {
|
||||||
information: "Information",
|
information: "Information",
|
||||||
|
|
|
@ -54,7 +54,8 @@ export default {
|
||||||
},
|
},
|
||||||
lunch: {
|
lunch: {
|
||||||
information: "ESInformation",
|
information: "ESInformation",
|
||||||
location: "ESLocation"
|
location: "ESLocation",
|
||||||
|
time:"ES TIME OF EVENT"
|
||||||
},
|
},
|
||||||
ssl: {
|
ssl: {
|
||||||
information: "ESInformation",
|
information: "ESInformation",
|
||||||
|
|
|
@ -55,6 +55,14 @@ const Stack = createStackNavigator();
|
||||||
function LunchEvent (props) {
|
function LunchEvent (props) {
|
||||||
const item = props.item
|
const item = props.item
|
||||||
const [expand, setExpand] = useState(false);
|
const [expand, setExpand] = useState(false);
|
||||||
|
|
||||||
|
var time_array = item.time.split(':')
|
||||||
|
if (time_array[0]>12) {
|
||||||
|
var time = String(parseInt(time_array[0])-12) + ':' + String(time_array[1]) + ' PM'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var time = String(time_array[0])+':'+String(time_array[1]) + ' AM'
|
||||||
|
}
|
||||||
return(
|
return(
|
||||||
<View>
|
<View>
|
||||||
<TouchableOpacity style={styles.listItem} onPress={()=>setExpand(!expand)}>
|
<TouchableOpacity style={styles.listItem} onPress={()=>setExpand(!expand)}>
|
||||||
|
@ -65,7 +73,15 @@ function LunchEvent (props) {
|
||||||
{expand?<LinearGradient start={{x: 0, y: 0.25}} end={{x: .5, y: 1}} colors={['red', '#FF7373']} style={{borderRadius: 24, alignSelf: 'center'}}><Image source = {require('./assets/collapse.png')} style={{tintColor: 'white'}}/></LinearGradient>:<Image source = {require('./assets/expand.png')} style={{tintColor: '#b2b2b2', alignSelf: 'center'}}/>}
|
{expand?<LinearGradient start={{x: 0, y: 0.25}} end={{x: .5, y: 1}} colors={['red', '#FF7373']} style={{borderRadius: 24, alignSelf: 'center'}}><Image source = {require('./assets/collapse.png')} style={{tintColor: 'white'}}/></LinearGradient>:<Image source = {require('./assets/expand.png')} style={{tintColor: '#b2b2b2', alignSelf: 'center'}}/>}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{expand?<View style={{marginLeft: 50}}><Text style={styles.accordianHeader}>{I18n.t('lunch.information')}</Text><Text style={styles.accordianText}>{item.text}</Text><Text style={styles.accordianHeader}>{'\n'}{I18n.t('lunch.location')}</Text><Text style={[styles.accordianText, {paddingBottom: '4%'}]}>{item.loc}</Text></View>:<></>}
|
{expand?
|
||||||
|
<View style={{marginLeft: 50}}>
|
||||||
|
<Text style={styles.accordianHeader}>{I18n.t('lunch.information')}</Text>
|
||||||
|
<Text style={styles.accordianText}>{item.text}</Text>
|
||||||
|
<Text style={styles.accordianHeader}>{'\n'}{I18n.t('lunch.location')}</Text>
|
||||||
|
<Text style={[styles.accordianText, {paddingBottom: '4%'}]}>{item.location}</Text>
|
||||||
|
<Text syle={styles.accordianHeader}>{'\n'}{I18n.t('lunch.time')}</Text>
|
||||||
|
<Text style={[styles.accordianText, {paddingBottom: '4%'}]}>{time}</Text>
|
||||||
|
</View>:<></>}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -81,7 +97,7 @@ class LunchEvents extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
fetch(`${url}/api/`+String(I18n.locale).split('-')[0]+`/lunchEvents`,{
|
fetch(`${url}/api/`+String(I18n.locale).split('-')[0]+`/lunch_events`,{
|
||||||
headers: {
|
headers: {
|
||||||
'Cache-Control': 'no-cache'
|
'Cache-Control': 'no-cache'
|
||||||
}
|
}
|
||||||
|
@ -91,7 +107,9 @@ class LunchEvents extends React.Component {
|
||||||
return response.text();
|
return response.text();
|
||||||
})
|
})
|
||||||
.then((json) => {
|
.then((json) => {
|
||||||
this.setState({data: JSON.parse(json)});
|
const data = JSON.parse(json)
|
||||||
|
data.sort((a,b)=>a.id-b.id)
|
||||||
|
this.setState({data: data});
|
||||||
})
|
})
|
||||||
.catch((error) => console.error(error))
|
.catch((error) => console.error(error))
|
||||||
}
|
}
|
||||||
|
|
57
app/Poll.js
57
app/Poll.js
|
@ -80,21 +80,54 @@ import {
|
||||||
DebugInstructions,
|
DebugInstructions,
|
||||||
ReloadInstructions,
|
ReloadInstructions,
|
||||||
} from 'react-native/Libraries/NewAppScreen';
|
} from 'react-native/Libraries/NewAppScreen';
|
||||||
|
import { url } from './resources/fetchInfo.json'
|
||||||
import {WebView} from 'react-native-webview';
|
import {WebView} from 'react-native-webview';
|
||||||
|
import I18n from 'i18n-js';
|
||||||
|
|
||||||
class Poll extends React.Component {
|
class Poll extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props)
|
||||||
|
this.state = {
|
||||||
|
data:[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
componentDidMount() {
|
||||||
|
fetch(`${url}/api/`+String(I18n.locale).split('-')[0]+`/polls`,{
|
||||||
|
headers: {
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
}}
|
||||||
|
).then((response) => {
|
||||||
|
return response.text();
|
||||||
|
}).then((json) => {
|
||||||
|
const data = JSON.parse(json)
|
||||||
|
data.sort((a,b)=>a.id-b.id)
|
||||||
|
this.setState({data: data});
|
||||||
|
}).catch((error) => console.error(error))
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
if (this.state.isLoading) {
|
||||||
<WebView
|
return <View/>
|
||||||
source = {{uri: 'https://docs.google.com/forms/d/e/1FAIpQLSfR0XP2yo3TV3egz7aMok56wnP9kG4FQt2v3rHrrayf8uC7Vw/viewform?usp=sf_link'}}
|
} else {
|
||||||
javaScriptEnabled={true}
|
if (this.state.data.length==0) {
|
||||||
domStorageEnabled={true}
|
return (
|
||||||
startInLoadingState={true}
|
<View style={{alignItems:'center',paddingiorizontal:'10%', height: '100%', backgroundColor: 'white', justifyContent: 'center', padding: '2%'}}>
|
||||||
style={{marginTop: 0}}
|
<Text style={{fontSize: 32, fontWeight: 'bold', marginBottom: '10%', color: 'red', textAlign: 'center'}}>No Poll</Text>
|
||||||
cacheEnabled={true}
|
</View>
|
||||||
|
)
|
||||||
/>
|
} else {
|
||||||
|
return (
|
||||||
)
|
<WebView
|
||||||
|
source = {{uri: this.state.data[this.state.data.length-1].url}}
|
||||||
|
javaScriptEnabled={true}
|
||||||
|
domStorageEnabled={true}
|
||||||
|
startInLoadingState={true}
|
||||||
|
style={{marginTop: 0}}
|
||||||
|
cacheEnabled={true}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,8 @@ class SSLOps extends React.Component {
|
||||||
return response.text();
|
return response.text();
|
||||||
})
|
})
|
||||||
.then((json) => {
|
.then((json) => {
|
||||||
|
const data = JSON.parse(json)
|
||||||
|
data.sort((a,b)=>a.id-b.id)
|
||||||
this.setState({data: JSON.parse(json)});
|
this.setState({data: JSON.parse(json)});
|
||||||
})
|
})
|
||||||
.catch((error) => console.error(error))
|
.catch((error) => console.error(error))
|
||||||
|
|
12
app/Staff.js
12
app/Staff.js
|
@ -179,8 +179,10 @@ class Staffs extends React.Component {
|
||||||
return response.text();
|
return response.text();
|
||||||
})
|
})
|
||||||
.then((json) => {
|
.then((json) => {
|
||||||
this.setState({data: JSON.parse(json).data});
|
const data = JSON.parse(json)
|
||||||
this.setState({dataSearch:JSON.parse(json).data});
|
data.sort((a,b)=>a.id-b.id)
|
||||||
|
this.setState({data: data});
|
||||||
|
this.setState({dataSearch: data});
|
||||||
})
|
})
|
||||||
.catch((error) => console.error(error))
|
.catch((error) => console.error(error))
|
||||||
}
|
}
|
||||||
|
@ -197,7 +199,9 @@ class Staffs extends React.Component {
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const { data , dataSearch,search} = this.state;
|
const { data , dataSearch,search} = this.state;
|
||||||
|
if (this.state.isLoading) {
|
||||||
|
return <View/>
|
||||||
|
} else {
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={styles.moreDefault}>
|
<SafeAreaView style={styles.moreDefault}>
|
||||||
<SearchBar
|
<SearchBar
|
||||||
|
@ -214,7 +218,7 @@ class Staffs extends React.Component {
|
||||||
/>
|
/>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
|
||||||
);
|
);}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,9 @@ class StudentWeek extends React.Component {
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
return response.text();
|
return response.text();
|
||||||
}).then((json) => {
|
}).then((json) => {
|
||||||
|
const data = JSON.parse(json)
|
||||||
this.setState({data: JSON.parse(json),isLoading:false});
|
data.sort((a,b)=>a.id-b.id)
|
||||||
|
this.setState({data: data,isLoading:false});
|
||||||
console.log(this.state.data)
|
console.log(this.state.data)
|
||||||
}).catch((error) => console.error(error))
|
}).catch((error) => console.error(error))
|
||||||
}
|
}
|
||||||
|
@ -67,17 +68,18 @@ class StudentWeek extends React.Component {
|
||||||
if (this.state.isLoading) {
|
if (this.state.isLoading) {
|
||||||
return <View/>
|
return <View/>
|
||||||
} else {
|
} else {
|
||||||
const iconURI = this.state.data.icon !== undefined?`data:image/png;charset=utf-8;base64,${this.state.data.icon}`:'';
|
console.log(this.state.data[this.state.data.length-1].image)
|
||||||
const hobbyText = (<Text style = {{marginLeft: 50, paddingHorizontal: '2%', paddingBottom: '2%'}}>{this.state.data.hobbies}</Text>)
|
const iconURI = this.state.data[this.state.data.length-1].image !== undefined?`data:image/png;charset=utf-8;base64,${this.state.data[this.state.data.length-1].image}`:'';
|
||||||
const achievementText = (<Text style = {{marginLeft: 50, paddingHorizontal: '2%', paddingBottom: '2%'}}>{this.state.data.achievements}</Text>)
|
const hobbyText = (<Text style = {{marginLeft: 50, paddingHorizontal: '2%', paddingBottom: '2%'}}>{this.state.data[this.state.data.length-1].hobbies}</Text>)
|
||||||
const messageText = (<Text style = {{marginLeft: 50, paddingHorizontal: '2%', paddingBottom: '2%'}}>{this.state.data.messages}</Text>)
|
const achievementText = (<Text style = {{marginLeft: 50, paddingHorizontal: '2%', paddingBottom: '2%'}}>{this.state.data[this.state.data.length-1].achievements}</Text>)
|
||||||
|
const messageText = (<Text style = {{marginLeft: 50, paddingHorizontal: '2%', paddingBottom: '2%'}}>{this.state.data[this.state.data.length-1].messages}</Text>)
|
||||||
return (
|
return (
|
||||||
<ScrollView style={{paddingTop:'5%',paddingHorizontal:'10%', backgroundColor: 'white', height: '100%'}}>
|
<ScrollView style={{paddingTop:'5%',paddingHorizontal:'10%', backgroundColor: 'white', height: '100%'}}>
|
||||||
<View style={{backgroundColor: 'white',borderRadius: 150, height: 300, width: 300, alignSelf: 'center', shadowColor: 'red', shadowOffset: {width: 0, height: 2}, shadowOpacity: 0.5, shadowRadius: 7}}>
|
<View style={{backgroundColor: 'white',borderRadius: 150, height: 300, width: 300, alignSelf: 'center', shadowColor: 'red', shadowOffset: {width: 0, height: 2}, shadowOpacity: 0.5, shadowRadius: 7}}>
|
||||||
<Image style={{resizeMode: 'cover',borderRadius: 150, height: 300, width: 300, alignSelf: 'center'}} source = {{iconURI}} />
|
<Image style={{resizeMode: 'cover',borderRadius: 150, height: 300, width: 300, alignSelf: 'center'}} source = {{iconURI}} />
|
||||||
</View>
|
</View>
|
||||||
<Text style={{fontSize:28,marginTop:'5%',textAlign:'center'}}>{this.state.data.name}</Text>
|
<Text style={{fontSize:28,marginTop:'5%',textAlign:'center'}}>{this.state.data[this.state.data.length-1].name}</Text>
|
||||||
<Text style={{fontSize:20,textAlign:'center', fontWeight: '200'}}>{I18n.t('student.Grade')} {this.state.data.year}</Text>
|
<Text style={{fontSize:20,textAlign:'center', fontWeight: '200'}}>{I18n.t('student.Grade')} {this.state.data[this.state.data.length-1].grade}</Text>
|
||||||
<View>
|
<View>
|
||||||
<View style={{display: 'flex', padding:'2%', borderRadius: 8, marginTop:'5%'}}>
|
<View style={{display: 'flex', padding:'2%', borderRadius: 8, marginTop:'5%'}}>
|
||||||
<TouchableOpacity onPress = {this.clickHobby.bind(this)}>
|
<TouchableOpacity onPress = {this.clickHobby.bind(this)}>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"url":"https://blazerappcms.ml/"}
|
{"url":"http://127.0.0.1:8080"}
|
|
@ -1,11 +1,13 @@
|
||||||
DROP TABLE auth_val;
|
DROP TABLE auth_val;
|
||||||
|
|
||||||
|
DROP TABLE student;
|
||||||
DROP TABLE events;
|
DROP TABLE events;
|
||||||
DROP TABLE teachers;
|
DROP TABLE teachers;
|
||||||
DROP TABLE announcements;
|
DROP TABLE announcements;
|
||||||
DROP TABLE clubs;
|
DROP TABLE clubs;
|
||||||
DROP TABLE lunch_events;
|
DROP TABLE lunch_events;
|
||||||
DROP TABLE ssl_opps;
|
DROP TABLE ssl_ops;
|
||||||
DROP TABLE polls;
|
DROP TABLE polls;
|
||||||
DROP TABLE new;
|
DROP TABLE new;
|
||||||
DROP TABLE important;
|
DROP TABLE important;
|
||||||
|
DROP TABLE challenge;
|
|
@ -21,7 +21,10 @@ CREATE TABLE teachers (
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
lang VARCHAR,
|
lang VARCHAR,
|
||||||
name VARCHAR NOT NULL,
|
name VARCHAR NOT NULL,
|
||||||
emails VARCHAR NOT NULL
|
email VARCHAR NOT NULL,
|
||||||
|
phone VARCHAR NOT NULL,
|
||||||
|
position VARCHAR NOT NULL,
|
||||||
|
image VARCHAR
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE announcements (
|
CREATE TABLE announcements (
|
||||||
|
@ -51,14 +54,14 @@ CREATE TABLE lunch_events (
|
||||||
time TIME
|
time TIME
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE ssl_opps (
|
CREATE TABLE ssl_ops (
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
lang VARCHAR,
|
lang VARCHAR,
|
||||||
title VARCHAR NOT NULL,
|
title VARCHAR NOT NULL,
|
||||||
text VARCHAR NOT NULL,
|
text VARCHAR NOT NULL,
|
||||||
location VARCHAR NOT NULL,
|
location VARCHAR NOT NULL,
|
||||||
teacher VARCHAR NOT NULL,
|
teacher VARCHAR NOT NULL,
|
||||||
time TIME
|
date DATE
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE polls (
|
CREATE TABLE polls (
|
||||||
|
@ -75,9 +78,30 @@ CREATE TABLE new (
|
||||||
new_date DATE
|
new_date DATE
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE challenge (
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
lang VARCHAR,
|
||||||
|
title VARCHAR NOT NULL,
|
||||||
|
text VARCHAR NOT NULL,
|
||||||
|
link VARCHAR NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE student (
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
lang VARCHAR,
|
||||||
|
name VARCHAR NOT NULL,
|
||||||
|
image VARCHAR,
|
||||||
|
grade VARCHAR NOT NULL,
|
||||||
|
messages VARCHAR NOT NULL,
|
||||||
|
hobbies VARCHAR NOT NULL,
|
||||||
|
achievements VARCHAR NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE important (
|
CREATE TABLE important (
|
||||||
id SERIAL PRIMARY KEY,
|
id SERIAL PRIMARY KEY,
|
||||||
lang VARCHAR,
|
lang VARCHAR,
|
||||||
image VARCHAR,
|
image VARCHAR,
|
||||||
text VARCHAR NOT NULL
|
text VARCHAR NOT NULL
|
||||||
)
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,17 @@ pub mod defs {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api_route! {
|
||||||
|
student {
|
||||||
|
name: (Text, String, String),
|
||||||
|
image: (Text, String, Image),
|
||||||
|
grade: (Text, String, String),
|
||||||
|
messages: (Text, String, String),
|
||||||
|
hobbies: (Text, String, String),
|
||||||
|
achievements: (Text, String, String),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
api_route! {
|
api_route! {
|
||||||
events {
|
events {
|
||||||
title: (Text, String, String),
|
title: (Text, String, String),
|
||||||
|
@ -158,7 +169,10 @@ api_route! {
|
||||||
api_route! {
|
api_route! {
|
||||||
teachers {
|
teachers {
|
||||||
name: (Text, String, String),
|
name: (Text, String, String),
|
||||||
emails: (Text, String, String),
|
email: (Text, String, String),
|
||||||
|
phone: (Text, String, String)
|
||||||
|
position: (Text, String, String),
|
||||||
|
image: (Text, String, Image)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,15 +185,6 @@ api_route! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
api_route! {
|
|
||||||
student {
|
|
||||||
name: (Text, String, String),
|
|
||||||
meeting: (Text, String, String),
|
|
||||||
link: (Text, String, String),
|
|
||||||
sponsor: (Text, String, String),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
api_route! {
|
api_route! {
|
||||||
clubs {
|
clubs {
|
||||||
name: (Text, String, String),
|
name: (Text, String, String),
|
||||||
|
@ -228,9 +233,18 @@ api_route! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api_route! {
|
||||||
|
challenge {
|
||||||
|
title: (Text, String, String),
|
||||||
|
text: (Text, String, String),
|
||||||
|
link: (Text, String, String),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
api_route! {
|
api_route! {
|
||||||
important {
|
important {
|
||||||
image: (Text, String, Image),
|
image: (Text, String, Image),
|
||||||
text: (Text, String, String),
|
text: (Text, String, String),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ fn rocket(port: u16, address: String, env: Environment, pg: PgConnection, sa: Se
|
||||||
routes![home, home_not_logged_in, login, auth::callback, auth::oauth, static_files],
|
routes![home, home_not_logged_in, login, auth::callback, auth::oauth, static_files],
|
||||||
)
|
)
|
||||||
.mount("/api", routes![
|
.mount("/api", routes![
|
||||||
|
data::student::api,
|
||||||
data::events::api,
|
data::events::api,
|
||||||
data::teachers::api,
|
data::teachers::api,
|
||||||
data::announcements::api,
|
data::announcements::api,
|
||||||
|
@ -85,15 +86,16 @@ fn rocket(port: u16, address: String, env: Environment, pg: PgConnection, sa: Se
|
||||||
data::calendar::api,
|
data::calendar::api,
|
||||||
data::polls::api,
|
data::polls::api,
|
||||||
data::new::api,
|
data::new::api,
|
||||||
data::important::api
|
data::important::api,
|
||||||
|
data::challenge::api,
|
||||||
])
|
])
|
||||||
.mount(
|
.mount(
|
||||||
"/ui",
|
"/ui",
|
||||||
routes![
|
routes![
|
||||||
data::events::eui, data::teachers::eui, data::announcements::eui, data::clubs::eui, data::lunch_events::eui, data::ssl_ops::eui, data::calendar::eui, data::polls::eui, data::new::eui, data::important::eui,
|
data::student::eui, data::events::eui, data::teachers::eui, data::announcements::eui, data::clubs::eui, data::lunch_events::eui, data::ssl_ops::eui, data::calendar::eui, data::polls::eui, data::new::eui, data::challenge::eui, data::important::eui,
|
||||||
data::events::upd, data::teachers::upd, data::announcements::upd, data::clubs::upd, data::lunch_events::upd, data::ssl_ops::upd, data::calendar::upd, data::polls::upd, data::new::upd, data::important::upd,
|
data::student::upd, data::events::upd, data::teachers::upd, data::announcements::upd, data::clubs::upd, data::lunch_events::upd, data::ssl_ops::upd, data::calendar::upd, data::polls::upd, data::new::upd, data::challenge::upd, data::important::upd,
|
||||||
data::events::del, data::teachers::del, data::announcements::del, data::clubs::del, data::lunch_events::del, data::ssl_ops::del, data::calendar::del, data::polls::del, data::new::del, data::important::del,
|
data::student::del, data::events::del, data::teachers::del, data::announcements::del, data::clubs::del, data::lunch_events::del, data::ssl_ops::del, data::calendar::del, data::polls::del, data::new::del, data::challenge::del, data::important::del,
|
||||||
data::events::add, data::teachers::add, data::announcements::add, data::clubs::add, data::lunch_events::add, data::ssl_ops::add, data::calendar::add, data::polls::add, data::new::add, data::important::add,
|
data::student::add, data::events::add, data::teachers::add, data::announcements::add, data::clubs::add, data::lunch_events::add, data::ssl_ops::add, data::calendar::add, data::polls::add, data::new::add, data::challenge::add, data::important::add,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,15 +45,15 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<h2 style="font-size: 20px;">Add Event</h2>
|
<h2 style="font-size: 20px;">Add Announcement</h2>
|
||||||
<form action="announcements/add" method="post">
|
<form action="announcements/add" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Date</p>
|
<p class="my-0">Date of Submission</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="date" name="date">
|
<input type="text" class="form-control form-control-sm" id="date" name="date">
|
||||||
|
@ -98,11 +98,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<h2 style="font-size: 20px;">Update Event</h2>
|
<h2 style="font-size: 20px;">Update Announcement</h2>
|
||||||
<form action="anouncements/upd" method="post">
|
<form action="announcements/upd" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">ID of event to update</p>
|
<p class="my-0">ID of announcement to update</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
@ -111,11 +111,11 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Date</p>
|
<p class="my-0">Date of Submission</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="date" name="date">
|
<input type="text" class="form-control form-control-sm" id="date" name="date">
|
||||||
|
@ -154,15 +154,6 @@
|
||||||
<input type="text" class="form-control form-control-sm" id="time" name="time">
|
<input type="text" class="form-control form-control-sm" id="time" name="time">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Teacher/Organizer Email</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="emails" name="emails">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="submit", value="Submit">
|
<input type="submit", value="Submit">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
148
cms/templates/challenge.html.hbs
Normal file
148
cms/templates/challenge.html.hbs
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
{{! vim: set ft=html: }}
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-md p-3" style="">
|
||||||
|
<h2 style="font-size: 24px; font-weight: bold">
|
||||||
|
Admin Panel
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-md d-flex gap-4" style="">
|
||||||
|
<!-- announcements list -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Challenge of the Week</h1>
|
||||||
|
|
||||||
|
<div class="vstack gap-3 mt-4">
|
||||||
|
{{#each ctx}}
|
||||||
|
<div class="bg-light border rounded-3 p-2">
|
||||||
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
|
<h3 class="my-2" style="font-size: 18px;">{{title}}</h3>
|
||||||
|
<p class="mb-2">{{text}}</p>
|
||||||
|
<p class="mb-2">{{link}}</p>
|
||||||
|
<form action="challenge/del" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Delete">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- announcements actions -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">COTW Actions</h1>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Add Announcement</h2>
|
||||||
|
<form action="challenge/add" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Title</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Information</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="text" name="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Link to Challenge</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Update Challenge</h2>
|
||||||
|
<form action="challenge/upd" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">ID of challenge to update</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Title</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Information</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="text" name="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Link to Challenge</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit", value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -50,11 +50,11 @@
|
||||||
<form action="clubs/add" method="post">
|
<form action="clubs/add" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Meeting</p>
|
<p class="my-0">Meeting Date and Time</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Link</p>
|
<p class="my-0">Meeting Location</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<h2 style="font-size: 20px;">Update Club</h2>
|
<h2 style="font-size: 20px;">Update Club</h2>
|
||||||
<form action="anouncements/upd" method="post">
|
<form action="clubs/upd" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">ID of club to update</p>
|
<p class="my-0">ID of club to update</p>
|
||||||
|
@ -112,11 +112,11 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Meeting</p>
|
<p class="my-0">Meeting Date and Time</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Link</p>
|
<p class="my-0">Meeting Location</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
||||||
|
|
|
@ -50,11 +50,11 @@
|
||||||
<form action="events/add" method="post">
|
<form action="events/add" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -130,11 +130,11 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -6,5 +6,11 @@
|
||||||
<body>
|
<body>
|
||||||
<a href="/ui/events">Events</a>
|
<a href="/ui/events">Events</a>
|
||||||
<a href="/ui/new">New</a>
|
<a href="/ui/new">New</a>
|
||||||
|
<a href="/ui/announcements">Announcements</a>
|
||||||
|
<a href="/ui/clubs">Clubs</a>
|
||||||
|
<a href="/ui/lunch_events">Lunch Events</a>
|
||||||
|
<a href="/ui/polls">Polls</a>
|
||||||
|
<a href="/ui/ssl_ops">SSL Opportunities</a>
|
||||||
|
<a href="/ui/polls">Polls</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
167
cms/templates/important.html.hbs
Normal file
167
cms/templates/important.html.hbs
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
{{! vim: set ft=html: }}
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-md p-3" style="">
|
||||||
|
<h2 style="font-size: 24px; font-weight: bold">
|
||||||
|
Admin Panel
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-md d-flex gap-4" style="">
|
||||||
|
<!-- clubs list -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Important</h1>
|
||||||
|
|
||||||
|
<div class="vstack gap-3 mt-4">
|
||||||
|
{{#each ctx}}
|
||||||
|
<div class="bg-light border rounded-3 p-2">
|
||||||
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
|
<h3 class="my-2" style="font-size: 18px;">{{name}}</h3>
|
||||||
|
<p class="mb-2">{{meeting}}</p>
|
||||||
|
<p class="mb-2">{{link}}</p>
|
||||||
|
<p class="mt-2 mb-0">Sponsor: {{sponsor}}</p>
|
||||||
|
<form action="clubs/del" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Delete">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- clubs actions -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Clubs Actions</h1>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Add Club</h2>
|
||||||
|
<form action="clubs/add" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Lang</p>
|
||||||
|
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Name</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Meeting</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Link</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Sponsor</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="sponsor" name="sponsor">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Update Club</h2>
|
||||||
|
<form action="anouncements/upd" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">ID of club to update</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Lang</p>
|
||||||
|
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Name</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Meeting</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Link</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Sponsor</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="sponsor" name="sponsor">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit", value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
167
cms/templates/lunch_events.html.hbs
Normal file
167
cms/templates/lunch_events.html.hbs
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
{{! vim: set ft=html: }}
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-md p-3" style="">
|
||||||
|
<h2 style="font-size: 24px; font-weight: bold">
|
||||||
|
Admin Panel
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-md d-flex gap-4" style="">
|
||||||
|
<!-- lunch events list -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Lunch Events</h1>
|
||||||
|
|
||||||
|
<div class="vstack gap-3 mt-4">
|
||||||
|
{{#each ctx}}
|
||||||
|
<div class="bg-light border rounded-3 p-2">
|
||||||
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
|
<h3 class="my-2" style="font-size: 18px;">{{title}}</h3>
|
||||||
|
<p class="mb-2">{{text}}</p>
|
||||||
|
<p class="mb-2">{{location}}</p>
|
||||||
|
<p class="mt-2 mb-0">{{time}}</p>
|
||||||
|
<form action="clubs/del" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Delete">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- clubs actions -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Lunch Events Actions</h1>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Add Lunch Event</h2>
|
||||||
|
<form action="lunch_events/add" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Title</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Information</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="text" name="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Location</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="location" name="location">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Time of event</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="time" name="time">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Update Lunch Event</h2>
|
||||||
|
<form action="lunch_events/upd" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">ID of lunch event to update</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Title</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Information</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="text" name="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Location</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="location" name="location">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Time of event</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="time" name="time">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit", value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -24,10 +24,7 @@
|
||||||
{{#each ctx}}
|
{{#each ctx}}
|
||||||
<div class="bg-light border rounded-3 p-2">
|
<div class="bg-light border rounded-3 p-2">
|
||||||
<small>ID: {{id}} | LANG: {{lang}}</small>
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
<h3 class="my-2" style="font-size: 18px;">{{url}}</h3>
|
<h3 class="my-2" style="font-size: 18px;">Poll: {{url}}</h3>
|
||||||
<p class="mb-2">{{meeting}}</p>
|
|
||||||
<p class="mb-2">{{link}}</p>
|
|
||||||
<p class="mt-2 mb-0">Sponsor: {{sponsor}}</p>
|
|
||||||
<form action="polls/del" method="post">
|
<form action="polls/del" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
@ -46,51 +43,24 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<h2 style="font-size: 20px;">Add Club</h2>
|
<h2 style="font-size: 20px;">Add Poll</h2>
|
||||||
<form action="polls/add" method="post">
|
<form action="polls/add" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Name</p>
|
<p class="my-0">URL of poll</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
<input type="text" class="form-control form-control-sm" id="url" name="url">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Meeting</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Link</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Sponsor</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="sponsor" name="sponsor">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -99,11 +69,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-4">
|
<div class="my-4">
|
||||||
<h2 style="font-size: 20px;">Update Club</h2>
|
<h2 style="font-size: 20px;">Update Poll</h2>
|
||||||
<form action="anouncements/upd" method="post">
|
<form action="polls/upd" method="post">
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">ID of club to update</p>
|
<p class="my-0">ID of Poll to update</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
@ -112,47 +82,20 @@
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Lang</p>
|
<select name="lang", id="lang">
|
||||||
<label for="lang" class="form-label"><small>'en' for English, 'es' for Spanish</small></label>
|
<option value="" disabled selected>Select Language</option>
|
||||||
</div>
|
<option value="en">English</option>
|
||||||
<div style="flex: 1; align: center;">
|
<option value="es">Spanish</option>
|
||||||
<input type="text" class="form-control form-control-sm" id="lang" name="lang">
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
<div class="d-flex mt-3">
|
||||||
<div style="flex: 1; justify-content: center;">
|
<div style="flex: 1; justify-content: center;">
|
||||||
<p class="my-0">Name</p>
|
<p class="my-0">URL of poll</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1; align: center;">
|
<div style="flex: 1; align: center;">
|
||||||
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
<input type="text" class="form-control form-control-sm" id="url" name="url">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Meeting</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="meeting" name="meeting">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Link</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="link" name="link">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mt-3">
|
|
||||||
<div style="flex: 1; justify-content: center;">
|
|
||||||
<p class="my-0">Sponsor</p>
|
|
||||||
</div>
|
|
||||||
<div style="flex: 1; align: center;">
|
|
||||||
<input type="text" class="form-control form-control-sm" id="sponsor" name="sponsor">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
185
cms/templates/ssl_ops.html.hbs
Normal file
185
cms/templates/ssl_ops.html.hbs
Normal file
|
@ -0,0 +1,185 @@
|
||||||
|
{{! vim: set ft=html: }}
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-md p-3" style="">
|
||||||
|
<h2 style="font-size: 24px; font-weight: bold">
|
||||||
|
Admin Panel
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-md d-flex gap-4" style="">
|
||||||
|
<!-- clubs list -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">SSL Opportunities</h1>
|
||||||
|
|
||||||
|
<div class="vstack gap-3 mt-4">
|
||||||
|
{{#each ctx}}
|
||||||
|
<div class="bg-light border rounded-3 p-2">
|
||||||
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
|
<h3 class="my-2" style="font-size: 18px;">{{name}}</h3>
|
||||||
|
<p class="mb-2">{{meeting}}</p>
|
||||||
|
<p class="mb-2">{{link}}</p>
|
||||||
|
<p class="mt-2 mb-0">Sponsor: {{sponsor}}</p>
|
||||||
|
<form action="clubs/del" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Delete">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- clubs actions -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">SSL Opps Actions</h1>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Add SSL Op</h2>
|
||||||
|
<form action="ssl_ops/add" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Title</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Information</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="text" name="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Location</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="location" name="location">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Organizer</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="teacher" name="teacher">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Date of Event</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="date" name="date">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Update SSL Opps</h2>
|
||||||
|
<form action="ssl_ops/upd" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">ID of club to update</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Title</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Information</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="text" name="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Location</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="location" name="location">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Organizer</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="teacher" name="teacher">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Date of Event</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="date" name="date">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit", value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
204
cms/templates/student.html.hbs
Normal file
204
cms/templates/student.html.hbs
Normal file
|
@ -0,0 +1,204 @@
|
||||||
|
{{! vim: set ft=html: }}
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-md p-3" style="">
|
||||||
|
<h2 style="font-size: 24px; font-weight: bold">
|
||||||
|
Admin Panel
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-md d-flex gap-4" style="">
|
||||||
|
<!-- announcements list -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Student of the Week</h1>
|
||||||
|
|
||||||
|
<div class="vstack gap-3 mt-4">
|
||||||
|
{{#each ctx}}
|
||||||
|
<div class="bg-light border rounded-3 p-2">
|
||||||
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
|
<h3 class="my-2" style="font-size: 18px;">{{name}} | Grade {{grade}}</h3>
|
||||||
|
<p class="mb-2">{{image}}</p>
|
||||||
|
<p class="mb-2">Message: {{messages}}</p>
|
||||||
|
<p class="mb-2">Hobbies: {{hobbies}}</p>
|
||||||
|
<p class="mb-2">Achievements: {{achievements}}</p>
|
||||||
|
<form action="announcements/del" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Delete">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- announcements actions -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">SOTW Actions</h1>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Add SOTW</h2>
|
||||||
|
<form action="student/add" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Student Name</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Student Picture</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="file" name="image", id="image", accept="image/png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Grade</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="grade" name="grade">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Message</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="messages" name="messages">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Hobbies</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="hobbies" name="hobbies">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Achievements</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="achievements" name="achievements">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Update SOTW</h2>
|
||||||
|
<form action="student/upd" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">ID of SOTW to update</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Student Name</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Student Picture</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="file" name="image", id="image", accept="image/png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Grade</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="grade" name="grade">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Message</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="messages" name="messages">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Hobbies</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="hobbies" name="hobbies">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Achievements</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="achievements" name="achievements">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit", value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
185
cms/templates/teachers.html.hbs
Normal file
185
cms/templates/teachers.html.hbs
Normal file
|
@ -0,0 +1,185 @@
|
||||||
|
{{! vim: set ft=html: }}
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="/static/style.css">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container-md p-3" style="">
|
||||||
|
<h2 style="font-size: 24px; font-weight: bold">
|
||||||
|
Admin Panel
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container-md d-flex gap-4" style="">
|
||||||
|
<!-- clubs list -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Staff</h1>
|
||||||
|
|
||||||
|
<div class="vstack gap-3 mt-4">
|
||||||
|
{{#each ctx}}
|
||||||
|
<div class="bg-light border rounded-3 p-2">
|
||||||
|
<small>ID: {{id}} | LANG: {{lang}}</small>
|
||||||
|
<h3 class="my-2" style="font-size: 18px;">{{name}}</h3>
|
||||||
|
<p class="mb-2">{{meeting}}</p>
|
||||||
|
<p class="mb-2">{{link}}</p>
|
||||||
|
<p class="mt-2 mb-0">Sponsor: {{sponsor}}</p>
|
||||||
|
<form action="teachers/del" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
|
||||||
|
</div>
|
||||||
|
<input type="submit" value="Delete">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- clubs actions -->
|
||||||
|
<div class="p-3" style="flex: 1;">
|
||||||
|
<h1 style="font-size: 28px;">Staff Actions</h1>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Add Staff</h2>
|
||||||
|
<form action="teachers/add" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Name</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Email</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="email" name="email">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Phone</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="phone" name="phone">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Position</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="position" name="position">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Staff Picture</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="file" name="image", id="image", accept="image/png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="my-4">
|
||||||
|
<h2 style="font-size: 20px;">Update Staff</h2>
|
||||||
|
<form action="teachers/upd" method="post">
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">ID of staff to update</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="number" class="form-control form-control-sm" id="id" name="id">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<select name="lang", id="lang">
|
||||||
|
<option value="" disabled selected>Select Language</option>
|
||||||
|
<option value="en">English</option>
|
||||||
|
<option value="es">Spanish</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Name</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="name" name="name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Email</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="email" name="email">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Phone</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="phone" name="phone">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Position</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="text" class="form-control form-control-sm" id="position" name="position">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex mt-3">
|
||||||
|
<div style="flex: 1; justify-content: center;">
|
||||||
|
<p class="my-0">Staff Picture</p>
|
||||||
|
</div>
|
||||||
|
<div style="flex: 1; align: center;">
|
||||||
|
<input type="file" name="image", id="image", accept="image/png">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit", value="Submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user