From a545d7d8b18eab99458b86d8daef6bca8fad0b2e Mon Sep 17 00:00:00 2001 From: Jai A Date: Sat, 3 Oct 2020 22:55:58 -0700 Subject: [PATCH] Add user context menu --- layouts/default.vue | 74 ++++++++++++++++++++++++++++++++++-- nuxt.config.js | 6 +-- pages/create/mod.vue | 11 ++++++ pages/dashboard/projects.vue | 41 ++++++-------------- 4 files changed, 95 insertions(+), 37 deletions(-) create mode 100644 pages/create/mod.vue diff --git a/layouts/default.vue b/layouts/default.vue index 62ffd9693..f3172c40b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -122,9 +122,8 @@
Modrinth is open source software. You may view the source code at - our GitHub Repository. + our + GitHub Repository.
@@ -138,9 +137,26 @@ >Log In
- avatar + avatar {{ this.$auth.user.username }}
+
@@ -412,6 +433,7 @@ export default { .avatar { img { + cursor: pointer; border-radius: 50%; height: 2rem; margin-right: 0.5rem; @@ -427,6 +449,50 @@ export default { background-color: var(--color-grey-1); margin-left: 2.5rem; } + + .user-actions-popup { + position: relative; + display: inline-block; + + .popup-inner { + width: 140px; + border: 2px var(--color-grey-2) solid; + background-color: var(--color-bg); + color: var(--color-grey-5); + font-size: 15px; + padding: 8px 0; + position: absolute; + z-index: 1; + margin-bottom: 20px; + bottom: 500%; + margin-left: -165px; + + hr { + color: var(--color-grey-2); + height: 1px; + } + p { + cursor: pointer; + padding: 8px; + margin: 0; + &:hover, + &:focus { + color: var(--color-text-inverted); + background-color: var(--color-brand); + } + } + } + .popup-inner::after { + content: ''; + position: absolute; + top: 100%; + right: 90%; + border-width: 7px; + border-style: solid; + border-color: var(--color-grey-2) transparent transparent + transparent; + } + } } } diff --git a/nuxt.config.js b/nuxt.config.js index e37de3352..6284e7b0d 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -27,12 +27,12 @@ export default { { hid: 'og-title', property: 'og:title', - content: 'Modrinth - Modern modding platform for all', + content: 'Open source modding platform', }, { hid: 'og-site-name', property: 'og:site_name', - content: 'Modrinth.com', + content: 'Modrinth', }, { hid: 'og-image', @@ -70,7 +70,7 @@ export default { { hid: 'twitter-title', property: 'twitter:title', - content: 'Modrinth.com', + content: 'Modrinth', }, ], link: [ diff --git a/pages/create/mod.vue b/pages/create/mod.vue new file mode 100644 index 000000000..436b2174a --- /dev/null +++ b/pages/create/mod.vue @@ -0,0 +1,11 @@ +
+

Create Mod

+
+ + + + + diff --git a/pages/dashboard/projects.vue b/pages/dashboard/projects.vue index 5c13c25f6..f9a25a9be 100644 --- a/pages/dashboard/projects.vue +++ b/pages/dashboard/projects.vue @@ -4,7 +4,9 @@

Mods

- + Create a new mod
@@ -40,35 +42,6 @@
- -
-

Modpacks

- -
- - - - - - - - - - - - - - - - - - - - - -
NameRoleStatusDownloadsLast updated
- - All of Fabric MiniContributorAbandoned357Apr 1, 2020
@@ -82,6 +55,14 @@ } } +.create-button { + margin: auto 0; + padding: 4px 20px; + border-radius: 5px; + color: var(--color-grey-5); + background-color: var(--color-grey-1); +} + table { background: var(--color-bg); border-collapse: collapse;