Compare commits
	
		
			No commits in common. "master" and "neon-mini-redesign" have entirely different histories.
		
	
	
		
			master
			...
			neon-mini-
		
	
		
|  | @ -1,44 +0,0 @@ | |||
| name: Deploy Wishlist | ||||
| on: | ||||
|   push: | ||||
|     branches: [ master ] | ||||
|      | ||||
| env: | ||||
|   DEPLOY_DIR: ${{ secrets.DEPLOY_DIR }} | ||||
| 
 | ||||
| jobs: | ||||
|   deploy: | ||||
|     runs-on: ubuntu | ||||
|     steps: | ||||
|       - name: Checkout code | ||||
|         uses: actions/checkout@v3 | ||||
|          | ||||
|       - name: Create .env file from secrets | ||||
|         run: |  | ||||
|           echo "$ENV_PROD" > .env | ||||
|           if [ ! -s .env ]; then | ||||
|             echo "Error: .env file is empty!" | ||||
|             exit 1 | ||||
|           fi | ||||
|         env: | ||||
|           ENV_PROD: ${{ secrets.ENV_PROD }} | ||||
| 
 | ||||
|       - name: Install PHP dependencies | ||||
|         run: composer install | ||||
| 
 | ||||
|       - name: Install Node.js dependencies | ||||
|         run: npm i | ||||
| 
 | ||||
|       - name: Build assets | ||||
|         run: npm run build | ||||
|          | ||||
|       - name: Copy files to deployment directory | ||||
|         run: |  | ||||
|           chmod -R 777 ./ | ||||
|           sudo rsync -av ./ ${DEPLOY_DIR}/ | ||||
| 
 | ||||
|       - name: Restart PHP service | ||||
|         run: sudo systemctl restart php8.2-fpm | ||||
| 
 | ||||
|       - name: Restart Nginx | ||||
|         run: sudo systemctl restart nginx | ||||
|  | @ -17,5 +17,3 @@ yarn-error.log | |||
| /.fleet | ||||
| /.idea | ||||
| /.vscode | ||||
| composer.lock | ||||
| package-lock.json | ||||
|  |  | |||
|  | @ -1,15 +0,0 @@ | |||
| <?php | ||||
| 
 | ||||
| namespace App\Http\Controllers; | ||||
| 
 | ||||
| use App\Models\ServicesLink; | ||||
| use Illuminate\Http\Request; | ||||
| 
 | ||||
| class ServiceLinksController extends Controller | ||||
| { | ||||
|     public function index() | ||||
|     { | ||||
|         $links = new ServicesLink(); | ||||
|         return $links->all(); | ||||
|     } | ||||
| } | ||||
|  | @ -1,11 +0,0 @@ | |||
| <?php | ||||
| 
 | ||||
| namespace App\Models; | ||||
| 
 | ||||
| use Illuminate\Database\Eloquent\Factories\HasFactory; | ||||
| use Illuminate\Database\Eloquent\Model; | ||||
| 
 | ||||
| class ServicesLink extends Model | ||||
| { | ||||
|     use HasFactory; | ||||
| } | ||||
|  | @ -1,29 +0,0 @@ | |||
| <?php | ||||
| 
 | ||||
| use Illuminate\Database\Migrations\Migration; | ||||
| use Illuminate\Database\Schema\Blueprint; | ||||
| use Illuminate\Support\Facades\Schema; | ||||
| 
 | ||||
