diff --git a/apps/news/models.py b/apps/news/models.py index 1495574..d254e9d 100644 --- a/apps/news/models.py +++ b/apps/news/models.py @@ -3,6 +3,7 @@ # Create your models here. TYPES = [ + ('ongoing event', 'ongoing'), ('upcoming event', 'upcoming'), ('app update', 'app'), ('online competition', 'online'), diff --git a/apps/projects/views.py b/apps/projects/views.py index fb31840..97cae27 100644 --- a/apps/projects/views.py +++ b/apps/projects/views.py @@ -20,7 +20,7 @@ def get_projects(request): """ Get a list of projects """ - projects = Project.objects.filter(is_visible=True).order_by('title') + projects = Project.objects.filter(is_visible=True) serializer = ProjectSerializer( projects, many=True, context={'request': request}) response_data = serializer.data diff --git a/frontend/.gitignore b/frontend/.gitignore index 185e663..a62e7fa 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -19,3 +19,6 @@ yarn-error.log* *.njsproj *.sln *.sw* + +# Misc files +/src/config/config.js \ No newline at end of file diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9c28e60..48c78af 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -3151,6 +3151,15 @@ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", "dev": true }, + "cookies": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.3.tgz", + "integrity": "sha512-+gixgxYSgQLTaTIilDHAdlNPZDENDQernEMiIcZpYYP14zgHsCt4Ce1FEjFtcp6GefhozebB6orvhAAWx/IS0A==", + "requires": { + "depd": "~1.1.2", + "keygrip": "~1.0.3" + } + }, "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", @@ -3958,8 +3967,7 @@ "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "des.js": { "version": "1.0.0", @@ -7134,6 +7142,11 @@ "integrity": "sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==", "dev": true }, + "js-cookie": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", + "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==" + }, "js-levenshtein": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", @@ -7249,6 +7262,11 @@ "verror": "1.10.0" } }, + "keygrip": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.3.tgz", + "integrity": "sha512-/PpesirAIfaklxUzp4Yb7xBper9MwP6hNRA6BGGUFCgbJ+BM5CKBtsoxinNXkLHAr+GXS1/lSlF2rP7cv5Fl+g==" + }, "killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index 4fd1544..874c945 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,6 +9,8 @@ }, "dependencies": { "axios": "^0.18.1", + "cookies": "^0.7.3", + "js-cookie": "^2.2.1", "masonry-layout": "^4.2.2", "vue": "^2.5.17", "vue-carousel": "^0.18.0", diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico deleted file mode 100644 index f9e3fab..0000000 Binary files a/frontend/public/favicon.ico and /dev/null differ diff --git a/frontend/public/index.html b/frontend/public/index.html index eb18666..7e6bb02 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -4,7 +4,9 @@ - + + + SDSLabs diff --git a/frontend/public/sdslabs.png b/frontend/public/sdslabs.png new file mode 100644 index 0000000..5fbf268 Binary files /dev/null and b/frontend/public/sdslabs.png differ diff --git a/frontend/src/assets/images/logo-square.svg b/frontend/src/assets/images/logo-square.svg new file mode 100755 index 0000000..9badaa8 --- /dev/null +++ b/frontend/src/assets/images/logo-square.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/assets/images/scroll-arrow-left.svg b/frontend/src/assets/images/scroll-arrow-left.svg new file mode 100644 index 0000000..d73dd1e --- /dev/null +++ b/frontend/src/assets/images/scroll-arrow-left.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/assets/images/scroll-arrow.svg b/frontend/src/assets/images/scroll-arrow-right.svg similarity index 100% rename from frontend/src/assets/images/scroll-arrow.svg rename to frontend/src/assets/images/scroll-arrow-right.svg diff --git a/frontend/src/components/Button.vue b/frontend/src/components/Button.vue index e209788..695b4b9 100644 --- a/frontend/src/components/Button.vue +++ b/frontend/src/components/Button.vue @@ -2,6 +2,7 @@ diff --git a/frontend/src/components/Footer.vue b/frontend/src/components/Footer.vue index 797f84e..f34e9f9 100644 --- a/frontend/src/components/Footer.vue +++ b/frontend/src/components/Footer.vue @@ -19,7 +19,7 @@
diff --git a/frontend/src/components/Gallery.vue b/frontend/src/components/Gallery.vue index 342afe9..568d8e1 100644 --- a/frontend/src/components/Gallery.vue +++ b/frontend/src/components/Gallery.vue @@ -22,7 +22,7 @@
- -
+
--> +
@@ -79,14 +81,18 @@ diff --git a/frontend/src/components/Project.vue b/frontend/src/components/Project.vue index 0e468cc..9535a9d 100644 --- a/frontend/src/components/Project.vue +++ b/frontend/src/components/Project.vue @@ -18,7 +18,7 @@
-
+
+.image { + align-items: center; +} + diff --git a/frontend/src/components/Sidebar.vue b/frontend/src/components/Sidebar.vue index 18931ce..03ae760 100644 --- a/frontend/src/components/Sidebar.vue +++ b/frontend/src/components/Sidebar.vue @@ -15,6 +15,7 @@ diff --git a/frontend/src/components/about/SisterGallery.vue b/frontend/src/components/about/SisterGallery.vue index fa452bd..2db1632 100644 --- a/frontend/src/components/about/SisterGallery.vue +++ b/frontend/src/components/about/SisterGallery.vue @@ -19,7 +19,13 @@
@@ -42,18 +48,21 @@ export default { return { slides: [ { + website: "https://dsgiitr.com", image: dsg, title: "DATA SCIENCE GROUP", description: "As a part of SDS, this group aims at improving the culture of Data Science and Machine Learning in IIT Roorkee." }, { + website: "https://www.facebook.com/groups/sdspag", image: pag, title: "PROGRAMMING & ALGORITHMS GROUP", description: "A bunch of competetive programming enthusiasts, PAG, frequently organizes coding lectures and contests for IITR people." }, { + website: "https://infoseciitr.in", image: infosec, title: "INFOSECIITR", description: diff --git a/frontend/src/components/navbar/NavLink.vue b/frontend/src/components/navbar/NavLink.vue index 669abf8..172b809 100644 --- a/frontend/src/components/navbar/NavLink.vue +++ b/frontend/src/components/navbar/NavLink.vue @@ -6,7 +6,9 @@ class="no-underline block mt-8 sm:inline-block sm:mt-0" target="_blank" > - {{ text }} + {{ + text + }} - {{ text }} + {{ + text + }} diff --git a/frontend/src/components/navbar/NavMobile.vue b/frontend/src/components/navbar/NavMobile.vue index 70784ac..584e061 100644 --- a/frontend/src/components/navbar/NavMobile.vue +++ b/frontend/src/components/navbar/NavMobile.vue @@ -20,7 +20,7 @@
-
+
diff --git a/frontend/src/components/navbar/User.vue b/frontend/src/components/navbar/User.vue new file mode 100644 index 0000000..9cf4d92 --- /dev/null +++ b/frontend/src/components/navbar/User.vue @@ -0,0 +1,74 @@ + + + diff --git a/frontend/src/config/config.sample.js b/frontend/src/config/config.sample.js new file mode 100644 index 0000000..680684f --- /dev/null +++ b/frontend/src/config/config.sample.js @@ -0,0 +1,17 @@ +export const config = { + client: { + id: "", + secret: "" + }, + auth: { + tokenHost: "http://falcon.sdslabs.local", + tokenPath: "http://falcon.sdslabs.local/access_token", + authorizePath: "http://falcon.sdslabs.local/authorize" + }, + scopes: ["email", "image_url", "organizations"], + user: { + url_resource_owner_details: "http://falcon.sdslabs.local/users", + redirect_url: "", + accounts_url: "http://arceus.sdslabs.local" + } +}; diff --git a/frontend/src/mutation-types.js b/frontend/src/mutation-types.js new file mode 100644 index 0000000..9fcd790 --- /dev/null +++ b/frontend/src/mutation-types.js @@ -0,0 +1,3 @@ +export const TOGGLE_USER = "TOGGLE_USER"; +export const CLOSE_USER = "CLOSE_USER"; +export const LOGOUT = "LOGOUT"; diff --git a/frontend/src/store.js b/frontend/src/store.js index 5c73fda..2ed3d91 100644 --- a/frontend/src/store.js +++ b/frontend/src/store.js @@ -1,10 +1,29 @@ import Vue from "vue"; import Vuex from "vuex"; +import { TOGGLE_USER, CLOSE_USER, LOGOUT } from "./mutation-types"; Vue.use(Vuex); export default new Vuex.Store({ - state: {}, - mutations: {}, - actions: {} + state: { + login: true, + user: false + }, + mutations: { + [TOGGLE_USER](state) { + state.user = !state.user; + }, + [CLOSE_USER](state) { + if (state.user) state.user = false; + } + }, + actions: { + [LOGOUT]({ state }) { + state.login = false; + state.user = false; + // const cookieRemoveString = + // "sdslabs= ; expires = Thu, 01 Jan 1970 00:00:00 GMT; Domain=.sdslabs.co; path=/;"; + // document.cookie = cookieRemoveString; + } + } }); diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index c23d089..2df4222 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -1,5 +1,5 @@ export const CONFIG = { - baseURL: "http://0.0.0.0:8000", + baseURL: "https://portfolio-backend.sdslabs.co", colors: ["blue", "red", "green", "yellow", "purple", "orange"], mobileSize: 576 }; diff --git a/frontend/src/views/About.vue b/frontend/src/views/About.vue index 25ffae6..c9be5b8 100644 --- a/frontend/src/views/About.vue +++ b/frontend/src/views/About.vue @@ -1,5 +1,8 @@