| return new class extends Migration | ||||
| { | ||||
|     /** | ||||
|      * Run the migrations. | ||||
|      */ | ||||
|     public function up(): void | ||||
|     { | ||||
|         Schema::create('services_links', function (Blueprint $table) { | ||||
|             $table->id(); | ||||
|             $table->string('name', 255); | ||||
|             $table->string('link', 255); | ||||
|             $table->timestamps(); | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Reverse the migrations. | ||||
|      */ | ||||
|     public function down(): void | ||||
|     { | ||||
|         Schema::dropIfExists('services_links'); | ||||
|     } | ||||
| }; | ||||
|  | @ -1,18 +0,0 @@ | |||
| import './js/bootstrap'; | ||||
| import { createApp } from 'vue' | ||||
| import { createPinia } from 'pinia' | ||||
| import App from './views/ServiceLinks/ServicesLinks.vue' | ||||
| import { createVuetify } from 'vuetify' | ||||
| import 'vuetify/styles' | ||||
| import * as components from 'vuetify/components' | ||||
| import * as directives from 'vuetify/directives' | ||||
| import '@mdi/font/css/materialdesignicons.css' | ||||
| 
 | ||||
| const pinia = createPinia(); | ||||
| 
 | ||||
| const vuetify = createVuetify({ | ||||
|     components, | ||||
|     directives | ||||
| }); | ||||
| 
 | ||||
| createApp(App).use(vuetify).use(pinia).mount("#app"); | ||||
|  | @ -1,21 +0,0 @@ | |||
| import {defineStore} from "pinia"; | ||||
| import axios from "axios"; | ||||
| 
 | ||||
| export const useServicesList = defineStore('services_list', { | ||||
|     state: () => ({ | ||||
|         links: Object | ||||
|     }), | ||||
|     getters: { | ||||
| 
 | ||||
|     }, | ||||
|     actions: { | ||||
|         async getList(){ | ||||
|             await axios | ||||
|                 .get('/api/v1/services_list') | ||||
|                 .then((response) => { | ||||
|                     this.links = response.data; | ||||
|                 }); | ||||
|         } | ||||
| 
 | ||||
|     }, | ||||
| }) | ||||
|  | @ -24,7 +24,7 @@ | |||
| <template> | ||||
|     <div class="w-100 d-flex justify-center"> | ||||
|         <v-list class="bg-grey-darken-3" :class="isWide ? 'w-66' : 'w-100'"> | ||||
|             <v-skeleton-loader v-if="fetching" type="list-item" class="bg-grey-darken-3 ml-1 mr-3"/> | ||||
|             <v-skeleton-loader v-if="fetching" type="list-item" class="bg-grey-darken-3"/> | ||||
|             <v-list-item v-else class="bg-grey-darken-3 neon-border mt-6 mb-7 ml-7 mr-7" elevation="0" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" --> | ||||
|                 <template v-slot:prepend> | ||||
|                     <v-avatar class="mt-1 mb-1 ml-5" :image="link.image" rounded="0"></v-avatar> | ||||
|  |  | |||
|  | @ -29,8 +29,8 @@ | |||
| 
 | ||||
| <template> | ||||
|     <div class="w-100 d-flex justify-center mt-6 mb-6"> | ||||
|         <v-skeleton-loader v-if="fetching" type="table" class="bg-grey-darken-3 mr-3 ml-1"/> | ||||
|         <v-table v-else class="bg-grey-darken-3 neon-border pa-3 ml-1 mr-3 text-xl-h5 text-lg-h5 text-md-h5 text-sm-h5 text-body-2" :class="isWide ? 'w-66' : 'w-100'"> | ||||
|         <v-skeleton-loader v-if="fetching" type="table" class="bg-grey-darken-3"/> | ||||
|         <v-table v-else class="bg-grey-darken-3 neon-border pa-3 text-xl-h5 text-lg-h5 text-md-h5 text-sm-h5 text-body-2" :class="isWide ? 'w-66' : 'w-100'"> | ||||
|             <tbody> | ||||
|             <tr v-for="schedule in schedules"> | ||||
|                 <td>{{ parseDate(schedule.current_date) }} {{ schedule.weekday_name }} {{ schedule.stream_time }}</td> | ||||
|  |  | |||
|  | @ -1,86 +0,0 @@ | |||
| <script> | ||||
| 
 | ||||
| import {ref} from "vue"; | ||||
| import {useServicesList} from "../../stores/services_list.js"; | ||||
| 
 | ||||
| export default { | ||||
|     name: "ServicesLinks", | ||||
|     data: () => ({ | ||||
|         links: ref([]), | ||||
|         servicesListStore: useServicesList(), | ||||
|         fetching: true, | ||||
|         windowHeight: document.documentElement.clientHeight, | ||||
|         windowWidth: document.documentElement.clientWidth, | ||||
|         isWide: window.innerWidth >= 654 | ||||
|     }), | ||||
|     mounted() { | ||||
|         this.fetching = true; | ||||
|         this.servicesListStore.getList().then(()=>{ | ||||
|             this.links = this.servicesListStore.links; | ||||
|             this.fetching = false; | ||||
|         }); | ||||
|         this.myEventHandler(); | ||||
|         window.addEventListener("resize", this.myEventHandler, { passive: true }); | ||||
|     }, | ||||
|     methods: { | ||||
|         myEventHandler(e) { | ||||
|             this.windowHeight = document.documentElement.clientHeight; | ||||
|             this.windowWidth = document.documentElement.clientWidth; | ||||
|             this.isWide = this.windowWidth >= 654; | ||||
|         } | ||||
|     }, | ||||
|     created() { | ||||
|         window.addEventListener("resize", this.myEventHandler); | ||||
|     }, | ||||
| } | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|     <v-app> | ||||
|         <v-sheet class="bg-gradient h-100 w-100 d-flex justify-center"> | ||||
|             <v-sheet class="bg-grey-darken-3 mt-5 mb-5 rounded-lg w-75 pl-3 pr-3"> | ||||
|                 <p class="text-xl-h3 text-lg-h3 text-md-h4 text-sm-h4 text-h5 text-center pt-3">Список сервисов и страниц</p> | ||||
|                 <v-skeleton-loader v-if="fetching" class="bg-grey-darken-3" type="card"/> | ||||
|                 <div class="pt-5 h-100" v-else> | ||||
|                     <v-row class="ma-0" v-for="n in Math.ceil(links.length / 3)" v-if="isWide"> | ||||
|                         <v-col class="d-flex justify-center align-center w-33" v-for="j in 3"> | ||||
|                             <v-btn v-if="links[(n - 1) * 3 + j - 1]" class="w-100 h-100 pa-5 text-white mt-5 mb-5 bg-btn text-center" :href="links[(n - 1) * 3 + j - 1].link" target="_blank"> | ||||
|                                 <template v-slot:default> | ||||
|                                     <span class="txt-wrap">{{ links[(n - 1) * 3 + j - 1].name }}</span> | ||||
|                                 </template> | ||||
|                             </v-btn> | ||||
|                         </v-col> | ||||
|                     </v-row> | ||||
|                     <div v-else class="ma-0"> | ||||
|                         <v-btn class="w-100 h-100 pa-5 text-white mt-5 mb-5 bg-btn text-center" v-for="link in links" :href="link.link" target="_blank"> | ||||
|                             <template v-slot:default> | ||||
|                                 <span class="txt-wrap">{{ link.name }}</span> | ||||
|                             </template> | ||||
|                         </v-btn> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </v-sheet> | ||||
|         </v-sheet> | ||||
|     </v-app> | ||||
| </template> | ||||
| 
 | ||||
| <style scoped> | ||||
| .bg-gradient { | ||||
|     --s: 50px; /* control the size */ | ||||
| 
 | ||||
|     --c: #E08E79 0 25%,#774F38 0 50%,#0000 0; | ||||
|     background: | ||||
|         conic-gradient(from 180deg,var(--c)) | ||||
|         0/var(--s) var(--s), | ||||
|         repeating-conic-gradient(from 90deg,var(--c)) | ||||
|         0/calc(3*var(--s)) calc(3*var(--s)) | ||||
| } | ||||
| 
 | ||||
| .bg-btn { | ||||
|     background-color: #E08E79 | ||||
| } | ||||
| 
 | ||||
| .txt-wrap { | ||||
|     white-space: wrap!important; | ||||
| } | ||||
| </style> | ||||
|  | @ -1,13 +0,0 @@ | |||
| <!DOCTYPE html> | ||||
| <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | ||||
|     <head> | ||||
|         <meta charset="utf-8"> | ||||
|         <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|         <title>Services Links</title> | ||||
|         @vite('resources/service_links.js') | ||||
|         @vite('resources/css/app.css') | ||||
|     </head> | ||||
|     <body class="antialiased"> | ||||
|         <div id="app"></div> | ||||
|     </body> | ||||
| </html> | ||||
|  | @ -20,4 +20,3 @@ | |||
| Route::get('/dates', 'App\Http\Controllers\SchedulesController@mmDate')->name('dates'); | ||||
| Route::get('/phrases', 'App\Http\Controllers\BasyaPhrasesController@index')->name('phrases'); | ||||
| Route::post('/rating', 'App\Http\Controllers\RatingController@index')->name('rating'); | ||||
| Route::get('/services_list', 'App\Http\Controllers\ServiceLinksController@index')->name('services_list'); | ||||
|  |  | |||
|  | @ -14,10 +14,6 @@ | |||
| */ | ||||
| 
 | ||||
| Route::get('/', function () { | ||||
|     return view('ServiceLinks/links'); | ||||
| }); | ||||
| 
 | ||||
| Route::get('/schedule', function () { | ||||
|     return view('welcome'); | ||||
| }); | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,8 +12,7 @@ export default defineConfig({ | |||
|                 'resources/welcome.js', | ||||
|                 'resources/caesar.js', | ||||
|                 'resources/basya.js', | ||||
|                 'resources/friday.js', | ||||
|                 'resources/service_links.js' | ||||
|                 'resources/friday.js' | ||||
|             ], | ||||
|             refresh: true, | ||||
|         }), | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue